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

(#554) Fixes to get couple of tests running cleanly in ASAN-builds #555

Merged
merged 2 commits into from
Mar 22, 2023
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
25 changes: 25 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ function usage() {
echo "To run CI-regression tests : INCLUDE_SLOW_TESTS=true ./${Me}"
echo "To run nightly regression tests : RUN_NIGHTLY_TESTS=true ./${Me}"
echo "To run make build-and-test tests : RUN_MAKE_TESTS=true ./${Me}"
echo
echo "To run a smaller collection of slow running tests,
name the function that drives the test execution.
Examples:"
echo " INCLUDE_SLOW_TESTS=true ./test.sh run_btree_tests"
echo " INCLUDE_SLOW_TESTS=true ./test.sh run_splinter_functionality_tests"
echo " INCLUDE_SLOW_TESTS=true ./test.sh nightly_cache_perf_tests"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly unrelated change. I needed a way to quickly re-test batches of tests run by this script under ASAN build modes. So, added this new capability to run a set of tests w/o having to wait for full runs to complete to validate a fix.

}

# ##################################################################
Expand Down Expand Up @@ -743,6 +750,24 @@ fi

# ---- Rest of the coverage runs included in CI test runs ----

# ------------------------------------------------------------------------
# Fast-path execution support. You can invoke this script specifying the
# name of one of the functions to execute a specific set of tests. If the
# function takes arguments, pass them on the command-line. This way, one
# can debug script changes to ensure that test-execution still works.
#
# Examples:
# INCLUDE_SLOW_TESTS=true ./test.sh run_btree_tests
# ------------------------------------------------------------------------
if [ $# -ge 1 ]; then

# shellcheck disable=SC2048
$*
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where the support to re-run manually granular collection of tests is added. This will help expedite dev turnaround during fix stabilization and re-tests.

record_elapsed_time ${testRunStartSeconds} "All Tests"
cat_exec_log_file
exit 0
fi

# Run all the unit-tests first, to get basic coverage
run_with_timing "Fast unit tests" "$BINDIR"/unit_test

Expand Down
1 change: 1 addition & 0 deletions tests/functional/filter_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ filter_test(int argc, char *argv[])
clockcache_deinit(cc);
platform_free(hid, cc);
rc_allocator_deinit(&al);
task_system_destroy(hid, &ts);
io_handle_deinit(io);
free_iohandle:
platform_free(hid, io);
Expand Down
2 changes: 2 additions & 0 deletions tests/functional/io_apis_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,9 @@ splinter_io_apis_test(int argc, char *argv[])

test_async_reads_by_threads(&io_test_fn_arg, NUM_THREADS);

task_system_destroy(hid, &tasks);
io_free:
io_handle_deinit(io_hdl);
platform_free(hid, io_hdl);
heap_destroy:
platform_heap_destroy(&hh);
Expand Down