diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2022-05-04 15:49:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-04 15:49:01 (GMT) |
commit | 838d050a63d310a38f92a510dc94c0656a84bb51 (patch) | |
tree | 55fe7b05c0408ebf4b28c3bfb5cd9a1d04fb2502 /test/cache.c | |
parent | 19a59c29b93c04ae069881da2354d3d7048619b9 (diff) | |
download | hdf5-838d050a63d310a38f92a510dc94c0656a84bb51.zip hdf5-838d050a63d310a38f92a510dc94c0656a84bb51.tar.gz hdf5-838d050a63d310a38f92a510dc94c0656a84bb51.tar.bz2 |
h5test.h testing macros get enclosed in do..while loops (#1721)
* h5test.h testing macros get enclosed in do..while loops
* Adds missed macro in hl C++ code
* Fixes macro in Windows code
Diffstat (limited to 'test/cache.c')
-rw-r--r-- | test/cache.c | 208 |
1 files changed, 104 insertions, 104 deletions
diff --git a/test/cache.c b/test/cache.c index 04db07f..45e6263 100644 --- a/test/cache.c +++ b/test/cache.c @@ -262,9 +262,9 @@ smoke_check_1(int express_test, unsigned paged) H5F_t * file_ptr = NULL; if (paged) - TESTING("smoke check #1P -- all clean, ins, dest, ren, 4/2 MB cache") + TESTING("smoke check #1P -- all clean, ins, dest, ren, 4/2 MB cache"); else - TESTING("smoke check #1 -- all clean, ins, dest, ren, 4/2 MB cache") + TESTING("smoke check #1 -- all clean, ins, dest, ren, 4/2 MB cache"); if (paged && (express_test > 0)) { @@ -460,9 +460,9 @@ smoke_check_2(int express_test, unsigned paged) H5F_t * file_ptr = NULL; if (paged) - TESTING("smoke check #2P -- ~1/2 dirty, ins, dest, ren, 4/2 MB cache") + TESTING("smoke check #2P -- ~1/2 dirty, ins, dest, ren, 4/2 MB cache"); else - TESTING("smoke check #2 -- ~1/2 dirty, ins, dest, ren, 4/2 MB cache") + TESTING("smoke check #2 -- ~1/2 dirty, ins, dest, ren, 4/2 MB cache"); if (paged && (express_test > 0)) { @@ -657,9 +657,9 @@ smoke_check_3(int express_test, unsigned paged) H5F_t * file_ptr = NULL; if (paged) - TESTING("smoke check #3P -- all clean, ins, dest, ren, 2/1 KB cache") + TESTING("smoke check #3P -- all clean, ins, dest, ren, 2/1 KB cache"); else - TESTING("smoke check #3 -- all clean, ins, dest, ren, 2/1 KB cache") + TESTING("smoke check #3 -- all clean, ins, dest, ren, 2/1 KB cache"); if (paged && (express_test > 0)) { @@ -855,9 +855,9 @@ smoke_check_4(int express_test, unsigned paged) H5F_t * file_ptr = NULL; if (paged) - TESTING("smoke check #4P -- ~1/2 dirty, ins, dest, ren, 2/1 KB cache") + TESTING("smoke check #4P -- ~1/2 dirty, ins, dest, ren, 2/1 KB cache"); else - TESTING("smoke check #4 -- ~1/2 dirty, ins, dest, ren, 2/1 KB cache") + TESTING("smoke check #4 -- ~1/2 dirty, ins, dest, ren, 2/1 KB cache"); if (paged && (express_test > 0)) { @@ -1098,9 +1098,9 @@ smoke_check_5(int express_test, unsigned paged) }; if (paged) - TESTING("smoke check #5P -- all clean, ins, prot, unprot, AR cache 1") + TESTING("smoke check #5P -- all clean, ins, prot, unprot, AR cache 1"); else - TESTING("smoke check #5 -- all clean, ins, prot, unprot, AR cache 1") + TESTING("smoke check #5 -- all clean, ins, prot, unprot, AR cache 1"); if (paged && (express_test > 0)) { @@ -1330,9 +1330,9 @@ smoke_check_6(int express_test, unsigned paged) }; if (paged) - TESTING("smoke check #6P -- ~1/2 dirty, ins, prot, unprot, AR cache 1") + TESTING("smoke check #6P -- ~1/2 dirty, ins, prot, unprot, AR cache 1"); else - TESTING("smoke check #6 -- ~1/2 dirty, ins, prot, unprot, AR cache 1") + TESTING("smoke check #6 -- ~1/2 dirty, ins, prot, unprot, AR cache 1"); if (paged && (express_test > 0)) { @@ -1563,9 +1563,9 @@ smoke_check_7(int express_test, unsigned paged) }; if (paged) - TESTING("smoke check #7P -- all clean, ins, prot, unprot, AR cache 2") + TESTING("smoke check #7P -- all clean, ins, prot, unprot, AR cache 2"); else - TESTING("smoke check #7 -- all clean, ins, prot, unprot, AR cache 2") + TESTING("smoke check #7 -- all clean, ins, prot, unprot, AR cache 2"); if (paged && (express_test > 0)) { @@ -1796,9 +1796,9 @@ smoke_check_8(int express_test, unsigned paged) }; if (paged) - TESTING("smoke check #8P -- ~1/2 dirty, ins, prot, unprot, AR cache 2") + TESTING("smoke check #8P -- ~1/2 dirty, ins, prot, unprot, AR cache 2"); else - TESTING("smoke check #8 -- ~1/2 dirty, ins, prot, unprot, AR cache 2") + TESTING("smoke check #8 -- ~1/2 dirty, ins, prot, unprot, AR cache 2"); if (paged && (express_test > 0)) { @@ -1993,9 +1993,9 @@ smoke_check_9(int express_test, unsigned paged) H5C_t * cache_ptr = NULL; if (paged) - TESTING("smoke check #9P -- all clean, ins, dest, ren, 4/2 MB, corked") + TESTING("smoke check #9P -- all clean, ins, dest, ren, 4/2 MB, corked"); else - TESTING("smoke check #9 -- all clean, ins, dest, ren, 4/2 MB, corked") + TESTING("smoke check #9 -- all clean, ins, dest, ren, 4/2 MB, corked"); if (paged && (express_test > 0)) { @@ -2311,9 +2311,9 @@ smoke_check_10(int express_test, unsigned paged) H5C_t * cache_ptr = NULL; if (paged) - TESTING("smoke check #10P -- ~1/2 dirty, ins, dest, ren, 4/2 MB, corked") + TESTING("smoke check #10P -- ~1/2 dirty, ins, dest, ren, 4/2 MB, corked"); else - TESTING("smoke check #10 -- ~1/2 dirty, ins, dest, ren, 4/2 MB, corked") + TESTING("smoke check #10 -- ~1/2 dirty, ins, dest, ren, 4/2 MB, corked"); if (paged && (express_test > 0)) { @@ -2626,9 +2626,9 @@ write_permitted_check(int #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ if (paged) - TESTING("write permitted check -- 1/0 MB cache (paged aggregation)") + TESTING("write permitted check -- 1/0 MB cache (paged aggregation)"); else - TESTING("write permitted check -- 1/0 MB cache") + TESTING("write permitted check -- 1/0 MB cache"); #if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS @@ -2840,9 +2840,9 @@ check_insert_entry(unsigned paged) struct H5C_cache_entry_t *search_ptr; if (paged) - TESTING("H5C_insert_entry() functionality (paged aggregation)") + TESTING("H5C_insert_entry() functionality (paged aggregation)"); else - TESTING("H5C_insert_entry() functionality") + TESTING("H5C_insert_entry() functionality"); pass = TRUE; @@ -3105,9 +3105,9 @@ check_flush_cache(unsigned paged) H5F_t *file_ptr = NULL; if (paged) - TESTING("H5C_flush_cache() functionality (paged aggregation)") + TESTING("H5C_flush_cache() functionality (paged aggregation)"); else - TESTING("H5C_flush_cache() functionality") + TESTING("H5C_flush_cache() functionality"); pass = TRUE; @@ -11382,9 +11382,9 @@ check_get_entry_status(unsigned paged) test_entry_t *entry_ptr = NULL; if (paged) - TESTING("H5C_get_entry_status() functionality (paged aggregation)") + TESTING("H5C_get_entry_status() functionality (paged aggregation)"); else - TESTING("H5C_get_entry_status() functionality") + TESTING("H5C_get_entry_status() functionality"); pass = TRUE; @@ -11603,9 +11603,9 @@ check_expunge_entry(unsigned paged) test_entry_t *entry_ptr; if (paged) - TESTING("H5C_expunge_entry() functionality (paged aggregation)") + TESTING("H5C_expunge_entry() functionality (paged aggregation)"); else - TESTING("H5C_expunge_entry() functionality") + TESTING("H5C_expunge_entry() functionality"); pass = TRUE; @@ -11880,9 +11880,9 @@ check_multiple_read_protect(unsigned paged) test_entry_t *entry_ptr; if (paged) - TESTING("multiple read only protects on a single entry (paged aggr)") + TESTING("multiple read only protects on a single entry (paged aggr)"); else - TESTING("multiple read only protects on a single entry") + TESTING("multiple read only protects on a single entry"); pass = TRUE; @@ -12284,9 +12284,9 @@ check_move_entry(unsigned paged) }; if (paged) - TESTING("H5C_move_entry() functionality (paged aggregation)") + TESTING("H5C_move_entry() functionality (paged aggregation)"); else - TESTING("H5C_move_entry() functionality") + TESTING("H5C_move_entry() functionality"); pass = TRUE; @@ -12334,7 +12334,7 @@ check_move_entry(unsigned paged) if (pass) PASSED(); else - H5_FAILED() + H5_FAILED(); if (!pass) HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); @@ -12525,9 +12525,9 @@ check_pin_protected_entry(unsigned paged) test_entry_t *entry_ptr; if (paged) - TESTING("H5C_pin_protected_entry() functionality (paged aggregation)") + TESTING("H5C_pin_protected_entry() functionality (paged aggregation)"); else - TESTING("H5C_pin_protected_entry() functionality") + TESTING("H5C_pin_protected_entry() functionality"); pass = TRUE; @@ -12639,9 +12639,9 @@ check_resize_entry(unsigned paged) test_entry_t *entry_ptr = NULL; if (paged) - TESTING("entry resize functionality (paged aggregation)") + TESTING("entry resize functionality (paged aggregation)"); else - TESTING("entry resize functionality") + TESTING("entry resize functionality"); /* Setup a cache and verify that it is empty. * @@ -13506,9 +13506,9 @@ check_evictions_enabled(unsigned paged) test_entry_t *entry_ptr; if (paged) - TESTING("evictions enabled/disabled functionality (paged aggregation)") + TESTING("evictions enabled/disabled functionality (paged aggregation)"); else - TESTING("evictions enabled/disabled functionality") + TESTING("evictions enabled/disabled functionality"); /* Setup a cache and verify that it is empty. * @@ -14148,9 +14148,9 @@ check_flush_protected_err(unsigned paged) H5C_t *cache_ptr = NULL; if (paged) - TESTING("flush cache with protected entry error (paged aggregation)") + TESTING("flush cache with protected entry error (paged aggregation)"); else - TESTING("flush cache with protected entry error") + TESTING("flush cache with protected entry error"); pass = TRUE; @@ -14241,9 +14241,9 @@ check_destroy_pinned_err(unsigned paged) H5F_t *file_ptr = NULL; if (paged) - TESTING("destroy cache with permanently pinned entry error (pgd aggr)") + TESTING("destroy cache with permanently pinned entry error (pgd aggr)"); else - TESTING("destroy cache with permanently pinned entry error") + TESTING("destroy cache with permanently pinned entry error"); pass = TRUE; @@ -14328,9 +14328,9 @@ check_destroy_protected_err(unsigned paged) H5F_t *file_ptr = NULL; if (paged) - TESTING("destroy cache with protected entry error (paged aggregation)") + TESTING("destroy cache with protected entry error (paged aggregation)"); else - TESTING("destroy cache with protected entry error") + TESTING("destroy cache with protected entry error"); pass = TRUE; @@ -14427,9 +14427,9 @@ check_duplicate_insert_err(unsigned paged) test_entry_t *entry_ptr; if (paged) - TESTING("duplicate entry insertion error (paged aggregation)") + TESTING("duplicate entry insertion error (paged aggregation)"); else - TESTING("duplicate entry insertion error") + TESTING("duplicate entry insertion error"); pass = TRUE; @@ -14510,9 +14510,9 @@ check_double_pin_err(unsigned paged) test_entry_t *entry_ptr; if (paged) - TESTING("pin a pinned entry error (paged aggregation)") + TESTING("pin a pinned entry error (paged aggregation)"); else - TESTING("pin a pinned entry error") + TESTING("pin a pinned entry error"); pass = TRUE; @@ -14599,9 +14599,9 @@ check_double_unpin_err(unsigned paged) test_entry_t *entry_ptr; if (paged) - TESTING("unpin an unpinned entry error (paged aggregation)") + TESTING("unpin an unpinned entry error (paged aggregation)"); else - TESTING("unpin an unpinned entry error") + TESTING("unpin an unpinned entry error"); pass = TRUE; @@ -14697,9 +14697,9 @@ check_pin_entry_errs(unsigned paged) test_entry_t *entry_ptr; if (paged) - TESTING("pin entry related errors (paged aggregation)") + TESTING("pin entry related errors (paged aggregation)"); else - TESTING("pin entry related errors") + TESTING("pin entry related errors"); pass = TRUE; @@ -14805,9 +14805,9 @@ check_double_protect_err(unsigned paged) H5C_cache_entry_t *cache_entry_ptr; if (paged) - TESTING("protect a protected entry error (paged aggregation)") + TESTING("protect a protected entry error (paged aggregation)"); else - TESTING("protect a protected entry error") + TESTING("protect a protected entry error"); pass = TRUE; @@ -14887,9 +14887,9 @@ check_double_unprotect_err(unsigned paged) test_entry_t *entry_ptr; if (paged) - TESTING("unprotect an unprotected entry error (paged aggregation)") + TESTING("unprotect an unprotected entry error (paged aggregation)"); else - TESTING("unprotect an unprotected entry error") + TESTING("unprotect an unprotected entry error"); pass = TRUE; @@ -14968,9 +14968,9 @@ check_mark_entry_dirty_errs(unsigned paged) test_entry_t *entry_ptr; if (paged) - TESTING("mark entry dirty related errors (paged aggregation)") + TESTING("mark entry dirty related errors (paged aggregation)"); else - TESTING("mark entry dirty related errors") + TESTING("mark entry dirty related errors"); pass = TRUE; @@ -15051,9 +15051,9 @@ check_expunge_entry_errs(unsigned paged) test_entry_t *entry_ptr; if (paged) - TESTING("expunge entry related errors (paged aggregation)") + TESTING("expunge entry related errors (paged aggregation)"); else - TESTING("expunge entry related errors") + TESTING("expunge entry related errors"); pass = TRUE; @@ -15167,9 +15167,9 @@ check_move_entry_errs(unsigned paged) test_entry_t *entry_1_0_ptr; if (paged) - TESTING("move entry related errors (paged aggregation)") + TESTING("move entry related errors (paged aggregation)"); else - TESTING("move entry related errors") + TESTING("move entry related errors"); pass = TRUE; @@ -15250,7 +15250,7 @@ check_move_entry_errs(unsigned paged) if (pass) PASSED(); else { - H5_FAILED() + H5_FAILED(); HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } /* end else */ @@ -15280,9 +15280,9 @@ check_resize_entry_errs(unsigned paged) test_entry_t *entry_ptr; if (paged) - TESTING("resize entry related errors (paged aggregation)") + TESTING("resize entry related errors (paged aggregation)"); else - TESTING("resize entry related errors") + TESTING("resize entry related errors"); pass = TRUE; @@ -15381,9 +15381,9 @@ check_unprotect_ro_dirty_err(unsigned paged) test_entry_t *entry_ptr; if (paged) - TESTING("unprotect a read only entry dirty error (paged aggregation)") + TESTING("unprotect a read only entry dirty error (paged aggregation)"); else - TESTING("unprotect a read only entry dirty error") + TESTING("unprotect a read only entry dirty error"); pass = TRUE; @@ -15506,9 +15506,9 @@ check_protect_ro_rw_err(unsigned paged) void * thing_ptr = NULL; if (paged) - TESTING("protect a read only entry rw error (paged aggregation)") + TESTING("protect a read only entry rw error (paged aggregation)"); else - TESTING("protect a read only entry rw error") + TESTING("protect a read only entry rw error"); pass = TRUE; @@ -15591,9 +15591,9 @@ check_protect_retries(unsigned paged) int32_t idx; if (paged) - TESTING("protect an entry to verify retries (paged aggregation)") + TESTING("protect an entry to verify retries (paged aggregation)"); else - TESTING("protect an entry to verify retries") + TESTING("protect an entry to verify retries"); pass = TRUE; @@ -15723,9 +15723,9 @@ check_check_evictions_enabled_err(unsigned paged) H5C_t * cache_ptr = NULL; if (paged) - TESTING("get/set evictions enabled errors (paged aggregation)") + TESTING("get/set evictions enabled errors (paged aggregation)"); else - TESTING("get/set evictions enabled errors") + TESTING("get/set evictions enabled errors"); pass = TRUE; @@ -15917,9 +15917,9 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged) /* double empty_reserve = */ 0.05}; if (paged) - TESTING("automatic cache resizing (paged aggregation)") + TESTING("automatic cache resizing (paged aggregation)"); else - TESTING("automatic cache resizing") + TESTING("automatic cache resizing"); pass = TRUE; @@ -19772,9 +19772,9 @@ check_auto_cache_resize_disable(unsigned paged) /* double empty_reserve = */ 0.05}; if (paged) - TESTING("automatic cache resize disable (paged aggregation)") + TESTING("automatic cache resize disable (paged aggregation)"); else - TESTING("automatic cache resize disable") + TESTING("automatic cache resize disable"); pass = TRUE; @@ -22371,9 +22371,9 @@ check_auto_cache_resize_epoch_markers(unsigned paged) /* double empty_reserve = */ 0.05}; if (paged) - TESTING("automatic cache resize epoch marker management (paged aggr)") + TESTING("automatic cache resize epoch marker management (paged aggr)"); else - TESTING("automatic cache resize epoch marker management") + TESTING("automatic cache resize epoch marker management"); pass = TRUE; @@ -23062,9 +23062,9 @@ check_auto_cache_resize_input_errs(unsigned paged) H5C_auto_size_ctl_t test_auto_size_ctl; if (paged) - TESTING("automatic cache resize input errors (paged aggregation)") + TESTING("automatic cache resize input errors (paged aggregation)"); else - TESTING("automatic cache resize input errors") + TESTING("automatic cache resize input errors"); pass = TRUE; @@ -25301,9 +25301,9 @@ check_auto_cache_resize_aux_fcns(unsigned paged) }; if (paged) - TESTING("automatic cache resize auxiliary functions (paged aggregation)") + TESTING("automatic cache resize auxiliary functions (paged aggregation)"); else - TESTING("automatic cache resize auxiliary functions") + TESTING("automatic cache resize auxiliary functions"); pass = TRUE; @@ -25803,15 +25803,15 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) if (fill_via_insertion) { if (paged) - TESTING("to ensure metadata blizzard absence when inserting (pgd aggr)") + TESTING("to ensure metadata blizzard absence when inserting (pgd aggr)"); else - TESTING("to ensure metadata blizzard absence when inserting") + TESTING("to ensure metadata blizzard absence when inserting"); } /* end if */ else { if (paged) - TESTING("to ensure metadata blizzard absence on protect/unprotect (pa)") + TESTING("to ensure metadata blizzard absence on protect/unprotect (pa)"); else - TESTING("to ensure metadata blizzard absence on protect/unprotect") + TESTING("to ensure metadata blizzard absence on protect/unprotect"); } /* end else */ if (show_progress) /* 0 */ @@ -26487,9 +26487,9 @@ check_flush_deps(unsigned paged) /* clang-format on */ if (paged) - TESTING("flush dependencies (paged aggregation)") + TESTING("flush dependencies (paged aggregation)"); else - TESTING("flush dependencies") + TESTING("flush dependencies"); pass = TRUE; @@ -28395,9 +28395,9 @@ check_flush_deps_err(unsigned paged) unsigned test_count; /* Test iteration variable */ if (paged) - TESTING("flush dependency errors (paged aggregation)") + TESTING("flush dependency errors (paged aggregation)"); else - TESTING("flush dependency errors") + TESTING("flush dependency errors"); pass = TRUE; @@ -28684,9 +28684,9 @@ check_flush_deps_order(unsigned paged) /* clang-format on */ if (paged) - TESTING("flush dependencies flush order (paged aggregation)") + TESTING("flush dependencies flush order (paged aggregation)"); else - TESTING("flush dependencies flush order") + TESTING("flush dependencies flush order"); pass = TRUE; @@ -31414,9 +31414,9 @@ check_notify_cb(unsigned paged) /* clang-format on */ if (paged) - TESTING("'notify' callback (paged)") + TESTING("'notify' callback (paged)"); else - TESTING("'notify' callback") + TESTING("'notify' callback"); pass = TRUE; @@ -31667,9 +31667,9 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged) reset_entries(); if (fill_via_insertion) - TESTING("to ensure cork/uncork metadata when inserting") + TESTING("to ensure cork/uncork metadata when inserting"); else - TESTING("to ensure cork/uncork metadata on protect/unprotect") + TESTING("to ensure cork/uncork metadata on protect/unprotect"); if (show_progress) /* 0 */ HDfprintf(stdout, "\n%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass); @@ -32220,9 +32220,9 @@ check_entry_deletions_during_scans(unsigned paged) H5F_t *file_ptr = NULL; if (paged) - TESTING("entry deletion during list scan detection and adaption (par)") + TESTING("entry deletion during list scan detection and adaption (par)"); else - TESTING("entry deletion during list scan detection and adaption") + TESTING("entry deletion during list scan detection and adaption"); pass = TRUE; @@ -33690,9 +33690,9 @@ check_stats(unsigned paged) #endif /* H5C_COLLECT_CACHE_STATS */ if (paged) - TESTING("metadata cache statistics collection (paged aggregation)") + TESTING("metadata cache statistics collection (paged aggregation)"); else - TESTING("metadata cache statistics collection") + TESTING("metadata cache statistics collection"); #if H5C_COLLECT_CACHE_STATS |