summaryrefslogtreecommitdiffstats
path: root/test/cache_image.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-04-21 20:39:25 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-04-21 20:39:25 (GMT)
commit13e930d306fc38940b00fe020ededbc9a191c4d2 (patch)
tree97cd868d970c2a0c9ae6c6eb0fb3a85afa5862e8 /test/cache_image.c
parentde18e8c95a3b6c5d7f9fee66d70546fa46046d21 (diff)
downloadhdf5-13e930d306fc38940b00fe020ededbc9a191c4d2.zip
hdf5-13e930d306fc38940b00fe020ededbc9a191c4d2.tar.gz
hdf5-13e930d306fc38940b00fe020ededbc9a191c4d2.tar.bz2
Add a `skip compact` configuration for skipping the "zoo" tests for
compact datasets. Bundle the zoo-test configuration into a new type, zoo_config_t. Add a couple new "zoo" test phases, "delete" and "validate-deletion", to the existing "create" and "verify" phases. Give names and numbers to all phases with the new `enum`, `phase_t`, and refactor so that tend_zoo runs a selection of phases at each step. Stub the "delete" and "validate-deletion" phases for most test steps. Actually implement for compact dataset (ds_cpt_i) test. In tend_zoo(), delay for 50 milliseconds after running all steps. Really, this should delay after each step.... Implement vfd_swmr_writer_may_increase_tick_to() and vfd_swmr_reader_did_increase_tick_to() with a file that reader and writer share. The reader saves its current tick number in the shared file. The writer does not advance its tick number past the reader's. Collect some statistics in vfd_swmr_writer_may_increase_tick_to() and print them before the writer exits. Add option flags for skipping compact dataset tests (-C) and for printing error stacks (-e). Update the usage message, which was stale before the new options were added. Delete some dead code. Add #if 0'd-out code for the reader to wait for the writer before running "delete" and "validate-deletion" steps.
Diffstat (limited to 'test/cache_image.c')
-rw-r--r--test/cache_image.c30
1 files changed, 22 insertions, 8 deletions
diff --git a/test/cache_image.c b/test/cache_image.c
index f3db30b..d4002c7 100644
--- a/test/cache_image.c
+++ b/test/cache_image.c
@@ -4819,7 +4819,9 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
/* 3) Construct a "zoo" in the above group, and validate it. */
if ( pass )
- pass = create_zoo(file_id, process_group_name, min_group, false);
+ pass = create_zoo(file_id, process_group_name,
+ (zoo_config_t){.proc_num = min_group, .skip_varlen = false,
+ .skip_compact = false});
#if H5C_COLLECT_CACHE_STATS
if ( pass ) {
@@ -4890,8 +4892,11 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
/* 6) Validate the "zoo" created in the previous file open. */
- if ( pass )
- pass = validate_zoo(file_id, process_group_name, max_group, false);
+ if ( pass ) {
+ pass = validate_zoo(file_id, process_group_name,
+ (zoo_config_t){.proc_num = max_group, .skip_varlen = false,
+ .skip_compact = false});
+ }
#if H5C_COLLECT_CACHE_STATS
if ( pass ) {
@@ -4931,8 +4936,11 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
/* 8) Construct a "zoo" in the above group, and validate it. */
- if ( pass )
- pass = create_zoo(file_id, process_group_name, max_group, false);
+ if ( pass ) {
+ pass = create_zoo(file_id, process_group_name,
+ (zoo_config_t){.proc_num = max_group, .skip_varlen = false,
+ .skip_compact = false});
+ }
if ( show_progress )
HDfprintf(stdout, "%s:L4 cp = %d, max_group = %d, pass = %d.\n",
@@ -4993,7 +5001,9 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
i = min_group;
while(pass && i <= max_group) {
HDsprintf(process_group_name, "/process_%d", i);
- pass = validate_zoo(file_id, process_group_name, i++, false);
+ pass = validate_zoo(file_id, process_group_name,
+ (zoo_config_t){.proc_num = i++, .skip_varlen = false,
+ .skip_compact = false});
}
#if H5C_COLLECT_CACHE_STATS
@@ -5046,7 +5056,9 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
while ( ( pass ) && ( i <= max_group ) ) {
HDsprintf(process_group_name, "/process_%d", i);
- pass = validate_zoo(file_id, process_group_name, i++, false);
+ pass = validate_zoo(file_id, process_group_name,
+ (zoo_config_t){.proc_num = i++, .skip_varlen = false,
+ .skip_compact = false});
}
#if H5C_COLLECT_CACHE_STATS
@@ -5110,7 +5122,9 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
i = min_group;
while ( ( pass ) && ( i <= max_group ) ) {
HDsprintf(process_group_name, "/process_%d", i);
- pass = validate_zoo(file_id, process_group_name, i++, false);
+ pass = validate_zoo(file_id, process_group_name,
+ (zoo_config_t){.proc_num = i++, .skip_varlen = false,
+ .skip_compact = false});
}
#if H5C_COLLECT_CACHE_STATS