diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2022-04-08 13:22:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-08 13:22:07 (GMT) |
commit | 236297c00d630b391b2ee3b98e67b0b83d642a12 (patch) | |
tree | 4c047585c6c8878d3d592dc398536ccff27ee5ee /test | |
parent | 02d0208187af16137d01a3261961ab8fabd65d28 (diff) | |
download | hdf5-236297c00d630b391b2ee3b98e67b0b83d642a12.zip hdf5-236297c00d630b391b2ee3b98e67b0b83d642a12.tar.gz hdf5-236297c00d630b391b2ee3b98e67b0b83d642a12.tar.bz2 |
1.12: Last round of normalizations for 1.12.2 (#1621)
Diffstat (limited to 'test')
-rw-r--r-- | test/AtomicWriterReader.txt | 2 | ||||
-rw-r--r-- | test/cork.c | 32 | ||||
-rw-r--r-- | test/dangle.c | 16 | ||||
-rw-r--r-- | test/direct_chunk.c | 2 | ||||
-rw-r--r-- | test/fheap.c | 147 | ||||
-rw-r--r-- | test/titerate.c | 10 | ||||
-rw-r--r-- | test/tselect.c | 33 |
7 files changed, 119 insertions, 123 deletions
diff --git a/test/AtomicWriterReader.txt b/test/AtomicWriterReader.txt index dc0a3bd..064ba39 100644 --- a/test/AtomicWriterReader.txt +++ b/test/AtomicWriterReader.txt @@ -11,7 +11,7 @@ atomic_reader.c: is the "read" part of the test. Building the Tests ------------------ -The two test parts are automically built during configure and make process. +The two test parts are automatically built during configure and make process. But to build them individually, you can do in test/ directory: $ gcc atomic_writer $ gcc atomic_reader diff --git a/test/cork.c b/test/cork.c index a256482..9f927d8 100644 --- a/test/cork.c +++ b/test/cork.c @@ -1205,20 +1205,20 @@ static unsigned verify_multiple_cork(hbool_t swmr) { /* Variable Declarations */ - hid_t fid1 = -1, fid2 = -1; /* File ID */ - hid_t fapl = -1; /* File access property list */ - hid_t tid1 = -1, tid2 = -1; /* Datatype IDs */ - hid_t gid1 = -1, gid2 = -1; /* Group IDs */ - hid_t did1 = -1, did2 = -1; /* Dataset ID */ - hid_t aidg1 = -1, aidg2 = -1; /* Attribute ID */ - hid_t aidd1 = -1, aidd2 = -1; /* Attribute ID */ - hid_t aidt1 = -1, aidt2 = -1; /* Attribute ID */ - hid_t sid = -1; /* Dataspace ID */ - H5O_info2_t oinfo1, oinfo2, oinfo3; /* Object metadata information */ - hsize_t dim[1] = {5}; /* Dimension sizes */ - unsigned flags; /* File access flags */ - hbool_t corked; /* Cork status */ - herr_t ret; /* Return value */ + hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File ID */ + hid_t fapl = H5I_INVALID_HID; /* File access property list */ + hid_t tid1 = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */ + hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */ + hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset ID */ + hid_t aidg1 = H5I_INVALID_HID, aidg2 = H5I_INVALID_HID; /* Attribute ID */ + hid_t aidd1 = H5I_INVALID_HID, aidd2 = H5I_INVALID_HID; /* Attribute ID */ + hid_t aidt1 = H5I_INVALID_HID, aidt2 = H5I_INVALID_HID; /* Attribute ID */ + hid_t sid = H5I_INVALID_HID; /* Dataspace ID */ + H5O_info2_t oinfo1, oinfo2, oinfo3; /* Object metadata information */ + hsize_t dim[1] = {5}; /* Dimension sizes */ + unsigned flags; /* File access flags */ + hbool_t corked; /* Cork status */ + herr_t ret; /* Return value */ /* Testing Macro */ if (swmr) { @@ -1881,8 +1881,8 @@ error: static unsigned test_dset_cork(hbool_t swmr, hbool_t new_format) { - hid_t fid = H5I_INVALID_HID; /* File ID */ - hid_t fapl = H5I_INVALID_HID; /* File access property list */ + hid_t fid = H5I_INVALID_HID; /* File ID */ + hid_t fapl; /* File access property list */ hid_t gid = H5I_INVALID_HID; /* Group ID */ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */ hid_t tid1 = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */ diff --git a/test/dangle.c b/test/dangle.c index d41507b..5f7a84f 100644 --- a/test/dangle.c +++ b/test/dangle.c @@ -660,7 +660,21 @@ error: int main(void) { - int nerrors = 0; + const char *env_h5_drvr; /* File Driver value from environment */ + int nerrors = 0; + + /* Get the VFD to use */ + env_h5_drvr = HDgetenv("HDF5_DRIVER"); + if (env_h5_drvr == NULL) + env_h5_drvr = "nomatch"; + + /* Don't run this test with the multi/split VFD. A bug in library shutdown + * ordering causes problems with the multi VFD when IDs are left dangling. + */ + if (!HDstrcmp(env_h5_drvr, "multi") || !HDstrcmp(env_h5_drvr, "split")) { + HDputs(" -- SKIPPED for incompatible VFD --"); + return 0; + } /* Run tests w/weak file close */ HDputs("Testing dangling objects with weak file close:"); diff --git a/test/direct_chunk.c b/test/direct_chunk.c index d4a1e7a..ac4ef8d 100644 --- a/test/direct_chunk.c +++ b/test/direct_chunk.c @@ -2053,7 +2053,7 @@ test_read_unallocated_chunk(hid_t file) /* Check that the chunk storage size call does not succeed. */ if (status != -1) TEST_ERROR - if (direct_chunk_nbytes != 0) + if (direct_chunk_nbytes != ULONG_MAX) TEST_ERROR } } diff --git a/test/fheap.c b/test/fheap.c index 5ca45fc..f2c9b35 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -466,40 +466,24 @@ error: return (1); } /* add_obj() */ -/*------------------------------------------------------------------------- - * Function: get_del_string - * - * Purpose: Return string describing the kind of deletion to perform - * - * Return: Success: 0 - * - * Failure: 1 - * - * Programmer: Quincey Koziol - * Monday, June 6, 2006 - * - *------------------------------------------------------------------------- - */ -static char * +/* Return a string describing the kind of deletion to perform. */ +static const char * get_del_string(const fheap_test_param_t *tparam) { - char *str; - /* Remove half of total objects from heap */ if (tparam->del_dir == FHEAP_DEL_FORWARD) if (tparam->drain_half == FHEAP_DEL_DRAIN_ALL) - str = H5MM_strdup("(all - forward)"); + return "(all - forward)"; else - str = H5MM_strdup("(half, refill, all - forward)"); + return "(half, refill, all - forward)"; else if (tparam->del_dir == FHEAP_DEL_REVERSE) if (tparam->drain_half == FHEAP_DEL_DRAIN_ALL) - str = H5MM_strdup("(all - reverse)"); + return "(all - reverse)"; else - str = H5MM_strdup("(half, refill, all - reverse)"); + return "(half, refill, all - reverse)"; else - str = H5MM_strdup("(all - deleting heap)"); + return "(all - deleting heap)"; - return (str); } /* get_del_string() */ /*------------------------------------------------------------------------- @@ -547,29 +531,20 @@ get_fill_size(const fheap_test_param_t *tparam) * *------------------------------------------------------------------------- */ -/* Disable warning for "format not a string literal" here -QAK */ -/* - * This pragma only needs to surround the snprintf() calls with - * test_desc in the code below, but early (4.4.7, at least) gcc only - * allows diagnostic pragmas to be toggled outside of functions. - */ -H5_GCC_DIAG_OFF("format-nonliteral") static int begin_test(fheap_test_param_t *tparam, const char *base_desc, fheap_heap_ids_t *keep_ids, size_t *fill_size) { - char *del_str = NULL; /* Deletion order description */ - char *test_desc = NULL; /* Test description */ + char * test_desc; /* Test description */ + const char *del_str = get_del_string(tparam); /* * Test filling & removing all (small) objects from root direct block of absolute heap */ - del_str = get_del_string(tparam); - HDassert(del_str); - size_t test_desc_len = HDstrlen(del_str) + HDstrlen(base_desc); - test_desc = (char *)H5MM_malloc(test_desc_len); - HDsnprintf(test_desc, test_desc_len, base_desc, del_str); + size_t test_desc_len = strlen(base_desc) + sizeof(" ") + strlen(del_str); + test_desc = H5MM_malloc(test_desc_len); + (void)HDsnprintf(test_desc, test_desc_len, "%s %s", base_desc, del_str); + TESTING(test_desc); - H5MM_xfree(del_str); H5MM_xfree(test_desc); /* Initialize the heap ID structure */ @@ -582,7 +557,6 @@ begin_test(fheap_test_param_t *tparam, const char *base_desc, fheap_heap_ids_t * /* Success */ return (0); } /* end begin_test() */ -H5_GCC_DIAG_ON("format-nonliteral") /*------------------------------------------------------------------------- * Function: reopen_file @@ -7770,7 +7744,7 @@ test_man_remove_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ - const char *base_desc = "removing all objects from root direct block of absolute heap %s"; + const char *base_desc = "removing all objects from root direct block of absolute heap"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -7843,7 +7817,7 @@ test_man_remove_two_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ - const char *base_desc = "removing all objects from two direct blocks of absolute heap %s"; + const char *base_desc = "removing all objects from two direct blocks of absolute heap"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -7931,7 +7905,7 @@ test_man_remove_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ - const char *base_desc = "removing all objects from first row of direct blocks of absolute heap %s"; + const char *base_desc = "removing all objects from first row of direct blocks of absolute heap"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -8001,7 +7975,7 @@ test_man_remove_first_two_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_par size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ - const char *base_desc = "removing all objects from first two rows of direct blocks of absolute heap %s"; + const char *base_desc = "removing all objects from first two rows of direct blocks of absolute heap"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -8073,7 +8047,7 @@ test_man_remove_first_four_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ - const char *base_desc = "removing all objects from first four rows of direct blocks of absolute heap %s"; + const char *base_desc = "removing all objects from first four rows of direct blocks of absolute heap"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -8149,7 +8123,7 @@ test_man_remove_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ - const char *base_desc = "removing all objects from all direct blocks of root group in absolute heap %s"; + const char *base_desc = "removing all objects from all direct blocks of root group in absolute heap"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -8219,7 +8193,7 @@ test_man_remove_2nd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ - const char *base_desc = "removing all objects from 2nd level indirect blocks of absolute heap %s"; + const char *base_desc = "removing all objects from 2nd level indirect blocks of absolute heap"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -8293,7 +8267,7 @@ test_man_remove_3rd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ - const char *base_desc = "removing all objects from 3rd level indirect blocks of absolute heap %s"; + const char *base_desc = "removing all objects from 3rd level indirect blocks of absolute heap"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -8374,8 +8348,7 @@ test_man_skip_start_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t size_t obj_size; /* Size of object */ fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ - const char *base_desc = - "inserting object that is too large for starting block, then remove all objects %s"; + const char *base_desc = "inserting object that is too large for starting block, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -8454,7 +8427,7 @@ test_man_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ const char *base_desc = - "skipping starting block, then adding object back to first block, then remove all objects %s"; + "skipping starting block, then adding object back to first block, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -8554,7 +8527,7 @@ test_man_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_t fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ const char *base_desc = - "skipping starting block, then adding objects to backfill and extend, then remove all objects %s"; + "skipping starting block, then adding objects to backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -8663,7 +8636,7 @@ test_man_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ const char *base_desc = "insert object to initial block, then add object too large for starting direct " - "blocks, then remove all objects %s"; + "blocks, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -8762,7 +8735,7 @@ test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_tes unsigned v; /* Local index variables */ /* Test description */ const char *base_desc = "insert object to initial block, then add object too large for starting direct " - "blocks, then backfill and extend, then remove all objects %s"; + "blocks, then backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -8908,7 +8881,7 @@ test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t * unsigned u; /* Local index variable */ /* Test description */ const char *base_desc = - "skipping blocks with indirect root, then backfill and extend, then remove all objects %s"; + "skipping blocks with indirect root, then backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -9073,7 +9046,7 @@ test_man_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ const char *base_desc = - "filling first row, then skipping rows, then backfill and extend, then remove all objects %s"; + "filling first row, then skipping rows, then backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -9203,7 +9176,7 @@ test_man_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_ unsigned v; /* Local index variables */ /* Test description */ const char *base_desc = "skipping direct blocks to last row and skipping two rows of root indirect " - "block, then backfill and extend, then remove all objects %s"; + "block, then backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -9329,7 +9302,7 @@ test_man_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_crea fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ const char *base_desc = "filling direct blocks and skipping blocks in non-root indirect block, then " - "backfill and extend, then remove all objects %s"; + "backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -9458,7 +9431,7 @@ test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_ unsigned u; /* Local index variable */ /* Test description */ const char *base_desc = "filling direct blocks and skipping row of non-root indirect blocks, then " - "backfill and extend, then remove all objects %s"; + "backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -9590,7 +9563,7 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_ /* Test description */ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, except last one, and insert object too " - "large for 2nd level indirect blocks, then backfill and extend, then remove all objects %s"; + "large for 2nd level indirect blocks, then backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -9736,7 +9709,7 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5 unsigned u; /* Local index variable */ /* Test description */ const char *base_desc = "filling direct blocks and skipping row of non-root indirect blocks, then skip " - "row of direct blocks, then backfill and extend, then remove all objects %s"; + "row of direct blocks, then backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -9899,7 +9872,7 @@ test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_ unsigned u, v; /* Local index variables */ /* Test description */ const char *base_desc = "filling direct blocks and skipping two rows of root indirect block, then " - "backfill and extend, then remove all objects %s"; + "backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -10056,7 +10029,7 @@ test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t /* Test description */ const char *base_desc = "filling direct blocks and skipping two rows of root indirect block, skip one row of root indirect " - "block, then backfill and extend, then remove all objects %s"; + "block, then backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -10236,7 +10209,7 @@ test_man_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t /* Test description */ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, and skip first rows of direct blocks of " - "3rd level indirect block, then backfill and extend, then remove all objects %s"; + "3rd level indirect block, then backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -10368,7 +10341,7 @@ test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect block's direct " "blocks, and skip first rows of direct blocks of 3rd level indirect block's 2nd level indirect " - "block, then backfill and extend, then remove all objects %s"; + "block, then backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -10512,7 +10485,7 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h /* Test description */ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level " "indirect block's direct blocks, and skip first row of indirect blocks of 3rd " - "level indirect block, then backfill and extend, then remove all objects %s"; + "level indirect block, then backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -10665,7 +10638,7 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped( /* Test description */ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level " "indirect block's direct blocks, and skip first two rows of indirect blocks of " - "3rd level indirect block, then backfill and extend, then remove all objects %s"; + "3rd level indirect block, then backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -10823,7 +10796,7 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling first row of 3rd level indirect " "blocks, except last one, fill all direct blocks in last 3rd level indirect block, and insert object " - "too large for it's 2nd level indirect blocks, then backfill and extend, then remove all objects %s"; + "too large for it's 2nd level indirect blocks, then backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -10987,7 +10960,7 @@ test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s "filling direct blocks, filling 2nd level indirect blocks, filling first row of 3rd level indirect " "blocks, fill all direct blocks in next 3rd level indirect block, fill all 1st row of 2nd level " "indirect blocks, except last one, and insert object too large for 2nd level indirect block, then " - "backfill and extend, then remove all objects %s"; + "backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -11155,7 +11128,7 @@ test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5 const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill " "4th level indirect block's direct blocks, and skip first row of 2nd indirect blocks of 4th level " - "indirect block, then backfill and extend, then remove all objects %s"; + "indirect block, then backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -11319,7 +11292,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill " "4th level indirect block's direct, 2nd level indirect blocks and 3rd level direct block, and skip " "first row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then " - "backfill and extend, then remove all objects %s"; + "backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -11503,7 +11476,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_ "first row of 4th level indirect blocks, fill 2nd row 4th level indirect block's direct, 2nd level " "indirect blocks, first row of 3rd level indirect blocks, 3rd level direct block in 2nd row, and " "skip first row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then " - "backfill and extend, then remove all objects %s"; + "backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -11722,7 +11695,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill " "first row of 3rd level indirect blocks in 4th level indirect block except last 3rd level block, " "fill direct blocks in 3rd level block, and skip row of 2nd indirect blocks of 4th level indirect " - "block's 3rd level indirect block, then backfill and extend, then remove all objects %s"; + "block's 3rd level indirect block, then backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -11923,7 +11896,7 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_ "first row of 4th level indirect blocks, except last one, fill first row of 3rd level indirect " "blocks in last 4th level indirect block except last 3rd level block, fill direct blocks in 3rd " "level block, and skip row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect " - "block, then backfill and extend, then remove all objects %s"; + "block, then backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -12144,7 +12117,7 @@ test_man_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar fheap_heap_state_t state; /* State of fractal heap */ unsigned u; /* Local index variables */ /* Test description */ - const char *base_desc = "fragmenting small blocks, then backfill and extend, then remove all objects %s"; + const char *base_desc = "fragmenting small blocks, then backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -12276,7 +12249,7 @@ test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar fheap_heap_state_t state; /* State of fractal heap */ unsigned u, v; /* Local index variables */ /* Test description */ - const char *base_desc = "fragmenting direct blocks, then backfill and extend, then remove all objects %s"; + const char *base_desc = "fragmenting direct blocks, then backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -12450,7 +12423,7 @@ test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * unsigned u, v; /* Local index variables */ /* Test description */ const char *base_desc = "fill root direct blocks, then fragment 2nd level indirect block's direct " - "blocks, then backfill and extend, then remove all objects %s"; + "blocks, then backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -12562,7 +12535,7 @@ test_man_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * /* Test description */ const char *base_desc = "fill root direct blocks and 2nd level indirect blocks, then fragment 3rd level indirect block's " - "direct blocks, then backfill and extend, then remove all objects %s"; + "direct blocks, then backfill and extend, then remove all objects"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -12676,7 +12649,7 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar unsigned char obj_type; /* Type of storage for object */ fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ - const char *base_desc = "insert one huge object, then remove %s"; + const char *base_desc = "insert one huge object, then remove"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -12827,7 +12800,7 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar unsigned char obj_type; /* Type of storage for object */ fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ - const char *base_desc = "insert two huge objects, then remove %s"; + const char *base_desc = "insert two huge objects, then remove"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -13058,7 +13031,7 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp unsigned char obj_type; /* Type of storage for object */ fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ - const char *base_desc = "insert three huge objects, then remove %s"; + const char *base_desc = "insert three huge objects, then remove"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -13365,7 +13338,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar unsigned char obj_type; /* Type of storage for object */ fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ - const char *base_desc = "insert mix of normal & huge objects, then remove %s"; + const char *base_desc = "insert mix of normal & huge objects, then remove"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -13789,7 +13762,7 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam hbool_t huge_ids_direct; /* Are 'huge' objects directly accessed? */ hbool_t pline_init = FALSE; /* Whether the I/O pipeline has been initialized */ /* Test description */ - const char *base_desc = "insert 'huge' object into heap with I/O filters, then remove %s"; + const char *base_desc = "insert 'huge' object into heap with I/O filters, then remove"; /* Copy heap creation properties */ HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t)); @@ -13997,7 +13970,7 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar unsigned char obj_type; /* Type of storage for object */ fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ - const char *base_desc = "insert one tiny object, then remove %s"; + const char *base_desc = "insert one tiny object, then remove"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -14148,7 +14121,7 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar unsigned char obj_type; /* Type of storage for object */ fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ - const char *base_desc = "insert two tiny objects, then remove %s"; + const char *base_desc = "insert two tiny objects, then remove"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -14384,7 +14357,7 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar unsigned char obj_type; /* Type of storage for object */ fheap_heap_state_t state; /* State of fractal heap */ /* Test description */ - const char *base_desc = "insert mix of normal, huge & tiny objects, then remove %s"; + const char *base_desc = "insert mix of normal, huge & tiny objects, then remove"; /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -14985,7 +14958,7 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para fheap_heap_state_t state; /* State of fractal heap */ unsigned deflate_level; /* Deflation level */ /* Test description */ - const char *base_desc = "insert one 'managed' object into heap with I/O filters, then remove %s"; + const char *base_desc = "insert one 'managed' object into heap with I/O filters, then remove"; /* Copy heap creation properties */ HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t)); @@ -15159,7 +15132,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa fheap_heap_state_t state; /* State of fractal heap */ unsigned deflate_level; /* Deflation level */ /* Test description */ - const char *base_desc = "insert two 'managed' objects into heap with I/O filters, then remove %s"; + const char *base_desc = "insert two 'managed' objects into heap with I/O filters, then remove"; /* Copy heap creation properties */ HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t)); diff --git a/test/titerate.c b/test/titerate.c index b6cdd9e3..10ed039 100644 --- a/test/titerate.c +++ b/test/titerate.c @@ -53,8 +53,8 @@ typedef struct { #define CORRUPTED_ATNAMELEN_FILE "memleak_H5O_dtype_decode_helper_H5Odtype.h5" #define DSET_NAME "image" typedef struct searched_err_t { - char message[256]; - bool found; + char message[256]; + hbool_t found; } searched_err_t; /* Call back function for test_corrupted_attnamelen */ @@ -987,7 +987,7 @@ find_err_msg_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *_ /* If the searched error message is found, stop the iteration */ if (err_desc->desc != NULL && HDstrcmp(err_desc->desc, searched_err->message) == 0) { - searched_err->found = true; + searched_err->found = TRUE; status = H5_ITER_STOP; } @@ -1033,14 +1033,14 @@ test_corrupted_attnamelen(void) if (err_status == -1) { /* Initialize client data */ HDstrcpy(err_caught.message, err_message); - err_caught.found = false; + err_caught.found = FALSE; /* Look for the correct error message */ ret = H5Ewalk2(H5E_DEFAULT, H5E_WALK_UPWARD, find_err_msg_cb, &err_caught); CHECK(ret, FAIL, "H5Ewalk2"); /* Fail if the indicated message is not found */ - CHECK(err_caught.found, false, "test_corrupted_attnamelen: Expected error not found"); + CHECK(err_caught.found, FALSE, "test_corrupted_attnamelen: Expected error not found"); } /* Close the dataset and file */ diff --git a/test/tselect.c b/test/tselect.c index 7d32407..a489d45 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -15995,18 +15995,24 @@ test_h5s_set_extent_none(void) void test_select(void) { - hid_t plist_id; /* Property list for reading random hyperslabs */ - hid_t fapl; /* Property list accessing the file */ - int mdc_nelmts; /* Metadata number of elements */ - size_t rdcc_nelmts; /* Raw data number of elements */ - size_t rdcc_nbytes; /* Raw data number of bytes */ - double rdcc_w0; /* Raw data write percentage */ - hssize_t offset[SPACE7_RANK] = {1, 1}; /* Offset for testing selection offsets */ - herr_t ret; /* Generic return value */ + hid_t plist_id; /* Property list for reading random hyperslabs */ + hid_t fapl; /* Property list accessing the file */ + int mdc_nelmts; /* Metadata number of elements */ + size_t rdcc_nelmts; /* Raw data number of elements */ + size_t rdcc_nbytes; /* Raw data number of bytes */ + double rdcc_w0; /* Raw data write percentage */ + hssize_t offset[SPACE7_RANK] = {1, 1}; /* Offset for testing selection offsets */ + const char *env_h5_drvr; /* File Driver value from environment */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Selections\n")); + /* Get the VFD to use */ + env_h5_drvr = HDgetenv("HDF5_DRIVER"); + if (env_h5_drvr == NULL) + env_h5_drvr = "nomatch"; + /* Create a dataset transfer property list */ plist_id = H5Pcreate(H5P_DATASET_XFER); CHECK(plist_id, FAIL, "H5Pcreate"); @@ -16069,10 +16075,13 @@ test_select(void) test_select_hyper_union_3d(); /* Test hyperslab union code for 3-D dataset */ test_select_hyper_valid_combination(); /* Test different input combinations */ - test_select_hyper_and_2d(); /* Test hyperslab intersection (AND) code for 2-D dataset */ - test_select_hyper_xor_2d(); /* Test hyperslab XOR code for 2-D dataset */ - test_select_hyper_notb_2d(); /* Test hyperslab NOTB code for 2-D dataset */ - test_select_hyper_nota_2d(); /* Test hyperslab NOTA code for 2-D dataset */ + /* The following tests are currently broken with the Direct VFD */ + if (HDstrcmp(env_h5_drvr, "direct") != 0) { + test_select_hyper_and_2d(); /* Test hyperslab intersection (AND) code for 2-D dataset */ + test_select_hyper_xor_2d(); /* Test hyperslab XOR code for 2-D dataset */ + test_select_hyper_notb_2d(); /* Test hyperslab NOTB code for 2-D dataset */ + test_select_hyper_nota_2d(); /* Test hyperslab NOTA code for 2-D dataset */ + } /* test the random hyperslab I/O with the default property list for reading */ test_select_hyper_union_random_5d(H5P_DEFAULT); /* Test hyperslab union code for random 5-D hyperslabs */ |