Skip to content

Commit

Permalink
Removing leak-check=all
Browse files Browse the repository at this point in the history
  • Loading branch information
maddeleine committed Oct 18, 2024
1 parent ac6ac5b commit 9add151
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ if (BUILD_TESTING)
# We only run this on OpenSSL 1.1.1 because there are hundreds of false positives in other libcryptos.
# Tracking issue: https://github.com/aws/s2n-tls/issues/4777
if ($ENV{S2N_LIBCRYPTO} MATCHES "openssl-1.1.1")
set(MEMORYCHECK_COMMAND_OPTIONS "${VALGRIND_DEFAULT} --run-libc-freeres=yes --errors-for-leak-kinds=all --show-leak-kinds=all")
set(MEMORYCHECK_COMMAND_OPTIONS "${VALGRIND_DEFAULT} --run-libc-freeres=yes --show-leak-kinds=all")
else()
set(MEMORYCHECK_COMMAND_OPTIONS "${VALGRIND_DEFAULT} --run-libc-freeres=no")
endif()
Expand Down
2 changes: 1 addition & 1 deletion codebuild/bin/test_exec_leak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ cc -Iapi build/detect_exec_leak_finish.c build/lib/libs2n.so -o build/bin/detect
valgrind_log_dir=valgrind_log_dir
for test_file in detect_exec_leak detect_exec_leak_finish; do
LD_LIBRARY_PATH="build/lib:$TARGET_LIBCRYPTO_PATH/lib:$LD_LIBRARY_PATH" S2N_VALGRIND=1 \
valgrind --leak-check=full --show-leak-kinds=all --errors-for-leak-kinds=all \
valgrind --leak-check=full --show-leak-kinds=all \
--run-libc-freeres=yes -q --gen-suppressions=all --track-fds=yes \
--leak-resolution=high --undef-value-errors=no --trace-children=yes \
--suppressions=tests/unit/valgrind.suppressions --log-file="build/$valgrind_log_dir/$test_file" \
Expand Down
1 change: 0 additions & 1 deletion tests/unit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ $(PEDANTIC_VALGRIND_TESTS)::
--num-callers=40 \
--undef-value-errors=no \
--show-leak-kinds=all \
--errors-for-leak-kinds=all \
--suppressions=valgrind.suppressions \
./$(@:.pedantic_valgrind=)

Expand Down
3 changes: 2 additions & 1 deletion tests/unit/s2n_fips_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ int main()
}
}

END_TEST();
EXPECT_SUCCESS(s2n_cleanup_final());
END_TEST_NO_INIT();
}
2 changes: 1 addition & 1 deletion tests/unit/s2n_fork_generation_number_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ static int s2n_test_case_pthread_atfork_cb(struct fgn_test_case *test_case)

EXPECT_EQUAL(s2n_unit_tests_common(test_case), S2N_SUCCESS);

EXPECT_SUCCESS(s2n_cleanup());
EXPECT_SUCCESS(s2n_cleanup_final());

return S2N_SUCCESS;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/s2n_random_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ static int s2n_random_test_case_default_cb(struct random_test_case *test_case)

EXPECT_EQUAL(s2n_common_tests(test_case), S2N_SUCCESS);

EXPECT_SUCCESS(s2n_cleanup());
EXPECT_SUCCESS(s2n_cleanup_final());

return EXIT_SUCCESS;
}
Expand Down
1 change: 1 addition & 0 deletions tests/unit/s2n_seccomp_handshake_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ int main(int argc, char **argv)
*
* An application using s2n-tls with seccomp would need to do the same.
*/
EXPECT_SUCCESS(s2n_enable_atexit());
EXPECT_SUCCESS(s2n_init());

/* No unexpected syscalls allowed beyond this point */
Expand Down

0 comments on commit 9add151

Please sign in to comment.