From 2f8f942fdd34ead4c5d20154469b6afc91001ef2 Mon Sep 17 00:00:00 2001 From: Rob Johnson Date: Tue, 8 Jul 2025 18:07:46 -0700 Subject: [PATCH 01/13] turn on more tests --- test.sh | 149 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 82 insertions(+), 67 deletions(-) diff --git a/test.sh b/test.sh index 1ddadd2e..81f80e06 100755 --- a/test.sh +++ b/test.sh @@ -298,7 +298,7 @@ function nightly_sync_perf_tests() { --tree-size-gib 4 \ --db-capacity-gib 60 \ --db-location ${dbname} \ - --verbose-progress + --verbose-progress \ ${Use_shmem} rm ${dbname} @@ -381,9 +381,10 @@ function nightly_async_perf_tests() { local dbname="splinter_test.perf.db" run_with_timing "Parallel Async Performance test ${test_descr}" \ "$BINDIR"/driver_test splinter_test --parallel-perf \ - --num-bg-threads ${nbgthreads} \ --max-async-inflight ${nasync} \ --num-pthreads ${npthreads} \ + --num-normal-bg-threads ${nbgthreads} \ + --num-memtable-bg-threads 2 \ --db-capacity-gib 60 \ --db-location ${dbname} rm ${dbname} @@ -397,7 +398,7 @@ function run_nightly_perf_tests() { nightly_cache_perf_tests - # nightly_async_perf_tests + nightly_async_perf_tests } # ############################################################################# @@ -951,54 +952,6 @@ if [ "$RUN_NIGHTLY_TESTS" == "true" ]; then exit 0 fi -# ---- Fast running Smoke test runs ---- -if [ "$INCLUDE_SLOW_TESTS" != "true" ]; then - - # For some coverage, exercise --help, --list args for unit test binaries - set -x - "$BINDIR"/unit_test --help - "$BINDIR"/unit_test --list - "$BINDIR"/unit_test --list splinterdb_quick - "$BINDIR"/unit/btree_test --help - "$BINDIR"/unit/splinterdb_quick_test --list - set +x - - echo " " - echo "NOTE: **** Only running fast unit tests ****" - echo "To run all tests, set the env var, and re-run: $ INCLUDE_SLOW_TESTS=true ./$Me" - echo " " - - # Exercise config-parsing test case. Here, we feed-in a set of - # --config-params that the test code knows to "expect" and validates. - # These options can come in any order. - set -x - run_with_timing "Config-params parsing test" - "$BINDIR"/unit/config_parse_test --log \ - --num-inserts 20 \ - --rough-count-height 11 \ - --stats \ - --verbose-logging \ - --verbose-progress - set +x - - start_seconds=$SECONDS - - run_with_timing "Smoke tests" run_fast_unit_tests "" - - Use_shmem="--use-shmem" - run_with_timing "Smoke tests using shared memory" run_fast_unit_tests - - if [ "$RUN_MAKE_TESTS" == "true" ]; then - run_with_timing "Basic build-and-test tests" test_make_run_tests - fi - - cat_exec_log_file - exit 0 -fi - -# ---- Rest of the coverage runs included in CI test runs ---- -UNIT_TESTS_DB_DEV="unit_tests_db" - # ------------------------------------------------------------------------ # 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 @@ -1039,29 +992,91 @@ if [ $# -ge 1 ]; then exit 0 fi -# Run all the unit-tests first, to get basic coverage -run_with_timing "Fast unit tests" "$BINDIR"/unit_test +# +# Fast tests +# -# ------------------------------------------------------------------------ -# Run mini-unit-tests that were excluded from bin/unit_test binary: -# ------------------------------------------------------------------------ -Use_shmem="" -run_slower_unit_tests +# For some coverage, exercise --help, --list args for unit test binaries +set -x +"$BINDIR"/unit_test --help +"$BINDIR"/unit_test --list +"$BINDIR"/unit_test --list splinterdb_quick +"$BINDIR"/unit/btree_test --help +"$BINDIR"/unit/splinterdb_quick_test --list +set +x + +# Exercise config-parsing test case. Here, we feed-in a set of +# --config-params that the test code knows to "expect" and validates. +# These options can come in any order. +set -x +run_with_timing "Config-params parsing test" + "$BINDIR"/unit/config_parse_test --log \ + --num-inserts 20 \ + --rough-count-height 11 \ + --stats \ + --verbose-logging \ + --verbose-progress +set +x + +run_with_timing "Smoke tests" run_fast_unit_tests "" -if [ -f ${UNIT_TESTS_DB_DEV} ]; then rm ${UNIT_TESTS_DB_DEV}; fi +Use_shmem="--use-shmem" +run_with_timing "Smoke tests using shared memory" run_fast_unit_tests -run_splinter_functionality_tests +if [ "$RUN_MAKE_TESTS" == "true" ]; then + run_with_timing "Basic build-and-test tests" test_make_run_tests +fi -run_splinter_perf_tests +# +# Slow tests +# -run_btree_tests +if [ "$INCLUDE_SLOW_TESTS" == "true" ]; then -run_other_driver_tests + # ---- Rest of the coverage runs included in CI test runs ---- + UNIT_TESTS_DB_DEV="unit_tests_db" + + # Run all the unit-tests first, to get basic coverage + run_with_timing "Fast unit tests" "$BINDIR"/unit_test + + # ------------------------------------------------------------------------ + # Run mini-unit-tests that were excluded from bin/unit_test binary: + # ------------------------------------------------------------------------ + Use_shmem="" + run_slower_unit_tests + + if [ -f ${UNIT_TESTS_DB_DEV} ]; then rm ${UNIT_TESTS_DB_DEV}; fi + + run_splinter_functionality_tests + + run_splinter_perf_tests + + run_btree_tests + + run_other_driver_tests + + record_elapsed_time ${testRunStartSeconds} "Tests without shared memory configured" + # ------------------------------------------------------------------------ + # Re-run a collection of tests using shared-memory. + Use_shmem="--use-shmem" run_tests_with_shared_memory + + # + # The tests formerly known as 'nightly' tests, which are now run as part of + # SLOW_TESTS. + # + set +e + run_with_timing "Check limits, error conditions." nightly_test_limitations + + run_nightly_stress_tests + + Use_shmem="" run_nightly_perf_tests + Use_shmem="--use-shmem" run_nightly_perf_tests + set -e + + record_elapsed_time ${testRunStartSeconds} "Nightly Stress & Performance Tests" + +fi -record_elapsed_time ${testRunStartSeconds} "Tests without shared memory configured" -# ------------------------------------------------------------------------ -# Re-run a collection of tests using shared-memory. -Use_shmem="--use-shmem" run_tests_with_shared_memory record_elapsed_time ${testRunStartSeconds} "All Tests" echo ALL PASSED From e1bc046d9a0abcc2156f5c311f518e96e0ac1d06 Mon Sep 17 00:00:00 2001 From: Rob Johnson Date: Mon, 14 Jul 2025 12:12:28 -0700 Subject: [PATCH 02/13] properly wait for I/O quiescence in io_apis_test.c --- tests/functional/io_apis_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/io_apis_test.c b/tests/functional/io_apis_test.c index 89aab684..3335ebfb 100644 --- a/tests/functional/io_apis_test.c +++ b/tests/functional/io_apis_test.c @@ -882,7 +882,7 @@ test_async_reads(platform_heap_id hid, } } - io_cleanup(ioh, NUM_PAGES_RW_ASYNC_PER_THREAD); + io_wait_all(ioh); platform_free(hid, exp); free_buf: From 08e0a09cd3213d6b24b01ae30ec9cead00698a0f Mon Sep 17 00:00:00 2001 From: Rob Johnson Date: Tue, 15 Jul 2025 19:03:58 -0700 Subject: [PATCH 03/13] fix uninit variable in splinter test --- tests/functional/splinter_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/functional/splinter_test.c b/tests/functional/splinter_test.c index a88cea22..c8be376e 100644 --- a/tests/functional/splinter_test.c +++ b/tests/functional/splinter_test.c @@ -681,8 +681,8 @@ test_trunk_insert_lookup_thread(void *arg) uint64 *bases[NUM_OP_TYPES]; uint64 granularities[NUM_OP_TYPES]; uint64 offsets[NUM_OP_TYPES]; - uint8 insert_done; - uint64 num_ops = 0; + uint8 insert_done = 0; + uint64 num_ops = 0; random_state rs; random_init(&rs, seed, 0); From 4e6102da12ef115eb6d3505eca0f0fb9ddd3a61c Mon Sep 17 00:00:00 2001 From: Rob Johnson Date: Wed, 16 Jul 2025 12:29:56 -0700 Subject: [PATCH 04/13] shrink some tests, throttle progress output --- test.sh | 2 + tests/functional/cache_test.c | 48 +++++++++++----------- tests/functional/splinter_test.c | 69 +++++++++++++++++--------------- tests/test_common.h | 8 ++++ 4 files changed, 72 insertions(+), 55 deletions(-) diff --git a/test.sh b/test.sh index 81f80e06..89e75add 100755 --- a/test.sh +++ b/test.sh @@ -377,12 +377,14 @@ function nightly_async_perf_tests() { local npthreads=20 local nbgthreads=20 local nasync=10 + local tree_size=5 local test_descr="${npthreads} pthreads,bgt=${nbgthreads},async=${nasync}" local dbname="splinter_test.perf.db" run_with_timing "Parallel Async Performance test ${test_descr}" \ "$BINDIR"/driver_test splinter_test --parallel-perf \ --max-async-inflight ${nasync} \ --num-pthreads ${npthreads} \ + --tree-size-gib ${tree_size} \ --num-normal-bg-threads ${nbgthreads} \ --num-memtable-bg-threads 2 \ --db-capacity-gib 60 \ diff --git a/tests/functional/cache_test.c b/tests/functional/cache_test.c index 06927563..66a4605c 100644 --- a/tests/functional/cache_test.c +++ b/tests/functional/cache_test.c @@ -18,7 +18,7 @@ #include "task.h" #include "util.h" #include "random.h" - +#include "test_common.h" #include "poison.h" platform_status @@ -574,29 +574,29 @@ test_cache_flush(cache *cc, typedef struct { page_get_async_state_buffer buffer; enum { waiting_on_io, ready_to_continue, done } status; -} test_async_ctxt; +} cache_test_async_ctxt; typedef struct { - cache *cc; // IN - clockcache_config *cfg; // IN - task_system *ts; // IN - platform_thread thread; // IN - platform_heap_id hid; // IN - bool32 mt_reader; // IN readers are MT - bool32 logger; // IN logger thread - const uint64 *addr_arr; // IN array of page addrs - uint64 num_pages; // IN #of pages to get - uint64 num_pages_ws; // IN #of pages in working set - uint32 sync_probability; // IN probability of sync get - page_handle **handle_arr; // page handles - test_async_ctxt ctxt[READER_BATCH_SIZE]; // async_get() contexts + cache *cc; // IN + clockcache_config *cfg; // IN + task_system *ts; // IN + platform_thread thread; // IN + platform_heap_id hid; // IN + bool32 mt_reader; // IN readers are MT + bool32 logger; // IN logger thread + const uint64 *addr_arr; // IN array of page addrs + uint64 num_pages; // IN #of pages to get + uint64 num_pages_ws; // IN #of pages in working set + uint32 sync_probability; // IN probability of sync get + page_handle **handle_arr; // page handles + cache_test_async_ctxt ctxt[READER_BATCH_SIZE]; // async_get() contexts } test_params; void test_async_callback(void *ctxt) { - test_async_ctxt *test_ctxt = (test_async_ctxt *)ctxt; - test_ctxt->status = ready_to_continue; + cache_test_async_ctxt *test_ctxt = (cache_test_async_ctxt *)ctxt; + test_ctxt->status = ready_to_continue; } // Wait for in flight async lookups @@ -607,7 +607,7 @@ test_wait_inflight(test_params *params, uint64 j; for (j = 0; j < READER_BATCH_SIZE; j++) { - test_async_ctxt *ctxt = ¶ms->ctxt[j]; + cache_test_async_ctxt *ctxt = ¶ms->ctxt[j]; if (ctxt->status != done) { while (ctxt->status != done) { @@ -643,8 +643,8 @@ test_do_read_batch(threadid tid, test_params *params, uint64 batch_start) uint64 j; for (j = 0; j < READER_BATCH_SIZE; j++) { - async_status res; - test_async_ctxt *ctxt = ¶ms->ctxt[j]; + async_status res; + cache_test_async_ctxt *ctxt = ¶ms->ctxt[j]; // MT test probabilistically mixes sync and async api to test races if (mt_reader && params->sync_probability != 0 @@ -692,12 +692,14 @@ test_reader_thread(void *arg) uint64 i, j, k; const uint64 num_pages = ROUNDDOWN(params->num_pages, READER_BATCH_SIZE); const threadid tid = platform_get_tid(); + uint64 progress = 0; for (i = k = 0; i < num_pages; i += READER_BATCH_SIZE) { if (params->logger) { - platform_throttled_error_log(DEFAULT_THROTTLE_INTERVAL_SEC, - PLATFORM_CR "test %3lu%% complete", - i * 100 / num_pages); + test_print_progress(&progress, + i * 100 / num_pages, + PLATFORM_CR "test %3lu%% complete", + i * 100 / num_pages); } // Maintain working set by doing ungets on old pages if (i >= k + params->num_pages_ws) { diff --git a/tests/functional/splinter_test.c b/tests/functional/splinter_test.c index c8be376e..d6f4c810 100644 --- a/tests/functional/splinter_test.c +++ b/tests/functional/splinter_test.c @@ -72,6 +72,7 @@ typedef struct test_splinter_thread_params { uint8 lookup_positive_pct; // parallel lookup positive % uint64 seed; uint64 range_lookups_done; + uint64 progress; } test_splinter_thread_params; /* @@ -142,11 +143,13 @@ test_trunk_insert_thread(void *arg) if (test_is_done(done, spl_idx)) { continue; } - platform_default_log(PLATFORM_CR "Thread %lu inserting %3lu%% " - "complete for table %u ... ", - thread_number, - insert_base[spl_idx] / (total_ops[spl_idx] / 100), - spl_idx); + test_print_progress(¶ms->progress, + insert_base[spl_idx] / (total_ops[spl_idx] / 100), + PLATFORM_CR "Thread %lu inserting %3lu%% " + "complete for table %u", + thread_number, + insert_base[spl_idx] / (total_ops[spl_idx] / 100), + spl_idx); insert_base[spl_idx] = __sync_fetch_and_add(&curr_op[spl_idx], op_granularity); if (insert_base[spl_idx] >= total_ops[spl_idx]) { @@ -251,12 +254,13 @@ test_trunk_lookup_thread(void *arg) if (test_is_done(done, spl_idx)) { continue; } - platform_throttled_error_log( - DEFAULT_THROTTLE_INTERVAL_SEC, - PLATFORM_CR "Thread %lu lookups %3lu%% complete for table %u", - thread_number, - lookup_base[spl_idx] / (total_ops[spl_idx] / 100), - spl_idx); + test_print_progress(¶ms->progress, + lookup_base[spl_idx] / (total_ops[spl_idx] / 100), + PLATFORM_CR "Thread %lu lookups %3lu%% complete " + "for table %u", + thread_number, + lookup_base[spl_idx] / (total_ops[spl_idx] / 100), + spl_idx); lookup_base[spl_idx] = __sync_fetch_and_add(&curr_op[spl_idx], op_granularity); if (lookup_base[spl_idx] >= total_ops[spl_idx]) { @@ -398,15 +402,16 @@ test_trunk_range_thread(void *arg) start_time = platform_get_timestamp(); } } - platform_throttled_error_log( - DEFAULT_THROTTLE_INTERVAL_SEC, - PLATFORM_CR "Thread %lu range lookups %3lu%% complete for table %u" - ", range_base=%lu%s", - thread_number, - range_base[spl_idx] / (total_ops[spl_idx] / 100), - spl_idx, - range_base[spl_idx], - newmsg); + test_print_progress(¶ms->progress, + range_base[spl_idx] / (total_ops[spl_idx] / 100), + PLATFORM_CR + "Thread %lu range lookups %3lu%% " + "complete for table %u, range_base=%lu%s", + thread_number, + range_base[spl_idx] / (total_ops[spl_idx] / 100), + spl_idx, + range_base[spl_idx], + newmsg); range_base[spl_idx] = __sync_fetch_and_add(&curr_op[spl_idx], op_granularity); @@ -463,12 +468,12 @@ test_trunk_range_thread(void *arg) *----------------------------------------------------------------------------- */ static bool32 -advance_base(const test_splinter_thread_params *params, - uint64 *curr_op, - uint64 *base, - uint8 *done, - random_state *rs, - test_splinter_pthread_op_type type) +advance_base(test_splinter_thread_params *params, + uint64 *curr_op, + uint64 *base, + uint8 *done, + random_state *rs, + test_splinter_pthread_op_type type) { const uint64 *total_ops = params->total_ops; const uint64 op_granularity = params->op_granularity; @@ -481,12 +486,12 @@ advance_base(const test_splinter_thread_params *params, } if (type == OP_INSERT) { - platform_throttled_error_log( - DEFAULT_THROTTLE_INTERVAL_SEC, - PLATFORM_CR "inserting/lookups %3lu%% complete for table %u", - base[spl_idx] / (total_ops[spl_idx] / 100), - spl_idx); - + test_print_progress(¶ms->progress, + base[spl_idx] / (total_ops[spl_idx] / 100), + PLATFORM_CR "inserting/lookups %3lu%% complete " + "for table %u", + base[spl_idx] / (total_ops[spl_idx] / 100), + spl_idx); base[spl_idx] = __sync_fetch_and_add(&curr_op[spl_idx], op_granularity); if (base[spl_idx] >= total_ops[spl_idx]) { diff --git a/tests/test_common.h b/tests/test_common.h index c7ab6b69..c359cffe 100644 --- a/tests/test_common.h +++ b/tests/test_common.h @@ -59,3 +59,11 @@ test_show_verbose_progress(test_exec_config *test_exec_cfg) void trace_wait_for_gdb(void); + +#define test_print_progress(progress_state, progress, ...) \ + do { \ + if (*progress_state != progress) { \ + *progress_state = progress; \ + platform_default_log(__VA_ARGS__); \ + } \ + } while (0) From 656edb65eefed95141e46d1084a3b6dcd7d6274a Mon Sep 17 00:00:00 2001 From: Rob Johnson Date: Thu, 17 Jul 2025 12:08:29 -0700 Subject: [PATCH 05/13] clockcache_batch_start_writeback cannot fail --- src/clockcache.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/clockcache.c b/src/clockcache.c index 0337da22..d0e9ee92 100644 --- a/src/clockcache.c +++ b/src/clockcache.c @@ -963,8 +963,11 @@ clockcache_batch_start_writeback(clockcache *cc, uint64 batch, bool32 is_urgent) && clockcache_try_set_writeback(cc, next_entry_no, is_urgent)); - async_io_state *state = TYPED_MALLOC(cc->heap_id, state); - platform_assert(state != NULL); + async_io_state *state; + while ((state = TYPED_MALLOC(cc->heap_id, state)) == NULL) { + clockcache_wait(cc); + } + state->cc = cc; state->outstanding_pages = NULL; io_async_state_init(state->iostate, From 5ab405be894e4532365c5d3eeeb420027c5359d7 Mon Sep 17 00:00:00 2001 From: Rob Johnson Date: Fri, 18 Jul 2025 10:50:26 -0700 Subject: [PATCH 06/13] reduce time for running tests --- .github/workflows/run-tests.yml | 19 ++++++++++++++++--- test.sh | 30 ++++++++---------------------- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 9b11a2fb..6055e9f4 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -22,6 +22,8 @@ jobs: compiler_mode: [gcc, clang, gcc-asan, clang-msan] build_mode: [release, debug] target: [all] # Just compile most configs + include_slow_tests: [true] + run_nightly_tests: [false] exclude: # Don't do a compile job on these, since we will do run-tests on them below - compiler_mode: gcc-asan @@ -33,6 +35,9 @@ jobs: - compiler_mode: clang build_mode: debug target: all + - compiler_mode: gcc + build_mode: release + target: all include: # Compile and run tests on these configs - compiler_mode: gcc-asan @@ -40,12 +45,19 @@ jobs: target: run-tests - compiler_mode: clang-msan build_mode: release - sanitizer: msan target: run-tests - compiler_mode: clang build_mode: debug target: run-tests - name: ${{ matrix.target == 'all' && 'Compile' || 'Run' }} ${{ matrix.compiler_mode }} ${{ matrix.build_mode }} ${{ matrix.target }} + - compiler_mode: gcc + build_mode: release + target: run-tests + include_slow_tests: false + run_nightly_tests: true + name: ${{ matrix.target == 'all' && 'Compile' || 'Run' }} \ + ${{ matrix.target == 'run-tests' && matrix.include_slow_tests == true && '(slow tests)' || '' }} \ + ${{ matrix.target == 'run-tests' && matrix.run_nightly_tests == true && '(nightly tests)' || '' }} \ + ${{ matrix.compiler_mode }} ${{ matrix.build_mode }} ${{ matrix.target }} runs-on: ubuntu-latest env: CC: ${{ startsWith(matrix.compiler_mode, 'gcc') && 'gcc' || 'clang' }} @@ -53,7 +65,8 @@ jobs: BUILD_MODE: ${{ matrix.build_mode }} BUILD_ASAN: ${{ endsWith(matrix.compiler_mode, 'asan') && 1 || 0 }} BUILD_MSAN: ${{ endsWith(matrix.compiler_mode, 'msan') && 1 || 0 }} - INCLUDE_SLOW_TESTS: true + INCLUDE_SLOW_TESTS: ${{ matrix.include_slow_tests }} + RUN_NIGHTLY_TESTS: ${{ matrix.run_nightly_tests }} steps: - name: Maximize build space uses: easimon/maximize-build-space@master diff --git a/test.sh b/test.sh index 89e75add..3ca2afba 100755 --- a/test.sh +++ b/test.sh @@ -937,23 +937,6 @@ testRunStartSeconds=$SECONDS echo "$(TZ="America/Los_Angeles" date) **** SplinterDB${run_type}Test Suite Execution Times **** " > "${test_exec_log_file}" echo >> "${test_exec_log_file}" -# ---- Nightly Stress and Performance test runs ---- -if [ "$RUN_NIGHTLY_TESTS" == "true" ]; then - - set +e - run_with_timing "Check limits, error conditions." nightly_test_limitations - - run_nightly_stress_tests - - Use_shmem="" run_nightly_perf_tests - Use_shmem="--use-shmem" run_nightly_perf_tests - set -e - - record_elapsed_time ${testRunStartSeconds} "Nightly Stress & Performance Tests" - cat_exec_log_file - exit 0 -fi - # ------------------------------------------------------------------------ # 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 @@ -1062,10 +1045,11 @@ if [ "$INCLUDE_SLOW_TESTS" == "true" ]; then # Re-run a collection of tests using shared-memory. Use_shmem="--use-shmem" run_tests_with_shared_memory - # - # The tests formerly known as 'nightly' tests, which are now run as part of - # SLOW_TESTS. - # +fi + +# ---- Nightly Stress and Performance test runs ---- +if [ "$RUN_NIGHTLY_TESTS" == "true" ]; then + set +e run_with_timing "Check limits, error conditions." nightly_test_limitations @@ -1076,10 +1060,12 @@ if [ "$INCLUDE_SLOW_TESTS" == "true" ]; then set -e record_elapsed_time ${testRunStartSeconds} "Nightly Stress & Performance Tests" - + cat_exec_log_file + exit 0 fi + record_elapsed_time ${testRunStartSeconds} "All Tests" echo ALL PASSED From db24e9c3c9190b47b278b9e146a1affcf8f7bc3c Mon Sep 17 00:00:00 2001 From: Rob Johnson Date: Fri, 18 Jul 2025 10:53:31 -0700 Subject: [PATCH 07/13] tweak yml file --- .github/workflows/run-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 6055e9f4..c2c99edc 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -54,9 +54,9 @@ jobs: target: run-tests include_slow_tests: false run_nightly_tests: true - name: ${{ matrix.target == 'all' && 'Compile' || 'Run' }} \ - ${{ matrix.target == 'run-tests' && matrix.include_slow_tests == true && '(slow tests)' || '' }} \ - ${{ matrix.target == 'run-tests' && matrix.run_nightly_tests == true && '(nightly tests)' || '' }} \ + name: ${{ matrix.target == 'all' && 'Compile' || 'Run' }} \\ + ${{ matrix.target == 'run-tests' && matrix.include_slow_tests == 'true' && '(slow tests)' || '' }} \\ + ${{ matrix.target == 'run-tests' && matrix.run_nightly_tests == 'true' && '(nightly tests)' || '' }} \\ ${{ matrix.compiler_mode }} ${{ matrix.build_mode }} ${{ matrix.target }} runs-on: ubuntu-latest env: From 2fd86c944f39004707dd11439937fccef13794d3 Mon Sep 17 00:00:00 2001 From: Rob Johnson Date: Fri, 18 Jul 2025 10:56:15 -0700 Subject: [PATCH 08/13] tweak yml file --- .github/workflows/run-tests.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index c2c99edc..295c7219 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -54,9 +54,10 @@ jobs: target: run-tests include_slow_tests: false run_nightly_tests: true - name: ${{ matrix.target == 'all' && 'Compile' || 'Run' }} \\ - ${{ matrix.target == 'run-tests' && matrix.include_slow_tests == 'true' && '(slow tests)' || '' }} \\ - ${{ matrix.target == 'run-tests' && matrix.run_nightly_tests == 'true' && '(nightly tests)' || '' }} \\ + name: > + ${{ matrix.target == 'all' && 'Compile' || 'Run' }} + ${{ matrix.target == 'run-tests' && matrix.include_slow_tests == 'true' && '(slow tests)' || '' }} + ${{ matrix.target == 'run-tests' && matrix.run_nightly_tests == 'true' && '(nightly tests)' || '' }} ${{ matrix.compiler_mode }} ${{ matrix.build_mode }} ${{ matrix.target }} runs-on: ubuntu-latest env: From cd507bf4b1ac39b676854ad85f493b2f6cab0fc9 Mon Sep 17 00:00:00 2001 From: Rob Johnson Date: Fri, 18 Jul 2025 10:57:33 -0700 Subject: [PATCH 09/13] tweak yml file --- .github/workflows/run-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 295c7219..8470cbbe 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -22,8 +22,8 @@ jobs: compiler_mode: [gcc, clang, gcc-asan, clang-msan] build_mode: [release, debug] target: [all] # Just compile most configs - include_slow_tests: [true] - run_nightly_tests: [false] + include_slow_tests: ['true'] + run_nightly_tests: ['false'] exclude: # Don't do a compile job on these, since we will do run-tests on them below - compiler_mode: gcc-asan @@ -52,8 +52,8 @@ jobs: - compiler_mode: gcc build_mode: release target: run-tests - include_slow_tests: false - run_nightly_tests: true + include_slow_tests: 'false' + run_nightly_tests: 'true' name: > ${{ matrix.target == 'all' && 'Compile' || 'Run' }} ${{ matrix.target == 'run-tests' && matrix.include_slow_tests == 'true' && '(slow tests)' || '' }} From 75a1ff9d1ebd874bf64aa086553ed230618badc4 Mon Sep 17 00:00:00 2001 From: Rob Johnson Date: Fri, 18 Jul 2025 11:04:35 -0700 Subject: [PATCH 10/13] tweak yml file --- .github/workflows/run-tests.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 8470cbbe..db1aa794 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -29,32 +29,46 @@ jobs: - compiler_mode: gcc-asan build_mode: release target: all + include_slow_tests: 'true' + run_nightly_tests: 'false' - compiler_mode: clang-msan build_mode: release target: all + include_slow_tests: 'true' + run_nightly_tests: 'false' - compiler_mode: clang build_mode: debug target: all + include_slow_tests: 'true' + run_nightly_tests: 'false' - compiler_mode: gcc build_mode: release target: all + include_slow_tests: 'true' + run_nightly_tests: 'false' include: # Compile and run tests on these configs - compiler_mode: gcc-asan build_mode: release target: run-tests + include_slow_tests: 'true' + run_nightly_tests: 'false' - compiler_mode: clang-msan build_mode: release target: run-tests + include_slow_tests: 'true' + run_nightly_tests: 'false' - compiler_mode: clang build_mode: debug target: run-tests + include_slow_tests: 'true' + run_nightly_tests: 'false' - compiler_mode: gcc build_mode: release target: run-tests include_slow_tests: 'false' run_nightly_tests: 'true' - name: > + name: > ${{ matrix.target == 'all' && 'Compile' || 'Run' }} ${{ matrix.target == 'run-tests' && matrix.include_slow_tests == 'true' && '(slow tests)' || '' }} ${{ matrix.target == 'run-tests' && matrix.run_nightly_tests == 'true' && '(nightly tests)' || '' }} From 47e3b93eea18ec3fa44c5ae4ab5784187001bff9 Mon Sep 17 00:00:00 2001 From: Rob Johnson Date: Fri, 18 Jul 2025 11:09:23 -0700 Subject: [PATCH 11/13] tweak yml file --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index db1aa794..25fd5dc5 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -70,9 +70,9 @@ jobs: run_nightly_tests: 'true' name: > ${{ matrix.target == 'all' && 'Compile' || 'Run' }} + ${{ matrix.compiler_mode }} ${{ matrix.build_mode }} ${{ matrix.target }} ${{ matrix.target == 'run-tests' && matrix.include_slow_tests == 'true' && '(slow tests)' || '' }} ${{ matrix.target == 'run-tests' && matrix.run_nightly_tests == 'true' && '(nightly tests)' || '' }} - ${{ matrix.compiler_mode }} ${{ matrix.build_mode }} ${{ matrix.target }} runs-on: ubuntu-latest env: CC: ${{ startsWith(matrix.compiler_mode, 'gcc') && 'gcc' || 'clang' }} From 20f82de5f9eed75fe92375e6b6556e3b53019460 Mon Sep 17 00:00:00 2001 From: Rob Johnson Date: Fri, 18 Jul 2025 14:21:16 -0700 Subject: [PATCH 12/13] delete more dbs in tests --- test.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 3ca2afba..d77941e1 100755 --- a/test.sh +++ b/test.sh @@ -179,6 +179,7 @@ function nightly_functionality_stress_tests() { --num-tables ${ntables} \ --cache-capacity-gib ${cache_size} \ --db-location ${dbname} + rm ${dbname} # ---- ntables=2 @@ -190,6 +191,7 @@ function nightly_functionality_stress_tests() { --num-tables ${ntables} \ --cache-capacity-gib ${cache_size} \ --db-location ${dbname} + rm ${dbname} # ---- cache_size=1 # GiB @@ -206,6 +208,7 @@ function nightly_functionality_stress_tests() { --num-tables ${ntables} \ --cache-capacity-gib ${cache_size} \ --db-location ${dbname} + rm ${dbname} # ---- ntables=4 @@ -217,6 +220,8 @@ function nightly_functionality_stress_tests() { --num-tables ${ntables} \ --cache-capacity-gib ${cache_size} \ --db-location ${dbname} + rm ${dbname} + # ---- cache_size=512 # MiB test_descr="${nrows_h} rows, ${ntables} tables, ${cache_size} MiB cache" @@ -238,6 +243,7 @@ function nightly_unit_stress_tests() { local n_mills=10 local num_rows=$((n_mills * 1000 * 1000)) local nrows_h="${n_mills} mil" + local dbname="splinterdb_unit_tests_db" # ---- local n_threads=32 @@ -251,7 +257,10 @@ function nightly_unit_stress_tests() { --shmem-capacity-gib 8 \ --num-inserts ${num_rows} \ --num-memtable-bg-threads 8 \ - --num-normal-bg-threads 20 + --num-normal-bg-threads 20 \ + --db-location ${dbname} + rm ${dbname} + } # ############################################################################# @@ -353,6 +362,7 @@ function nightly_cache_perf_tests() { "$BINDIR"/driver_test cache_test --perf \ --db-location ${dbname} \ ${Use_shmem} + rm ${dbname} cache_size=6 # GiB test_descr="${cache_size} GiB cache" @@ -695,6 +705,7 @@ function run_slower_forked_process_tests() { msg="Splinter tests using ${num_forked_procs} forked child processes" run_with_timing "${msg}" "$BINDIR"/unit/splinterdb_forked_child_test \ --num-processes ${num_forked_procs} + rm splinterdb_unit_tests_db # ---- Run large_inserts_stress_test with small configuration as a quick check # using forked child process execution. From 3d5a868e0bea34fd2ed06c32e7632517626f43ab Mon Sep 17 00:00:00 2001 From: Rob Johnson Date: Mon, 21 Jul 2025 12:36:24 -0700 Subject: [PATCH 13/13] don't use --db-location w/ unit tests --- test.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test.sh b/test.sh index d77941e1..3c465259 100755 --- a/test.sh +++ b/test.sh @@ -257,8 +257,7 @@ function nightly_unit_stress_tests() { --shmem-capacity-gib 8 \ --num-inserts ${num_rows} \ --num-memtable-bg-threads 8 \ - --num-normal-bg-threads 20 \ - --db-location ${dbname} + --num-normal-bg-threads 20 rm ${dbname} }