Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove unused benchmarks #4696

Merged
merged 4 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ tests/unit/*_test
tests/fuzz/*_test
tests/fuzz/*.txt
tests/fuzz/fuzz-*.log
tests/benchmark/*_benchmark
bin/s2nc
bin/s2nd
bin/policy
Expand Down
20 changes: 0 additions & 20 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -539,26 +539,6 @@ if (BUILD_TESTING)
target_compile_options(s2nd PRIVATE -flto)
endif()

if(BENCHMARK)
find_package(benchmark REQUIRED)
file(GLOB BENCHMARK_SRC "tests/benchmark/*.cc")
file(GLOB BENCHMARK_UTILS "tests/benchmark/utils/*.cc")
enable_language(CXX)
foreach(benchmark ${BENCHMARK_SRC})
string(REGEX REPLACE ".+\\/(.+)\\.cc" "\\1" benchmark_name ${benchmark})
add_executable(${benchmark_name} ${benchmark} "bin/echo.c" "bin/common.c" ${BENCHMARK_UTILS})
target_include_directories(${benchmark_name} PRIVATE api)
target_include_directories(${benchmark_name} PRIVATE tests)
target_link_libraries(${benchmark_name} PUBLIC ${PROJECT_NAME} testss2n benchmark::benchmark)

# Based off the flags in tests/benchmark/Makefile
target_compile_options(${benchmark_name} PRIVATE -pedantic -Wall -Werror -Wunused -Wcomment -Wchar-subscripts
-Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings -Wno-deprecated-declarations
-Wno-unknown-pragmas -Wformat-security -Wno-missing-braces -fvisibility=hidden -Wno-unreachable-code
-Wno-unused-but-set-variable)
endforeach(benchmark)
endif()

if (S2N_INTEG_TESTS)
find_package (Python3 COMPONENTS Interpreter Development)
file(GLOB integv2_test_files "${PROJECT_SOURCE_DIR}/tests/integrationv2/test_*.py")
Expand Down
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ fuzz-linux : export S2N_UNSAFE_FUZZING_MODE = 1
fuzz-linux : bin
$(MAKE) -C tests fuzz

.PHONY : benchmark
benchmark: bin
$(MAKE) -C tests benchmark

.PHONY : coverage
coverage: run-lcov run-genhtml

Expand Down
8 changes: 0 additions & 8 deletions codebuild/bin/install_default_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,3 @@ if [[ ! -x `which cmake` ]]; then
;;
esac
fi

if [[ "$TESTS" == "benchmark" || "$TESTS" == "ALL" ]]; then
if [[ ! -x "$GB_INSTALL_DIR/lib/libbenchmark.a" ]]; then
mkdir -p "$GB_INSTALL_DIR"||true
codebuild/bin/install_googlebenchmark.sh "$(mktemp -d)" "$GB_INSTALL_DIR" "$OS_NAME" > /dev/null ;
fi
fi

47 changes: 0 additions & 47 deletions codebuild/bin/install_googlebenchmark.sh

This file was deleted.

1 change: 0 additions & 1 deletion codebuild/bin/s2n_codebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ if [[ "$TESTS" == "ALL" || "$TESTS" == "crt" ]]; then ./codebuild/bin/build_aws_
if [[ "$TESTS" == "ALL" || "$TESTS" == "sharedandstatic" ]]; then ./codebuild/bin/test_install_shared_and_static.sh $(mktemp -d); fi
if [[ "$TESTS" == "ALL" || "$TESTS" == "dynamicload" ]]; then ./codebuild/bin/test_dynamic_load.sh $(mktemp -d); fi
if [[ "$TESTS" == "ALL" || "$TESTS" == "fuzz" ]]; then (make clean && make fuzz) ; fi
if [[ "$TESTS" == "ALL" || "$TESTS" == "benchmark" ]]; then (make clean && make benchmark) ; fi
if [[ "$TESTS" == "sawHMAC" ]] && [[ "$OS_NAME" == "linux" ]]; then make -C tests/saw/ tmp/verify_HMAC.log ; fi
if [[ "$TESTS" == "sawDRBG" ]]; then make -C tests/saw tmp/verify_drbg.log ; fi
if [[ "$TESTS" == "ALL" || "$TESTS" == "tls" ]]; then make -C tests/saw tmp/verify_handshake.log ; fi
Expand Down
1 change: 0 additions & 1 deletion docker-images/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ RUN set -eux; \
. codebuild/bin/s2n_setup_env.sh; \
export PATH=$TEST_DEPS_DIR/clang/bin:$PATH; \
TESTS=integrationv2 codebuild/bin/s2n_install_test_dependencies.sh; \
TESTS=benchmark codebuild/bin/s2n_install_test_dependencies.sh; \
TESTS=fuzz codebuild/bin/s2n_install_test_dependencies.sh; \
TESTS=unit BUILD_S2N=false S2N_LIBCRYPTO=openssl-1.0.2 codebuild/bin/install_default_dependencies.sh; \
TESTS=unit BUILD_S2N=false S2N_LIBCRYPTO=openssl-1.0.2-fips codebuild/bin/install_default_dependencies.sh; \
Expand Down
5 changes: 0 additions & 5 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ all: libs viz
${MAKE} -C unit
@echo "\033[1m ${COMPILE_INFO} \033[0;39m"

.PHONY : benchmark
benchmark: libs
${MAKE} -C benchmark

.PHONY : valgrind
valgrind: libs
${MAKE} -C unit valgrind
Expand Down Expand Up @@ -66,5 +62,4 @@ clean: decruft
${MAKE} -C fuzz clean
${MAKE} -C viz clean
${MAKE} -C saw decruft
${MAKE} -C benchmark decruft

51 changes: 0 additions & 51 deletions tests/benchmark/Makefile

This file was deleted.

91 changes: 0 additions & 91 deletions tests/benchmark/Readme.md

This file was deleted.

85 changes: 0 additions & 85 deletions tests/benchmark/s2n_base64_benchmark.cc

This file was deleted.

29 changes: 0 additions & 29 deletions tests/benchmark/s2n_negotiate_benchmark.cc

This file was deleted.

Loading
Loading