diff options
author | vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com> | 2021-06-02 21:20:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-02 21:20:22 (GMT) |
commit | 4fa86ee88531add7769697ba4da881a9a8090497 (patch) | |
tree | 561792e0e3af7529c8a5e6a9782bc7ddfbf8eb94 /test | |
parent | f77aaebcbb7fdecc824dc86c0ca97d72ef9e0cc5 (diff) | |
parent | 7dded355b89ea66451955ee188841dcd14860c82 (diff) | |
download | hdf5-4fa86ee88531add7769697ba4da881a9a8090497.zip hdf5-4fa86ee88531add7769697ba4da881a9a8090497.tar.gz hdf5-4fa86ee88531add7769697ba4da881a9a8090497.tar.bz2 |
Merge pull request #18 from HDFGroup/feature/vfd_swmr
Feature/vfd swmr
Diffstat (limited to 'test')
75 files changed, 4966 insertions, 3314 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6770666..61f11a9 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -260,15 +260,15 @@ set(mirror_vfd_SOURCES ${HDF5_TEST_SOURCE_DIR}/genall5.c ) -set(vfd_swmr_zoo_reader_SOURCES - ${HDF5_TEST_SOURCE_DIR}/vfd_swmr_zoo_reader.c - ${HDF5_TEST_SOURCE_DIR}/genall5.c -) +#set(vfd_swmr_zoo_reader_SOURCES +# ${HDF5_TEST_SOURCE_DIR}/vfd_swmr_zoo_reader.c +# ${HDF5_TEST_SOURCE_DIR}/genall5.c +#) -set(vfd_swmr_zoo_writer_SOURCES - ${HDF5_TEST_SOURCE_DIR}/vfd_swmr_zoo_writer.c - ${HDF5_TEST_SOURCE_DIR}/genall5.c -) +#set(vfd_swmr_zoo_writer_SOURCES +# ${HDF5_TEST_SOURCE_DIR}/vfd_swmr_zoo_writer.c +# ${HDF5_TEST_SOURCE_DIR}/genall5.c +#) set (ttsafe_SOURCES ${HDF5_TEST_SOURCE_DIR}/ttsafe.h @@ -352,6 +352,9 @@ set (H5_TESTS thread_id # special link vol timer + cmpd_dtransform + event_set + vfd_swmr ) macro (ADD_H5_EXE file) @@ -546,6 +549,12 @@ if (HDF5_ENABLE_FORMATTERS) clang_format (HDF5_TEST_mirror_vfd_FORMAT mirror_vfd) endif () +#----------------------------------------------------------------------------- +# Add Target to clang-format +#----------------------------------------------------------------------------- +if (HDF5_ENABLE_FORMATTERS) + clang_format (HDF5_TEST_event_set_FORMAT event_set) +endif () ############################################################################## ### A D D I T I O N A L T E S T S ### @@ -632,20 +641,20 @@ foreach (h5_test ${H5_VDS_SWMR_TESTS}) ADD_H5_VDS_EXE(${h5_test}) endforeach () -set (H5_VFD_SWMR_TESTS - vfd_swmr_addrem_writer - vfd_swmr_bigset_writer - vfd_swmr_generator - vfd_swmr_group_writer - vfd_swmr_reader - vfd_swmr_remove_reader - vfd_swmr_remove_writer - vfd_swmr_sparse_reader - vfd_swmr_sparse_writer - vfd_swmr_vlstr_reader - vfd_swmr_vlstr_writer - vfd_swmr_writer -) +#set (H5_VFD_SWMR_TESTS +# vfd_swmr_addrem_writer +# vfd_swmr_bigset_writer +# vfd_swmr_generator +# vfd_swmr_group_writer +# vfd_swmr_reader +# vfd_swmr_remove_reader +# vfd_swmr_remove_writer +# vfd_swmr_sparse_reader +# vfd_swmr_sparse_writer +# vfd_swmr_vlstr_reader +# vfd_swmr_vlstr_writer +# vfd_swmr_writer +#) foreach (h5_test ${H5_VFD_SWMR_TESTS}) ADD_H5_EXE(${h5_test}) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index e5ad962..17931cf 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -318,14 +318,6 @@ set (test_CLEANFILES tvlstr.h5 tvlstr2.h5 twriteorder.dat - flush.h5 - flush-swmr.h5 - noflush.h5 - noflush-swmr.h5 - flush_extend.h5 - flush_extend-swmr.h5 - noflush_extend.h5 - noflush_extend-swmr.h5 enum1.h5 titerate.h5 ttsafe.h5 @@ -409,6 +401,7 @@ set (test_CLEANFILES splitter.log mirror_rw/* mirror_wo/* + event_set_*.h5 ) # Remove any output file left over from previous test run @@ -869,7 +862,7 @@ if (BUILD_SHARED_LIBS) ############################################################################## endif () -option (TEST_SHELL_SCRIPTS "Enable shell script tests" OFF) +option (TEST_SHELL_SCRIPTS "Enable shell script tests" ON) if (TEST_SHELL_SCRIPTS) include (ShellTests.cmake) endif() diff --git a/test/Makefile.am b/test/Makefile.am index 8aeb9ac..2d76946 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -71,12 +71,13 @@ TEST_PROG= testhdf5 \ cache cache_api cache_image cache_tagging lheap ohdr \ stab gheap evict_on_close farray earray btree2 fheap \ pool accum hyperslab istore bittests dt_arith page_buffer vfd_swmr \ - dtypes dsets chunk_info cmpd_dset filter_fail extend direct_chunk \ - external efc objcopy objcopy_ref links unlink twriteorder big mtime fillval mount \ + dtypes dsets chunk_info cmpd_dset cmpd_dtransform filter_fail extend direct_chunk \ + external efc objcopy objcopy_ref links unlink twriteorder big mtime \ + fillval mount \ flush1 flush2 app_ref enum set_extent ttsafe enc_dec_plist \ enc_dec_plist_cross_platform getname vfd ros3 s3comms hdfs ntypes \ dangle dtransform reserved cross_read freespace mf vds file_image \ - unregister cache_logging cork swmr thread_id vol timer + unregister cache_logging cork swmr thread_id vol timer event_set # List programs to be built when testing here. # error_test and err_compat are built at the same time as the other tests, but executed by testerror.sh. @@ -110,6 +111,7 @@ check_PROGRAMS=$(TEST_PROG) error_test err_compat tcheck_version \ vfd_swmr_vlstr_reader vfd_swmr_vlstr_writer \ vfd_swmr_zoo_reader vfd_swmr_zoo_writer \ vfd_swmr_attrdset_reader vfd_swmr_attrdset_writer \ + vfd_swmr_check_compat \ swmr_check_compat_vfd vds_env vds_swmr_gen vds_swmr_reader vds_swmr_writer \ mirror_vfd if HAVE_SHARED_CONDITIONAL @@ -240,7 +242,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse test_swmr*.h5 cache_logging.h5 cache_logging.out vds_swmr.h5 vds_swmr_src_*.h5 \ swmr[0-2].h5 swmr_writer.out swmr_writer.log.* swmr_reader.out.* swmr_reader.log.* \ tbogus.h5.copy cache_image_test.h5 direct_chunk.h5 native_vol_test.h5 \ - splitter*.h5 splitter.log mirror_rw mirror_ro + splitter*.h5 splitter.log mirror_rw mirror_ro event_set_[0-9].h5 # Sources for testhdf5 executable testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \ diff --git a/test/ShellTests.cmake b/test/ShellTests.cmake index b28bbd6..812121e 100644 --- a/test/ShellTests.cmake +++ b/test/ShellTests.cmake @@ -17,7 +17,7 @@ if (UNIX) - find_program (SH_PROGRAM sh) + find_program (SH_PROGRAM bash) if (SH_PROGRAM) ############################################################################## diff --git a/test/btree2.c b/test/btree2.c index f18b65c..aca0c77 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -631,6 +631,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ hsize_t idx; /* Index within B-tree, for iterator */ + hbool_t found; /* Whether record was found */ herr_t ret; /* Generic error return value */ /* @@ -666,8 +667,11 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_ TEST_ERROR /* Attempt to find record in B-tree with no records */ - idx = 0; - if (H5B2_find(bt2, &idx, find_cb, NULL) != FALSE) + idx = 0; + found = FALSE; + if (H5B2_find(bt2, &idx, &found, find_cb, NULL) < 0) + TEST_ERROR + if (found) TEST_ERROR /* Attempt to index record in B-tree with no records */ @@ -698,22 +702,34 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_ /* Attempt to find non-existant record in B-tree with 1 record */ /* (Should not be found, but not fail) */ - idx = 41; - if (H5B2_find(bt2, &idx, find_cb, &idx) != FALSE) + idx = 41; + found = FALSE; + if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0) + TEST_ERROR + if (found) TEST_ERROR /* Try again with NULL 'op' */ /* (Should not be found, but not fail) */ - if (H5B2_find(bt2, &idx, NULL, NULL) != FALSE) + found = FALSE; + if (H5B2_find(bt2, &idx, &found, NULL, NULL) < 0) + TEST_ERROR + if (found) TEST_ERROR /* Attempt to find existant record in B-tree with 1 record */ - idx = 42; - if (H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) + idx = 42; + found = FALSE; + if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0) + TEST_ERROR + if (!found) TEST_ERROR /* Try again with NULL 'op' */ - if (H5B2_find(bt2, &idx, NULL, NULL) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &idx, &found, NULL, NULL) < 0) + TEST_ERROR + if (!found) TEST_ERROR /* Attempt to index non-existant record in B-tree with 1 record */ @@ -766,13 +782,19 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_ /* Attempt to find non-existant record in level-0 B-tree with several records */ /* (Should not be found, but not fail) */ - idx = 41; - if (H5B2_find(bt2, &idx, find_cb, &idx) != FALSE) + idx = 41; + found = FALSE; + if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0) + TEST_ERROR + if (found) TEST_ERROR /* Attempt to find existant record in level-0 B-tree with several record */ - idx = 56; - if (H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) + idx = 56; + found = FALSE; + if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0) + TEST_ERROR + if (!found) TEST_ERROR /* Attempt to index non-existant record in B-tree with several records */ @@ -852,6 +874,7 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p hsize_t idx; /* Index within B-tree, for iterator */ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */ unsigned u; /* Local index variable */ + hbool_t found; /* Whether record was found */ herr_t ret; /* Generic error return value */ /* @@ -937,19 +960,28 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p /* Attempt to find non-existant record in level-1 B-tree */ /* (Should not be found, but not fail) */ - idx = INSERT_SPLIT_ROOT_NREC + 10; - if (H5B2_find(bt2, &idx, find_cb, &idx) != FALSE) + idx = INSERT_SPLIT_ROOT_NREC + 10; + found = FALSE; + if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0) + TEST_ERROR + if (found) TEST_ERROR /* Attempt to find existant record in root of level-1 B-tree */ - idx = 33; - if (H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) + idx = 33; + found = FALSE; + if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0) FAIL_STACK_ERROR + if (!found) + TEST_ERROR /* Attempt to find existant record in leaf of level-1 B-tree */ - idx = 56; - if (H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) + idx = 56; + found = FALSE; + if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0) FAIL_STACK_ERROR + if (!found) + TEST_ERROR /* Attempt to index non-existant record in level-1 B-tree */ idx = 0; @@ -1602,6 +1634,7 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */ hsize_t idx; /* Index within B-tree, for iterator */ unsigned u; /* Local index variable */ + hbool_t found; /* Whether record was found */ herr_t ret; /* Generic error return value */ /* @@ -1673,14 +1706,20 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_ /* Attempt to find non-existant record in level-2 B-tree */ /* (Should not be found, but not fail) */ - idx = INSERT_SPLIT_ROOT_NREC * 30; - if (H5B2_find(bt2, &idx, find_cb, &idx) != FALSE) + idx = INSERT_SPLIT_ROOT_NREC * 30; + found = FALSE; + if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0) + TEST_ERROR + if (found) TEST_ERROR /* Attempt to find existant record in root of level-2 B-tree */ - idx = 948; - if (H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) + idx = 948; + found = FALSE; + if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0) FAIL_STACK_ERROR + if (!found) + TEST_ERROR /* Check with B-tree */ record = 948; @@ -1688,9 +1727,12 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_ TEST_ERROR /* Attempt to find existant record in internal node of level-2 B-tree */ - idx = 505; - if (H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) + idx = 505; + found = FALSE; + if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0) FAIL_STACK_ERROR + if (!found) + TEST_ERROR /* Check with B-tree */ record = 505; @@ -1698,9 +1740,12 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_ TEST_ERROR /* Attempt to find existant record in leaf of level-2 B-tree */ - idx = 555; - if (H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) + idx = 555; + found = FALSE; + if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0) FAIL_STACK_ERROR + if (!found) + TEST_ERROR /* Check with B-tree */ record = 555; @@ -2957,14 +3002,15 @@ test_insert_lots(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t hsize_t temp_rec; /* Temporary record */ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */ hsize_t nrec; /* Number of records in B-tree */ + hbool_t found; /* Whether record was found */ herr_t ret; /* Generic error return value */ /* Initialize random number seed */ curr_time = HDtime(NULL); -#ifdef QAK - curr_time = 1109170019; - HDfprintf(stderr, "curr_time=%lu\n", (unsigned long)curr_time); -#endif /* QAK */ +#if 0 +curr_time=1109170019; +HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); +#endif HDsrandom((unsigned)curr_time); /* @@ -3062,8 +3108,11 @@ test_insert_lots(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t /* Attempt to find non-existant record in level-4 B-tree */ /* (Should not be found, but not fail) */ - idx = INSERT_MANY * 2; - if (H5B2_find(bt2, &idx, find_cb, &idx) != FALSE) + idx = INSERT_MANY * 2; + found = FALSE; + if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0) + TEST_ERROR + if (found) TEST_ERROR /* Find random records */ @@ -3072,8 +3121,11 @@ test_insert_lots(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t idx = (hsize_t)(HDrandom() % INSERT_MANY); /* Attempt to find existant record in root of level-4 B-tree */ - if (H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0) FAIL_STACK_ERROR + if (!found) + TEST_ERROR } /* end for */ /* Attempt to index non-existant record in level-4 B-tree, in increasing & decreasing order */ @@ -3186,6 +3238,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_ H5B2_test_rec_t record; /* Record to insert into tree */ H5B2_test_rec_t modify; /* Modified value */ H5B2_test_rec_t find; /* Record to find */ + hbool_t found; /* Whether record was found */ herr_t ret; /* Generic error return value */ /* Create the file for the test */ @@ -3214,31 +3267,43 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_ /* (Should not be found, but not fail) */ find.key = 10; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) FAIL_STACK_ERROR if (find.val != (hsize_t)-1) TEST_ERROR + if (found) + TEST_ERROR /* Try again with NULL 'op' */ /* (Should not be found, but not fail) */ - if (H5B2_find(bt2, &find, NULL, NULL) != FALSE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, NULL, NULL) < 0) FAIL_STACK_ERROR if (find.val != (hsize_t)-1) TEST_ERROR + if (found) + TEST_ERROR /* Attempt to find existant record in B-tree with 1 record */ find.key = 42; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) FAIL_STACK_ERROR if (find.val != 72) TEST_ERROR + if (!found) + TEST_ERROR /* Try again with NULL 'op' */ find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, NULL, NULL) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, NULL, NULL) < 0) FAIL_STACK_ERROR if (find.val != (hsize_t)-1) TEST_ERROR + if (!found) + TEST_ERROR /* Attempt to index non-existant record in B-tree with 1 record */ H5E_BEGIN_TRY @@ -3279,31 +3344,43 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_ /* (Should not be found, but not fail) */ find.key = 10; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) FAIL_STACK_ERROR if (find.val != (hsize_t)-1) TEST_ERROR + if (found) + TEST_ERROR /* Try again with NULL 'op' */ /* (Should not be found, but not fail) */ - if (H5B2_find(bt2, &find, NULL, NULL) != FALSE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, NULL, NULL) < 0) FAIL_STACK_ERROR if (find.val != (hsize_t)-1) TEST_ERROR + if (found) + TEST_ERROR /* Attempt to find modified record in B-tree with 1 record */ find.key = 42; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) FAIL_STACK_ERROR if (find.val != 43) TEST_ERROR + if (!found) + TEST_ERROR /* Try again with NULL 'op' */ find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, NULL, NULL) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, NULL, NULL) < 0) FAIL_STACK_ERROR if (find.val != (hsize_t)-1) TEST_ERROR + if (!found) + TEST_ERROR /* Attempt to index non-existant record in B-tree with 1 record */ H5E_BEGIN_TRY @@ -3364,17 +3441,23 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_ /* (Should not be found, but not fail) */ find.key = 10; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) TEST_ERROR if (find.val != (hsize_t)-1) TEST_ERROR + if (found) + TEST_ERROR /* Attempt to find existant record in level-0 B-tree with several records */ find.key = 56; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) TEST_ERROR if (find.val != 12) TEST_ERROR + if (!found) + TEST_ERROR /* Attempt to index non-existant record in B-tree with several records */ H5E_BEGIN_TRY @@ -3452,17 +3535,23 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_ /* (Should not be found, but not fail) */ find.key = 41; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) TEST_ERROR if (find.val != (hsize_t)-1) TEST_ERROR + if (found) + TEST_ERROR /* Attempt to find existant record in level-0 B-tree with several record */ find.key = 56; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) TEST_ERROR if (find.val != 22) TEST_ERROR + if (!found) + TEST_ERROR /* Attempt to index non-existant record in B-tree with several records */ H5E_BEGIN_TRY @@ -3562,6 +3651,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p H5B2_test_rec_t idx; /* Index within B-tree, for iterator */ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */ unsigned u; /* Local index variable */ + hbool_t found; /* Whether record was found */ herr_t ret; /* Generic error return value */ /* @@ -3696,30 +3786,39 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p /* (Should not be found, but not fail) */ find.key = 800; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) TEST_ERROR if (find.val != (hsize_t)-1) TEST_ERROR + if (found) + TEST_ERROR /* Attempt to find existant record in root of level-1 B-tree */ find.key = 33; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) FAIL_STACK_ERROR if (find.key != 33) TEST_ERROR if (find.val != 67) TEST_ERROR + if (!found) + TEST_ERROR /* Attempt to find existant record in leaf of level-1 B-tree */ find.key = 56; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) FAIL_STACK_ERROR if (find.key != 56) TEST_ERROR if (find.val != 113) TEST_ERROR + if (!found) + TEST_ERROR /* Attempt to index non-existant record in level-1 B-tree */ H5E_BEGIN_TRY @@ -4402,6 +4501,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_ H5B2_test_rec_t idx; /* Index within B-tree, for iterator */ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */ unsigned u; /* Local index variable */ + hbool_t found; /* Whether record was found */ herr_t ret; /* Generic error return value */ /* @@ -4482,18 +4582,24 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_ /* (Should not be found, but not fail) */ find.key = INSERT_SPLIT_ROOT_NREC_REC * 42; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) TEST_ERROR if (find.val != (hsize_t)-1) TEST_ERROR + if (found) + TEST_ERROR /* Attempt to find existant record in root of level-2 B-tree */ find.key = 1347; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) FAIL_STACK_ERROR if (find.val != (1347 * 2)) TEST_ERROR + if (!found) + TEST_ERROR /* Check with B-tree */ record.key = 1347; @@ -4503,10 +4609,13 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_ /* Attempt to find existant record in internal node of level-2 B-tree */ find.key = 513; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) FAIL_STACK_ERROR if (find.val != (513 * 2)) TEST_ERROR + if (!found) + TEST_ERROR /* Check with B-tree */ record.key = 513; @@ -4516,10 +4625,13 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_ /* Attempt to find existant record in leaf of level-2 B-tree */ find.key = 555; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) FAIL_STACK_ERROR if (find.val != (555 * 2)) TEST_ERROR + if (!found) + TEST_ERROR /* Check with B-tree */ record.key = 555; @@ -4647,18 +4759,24 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_ /* (Should not be found, but not fail) */ find.key = INSERT_SPLIT_ROOT_NREC_REC * 42; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) TEST_ERROR if (find.val != (hsize_t)-1) TEST_ERROR + if (found) + TEST_ERROR /* Attempt to find existant record in root of level-2 B-tree */ find.key = 1344; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) FAIL_STACK_ERROR if (find.val != (1344 * 2)) TEST_ERROR + if (!found) + TEST_ERROR /* Check with B-tree */ record.key = 1344; @@ -4668,10 +4786,13 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_ /* Attempt to find existant record in internal node of level-2 B-tree */ find.key = 512; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) FAIL_STACK_ERROR if (find.val != (512 * 2)) TEST_ERROR + if (!found) + TEST_ERROR /* Check with B-tree */ record.key = 512; @@ -4681,10 +4802,13 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_ /* Attempt to find existant record in leaf of level-2 B-tree */ find.key = 555; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) FAIL_STACK_ERROR if (find.val != (555 * 2)) TEST_ERROR + if (!found) + TEST_ERROR /* Check with B-tree */ record.key = 555; @@ -4822,18 +4946,24 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_ /* (Should not be found, but not fail) */ find.key = INSERT_SPLIT_ROOT_NREC_REC * 42; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) TEST_ERROR if (find.val != (hsize_t)-1) TEST_ERROR + if (found) + TEST_ERROR /* Attempt to find existant record in root of level-2 B-tree */ find.key = 1345; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) FAIL_STACK_ERROR if (find.val != (1345 * 2)) TEST_ERROR + if (!found) + TEST_ERROR /* Check with B-tree */ record.key = 1345; @@ -4843,10 +4973,13 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_ /* Attempt to find existant record in internal node of level-2 B-tree */ find.key = 513; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) FAIL_STACK_ERROR if (find.val != (513 * 2)) TEST_ERROR + if (!found) + TEST_ERROR /* Check with B-tree */ record.key = 513; @@ -4856,10 +4989,13 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_ /* Attempt to find existant record in leaf of level-2 B-tree */ find.key = 555; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) FAIL_STACK_ERROR if (find.val != (555 * 2)) TEST_ERROR + if (!found) + TEST_ERROR /* Check with B-tree */ record.key = 555; @@ -4960,6 +5096,7 @@ test_update_lots(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t H5B2_stat_t bt2_stat; /* Statistics about B-tree created */ hsize_t nrec; /* Number of records in B-tree */ unsigned u; /* Local index variable */ + hbool_t found; /* Whether record was found */ herr_t ret; /* Generic error return value */ /* Initialize random number seed */ @@ -5055,10 +5192,13 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); /* (Should not be found, but not fail) */ find.key = INSERT_MANY_REC * 2; find.val = (hsize_t)-1; - if (H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) TEST_ERROR if (find.val != (hsize_t)-1) TEST_ERROR + if (found) + TEST_ERROR /* Find random records */ for (u = 0; u < FIND_MANY_REC; u++) { @@ -5067,10 +5207,13 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); find.val = (hsize_t)-1; /* Attempt to find existant record in level-4 B-tree */ - if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) + found = FALSE; + if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0) FAIL_STACK_ERROR if (find.val != (find.key * 2)) TEST_ERROR + if (!found) + TEST_ERROR } /* end for */ /* Attempt to index non-existant record in level-4 B-tree, in increasing & decreasing order */ @@ -9600,6 +9743,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa H5B2_stat_t bt2_stat; /* Statistics about B-tree created */ H5B2_node_info_test_t ninfo; /* B-tree node info */ unsigned u; /* Local index variable */ + hbool_t rec_found; /* Whether record was found */ herr_t ret; /* Generic error return value */ /* @@ -9669,12 +9813,15 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa TEST_ERROR /* Attempt to find modified record */ - record = 4331; - found = 4331; - if (H5B2_find(bt2, &record, find_cb, &found) != TRUE) + record = 4331; + found = 4331; + rec_found = FALSE; + if (H5B2_find(bt2, &record, &rec_found, find_cb, &found) < 0) FAIL_STACK_ERROR if (found != 4331) TEST_ERROR + if (!rec_found) + TEST_ERROR /* Attempt to find original record */ record = 4330; @@ -9717,12 +9864,15 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa TEST_ERROR /* Attempt to find modified record */ - record = 5352; - found = 5352; - if (H5B2_find(bt2, &record, find_cb, &found) != TRUE) + record = 5352; + found = 5352; + rec_found = FALSE; + if (H5B2_find(bt2, &record, &rec_found, find_cb, &found) < 0) STACK_ERROR if (found != 5352) TEST_ERROR + if (!rec_found) + TEST_ERROR /* Attempt to find original record */ record = 5350; @@ -9765,12 +9915,15 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa TEST_ERROR /* Attempt to find modified record */ - record = 9448; - found = 9448; - if (H5B2_find(bt2, &record, find_cb, &found) != TRUE) + record = 9448; + found = 9448; + rec_found = FALSE; + if (H5B2_find(bt2, &record, &rec_found, find_cb, &found) < 0) STACK_ERROR if (found != 9448) TEST_ERROR + if (!rec_found) + TEST_ERROR /* Attempt to find original record */ record = 9445; diff --git a/test/cache.c b/test/cache.c index c7b2a25..abbfaff 100644 --- a/test/cache.c +++ b/test/cache.c @@ -8060,19 +8060,6 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu if ((check[i].entry_num != i) || (check[i].entry_type < 0) || (check[i].entry_type >= NUMBER_OF_ENTRY_TYPES) || (check[i].entry_index < 0) || (check[i].entry_index > max_indices[check[i].entry_type]) || -#ifndef H5_HAVE_STDBOOL_H - /* Check for nonsense values if hbool_t is an integral - * type instead of a real Boolean. - */ - ((check[i].in_cache != TRUE) && (check[i].in_cache != FALSE)) || - ((check[i].at_main_addr != TRUE) && (check[i].at_main_addr != FALSE)) || - ((check[i].is_dirty != TRUE) && (check[i].is_dirty != FALSE)) || - ((check[i].is_protected != TRUE) && (check[i].is_protected != FALSE)) || - ((check[i].is_pinned != TRUE) && (check[i].is_pinned != FALSE)) || - ((check[i].expected_deserialized != TRUE) && (check[i].expected_deserialized != FALSE)) || - ((check[i].expected_serialized != TRUE) && (check[i].expected_serialized != FALSE)) || - ((check[i].expected_destroyed != TRUE) && (check[i].expected_destroyed != FALSE)) || -#endif /* H5_HAVE_STDBOOL_H */ (check[i].expected_size <= (size_t)0)) { pass = FALSE; @@ -26392,7 +26379,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged) pass = FALSE; failure_mssg = "H5C_get_cache_hit_rate failed.\n"; } - else if (!H5_DBL_ABS_EQUAL(hit_rate, (double)0.0f)) { /* i.e. hit_rate != 0.0 */ + else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.0)) { /* i.e. hit_rate != 0.0 */ pass = FALSE; failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 1.\n"; @@ -26423,7 +26410,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged) pass = FALSE; failure_mssg = "H5C_get_cache_hit_rate failed.\n"; } - else if (!H5_DBL_ABS_EQUAL(hit_rate, (double)0.0f)) { /* i.e. hit_rate != 0.0 */ + else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.0)) { /* i.e. hit_rate != 0.0 */ pass = FALSE; failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 2.\n"; @@ -26464,7 +26451,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged) pass = FALSE; failure_mssg = "H5C_get_cache_hit_rate failed.\n"; } - else if (!H5_DBL_ABS_EQUAL(hit_rate, (double)0.5f)) { /* i.e. hit_rate != 0.5 */ + else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.5)) { /* i.e. hit_rate != 0.5 */ pass = FALSE; failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 3.\n"; @@ -26537,7 +26524,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged) pass = FALSE; failure_mssg = "H5C_get_cache_hit_rate failed.\n"; } - else if (!H5_DBL_ABS_EQUAL(hit_rate, (double)0.5F)) { /* i.e. hit_rate != 0.5 */ + else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.5)) { /* i.e. hit_rate != 0.5 */ pass = FALSE; failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 4.\n"; diff --git a/test/cache_api.c b/test/cache_api.c index 75e1b9d..5d0f395 100644 --- a/test/cache_api.c +++ b/test/cache_api.c @@ -81,27 +81,27 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024 + 1), - /* double min_clean_fraction = */ 0.2f, + /* double min_clean_fraction = */ 0.2, /* size_t max_size = */ (16 * 1024 * 1024 + 1), /* size_t min_size = */ (1 * 1024 * 1024 + 1), /* long int epoch_length = */ 50001, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.91f, - /* double increment = */ 2.1f, + /* double lower_hr_threshold = */ 0.91, + /* double increment = */ 2.1, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024 + 1), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0f, - /* double flash_threshold = */ 0.5f, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out, - /* double upper_hr_threshold = */ 0.998f, - /* double decrement = */ 0.91f, + /* double upper_hr_threshold = */ 0.998, + /* double decrement = */ 0.91, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024 - 1), /* int epochs_before_eviction = */ 4, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05f, + /* double empty_reserve = */ 0.05, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY}; @@ -526,22 +526,22 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024 + 1), - /* double min_clean_fraction = */ 0.2f, + /* double min_clean_fraction = */ 0.2, /* size_t max_size = */ (16 * 1024 * 1024 + 1), /* size_t min_size = */ (1 * 1024 * 1024 + 1), /* long int epoch_length = */ 50001, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.91f, - /* double increment = */ 2.1f, + /* double lower_hr_threshold = */ 0.91, + /* double increment = */ 2.1, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024 + 1), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0f, - /* double flash_threshold = */ 0.5f, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out, - /* double upper_hr_threshold = */ 0.998f, - /* double decrement = */ 0.91f, + /* double upper_hr_threshold = */ 0.998, + /* double decrement = */ 0.91, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024 - 1), /* int epochs_before_eviction = */ 4, @@ -559,27 +559,27 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (512 * 1024), - /* double min_clean_fraction = */ 0.1f, + /* double min_clean_fraction = */ 0.1, /* size_t max_size = */ (8 * 1024 * 1024), /* size_t min_size = */ (512 * 1024), /* long int epoch_length = */ 25000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.9f, - /* double increment = */ 2.0f, + /* double lower_hr_threshold = */ 0.9, + /* double increment = */ 2.0, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (2 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 1.5f, - /* double flash_threshold = */ 0.4f, + /* double flash_multiple = */ 1.5, + /* double flash_threshold = */ 0.4, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold, - /* double upper_hr_threshold = */ 0.9995f, - /* double decrement = */ 0.95f, + /* double upper_hr_threshold = */ 0.9995, + /* double decrement = */ 0.95, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (512 * 1024), /* int epochs_before_eviction = */ 4, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05f, + /* double empty_reserve = */ 0.05, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY}; @@ -592,27 +592,27 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.2f, + /* double min_clean_fraction = */ 0.2, /* size_t max_size = */ (16 * 1024 * 1024), /* size_t min_size = */ (1 * 1024 * 1024), /* long int epoch_length = */ 50000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off, - /* double lower_hr_threshold = */ 0.90f, - /* double increment = */ 2.0f, + /* double lower_hr_threshold = */ 0.90, + /* double increment = */ 2.0, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.1f, - /* double flash_threshold = */ 0.6f, + /* double flash_multiple = */ 2.1, + /* double flash_threshold = */ 0.6, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off, - /* double upper_hr_threshold = */ 0.999f, - /* double decrement = */ 0.9f, + /* double upper_hr_threshold = */ 0.999, + /* double decrement = */ 0.9, /* hbool_t apply_max_decrement = */ FALSE, /* size_t max_decrement = */ (1 * 1024 * 1024 - 1), /* int epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ FALSE, - /* double empty_reserve = */ 0.05f, + /* double empty_reserve = */ 0.05, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY}; @@ -625,28 +625,28 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.15f, + /* double min_clean_fraction = */ 0.15, /* size_t max_size = */ (20 * 1024 * 1024), /* size_t min_size = */ (1 * 1024 * 1024), /* long int epoch_length = */ 75000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.9f, - /* double increment = */ 2.0f, + /* double lower_hr_threshold = */ 0.9, + /* double increment = */ 2.0, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (2 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 1.1f, - /* double flash_threshold = */ 0.3f, + /* double flash_multiple = */ 1.1, + /* double flash_threshold = */ 0.3, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999f, - /* double decrement = */ 0.9f, + /* double upper_hr_threshold = */ 0.999, + /* double decrement = */ 0.9, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), /* int epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.1f, + /* double empty_reserve = */ 0.1, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY}; @@ -755,7 +755,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id) pass = FALSE; failure_mssg = "H5Fget_mdc_hit_rate() failed 1.\n"; } - else if (!H5_DBL_ABS_EQUAL(hit_rate, (double)0.0f)) { + else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.0)) { pass = FALSE; failure_mssg = "H5Fget_mdc_hit_rate() returned unexpected hit rate.\n"; @@ -857,7 +857,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id) hbool_t valid_chunk; hbool_t dump_hit_rate = FALSE; int64_t min_accesses = 1000; - double min_hit_rate = 0.90f; + double min_hit_rate = 0.90; hbool_t dump_cache_size = FALSE; hid_t file_id = -1; hid_t dataspace_id = -1; @@ -883,27 +883,27 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ 500000, - /* double min_clean_fraction = */ 0.1f, + /* double min_clean_fraction = */ 0.1, /* size_t max_size = */ 16000000, /* size_t min_size = */ 250000, /* long int epoch_length = */ 50000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off, - /* double lower_hr_threshold = */ 0.95f, - /* double increment = */ 2.0f, + /* double lower_hr_threshold = */ 0.95, + /* double increment = */ 2.0, /* hbool_t apply_max_increment = */ FALSE, /* size_t max_increment = */ 4000000, /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0f, - /* double flash_threshold = */ 0.5f, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off, - /* double upper_hr_threshold = */ 0.999f, - /* double decrement = */ 0.9f, + /* double upper_hr_threshold = */ 0.999, + /* double decrement = */ 0.9, /* hbool_t apply_max_decrement = */ FALSE, /* size_t max_decrement = */ 1000000, /* int epochs_before_eviction = */ 2, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05f, + /* double empty_reserve = */ 0.05, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY}; @@ -916,27 +916,27 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ 12000000, - /* double min_clean_fraction = */ 0.1f, + /* double min_clean_fraction = */ 0.1, /* size_t max_size = */ 16000000, /* size_t min_size = */ 250000, /* long int epoch_length = */ 50000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off, - /* double lower_hr_threshold = */ 0.95f, - /* double increment = */ 2.0f, + /* double lower_hr_threshold = */ 0.95, + /* double increment = */ 2.0, /* hbool_t apply_max_increment = */ FALSE, /* size_t max_increment = */ 4000000, /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0f, - /* double flash_threshold = */ 0.5f, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off, - /* double upper_hr_threshold = */ 0.999f, - /* double decrement = */ 0.9f, + /* double upper_hr_threshold = */ 0.999, + /* double decrement = */ 0.9, /* hbool_t apply_max_decrement = */ FALSE, /* size_t max_decrement = */ 1000000, /* int epochs_before_eviction = */ 2, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05f, + /* double empty_reserve = */ 0.05, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY}; @@ -949,27 +949,27 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ 2000000, - /* double min_clean_fraction = */ 0.1f, + /* double min_clean_fraction = */ 0.1, /* size_t max_size = */ 16000000, /* size_t min_size = */ 250000, /* long int epoch_length = */ 50000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off, - /* double lower_hr_threshold = */ 0.95f, - /* double increment = */ 2.0f, + /* double lower_hr_threshold = */ 0.95, + /* double increment = */ 2.0, /* hbool_t apply_max_increment = */ FALSE, /* size_t max_increment = */ 4000000, /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0f, - /* double flash_threshold = */ 0.5f, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off, - /* double upper_hr_threshold = */ 0.999f, - /* double decrement = */ 0.9f, + /* double upper_hr_threshold = */ 0.999, + /* double decrement = */ 0.9, /* hbool_t apply_max_decrement = */ FALSE, /* size_t max_decrement = */ 1000000, /* int epochs_before_eviction = */ 2, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05f, + /* double empty_reserve = */ 0.05, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY}; @@ -1517,26 +1517,26 @@ init_invalid_configs(void) configs[i].evictions_enabled = TRUE; configs[i].set_initial_size = TRUE; configs[i].initial_size = (1 * 1024 * 1024); - configs[i].min_clean_fraction = 0.25F; + configs[i].min_clean_fraction = 0.25; configs[i].max_size = (16 * 1024 * 1024); configs[i].min_size = (1 * 1024 * 1024); configs[i].epoch_length = 50000; configs[i].incr_mode = H5C_incr__threshold; - configs[i].lower_hr_threshold = 0.9F; - configs[i].increment = 2.0F; + configs[i].lower_hr_threshold = 0.9; + configs[i].increment = 2.0; configs[i].apply_max_increment = TRUE; configs[i].max_increment = (4 * 1024 * 1024); configs[i].flash_incr_mode = H5C_flash_incr__off; - configs[i].flash_multiple = 2.0F; - configs[i].flash_threshold = 0.5F; + configs[i].flash_multiple = 2.0; + configs[i].flash_threshold = 0.5; configs[i].decr_mode = H5C_decr__age_out_with_threshold; - configs[i].upper_hr_threshold = 0.999F; - configs[i].decrement = 0.9F; + configs[i].upper_hr_threshold = 0.999; + configs[i].decrement = 0.9; configs[i].apply_max_decrement = TRUE; configs[i].max_decrement = (1 * 1024 * 1024); configs[i].epochs_before_eviction = 3; configs[i].apply_empty_reserve = TRUE; - configs[i].empty_reserve = 0.1F; + configs[i].empty_reserve = 0.1; configs[i].dirty_bytes_threshold = (256 * 1024); configs[i].metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY; } @@ -1567,10 +1567,10 @@ init_invalid_configs(void) configs[6].initial_size = (1 * 1024 * 1024 - 1); /* 7 -- min_clean_fraction too big */ - configs[7].min_clean_fraction = 1.000001f; + configs[7].min_clean_fraction = 1.000001; /* 8 -- min_clean_fraction too small */ - configs[8].min_clean_fraction = -0.00000001f; + configs[8].min_clean_fraction = -0.00000001; /* 9 -- epoch_length too small */ configs[9].epoch_length = H5C__MIN_AR_EPOCH_LENGTH - 1; @@ -1582,10 +1582,10 @@ init_invalid_configs(void) configs[11].incr_mode = (enum H5C_cache_incr_mode) - 1; /* 12 -- lower_hr_threshold too small */ - configs[12].lower_hr_threshold = -0.000001f; + configs[12].lower_hr_threshold = -0.000001; /* 13 -- lower_hr_threshold too big */ - configs[13].lower_hr_threshold = 1.00000001f; + configs[13].lower_hr_threshold = 1.00000001; /* 14 -- increment too small */ configs[14].increment = 0.999999999999; @@ -1595,29 +1595,29 @@ init_invalid_configs(void) /* 16 -- flash_multiple too small */ configs[16].flash_incr_mode = H5C_flash_incr__add_space; - configs[16].flash_multiple = 0.09f; + configs[16].flash_multiple = 0.09; /* 17 -- flash_multiple too big */ configs[17].flash_incr_mode = H5C_flash_incr__add_space; - configs[17].flash_multiple = 10.001f; + configs[17].flash_multiple = 10.001; /* 18 -- flash_threshold too small */ configs[18].flash_incr_mode = H5C_flash_incr__add_space; - configs[18].flash_threshold = 0.099f; + configs[18].flash_threshold = 0.099; /* 19 -- flash_threshold too big */ configs[19].flash_incr_mode = H5C_flash_incr__add_space; - configs[19].flash_threshold = 1.001f; + configs[19].flash_threshold = 1.001; /* 20 -- bad decr_mode */ configs[20].decr_mode = (enum H5C_cache_decr_mode) - 1; /* 21 -- upper_hr_threshold too big */ - configs[21].upper_hr_threshold = 1.00001f; + configs[21].upper_hr_threshold = 1.00001; /* 22 -- decrement too small */ configs[22].decr_mode = H5C_decr__threshold; - configs[22].decrement = -0.0000000001f; + configs[22].decrement = -0.0000000001; /* 23 -- decrement too big */ configs[23].decr_mode = H5C_decr__threshold; @@ -1630,20 +1630,20 @@ init_invalid_configs(void) configs[25].epochs_before_eviction = H5C__MAX_EPOCH_MARKERS + 1; /* 26 -- empty_reserve too small */ - configs[26].empty_reserve = -0.0000000001f; + configs[26].empty_reserve = -0.0000000001; /* 27 -- empty_reserve too big */ configs[27].empty_reserve = 1.00000000001; /* 28 -- upper_hr_threshold too small */ - configs[28].upper_hr_threshold = -0.000000001f; + configs[28].upper_hr_threshold = -0.000000001; /* 29 -- upper_hr_threshold too big */ configs[29].upper_hr_threshold = 1.00000001; /* 30 -- upper_hr_threshold <= lower_hr_threshold */ - configs[30].lower_hr_threshold = 0.9f; - configs[30].upper_hr_threshold = 0.9f; + configs[30].lower_hr_threshold = 0.9; + configs[30].upper_hr_threshold = 0.9; /* 31 -- dirty_bytes_threshold too small */ configs[31].dirty_bytes_threshold = (H5C__MIN_MAX_CACHE_SIZE / 2) - 1; diff --git a/test/cache_common.c b/test/cache_common.c index 807f264..9a65051 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -1499,12 +1499,6 @@ add_flush_op(int target_type, int target_idx, int op_code, int type, int idx, hb HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); HDassert((0 <= idx) && (idx <= max_indices[type])); HDassert(new_size <= VARIABLE_ENTRY_SIZE); -#ifndef H5_HAVE_STDBOOL_H - /* Check for TRUE or FALSE if we're using an integer type instead - * of a real Boolean type. - */ - HDassert((flag == TRUE) || (flag == FALSE)); -#endif /* H5_HAVE_STDBOOL_H */ if (pass) { @@ -1710,12 +1704,6 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o HDassert((0 <= op_ptr->type) && (op_ptr->type < NUMBER_OF_ENTRY_TYPES)); HDassert((0 <= op_ptr->idx) && (op_ptr->idx <= max_indices[op_ptr->type])); HDassert(flags_ptr != NULL); -#ifndef H5_HAVE_STDBOOL_H - /* Check for TRUE or FALSE if we're using an integer type instead - * of a real Boolean type. - */ - HDassert((op_ptr->flag == FALSE) || (op_ptr->flag == TRUE)); -#endif /* H5_HAVE_STDBOOL_H */ if (pass) { diff --git a/test/cache_image.c b/test/cache_image.c index e0748b56..f5f36bf 100644 --- a/test/cache_image.c +++ b/test/cache_image.c @@ -15,7 +15,7 @@ * 7/13/15 * * This file contains tests specific to the cache image - * feature implemented in H5C.c + * feature implemented in H5C.c */ #include "cache_common.h" #include "genall5.h" @@ -389,8 +389,6 @@ create_datasets(hid_t file_id, int min_dset, int max_dset) } } - return; - } /* create_datasets() */ /*------------------------------------------------------------------------- @@ -462,8 +460,6 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset) if (show_progress) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); - return; - } /* delete_datasets() */ /*------------------------------------------------------------------------- @@ -852,8 +848,6 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl if (show_progress) HDfprintf(stdout, "%s: cp = %d -- exiting.\n", fcn_name, cp++); - return; - } /* open_hdf5_file() */ /*------------------------------------------------------------------------- @@ -965,8 +959,6 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa if (show_progress) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); - return; - } /* attempt_swmr_open_hdf5_file() */ /*------------------------------------------------------------------------- @@ -1204,8 +1196,6 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset) } } - return; - } /* verify_datasets() */ /****************************************************************************/ @@ -7882,8 +7872,8 @@ main(void) HDprintf("=========================================\n"); /* Check for VFD which stores data in multiple files */ - single_file_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") && - HDstrcmp(env_h5_drvr, "family")); + single_file_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 && + HDstrcmp(env_h5_drvr, "family") != 0); nerrs += check_cache_image_ctl_flow_1(single_file_vfd); nerrs += check_cache_image_ctl_flow_2(single_file_vfd); diff --git a/test/chunk_info.c b/test/chunk_info.c index ada2d80..7104941 100644 --- a/test/chunk_info.c +++ b/test/chunk_info.c @@ -449,7 +449,7 @@ error: * Return: Success: SUCCEED * Failure: FAIL * - * Note: Note that the dataspace argument in these new functions are + * Note: Note that the dataspace argument in these new functions is * currently not used. The functionality involved the dataspace * will be implemented in the next version. * @@ -486,10 +486,10 @@ test_get_chunk_info_highest_v18(hid_t fapl) hsize_t offset[2] = {0, 0}; /* Offset coordinates of a chunk */ #ifdef H5_HAVE_FILTER_DEFLATE const Bytef *z_src = (const Bytef *)(direct_buf); - Bytef * z_dst; /*destination buffer */ + Bytef * z_dst; /* Destination buffer */ uLongf z_dst_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(CHK_SIZE); uLong z_src_nbytes = (uLong)CHK_SIZE; -#endif /* end H5_HAVE_FILTER_DEFLATE */ +#endif void * inbuf = NULL; /* Pointer to new buffer */ hsize_t chunk_size = CHK_SIZE; /* Size of a chunk, can be compressed or not */ hsize_t ii, jj; /* Array indices */ @@ -544,14 +544,15 @@ test_get_chunk_info_highest_v18(hid_t fapl) /* Allocate input (compressed) buffer */ inbuf = HDcalloc(1, z_dst_nbytes); - /* Set chunk size to the compressed chunk size and the chunk point - to the compressed data chunk */ - chunk_size = (hsize_t)z_dst_nbytes; - z_dst = (Bytef *)inbuf; + /* zlib-friendly alias for the input buffer */ + z_dst = (Bytef *)inbuf; /* Perform compression from the source to the destination buffer */ ret = compress2(z_dst, &z_dst_nbytes, z_src, z_src_nbytes, aggression); + /* Set the chunk size to the compressed chunk size */ + chunk_size = (hsize_t)z_dst_nbytes; + /* Check for various zlib errors */ if (Z_BUF_ERROR == ret) { HDfprintf(stderr, "overflow"); @@ -1482,6 +1483,50 @@ error: return FAIL; } /* test_chunk_info_version2_btrees() */ +typedef struct chunk_iter_info_t { + hsize_t offset[2]; + uint32_t filter_mask; + haddr_t addr; + uint32_t nbytes; +} chunk_iter_info_t; + +static int +iter_cb(const hsize_t *offset, uint32_t filter_mask, haddr_t addr, uint32_t nbytes, void *op_data) +{ + chunk_iter_info_t **chunk_info = (chunk_iter_info_t **)op_data; + + (*chunk_info)->offset[0] = offset[0]; + (*chunk_info)->offset[1] = offset[1]; + (*chunk_info)->filter_mask = filter_mask; + (*chunk_info)->addr = addr; + (*chunk_info)->nbytes = nbytes; + + /* printf("offset: [%lld, %lld], addr: %ld, size: %d, filter mask: %d\n", offset[0], offset[1], addr, + * nbytes, filter_mask); */ + + *chunk_info += 1; + + return H5_ITER_CONT; +} + +static int +iter_cb_stop(const hsize_t H5_ATTR_UNUSED *offset, uint32_t H5_ATTR_UNUSED filter_mask, + haddr_t H5_ATTR_UNUSED addr, uint32_t H5_ATTR_UNUSED nbytes, void *op_data) +{ + chunk_iter_info_t **chunk_info = (chunk_iter_info_t **)op_data; + *chunk_info += 1; + return H5_ITER_STOP; +} + +static int +iter_cb_fail(const hsize_t H5_ATTR_UNUSED *offset, uint32_t H5_ATTR_UNUSED filter_mask, + haddr_t H5_ATTR_UNUSED addr, uint32_t H5_ATTR_UNUSED nbytes, void *op_data) +{ + chunk_iter_info_t **chunk_info = (chunk_iter_info_t **)op_data; + *chunk_info += 1; + return H5_ITER_ERROR; +} + /*------------------------------------------------------------------------- * Function: test_basic_query * @@ -1502,24 +1547,26 @@ error: static herr_t test_basic_query(hid_t fapl) { - char filename[FILENAME_BUF_SIZE]; /* File name */ - hid_t basicfile = H5I_INVALID_HID; /* File ID */ - hid_t dspace = H5I_INVALID_HID; /* Dataspace ID */ - hid_t dset = H5I_INVALID_HID; /* Dataset ID */ - hid_t cparms = H5I_INVALID_HID; /* Creation plist */ - hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */ - hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; /* Chunk dimensions */ - int direct_buf[CHUNK_NX][CHUNK_NY]; /* Data in chunks */ - unsigned flt_msk = 0; /* Filter mask */ - unsigned read_flt_msk = 0; /* Filter mask after direct read */ - hsize_t offset[2]; /* Offset coordinates of a chunk */ - hsize_t out_offset[2] = {0, 0}; /* Buffer to get offset coordinates */ - hsize_t size = 0; /* Size of an allocated/written chunk */ - hsize_t nchunks = 0; /* Number of chunks */ - haddr_t addr = 0; /* Address of an allocated/written chunk */ - hsize_t chk_index = 0; /* Index of a chunk */ - hsize_t ii, jj; /* Array indices */ - herr_t ret; /* Temporary returned value for verifying failure */ + char filename[FILENAME_BUF_SIZE]; /* File name */ + hid_t basicfile = H5I_INVALID_HID; /* File ID */ + hid_t dspace = H5I_INVALID_HID; /* Dataspace ID */ + hid_t dset = H5I_INVALID_HID; /* Dataset ID */ + hid_t cparms = H5I_INVALID_HID; /* Creation plist */ + hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */ + hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; /* Chunk dimensions */ + int direct_buf[CHUNK_NX][CHUNK_NY]; /* Data in chunks */ + unsigned flt_msk = 0; /* Filter mask */ + unsigned read_flt_msk = 0; /* Filter mask after direct read */ + hsize_t offset[2]; /* Offset coordinates of a chunk */ + hsize_t out_offset[2] = {0, 0}; /* Buffer to get offset coordinates */ + hsize_t size = 0; /* Size of an allocated/written chunk */ + hsize_t nchunks = 0; /* Number of chunks */ + haddr_t addr = 0; /* Address of an allocated/written chunk */ + hsize_t chk_index = 0; /* Index of a chunk */ + hsize_t ii, jj; /* Array indices */ + chunk_iter_info_t chunk_infos[2]; /* chunk infos filled up by iterator */ + chunk_iter_info_t *cptr; /* pointer to array of chunks */ + herr_t ret; /* Temporary returned value for verifying failure */ TESTING("basic operations"); @@ -1627,6 +1674,37 @@ test_basic_query(hid_t fapl) if (verify_empty_chunk_info(dset, offset) == FAIL) FAIL_PUTS_ERROR("Verification of H5Dget_chunk_info_by_coord on empty chunk failed\n"); + /* iterate over all chunks */ + cptr = &(chunk_infos[0]); + if (H5Dchunk_iter(dset, &iter_cb, &cptr) < 0) + TEST_ERROR; + + VERIFY(cptr, &(chunk_infos[2]), "Iterator did not iterate all chunks"); + VERIFY(chunk_infos[0].offset[0], 0, "Offset mismatch"); + VERIFY(chunk_infos[0].offset[1], 0, "Offset mismatch"); + VERIFY(chunk_infos[0].filter_mask, 0, "Filter mismatch"); + VERIFY(chunk_infos[0].nbytes, 96, "Size mismatch"); + + VERIFY(chunk_infos[1].offset[0], 1, "Offset mismatch"); + VERIFY(chunk_infos[1].offset[1], 1, "Offset mismatch"); + + /* iterate and stop after one iteration */ + cptr = &(chunk_infos[0]); + if (H5Dchunk_iter(dset, &iter_cb_stop, &cptr) < 0) + TEST_ERROR; + VERIFY(cptr, &(chunk_infos[1]), "Verification of halted iterator failed\n"); + + /* iterate and fail after one iteration */ + cptr = &(chunk_infos[0]); + H5E_BEGIN_TRY + { + ret = H5Dchunk_iter(dset, &iter_cb_fail, &cptr); + } + H5E_END_TRY; + if (ret >= 0) + TEST_ERROR; + VERIFY(cptr, &(chunk_infos[1]), "Verification of halted iterator failed\n"); + /* Release resourse */ if (H5Dclose(dset) < 0) TEST_ERROR diff --git a/test/cmpd_dtransform.c b/test/cmpd_dtransform.c new file mode 100644 index 0000000..76ff287 --- /dev/null +++ b/test/cmpd_dtransform.c @@ -0,0 +1,182 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://www.hdfgroup.org/licenses. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * Programmer: Jan-Willem Blokland + * December 1, 2020 + * + * Purpose: Test writing compounded attribute followed by + * writing data with a data transform function. + */ + +#include "h5test.h" + +#define FILENAME "cmpd_dtransform.h5" +#define LENGTH 11 + +typedef struct { + char name[64]; + char unit[64]; +} att_t; + +int +main(void) +{ + hsize_t dima[] = {1}; + hsize_t dims[] = {LENGTH}; + hid_t str_dtyp_id = H5I_INVALID_HID, att_dtyp_id = H5I_INVALID_HID; + hid_t file_id = H5I_INVALID_HID; + hid_t fspace_id = H5I_INVALID_HID; + hid_t dset_id = H5I_INVALID_HID; + hid_t att_dspc_id = H5I_INVALID_HID; + hid_t att_attr_id = H5I_INVALID_HID; + hid_t dxpl_id = H5I_INVALID_HID; + const char *expr = "2*x"; + int * data = NULL; + int * data_res = NULL; + att_t * atts = NULL; + att_t * atts_res = NULL; + + /* Compound datatype */ + if (NULL == (atts = HDmalloc(sizeof(att_t)))) + TEST_ERROR; + HDstrcpy(atts[0].name, "Name"); + HDstrcpy(atts[0].unit, "Unit"); + + /* String type */ + if ((str_dtyp_id = H5Tcopy(H5T_C_S1)) < 0) + FAIL_STACK_ERROR + if (H5Tset_size(str_dtyp_id, 64) < 0) + FAIL_STACK_ERROR + + /* Attribute type */ + if ((att_dtyp_id = H5Tcreate(H5T_COMPOUND, sizeof(att_t))) < 0) + FAIL_STACK_ERROR + if (H5Tinsert(att_dtyp_id, "NAME", HOFFSET(att_t, name), str_dtyp_id) < 0) + FAIL_STACK_ERROR + if (H5Tinsert(att_dtyp_id, "UNIT", HOFFSET(att_t, unit), str_dtyp_id) < 0) + FAIL_STACK_ERROR + + /* Create file. */ + if ((file_id = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + FAIL_STACK_ERROR + + /* Create file dataspace. */ + if ((fspace_id = H5Screate_simple(1, dims, NULL)) < 0) + FAIL_STACK_ERROR + + /* Create dataset. */ + if ((dset_id = H5Dcreate2(file_id, "test_dset", H5T_NATIVE_INT, fspace_id, H5P_DEFAULT, H5P_DEFAULT, + H5P_DEFAULT)) < 0) + FAIL_STACK_ERROR + + /* Write the attribute (compound) to the dataset */ + if ((att_dspc_id = H5Screate_simple(1, dima, NULL)) < 0) + FAIL_STACK_ERROR + if ((att_attr_id = + H5Acreate2(dset_id, "ATTRIBUTES", att_dtyp_id, att_dspc_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) + FAIL_STACK_ERROR + if (H5Awrite(att_attr_id, att_dtyp_id, atts) < 0) + FAIL_STACK_ERROR + + /* Create dataset transfer property list */ + if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) + FAIL_STACK_ERROR + if (H5Pset_data_transform(dxpl_id, expr) < 0) { + HDprintf("**** ERROR: H5Pset_data_transform (expression: %s) ****\n", expr); + FAIL_STACK_ERROR + } + + if (NULL == (data = HDmalloc(LENGTH * sizeof(int)))) + TEST_ERROR; + if (NULL == (data_res = HDmalloc(LENGTH * sizeof(int)))) + TEST_ERROR; + for (unsigned i = 0; i < LENGTH; i++) { + data[i] = 10; + data_res[i] = 2 * data[i]; + } + + /* Write the data */ + if (H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id, data) < 0) + FAIL_STACK_ERROR + + /* Read attribute */ + if (NULL == (atts_res = HDmalloc(sizeof(att_t)))) + TEST_ERROR; + if (H5Aread(att_attr_id, att_dtyp_id, atts_res) < 0) + FAIL_STACK_ERROR + + /* Verify attribute */ + if (HDstrcmp(atts_res[0].name, atts[0].name) != 0) + TEST_ERROR; + if (HDstrcmp(atts_res[0].unit, atts[0].unit) != 0) + TEST_ERROR; + + /* Read the data */ + if (H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0) + FAIL_STACK_ERROR + + /* Verify data */ + for (unsigned idx = 0; idx < LENGTH; idx++) + if (data[idx] != data_res[idx]) + TEST_ERROR; + + HDfree(atts); + HDfree(atts_res); + HDfree(data); + HDfree(data_res); + + /* Close all identifiers. */ + if (H5Pclose(dxpl_id) < 0) + FAIL_STACK_ERROR + if (H5Aclose(att_attr_id) < 0) + FAIL_STACK_ERROR + if (H5Sclose(att_dspc_id) < 0) + FAIL_STACK_ERROR + if (H5Dclose(dset_id) < 0) + FAIL_STACK_ERROR + if (H5Sclose(fspace_id) < 0) + FAIL_STACK_ERROR + if (H5Fclose(file_id) < 0) + FAIL_STACK_ERROR + if (H5Tclose(att_dtyp_id) < 0) + FAIL_STACK_ERROR + if (H5Tclose(str_dtyp_id) < 0) + FAIL_STACK_ERROR + + return 0; + +error: + H5E_BEGIN_TRY + { + H5Pclose(dxpl_id); + H5Aclose(att_attr_id); + H5Sclose(att_dspc_id); + H5Dclose(dset_id); + H5Sclose(fspace_id); + H5Fclose(file_id); + H5Tclose(att_dtyp_id); + H5Tclose(str_dtyp_id); + } + H5E_END_TRY + + if (atts) + HDfree(atts); + if (atts_res) + HDfree(atts_res); + if (data) + HDfree(data); + if (data_res) + HDfree(data_res); + + return 1; +} diff --git a/test/cross_read.c b/test/cross_read.c index 386c0da..eef814f 100644 --- a/test/cross_read.c +++ b/test/cross_read.c @@ -159,9 +159,9 @@ check_data_f(const char *dsetname, hid_t fid) /* Input (last row is different) */ for (i = 0; i < NX; i++) for (j = 0; j < NY; j++) - data_in[i][j] = ((double)(i + j + 1)) / (double)3.0F; + data_in[i][j] = ((double)(i + j + 1)) / 3.0; for (i = 0; i < NY; i++) - data_in[NX][i] = -2.2F; + data_in[NX][i] = -2.2; /* Output */ HDmemset(data_out, 0, (NX + 1) * NY * sizeof(double)); @@ -174,7 +174,7 @@ check_data_f(const char *dsetname, hid_t fid) /* Check results */ for (i = 0; i < (NX + 1); i++) for (j = 0; j < NY; j++) - if (!H5_DBL_REL_EQUAL(data_out[i][j], data_in[i][j], (double)0.001F)) + if (!H5_DBL_REL_EQUAL(data_out[i][j], data_in[i][j], 0.001)) if (!nerrors++) { H5_FAILED(); HDprintf("element [%d][%d] is %g but should have been %g\n", (int)i, (int)j, diff --git a/test/dsets.c b/test/dsets.c index e38f253..96f8b81 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -6520,7 +6520,7 @@ test_set_local(hid_t fapl) for (i = 0; i < DSET_DIM1; i++) for (j = 0; j < DSET_DIM2; j++) { points[i][j] = (int)n++; - points_dbl[i][j] = (double)1.5F * n++; + points_dbl[i][j] = 1.5 * n++; } /* Open file */ @@ -6716,7 +6716,7 @@ test_set_local(hid_t fapl) for (j = 0; j < dims[1]; j++) { /* If the difference between two values is greater than 0.001%, they're * considered not equal. */ - if (!H5_DBL_REL_EQUAL(points_dbl[i][j], check_dbl[i][j], (double)0.00001F)) { + if (!H5_DBL_REL_EQUAL(points_dbl[i][j], check_dbl[i][j], 0.00001)) { H5_FAILED(); HDprintf(" Line %d: Read different values than written.\n", __LINE__); HDprintf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j)); @@ -8803,7 +8803,7 @@ test_chunk_cache(hid_t fapl) /* Set new rdcc settings on fapl */ nslots_2 = nslots_1 * 2; nbytes_2 = nbytes_1 * 2; - w0_2 = w0_1 / (double)2.0F; + w0_2 = w0_1 / 2.0; if (H5Pset_cache(fapl_local, 0, nslots_2, nbytes_2, w0_2) < 0) FAIL_STACK_ERROR @@ -9525,8 +9525,7 @@ test_chunk_fast(const char *env_h5_driver, hid_t fapl) npoints = (hsize_t)snpoints; /* Compute the "down" dimension values */ - if (H5VM_array_down(ndims, dim, down) < 0) - FAIL_STACK_ERROR + H5VM_array_down(ndims, dim, down); /* Create chunked dataset */ if ((dsid = H5Dcreate2(fid, "dset", H5T_NATIVE_UINT, sid, H5P_DEFAULT, dcpl, @@ -9708,8 +9707,7 @@ test_chunk_fast(const char *env_h5_driver, hid_t fapl) H5VM_swizzle_coords(hsize_t, swizzled_dim, unlim_dim); /* Compute the "down" dimension values */ - if (H5VM_array_down(ndims, swizzled_dim, down) < 0) - FAIL_STACK_ERROR + H5VM_array_down(ndims, swizzled_dim, down); /* Read elements */ for (u = 0; u < npoints; u++) { diff --git a/test/dt_arith.c b/test/dt_arith.c index f2bf6cf..7b79102 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -74,9 +74,6 @@ typedef enum dtype_t { OTHER } dtype_t; -/* Skip overflow tests if non-zero */ -static int skip_overflow_tests_g = 0; - /* * Although we check whether a floating point overflow generates a SIGFPE and * turn off overflow tests in that case, it might still be possible for an @@ -394,7 +391,6 @@ static int without_hardware_g = 0; HDfree(value); \ } -void some_dummy_func(float x); static hbool_t overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits); static int my_isnan(dtype_t type, void *val); static int my_isinf(int endian, const unsigned char *val, size_t size, size_t mpos, size_t msize, size_t epos, @@ -515,92 +511,6 @@ except_func(H5T_conv_except_t except_type, hid_t H5_ATTR_UNUSED src_id, hid_t H5 } /*------------------------------------------------------------------------- - * Function: some_dummy_func - * - * Purpose: A dummy function to help check for overflow. - * - * Note: DO NOT DECLARE THIS FUNCTION STATIC OR THE COMPILER MIGHT - * PROMOTE ARGUMENT `x' TO DOUBLE AND DEFEAT THE OVERFLOW - * CHECKING. - * - * Return: void - * - * Programmer: Robb Matzke - * Tuesday, July 21, 1998 - * - *------------------------------------------------------------------------- - */ -void -some_dummy_func(float x) -{ - char s[128]; - - HDsnprintf(s, sizeof(s), "%g", (double)x); -} - -/*------------------------------------------------------------------------- - * Function: generates_sigfpe - * - * Purpose: Determines if SIGFPE is generated from overflows. We must be - * able to fork() and waitpid() in order for this test to work - * properly. Sets skip_overflow_tests_g to non-zero if they - * would generate SIGBUS, zero otherwise. - * - * Programmer: Robb Matzke - * Tuesday, July 21, 1998 - * - * Modifications: - * - *------------------------------------------------------------------------- - */ -static void -generates_sigfpe(void) -{ -#ifdef H5_HAVE_UNISTD_H - pid_t pid; - int status; - size_t i, j; - double d; - unsigned char *dp = (unsigned char *)&d; - float f; - - HDfflush(stdout); - HDfflush(stderr); - if ((pid = HDfork()) < 0) { - HDperror("fork"); - HDexit(EXIT_FAILURE); - } - else if (0 == pid) { - for (i = 0; i < 2000; i++) { - for (j = 0; j < sizeof(double); j++) - dp[j] = (unsigned char)HDrand(); - f = (float)d; - some_dummy_func((float)f); - } - HDexit(EXIT_SUCCESS); - } - - while (pid != HDwaitpid(pid, &status, 0)) - /*void*/; - if (WIFEXITED(status) && 0 == WEXITSTATUS(status)) { - HDputs("Floating-point overflow cases will be tested."); - skip_overflow_tests_g = FALSE; - } - else if (WIFSIGNALED(status) && SIGFPE == WTERMSIG(status)) { - HDputs("Floating-point overflow cases cannot be safely tested."); - skip_overflow_tests_g = TRUE; - /* delete the core dump file that SIGFPE may have created */ - HDunlink("core"); - } -#else /* H5_HAVE_UNISTD_H */ - HDputs("Cannot determine if floating-point overflows generate a SIGFPE"); - HDputs("due to a lack of fork(2) - assuming yes."); - HDputs("Overflow cases will not be tested."); - skip_overflow_tests_g = TRUE; -#endif /* H5_HAVE_UNISTD_H */ -} - -/*------------------------------------------------------------------------- * Function: test_hard_query * * Purpose: Tests H5Tcompiler_conv() for querying whether a conversion is @@ -3322,7 +3232,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) int expo_diff = check_expo[0] - check_expo[1]; int valid_bits = (int)((dst_ebias + dst_msize) + (size_t)MIN(check_expo[0], check_expo[1])) - 1; - double epsilon = 1.0F; + double epsilon = 1.0; /* Re-scale the mantissas based on any exponent difference */ if (expo_diff != 0) @@ -5406,9 +5316,6 @@ main(void) * for user-defined integer types */ nerrors += (unsigned long)test_derived_integer(); - /* Does floating point overflow generate a SIGFPE? */ - generates_sigfpe(); - /* Test degenerate cases */ nerrors += (unsigned long)run_fp_tests("noop"); diff --git a/test/dtransform.c b/test/dtransform.c index c679d30..9445d83 100644 --- a/test/dtransform.c +++ b/test/dtransform.c @@ -581,6 +581,7 @@ test_specials(hid_t file) const char *special3 = "1000/x"; const char *special4 = "-x"; const char *special5 = "+x"; + const char *special6 = "2e+1*x"; TESTING("data transform of some special cases") @@ -705,6 +706,29 @@ test_specials(hid_t file) if (H5Dclose(dset_id) < 0) TEST_ERROR + /*----------------------------- + * Operation 6: 2e+1*x + *----------------------------*/ + if (H5Pset_data_transform(dxpl_id, special6) < 0) + TEST_ERROR; + + for (row = 0; row < ROWS; row++) + for (col = 0; col < COLS; col++) + data_res[row][col] = transformData[row][col] * 20; + + if ((dset_id = H5Dcreate2(file, "/special6", H5T_NATIVE_INT, dataspace, H5P_DEFAULT, H5P_DEFAULT, + H5P_DEFAULT)) < 0) + TEST_ERROR + if (H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id, transformData) < 0) + TEST_ERROR + if (H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) + TEST_ERROR + + COMPARE_INT(read_buf, data_res) + + if (H5Dclose(dset_id) < 0) + TEST_ERROR + if (H5Pclose(dxpl_id) < 0) TEST_ERROR if (H5Sclose(dataspace) < 0) diff --git a/test/dtypes.c b/test/dtypes.c index 626c58c..52eb0ea 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -2284,9 +2284,9 @@ test_compound_11(void) /* Initialize buffer */ for (u = 0; u < NTESTELEM; u++) { - ((big_t *)buf)[u].d1 = (double)u * (double)1.5f; - ((big_t *)buf)[u].d2 = (double)u * (double)2.5f; - ((big_t *)buf)[u].d3 = (double)u * (double)3.5f; + ((big_t *)buf)[u].d1 = (double)u * 1.5; + ((big_t *)buf)[u].d2 = (double)u * 2.5; + ((big_t *)buf)[u].d3 = (double)u * 3.5; ((big_t *)buf)[u].i1 = (int)(u * 3); ((big_t *)buf)[u].i2 = (int)(u * 5); ((big_t *)buf)[u].s1 = (char *)HDmalloc((size_t)32); diff --git a/test/enc_dec_plist.c b/test/enc_dec_plist.c index 83298c8..9b4879e 100644 --- a/test/enc_dec_plist.c +++ b/test/enc_dec_plist.c @@ -141,11 +141,11 @@ main(void) hid_t vspace = -1; /* Virtual dset dataspaces */ hsize_t dims[1] = {3}; /* Data space current size */ hsize_t chunk_size[2] = {16384, 4}; /* chunk size */ - double fill = 2.7f; /* Fill value */ + double fill = 2.7; /* Fill value */ hsize_t max_size[1]; /* data space maximum size */ size_t nslots = 521 * 2; size_t nbytes = 1048576 * 10; - double w0 = 0.5f; + double w0 = 0.5; unsigned max_compact; unsigned min_dense; const char * c_to_f = "x+32"; @@ -159,26 +159,26 @@ main(void) TRUE, FALSE, (2 * 2048 * 1024), - 0.3f, + 0.3, (64 * 1024 * 1024), (4 * 1024 * 1024), 60000, H5C_incr__threshold, - 0.8f, - 3.0f, + 0.8, + 3.0, TRUE, (8 * 1024 * 1024), H5C_flash_incr__add_space, - 2.0f, - 0.25f, + 2.0, + 0.25, H5C_decr__age_out_with_threshold, - 0.997f, - 0.8f, + 0.997, + 0.8, TRUE, (3 * 1024 * 1024), 3, FALSE, - 0.2f, + 0.2, (256 * 2048), H5AC__DEFAULT_METADATA_WRITE_STRATEGY}; diff --git a/test/enc_dec_plist_cross_platform.c b/test/enc_dec_plist_cross_platform.c index c3f1fc5..9ea5cf9 100644 --- a/test/enc_dec_plist_cross_platform.c +++ b/test/enc_dec_plist_cross_platform.c @@ -156,70 +156,71 @@ error: return 1; } -static hid_t -read_and_decode_plist_file(const char *filename_prefix, unsigned config, char *filename, size_t filename_len) -{ - int fd; - size_t size; - const char *testfile; - void * buf = NULL; - hid_t plist = H5I_INVALID_HID; - - /* Generate filename from prefix and configuration word */ - if (HDsnprintf(filename, filename_len, "%s%s%s", filename_prefix, config & CONFIG_64 ? "64" : "32", - config & CONFIG_LE ? "le" : "be") < 0) - TEST_ERROR - - /* Read file 1 */ - testfile = H5_get_srcdir_filename(filename); - if ((fd = HDopen(testfile, O_RDONLY)) < 0) - TEST_ERROR - size = (size_t)HDlseek(fd, 0, SEEK_END); - HDlseek(fd, 0, SEEK_SET); - buf = HDmalloc(size); - if (HDread(fd, buf, size) < 0) - TEST_ERROR - HDclose(fd); - - /* Decode property lists */ - if ((plist = H5Pdecode(buf)) < 0) - FAIL_STACK_ERROR -error: - if (buf != NULL) - HDfree(buf); - return plist; -} - static int test_plists(const char *filename_prefix) { - int i; - unsigned config[2]; - hid_t plist[2]; - char filename[2][1024]; + unsigned config_1, config_2; + int fd_1, fd_2; + size_t size_1 = 0, size_2 = 0; + void * buf_1 = NULL, *buf_2 = NULL; + hid_t plist_1, plist_2; + char filename[1024]; + const char *testfile; /* Iterate over all combinations of configurations */ - for (config[0] = 0; config[0] < (NCONFIG - 1); config[0]++) { - for (config[1] = config[0] + 1; config[1] < NCONFIG; config[1]++) { - for (i = 0; i < 2; i++) { - plist[i] = - read_and_decode_plist_file(filename_prefix, config[i], filename[i], sizeof(filename[i])); - if (plist[i] == H5I_INVALID_HID) - goto error; - } + for (config_1 = 0; config_1 < (NCONFIG - 1); config_1++) + for (config_2 = config_1 + 1; config_2 < NCONFIG; config_2++) { + /* Generate filename for file 1 */ + if (HDsnprintf(filename, sizeof(filename), "%s%s%s", filename_prefix, + config_1 & CONFIG_64 ? "64" : "32", config_1 & CONFIG_LE ? "le" : "be") < 0) + TEST_ERROR + + /* Read file 1 */ + testfile = H5_get_srcdir_filename(filename); + if ((fd_1 = HDopen(testfile, O_RDONLY)) < 0) + TEST_ERROR + size_1 = (size_t)HDlseek(fd_1, (HDoff_t)0, SEEK_END); + HDlseek(fd_1, (HDoff_t)0, SEEK_SET); + buf_1 = (void *)HDmalloc(size_1); + if (HDread(fd_1, buf_1, size_1) < 0) + TEST_ERROR + HDclose(fd_1); + + /* Generate filename for file 2 */ + if (HDsnprintf(filename, sizeof(filename), "%s%s%s", filename_prefix, + config_2 & CONFIG_64 ? "64" : "32", config_2 & CONFIG_LE ? "le" : "be") < 0) + TEST_ERROR + + /* Read file 1 */ + testfile = H5_get_srcdir_filename(filename); + if ((fd_2 = HDopen(testfile, O_RDONLY)) < 0) + TEST_ERROR + size_2 = (size_t)HDlseek(fd_2, (HDoff_t)0, SEEK_END); + HDlseek(fd_2, (HDoff_t)0, SEEK_SET); + buf_2 = (void *)HDmalloc(size_2); + if (HDread(fd_2, buf_2, size_2) < 0) + TEST_ERROR + HDclose(fd_2); + + /* Decode property lists */ + if ((plist_1 = H5Pdecode(buf_1)) < 0) + FAIL_STACK_ERROR + if ((plist_2 = H5Pdecode(buf_2)) < 0) + FAIL_STACK_ERROR /* Compare decoded property lists */ - if (!H5Pequal(plist[0], plist[1])) - FAIL_PRINTF_ERROR("PLIST encoding/decoding comparison failed, " - "%s != %s\n", - filename[0], filename[1]) - - for (i = 0; i < 2; i++) { - if ((H5Pclose(plist[i])) < 0) - FAIL_STACK_ERROR - } - } - } + if (!H5Pequal(plist_1, plist_2)) + FAIL_PUTS_ERROR("PLIST encoding/decoding comparison failed\n") + + /* Close */ + if ((H5Pclose(plist_1)) < 0) + FAIL_STACK_ERROR + if ((H5Pclose(plist_2)) < 0) + FAIL_STACK_ERROR + + HDfree(buf_1); + HDfree(buf_2); + } /* end for */ return 1; diff --git a/test/err_compat.c b/test/err_compat.c index 69d62ff..6ad69d8 100644 --- a/test/err_compat.c +++ b/test/err_compat.c @@ -39,7 +39,6 @@ int * ipoints2_data = NULL; int * icheck2_data = NULL; #define DSET_NAME "a_dataset" -#define FAKE_ID (hid_t) - 1 herr_t custom_print_cb1(int n, H5E_error1_t *err_desc, void *client_data); herr_t custom_print_cb2(int n, H5E_error2_t *err_desc, void *client_data); @@ -47,13 +46,13 @@ herr_t custom_print_cb2(int n, H5E_error2_t *err_desc, void *client_data); /*------------------------------------------------------------------------- * Function: user_print1 * - * Purpose: This function is a user-defined old-style printing function. + * Purpose: This function is a user-defined old-style printing function. * This is just a convenience function for H5Ewalk1() with a * function that prints error messages. * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * 4 October 2010 * *------------------------------------------------------------------------- @@ -66,22 +65,22 @@ user_print1(FILE *stream) if (H5Ewalk1(H5E_WALK_UPWARD, (H5E_walk1_t)custom_print_cb1, stream) < 0) TEST_ERROR; - return 0; + return SUCCEED; error: - return -1; + return FAIL; } /*------------------------------------------------------------------------- * Function: user_print2 * - * Purpose: This function is a user-defined new-style printing function. + * Purpose: This function is a user-defined new-style printing function. * This is just a convenience function for H5Ewalk2() with a * function that prints error messages. * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * 4 October 2010 * *------------------------------------------------------------------------- @@ -94,27 +93,23 @@ user_print2(hid_t err_stack, FILE *stream) if (H5Ewalk2(err_stack, H5E_WALK_UPWARD, (H5E_walk2_t)custom_print_cb2, stream) < 0) TEST_ERROR; - return 0; + return SUCCEED; error: - return -1; + return FAIL; } /*------------------------------------------------------------------------- * Function: custom_print_cb1 * - * Purpose: Callback function to print error stack in customized way - * for H5Ewalk1. + * Purpose: Callback function to print error stack in customized way + * for H5Ewalk1 * - * Return: Success: 0 + * Return: SUCCEED/FAIL * - * Failure: -1 - * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * 4 October 2010 * - * Modifications: - * *------------------------------------------------------------------------- */ herr_t @@ -140,7 +135,7 @@ custom_print_cb1(int n, H5E_error1_t *err_desc, void *client_data) H5free_memory(maj); H5free_memory(min); - return 0; + return SUCCEED; error: if (maj) @@ -148,24 +143,20 @@ error: if (min) H5free_memory(min); - return -1; + return FAIL; } /*------------------------------------------------------------------------- * Function: custom_print_cb2 * - * Purpose: Callback function to print error stack in customized way - * for H5Ewalk1. - * - * Return: Success: 0 + * Purpose: Callback function to print error stack in customized way + * for H5Ewalk1 * - * Failure: -1 + * Return: SUCCEED/FAIL * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * 4 October 2010 * - * Modifications: - * *------------------------------------------------------------------------- */ herr_t @@ -191,7 +182,7 @@ custom_print_cb2(int n, H5E_error2_t *err_desc, void *client_data) H5free_memory(maj); H5free_memory(min); - return 0; + return SUCCEED; error: if (maj) @@ -199,62 +190,59 @@ error: if (min) H5free_memory(min); - return -1; + return FAIL; } /*------------------------------------------------------------------------- - * Function: test_error1 - * - * Purpose: Test the backward compatibility of H5Eset/get_auto. - * - * Return: Success: 0 + * Function: test_error_compat * - * Failure: -1 - * - * Programmer: Raymond Lu - * 17 September 2010 + * Purpose: Test the backward compatibility of H5Eset/get_auto * + * Return: SUCCEED/FAIL * - * Modifications: + * Programmer: Raymond Lu + * 17 September 2010 * *------------------------------------------------------------------------- */ static herr_t -test_error1(void) +test_error_compat(void) { - hid_t dataset, space; + hid_t did = H5I_INVALID_HID; + hid_t sid = H5I_INVALID_HID; hsize_t dims[2]; H5E_auto1_t old_func1; H5E_auto2_t old_func2; - void * old_data; + void * old_data = NULL; herr_t ret; TESTING("error API H5Eset/get_auto"); - printf("\n"); - /* Create the data space */ + /* Add a newline and flush so the output file looks nicer */ + HDprintf("\n"); + HDfflush(stdout); + + /* Create the dataspace */ dims[0] = DIM0; dims[1] = DIM1; - if ((space = H5Screate_simple(2, dims, NULL)) < 0) + if ((sid = H5Screate_simple(2, dims, NULL)) < 0) TEST_ERROR; - /* Use H5Eget_auto2 to query the default printing function. The library - *should indicate H5Eprint2 as the default. */ + /* Use H5Eget_auto2 to query the default printing function. */ if (H5Eget_auto2(H5E_DEFAULT, &old_func2, &old_data) < 0) TEST_ERROR; if (old_data != NULL) TEST_ERROR; - if (!old_func2 || (H5E_auto2_t)H5Eprint2 != old_func2) + if (old_func2 == NULL) TEST_ERROR; - /* This function sets the default printing function to be H5Eprint2. */ if (H5Eset_auto2(H5E_DEFAULT, old_func2, old_data) < 0) TEST_ERROR; /* Try the printing function. Dataset creation should fail because the file * doesn't exist. */ - dataset = H5Dcreate2(FAKE_ID, DSET_NAME, H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (dataset >= 0) + did = H5Dcreate2(H5I_INVALID_HID, DSET_NAME, H5T_STD_I32BE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (did >= 0) TEST_ERROR; /* This call should work. It simply returns H5Eprint1. */ @@ -271,8 +259,8 @@ test_error1(void) /* Try the printing function. Dataset creation should fail because the file * doesn't exist. */ - dataset = H5Dcreate2(FAKE_ID, DSET_NAME, H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (dataset >= 0) + did = H5Dcreate2(H5I_INVALID_HID, DSET_NAME, H5T_STD_I32BE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (did >= 0) TEST_ERROR; /* This call should fail because the test mixes H5Eget_auto2 with H5Eset_auto1. @@ -288,16 +276,16 @@ test_error1(void) /* Try the printing function. Dataset creation should fail because the file * doesn't exist. */ - dataset = H5Dcreate2(FAKE_ID, DSET_NAME, H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (dataset >= 0) + did = H5Dcreate2(H5I_INVALID_HID, DSET_NAME, H5T_STD_I32BE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (did >= 0) TEST_ERROR; - /* This function changes the new-style printing function back to the default H5Eprint2. */ - if (H5Eset_auto2(H5E_DEFAULT, (H5E_auto2_t)H5Eprint2, NULL) < 0) + /* This function changes the new-style printing function to the original. */ + if (H5Eset_auto2(H5E_DEFAULT, old_func2, NULL) < 0) TEST_ERROR; - /* This call should work because the H5Eset_auto2 above restored the default printing - * function H5Eprint2. It simply returns user_print1. */ + /* This call should work because the H5Eset_auto2 above set the default printing + * function to H5Eprint2. It simply returns user_print1. */ if ((ret = H5Eget_auto1(&old_func1, &old_data)) < 0) TEST_ERROR; if (old_data != NULL) @@ -315,70 +303,77 @@ test_error1(void) TEST_ERROR; if (old_data != NULL) TEST_ERROR; - if (!old_func2 || (H5E_auto2_t)H5Eprint2 != old_func2) + if (old_func2 == NULL) TEST_ERROR; /* Try the printing function. Dataset creation should fail because the file * doesn't exist. */ - dataset = H5Dcreate2(FAKE_ID, DSET_NAME, H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (dataset >= 0) + did = H5Dcreate2(H5I_INVALID_HID, DSET_NAME, H5T_STD_I32BE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (did >= 0) TEST_ERROR; - fprintf(stderr, "\n"); - return 0; + if (H5Sclose(sid) < 0) + TEST_ERROR; + + return SUCCEED; error: - return -1; + H5E_BEGIN_TRY + { + H5Dclose(did); + H5Sclose(sid); + } + H5E_END_TRY + + return FAIL; } /*------------------------------------------------------------------------- - * Function: test_error2 - * - * Purpose: Test error API functions, mainly on H5Epush1. + * Function: test_h5epush1 * - * Return: Success: 0 - * - * Failure: -1 - * - * Programmer: Raymond Lu - * July 10, 2003 + * Purpose: Test error API functions, mainly H5Epush1 * + * Return: SUCCEED/FAIL * - * Modifications: + * Programmer: Raymond Lu + * July 10, 2003 * *------------------------------------------------------------------------- */ static herr_t -test_error2(hid_t file) +test_h5epush1(hid_t file) { - hid_t dataset, space; + hid_t did = H5I_INVALID_HID; + hid_t sid = H5I_INVALID_HID; + hid_t estack_id = H5I_INVALID_HID; hsize_t dims[2]; - const char *FUNC_test_error = "test_error2"; + const char *FUNC_test_error = "test_h5epush1"; TESTING("error API based on data I/O"); - printf("\n"); - /* Create the data space */ + /* Add a newline and flush so the output file looks nicer */ + HDprintf("\n"); + HDfflush(stdout); + + /* Create the dataspace */ dims[0] = DIM0; dims[1] = DIM1; - if ((space = H5Screate_simple(2, dims, NULL)) < 0) + if ((sid = H5Screate_simple(2, dims, NULL)) < 0) TEST_ERROR; /* Test H5E_BEGIN_TRY */ H5E_BEGIN_TRY { - dataset = H5Dcreate2(FAKE_ID, DSET_NAME, H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + did = + H5Dcreate2(H5I_INVALID_HID, DSET_NAME, H5T_STD_I32BE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); } H5E_END_TRY; /* Create the dataset */ - if ((dataset = H5Dcreate2(file, DSET_NAME, H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < - 0) { - H5Epush1(__FILE__, FUNC_test_error, __LINE__, H5E_ERROR, H5E_CANTCREATE, "H5Dcreate2 failed"); - goto error; - } + if ((did = H5Dcreate2(file, DSET_NAME, H5T_STD_I32BE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR; - /* Disable the library's default printing function */ + /* Disable the library's default printing function */ #ifdef H5_USE_16_API_DEFAULT if (H5Eset_auto(NULL, NULL) < 0) #else @@ -387,36 +382,48 @@ test_error2(hid_t file) TEST_ERROR; /* Make H5Dwrite fail, verify default print is disabled */ - if (H5Dwrite(FAKE_ID, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ipoints2) < 0) { - H5Epush1(__FILE__, FUNC_test_error, __LINE__, H5E_ERROR, H5E_WRITEERROR, - "H5Dwrite shouldn't succeed"); - goto error; - } + if (H5Dwrite(H5I_INVALID_HID, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ipoints2) < 0) + H5Epush1(__FILE__, FUNC_test_error, __LINE__, H5E_ERROR, H5E_WRITEERROR, "expected H5Dwrite error"); + else + TEST_ERROR; + + /* Save the error stack so the close calls don't interfere with it */ + if ((estack_id = H5Eget_current_stack()) < 0) + TEST_ERROR; - /* In case program comes to this point, close dataset */ - if (H5Dclose(dataset) < 0) + /* Close open identifiers */ + if (H5Dclose(did) < 0) + TEST_ERROR; + if (H5Sclose(sid) < 0) + TEST_ERROR; + + /* Restore the stack containing errors */ + if (H5Eset_current_stack(estack_id) < 0) TEST_ERROR; - TEST_ERROR; + return SUCCEED; error: - return -1; + H5E_BEGIN_TRY + { + H5Dclose(did); + H5Sclose(sid); + H5Eclose_stack(estack_id); + } + H5E_END_TRY + + return FAIL; } /*------------------------------------------------------------------------- * Function: dump_error * - * Purpose: Prints error stack in default and customized ways. + * Purpose: Prints error stack in default and customized ways * - * Return: Success: 0 + * Return: SUCCEED/FAIL * - * Failure: -1 - * - * Programmer: Raymond Lu - * July 17, 2003 - * - * - * Modifications: + * Programmer: Raymond Lu + * July 17, 2003 * *------------------------------------------------------------------------- */ @@ -433,35 +440,34 @@ dump_error(void) if (H5Ewalk1(H5E_WALK_UPWARD, custom_print_cb1, stderr) < 0) TEST_ERROR; - return 0; + return SUCCEED; error: - return -1; + return FAIL; } /*------------------------------------------------------------------------- * Function: main * - * Purpose: Test error API. - * - * Programmer: Raymond Lu - * July 10, 2003 + * Purpose: Test error API * - * Modifications: + * Programmer: Raymond Lu + * July 10, 2003 * *------------------------------------------------------------------------- */ int main(void) { - hid_t file, fapl; + hid_t fid = H5I_INVALID_HID; + hid_t fapl_id = H5I_INVALID_HID; char filename[1024]; const char *FUNC_main = "main"; int i; HDfprintf(stderr, " This program tests the Error API compatible with HDF5 v1.6. There are supposed to " "be some error messages\n"); - fapl = h5_fileaccess(); + fapl_id = h5_fileaccess(); /* Set up data arrays */ if (NULL == (ipoints2_data = (int *)HDcalloc(DIM0 * DIM1, sizeof(int)))) @@ -478,34 +484,40 @@ main(void) for (i = 0; i < DIM0; i++) icheck2[i] = icheck2_data + (i * DIM1); - h5_fixname(FILENAME[0], fapl, filename, sizeof filename); - if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + h5_fixname(FILENAME[0], fapl_id, filename, sizeof(filename)); + if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0) TEST_ERROR; /* Test error stack */ /* Push an error onto error stack */ - H5Epush1(__FILE__, FUNC_main, __LINE__, H5E_ERROR, H5E_BADVALUE, "Error test failed"); + H5Epush1(__FILE__, FUNC_main, __LINE__, H5E_ERROR, H5E_BADVALUE, "fake error message 1"); /* Print out the errors on stack */ dump_error(); - fprintf(stderr, "\n"); /* Empty error stack */ H5Eclear1(); /* Test error API */ - if (test_error1() < 0) + if (test_error_compat() < 0) TEST_ERROR; - if (test_error2(file) < 0) { - H5Epush1(__FILE__, FUNC_main, __LINE__, H5E_ERROR, H5E_BADMESG, "Error test failed"); + /* Test H5Epush1 + * + * On success, there will be errors on the stack to print. + */ + if (test_h5epush1(fid) < 0) { + TEST_ERROR; + } + else { + H5Epush1(__FILE__, FUNC_main, __LINE__, H5E_ERROR, H5E_BADMESG, "fake error message 2"); H5Eprint1(stderr); } - if (H5Fclose(file) < 0) + if (H5Fclose(fid) < 0) TEST_ERROR; - h5_clean_files(FILENAME, fapl); + h5_clean_files(FILENAME, fapl_id); HDfree(ipoints2); HDfree(ipoints2_data); @@ -513,7 +525,7 @@ main(void) HDfree(icheck2_data); HDprintf("All error API tests passed.\n"); - return 0; + return EXIT_SUCCESS; error: HDfree(ipoints2); @@ -521,7 +533,14 @@ error: HDfree(icheck2); HDfree(icheck2_data); + H5E_BEGIN_TRY + { + H5Fclose(fid); + H5Pclose(fapl_id); + } + H5E_END_TRY + HDprintf("***** ERROR TEST FAILED! *****\n"); - return 1; + return EXIT_FAILURE; } #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/test/error_test.c b/test/error_test.c index d1ce00b..cf1e82c 100644 --- a/test/error_test.c +++ b/test/error_test.c @@ -129,7 +129,7 @@ test_error(hid_t file) TEST_ERROR; if (old_data != NULL) TEST_ERROR; - if (old_func != (H5E_auto2_t)H5Eprint2) + if (old_func == NULL) TEST_ERROR; if (H5Eset_auto2(H5E_DEFAULT, NULL, NULL) < 0) diff --git a/test/event_set.c b/test/event_set.c new file mode 100644 index 0000000..6568663 --- /dev/null +++ b/test/event_set.c @@ -0,0 +1,135 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://www.hdfgroup.org/licenses. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * Programmer: Quincey Koziol + * Wednesday, April 8, 2020 + * + * Purpose: Tests event sets. + */ +#include "h5test.h" +#include "H5srcdir.h" + +const char *FILENAME[] = {"event_set_1", NULL}; + +/*------------------------------------------------------------------------- + * Function: test_es_create + * + * Purpose: Tests creating event sets. + * + * Return: Success: 0 + * Failure: number of errors + * + * Programmer: Quincey Koziol + * Thursday, April 9, 2020 + * + *------------------------------------------------------------------------- + */ +static int +test_es_create(void) +{ + hid_t es_id; /* Event set ID */ + size_t count; /* # of events in set */ + size_t num_errs; /* # of failed events in set */ + uint64_t num_ops; /* # of events inserted into set */ + hbool_t err_occurred; /* Whether an error has occurred */ + + TESTING("event set creation"); + + /* Create an event set */ + if ((es_id = H5EScreate()) < 0) + TEST_ERROR; + + /* Query the # of events in empty event set */ + count = 0; + if (H5ESget_count(es_id, &count) < 0) + TEST_ERROR; + if (count > 0) + FAIL_PUTS_ERROR("should be empty event set"); + + /* Check for errors */ + err_occurred = FALSE; + if (H5ESget_err_status(es_id, &err_occurred) < 0) + TEST_ERROR; + if (err_occurred) + FAIL_PUTS_ERROR("should not be an error for the event set"); + + /* Check errors count */ + num_errs = 0; + if (H5ESget_err_count(es_id, &num_errs) < 0) + TEST_ERROR; + if (num_errs) + FAIL_PUTS_ERROR("should not be any errors for the event set"); + + /* Check errors count */ + num_ops = 0; + if (H5ESget_op_counter(es_id, &num_ops) < 0) + TEST_ERROR; + if (num_ops) + FAIL_PUTS_ERROR("should not be any operations for the event set yet"); + + /* Close the event set */ + if (H5ESclose(es_id) < 0) + TEST_ERROR; + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY + { + H5ESclose(es_id); + } + H5E_END_TRY; + return 1; +} + +/*------------------------------------------------------------------------- + * Function: main + * + * Purpose: Tests event sets + * + * Return: Success: EXIT_SUCCESS + * Failure: EXIT_FAILURE + * + * Programmer: Quincey Koziol + * Wednesday, April 8, 2020 + * + *------------------------------------------------------------------------- + */ +int +main(void) +{ + hid_t fapl_id = H5I_INVALID_HID; /* File access property list */ + int nerrors = 0; /* Error count */ + + /* Setup */ + h5_reset(); + fapl_id = h5_fileaccess(); + + /* Tests */ + nerrors += test_es_create(); + + /* Cleanup */ + h5_cleanup(FILENAME, fapl_id); + + /* Check for any errors */ + if (nerrors) { + HDputs("***** EVENT SET TESTS FAILED *****"); + HDexit(EXIT_FAILURE); + } /* end if */ + + /* Report status */ + HDputs("All event set tests passed."); + + HDexit(EXIT_SUCCESS); +} /* end main() */ diff --git a/test/gen_cross.c b/test/gen_cross.c index 3eac79a..2746bb6 100644 --- a/test/gen_cross.c +++ b/test/gen_cross.c @@ -295,7 +295,7 @@ create_scale_offset_dsets_double(hid_t fid, hid_t fsid, hid_t msid) hid_t dataset = -1; /* dataset handles */ hid_t dcpl = -1; double data[NX][NY]; /* data to write */ - double fillvalue = -2.2f; + double fillvalue = -2.2; hsize_t chunk[RANK] = {CHUNK0, CHUNK1}; int i, j; diff --git a/test/gen_plist.c b/test/gen_plist.c index 7a67c56..10c6423 100644 --- a/test/gen_plist.c +++ b/test/gen_plist.c @@ -42,7 +42,7 @@ main(void) hsize_t max_size[1]; /* data space maximum size */ size_t nslots = 521 * 2; size_t nbytes = 1048576 * 10; - double w0 = 0.5f; + double w0 = 0.5; unsigned max_compact; unsigned min_dense; const char * c_to_f = "x+32"; @@ -56,26 +56,26 @@ main(void) 1 /*TRUE*/, 0 /*FALSE*/, (2 * 2048 * 1024), - 0.3f, + 0.3, (64 * 1024 * 1024), (4 * 1024 * 1024), 60000, H5C_incr__threshold, - 0.8f, - 3.0f, + 0.8, + 3.0, 1 /*TRUE*/, (8 * 1024 * 1024), H5C_flash_incr__add_space, - 2.0f, - 0.25f, + 2.0, + 0.25, H5C_decr__age_out_with_threshold, - 0.997f, - 0.8f, + 0.997, + 0.8, 1 /*TRUE*/, (3 * 1024 * 1024), 3, 0 /*FALSE*/, - 0.2f, + 0.2, (256 * 2048), H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY}; H5AC_cache_image_config_t my_cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, TRUE, FALSE, diff --git a/test/genall5.c b/test/genall5.c index 2c9586b..f1189fb 100644 --- a/test/genall5.c +++ b/test/genall5.c @@ -19,7 +19,6 @@ * of the same name. */ -#include <err.h> #include "cache_common.h" #include "vfd_swmr_common.h" /* for below_speed_limit() */ #include "genall5.h" @@ -2756,12 +2755,12 @@ out: if (!ok) { /* Currently not used: this step makes sure the operation doesn't take too long. * Any test that sets config.msgival or lastmsgtime to 0 will skip this step */ - if (strcmp(failure_mssg, last_failure_mssg) != 0 && + if (HDstrcmp(failure_mssg, last_failure_mssg) != 0 && ((config.msgival.tv_sec || config.msgival.tv_nsec)) && (lastmsgtime->tv_sec || lastmsgtime->tv_nsec)) { if (below_speed_limit(lastmsgtime, &config.msgival)) { last_failure_mssg = failure_mssg; - warnx("%s: %s", __func__, failure_mssg); + HDfprintf(stderr, "%s: %s", __func__, failure_mssg); } } } diff --git a/test/h5test.c b/test/h5test.c index 3c37cf9..8f74e45 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -147,16 +147,27 @@ h5_errors(hid_t estack, void H5_ATTR_UNUSED *client_data) return 0; } +/*------------------------------------------------------------------------- + * Function: h5_testing + * + * Purpose: Prints "Testing" + formatted options to stdout + * Used in the TESTING macro + * + * Return: void + *------------------------------------------------------------------------- + */ void h5_testing(const char *fmt, ...) { va_list ap; char buf[62 + 1]; /* room for 62-char field + NUL */ - va_start(ap, fmt); - vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - printf("Testing %s", buf); - fflush(stdout); + + HDva_start(ap, fmt); + HDvsnprintf(buf, sizeof(buf), fmt, ap); + HDva_end(ap); + + HDprintf("Testing %s", buf); + HDfflush(stdout); } /*------------------------------------------------------------------------- diff --git a/test/lheap.c b/test/lheap.c index 9bbacbe..2609510 100644 --- a/test/lheap.c +++ b/test/lheap.c @@ -103,7 +103,7 @@ main(void) if (j > 4) buf[j] = '\0'; - if (UFAIL == (obj[i] = H5HL_insert(f, heap, HDstrlen(buf) + 1, buf))) { + if (H5HL_insert(f, heap, HDstrlen(buf) + 1, buf, &obj[i]) < 0) { H5_FAILED(); H5Eprint2(H5E_DEFAULT, stdout); goto error; diff --git a/test/links.c b/test/links.c index 2ac2e28..b2d0d9a 100644 --- a/test/links.c +++ b/test/links.c @@ -140,7 +140,7 @@ const char *FILENAME[] = {"links0", #define H5L_DIM1 100 #define H5L_DIM2 100 -#define FILTER_FILESIZE_MAX_FRACTION (double)0.9F +#define FILTER_FILESIZE_MAX_FRACTION 0.9 /* Creation order macros */ #define CORDER_GROUP_NAME "corder_group" diff --git a/test/mirror_vfd.c b/test/mirror_vfd.c index 97d32ba..3556cd2 100644 --- a/test/mirror_vfd.c +++ b/test/mirror_vfd.c @@ -28,6 +28,8 @@ #ifdef H5_HAVE_MIRROR_VFD +#include "H5FDmirror_priv.h" /* Private header for the mirror VFD */ + /* For future consideration, IP address and port number might be * environment variables? */ @@ -61,8 +63,8 @@ static unsigned int g_verbosity = DEFAULT_VERBOSITY; #define LOGPRINT(lvl, ...) \ do { \ if ((lvl) <= g_verbosity) { \ - fprintf(g_log_stream, __VA_ARGS__); \ - fflush(g_log_stream); \ + HDfprintf(g_log_stream, __VA_ARGS__); \ + HDfflush(g_log_stream); \ } \ } while (0) @@ -148,7 +150,7 @@ _populate_filepath(const char *dirname, const char *_basename, hid_t fapl_id, ch } if (HDsnprintf(_path, H5FD_SPLITTER_PATH_MAX, "%s%s%s", dirname, - (dirname[strlen(dirname)] == '/') ? "" : "/", /* slash iff needed */ + (dirname[HDstrlen(dirname)] == '/') ? "" : "/", /* slash iff needed */ _basename) > H5FD_SPLITTER_PATH_MAX) { TEST_ERROR; } @@ -2339,7 +2341,7 @@ test_vanishing_datasets(void) TEST_ERROR; } if (group_info.nlinks > 0) { - HDfprintf(stderr, "links in rw file: %d\n", group_info.nlinks); + HDfprintf(stderr, "links in rw file: %" PRIuHSIZE "\n", group_info.nlinks); HDfflush(stderr); TEST_ERROR; } @@ -2354,7 +2356,7 @@ test_vanishing_datasets(void) TEST_ERROR; } if (group_info.nlinks > 0) { - HDfprintf(stderr, "links in wo file: %d\n", group_info.nlinks); + HDfprintf(stderr, "links in wo file: %" PRIuHSIZE "\n", group_info.nlinks); HDfflush(stderr); TEST_ERROR; } diff --git a/test/mtime.c b/test/mtime.c index 78f9065..43dc502 100644 --- a/test/mtime.c +++ b/test/mtime.c @@ -120,7 +120,7 @@ main(void) HDputs(" cannot be queried on this system. See H5O_mtime_decode()."); return 0; } - else if (HDfabs(HDdifftime(now, oi1.ctime)) > (double)60.0F) { + else if (HDfabs(HDdifftime(now, oi1.ctime)) > 60.0) { H5_FAILED(); tm = HDlocaltime(&(oi1.ctime)); HDstrftime((char *)buf1, sizeof buf1, "%Y-%m-%d %H:%M:%S", tm); diff --git a/test/objcopy.c b/test/objcopy.c index 2575bdb..43a5756 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -1103,7 +1103,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, /* Iterate over all elements, calling memcmp() for each */ for (elmt = 0; elmt < nelmts; elmt++) { - if (HDmemcmp(memb1, memb2, memb_size)) + if (HDmemcmp(memb1, memb2, memb_size) != 0) TEST_ERROR /* Update member pointers */ @@ -1325,7 +1325,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, else TEST_ERROR } /* end else */ - else if (HDmemcmp(buf1, buf2, (elmt_size * nelmts))) + else if (HDmemcmp(buf1, buf2, (elmt_size * nelmts)) != 0) TEST_ERROR /* Data should be the same. :-) */ @@ -1596,7 +1596,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) if (H5Lget_name_by_idx(gid2, ".", H5_INDEX_NAME, H5_ITER_INC, idx, objname2, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(objname, objname2)) + if (HDstrcmp(objname, objname2) != 0) TEST_ERROR /* Get link info */ @@ -1710,7 +1710,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) TEST_ERROR /* Compare link data */ - if (HDmemcmp(linkval, linkval2, linfo.u.val_size)) + if (HDmemcmp(linkval, linkval2, linfo.u.val_size) != 0) TEST_ERROR } /* end else-if */ else { @@ -2936,7 +2936,7 @@ test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t HDmemset(buf, 0, sizeof(buf)); for (i = 0; i < DIM_SIZE_1; i++) { buf[i].a = i; - buf[i].d = (double)1.0F / (double)(i + 1); + buf[i].d = 1.0 / (double)(i + 1); } /* end for */ /* Initialize the filenames */ @@ -4499,7 +4499,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid #ifndef H5_HAVE_FILTER_DEFLATE SKIPPED(); - puts(" Deflation filter not available"); + HDputs(" Deflation filter not available"); #else /* H5_HAVE_FILTER_DEFLATE */ /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) @@ -4924,7 +4924,7 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h #ifndef H5_HAVE_FILTER_DEFLATE SKIPPED(); - puts(" Deflation filter not available"); + HDputs(" Deflation filter not available"); #else /* H5_HAVE_FILTER_DEFLATE */ /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) @@ -7030,7 +7030,7 @@ compare_attribute_compound_vlstr(hid_t loc, hid_t loc2) FAIL_STACK_ERROR if (HDstrlen(rbuf.v) != HDstrlen(rbuf2.v)) FAIL_STACK_ERROR - if (HDmemcmp(rbuf.v, rbuf2.v, HDstrlen(rbuf.v))) + if (HDmemcmp(rbuf.v, rbuf2.v, HDstrlen(rbuf.v)) != 0) FAIL_STACK_ERROR /* Reclaim vlen buffer */ @@ -7278,7 +7278,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, #ifndef H5_HAVE_FILTER_DEFLATE SKIPPED(); - puts(" Deflation filter not available"); + HDputs(" Deflation filter not available"); #else /* H5_HAVE_FILTER_DEFLATE */ /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) { @@ -11700,9 +11700,9 @@ test_copy_null_ref(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap TEST_ERROR /* Verify that the references contain only "0" bytes */ - if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf))) + if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0) TEST_ERROR - if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf))) + if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0) TEST_ERROR /* Close datasets */ @@ -11745,9 +11745,9 @@ test_copy_null_ref(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap TEST_ERROR /* Verify that the references contain only "0" bytes */ - if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf))) + if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0) TEST_ERROR - if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf))) + if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0) TEST_ERROR /* Close */ @@ -11907,9 +11907,9 @@ test_copy_null_ref_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds TEST_ERROR /* Verify that the references contain only "0" bytes */ - if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf))) + if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0) TEST_ERROR - if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf))) + if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0) TEST_ERROR /* Create destination file */ @@ -11952,9 +11952,9 @@ test_copy_null_ref_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds TEST_ERROR /* Verify that the references contain only "0" bytes */ - if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf))) + if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0) TEST_ERROR - if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf))) + if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0) TEST_ERROR /* Close */ diff --git a/test/objcopy_ref.c b/test/objcopy_ref.c index 21fa51a..23df121 100644 --- a/test/objcopy_ref.c +++ b/test/objcopy_ref.c @@ -887,7 +887,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, /* Iterate over all elements, calling memcmp() for each */ for (elmt = 0; elmt < nelmts; elmt++) { - if (HDmemcmp(memb1, memb2, memb_size)) + if (HDmemcmp(memb1, memb2, memb_size) != 0) TEST_ERROR /* Update member pointers */ @@ -1035,7 +1035,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, else TEST_ERROR } /* end else */ - else if (HDmemcmp(buf1, buf2, (elmt_size * nelmts))) + else if (HDmemcmp(buf1, buf2, (elmt_size * nelmts)) != 0) TEST_ERROR /* Data should be the same. :-) */ @@ -1306,7 +1306,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) if (H5Lget_name_by_idx(gid2, ".", H5_INDEX_NAME, H5_ITER_INC, idx, objname2, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(objname, objname2)) + if (HDstrcmp(objname, objname2) != 0) TEST_ERROR /* Get link info */ @@ -1420,7 +1420,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) TEST_ERROR /* Compare link data */ - if (HDmemcmp(linkval, linkval2, linfo.u.val_size)) + if (HDmemcmp(linkval, linkval2, linfo.u.val_size) != 0) TEST_ERROR } /* end else-if */ else { diff --git a/test/tattr.c b/test/tattr.c index c30b0f5..b602222 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -519,13 +519,13 @@ test_attr_basic_read(hid_t fapl) static void test_attr_flush(hid_t fapl) { - hid_t fil, /* File ID */ - att, /* Attribute ID */ - spc, /* Dataspace ID */ - set; /* Dataset ID */ - double wdata = 3.14159F; /* Data to write */ - double rdata; /* Data read in */ - herr_t ret; /* Generic return value */ + hid_t fil, /* File ID */ + att, /* Attribute ID */ + spc, /* Dataspace ID */ + set; /* Dataset ID */ + double wdata = 3.14159; /* Data to write */ + double rdata; /* Data read in */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Attribute Flushing\n")); @@ -546,7 +546,7 @@ test_attr_flush(hid_t fapl) CHECK(ret, FAIL, "H5Awrite"); if (!H5_DBL_ABS_EQUAL(rdata, 0.0)) - TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n", rdata, (double)0.0F); + TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n", rdata, 0.0); ret = H5Fflush(fil, H5F_SCOPE_GLOBAL); CHECK(ret, FAIL, "H5Fflush"); @@ -555,7 +555,7 @@ test_attr_flush(hid_t fapl) CHECK(ret, FAIL, "H5Awrite"); if (!H5_DBL_ABS_EQUAL(rdata, 0.0)) - TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n", rdata, (double)0.0F); + TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n", rdata, 0.0); ret = H5Awrite(att, H5T_NATIVE_DOUBLE, &wdata); CHECK(ret, FAIL, "H5Awrite"); diff --git a/test/testfiles/err_compat_1 b/test/testfiles/err_compat_1 index 978c1f4..e588a8b 100644 --- a/test/testfiles/err_compat_1 +++ b/test/testfiles/err_compat_1 @@ -4,7 +4,7 @@ All error API tests passed. This program tests the Error API compatible with HDF5 version (number). There are supposed to be some error messages ********* Print error stack in HDF5 default way ********* HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in main(): Error test failed + #000: (file name) line (number) in main(): fake error message 1 major: Error API minor: Bad value @@ -12,38 +12,87 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): error #000: (file name) in main(): line (number) major: Error API minor: Bad value - HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Dcreate2(): invalid location identifier + #000: (file name) line (number) in H5Dcreate2(): unable to synchronously create dataset + major: Dataset + minor: Unable to create file + #001: (file name) line (number) in H5D__create_api_common(): can't set object access arguments + major: Dataset + minor: Can't set value + #002: (file name) line (number) in H5VL_setup_acc_args(): invalid location identifier + major: Invalid arguments to routine + minor: Inappropriate type + #003: (file name) line (number) in H5VL_vol_object(): invalid identifier type to function major: Invalid arguments to routine minor: Inappropriate type ********* Print error stack in customized way ********* - error #000: (file name) in H5Dcreate2(): line (number) + error #000: (file name) in H5VL_vol_object(): line (number) + major: Invalid arguments to routine + minor: Inappropriate type + error #001: (file name) in H5VL_setup_acc_args(): line (number) major: Invalid arguments to routine minor: Inappropriate type + error #002: (file name) in H5D__create_api_common(): line (number) + major: Dataset + minor: Can't set value + error #003: (file name) in H5Dcreate2(): line (number) + major: Dataset + minor: Unable to create file ********* Print error stack in customized way ********* - error #000: (file name) in H5Eget_auto(1 or 2)(): line (number) + error #000: (file name) in H5VL_vol_object(): line (number) + major: Invalid arguments to routine + minor: Inappropriate type + error #001: (file name) in H5VL_setup_acc_args(): line (number) + major: Invalid arguments to routine + minor: Inappropriate type + error #002: (file name) in H5D__create_api_common(): line (number) + major: Dataset + minor: Can't set value + error #003: (file name) in H5Dcreate2(): line (number) + major: Dataset + minor: Unable to create file + error #004: (file name) in H5Eget_auto(1 or 2)(): line (number) major: Error API minor: Can't get value ********* Print error stack in customized way ********* - error #000: (file name) in H5Dcreate2(): line (number) + error #000: (file name) in H5VL_vol_object(): line (number) + major: Invalid arguments to routine + minor: Inappropriate type + error #001: (file name) in H5VL_setup_acc_args(): line (number) major: Invalid arguments to routine minor: Inappropriate type + error #002: (file name) in H5D__create_api_common(): line (number) + major: Dataset + minor: Can't set value + error #003: (file name) in H5Dcreate2(): line (number) + major: Dataset + minor: Unable to create file HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Dcreate2(): invalid location identifier + #000: (file name) line (number) in H5Dcreate2(): unable to synchronously create dataset + major: Dataset + minor: Unable to create file + #001: (file name) line (number) in H5D__create_api_common(): can't set object access arguments + major: Dataset + minor: Can't set value + #002: (file name) line (number) in H5VL_setup_acc_args(): invalid location identifier + major: Invalid arguments to routine + minor: Inappropriate type + #003: (file name) line (number) in H5VL_vol_object(): invalid identifier type to function major: Invalid arguments to routine minor: Inappropriate type - HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in main(): Error test failed + #000: (file name) line (number) in main(): fake error message 2 major: Error API minor: Unrecognized message - #001: (file name) line (number) in test_error2(): H5Dwrite shouldn't succeed + #001: (file name) line (number) in test_h5epush1(): expected H5Dwrite error major: Error API minor: Write failed - #002: (file name) line (number) in H5Dwrite(): dset_id is not a dataset ID + #002: (file name) line (number) in H5Dwrite(): can't synchronously write data + major: Dataset + minor: Write failed + #003: (file name) line (number) in H5D__write_api_common(): dset_id is not a dataset ID major: Invalid arguments to routine minor: Inappropriate type diff --git a/test/testfiles/error_test_1 b/test/testfiles/error_test_1 index f0e4a62..070869e 100644 --- a/test/testfiles/error_test_1 +++ b/test/testfiles/error_test_1 @@ -21,7 +21,10 @@ Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs): Testing error API based on data I/O HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Dwrite(): dset_id is not a dataset ID + #000: (file name) line (number) in H5Dwrite(): can't synchronously write data + major: Dataset + minor: Write failed + #001: (file name) line (number) in H5D__write_api_common(): dset_id is not a dataset ID major: Invalid arguments to routine minor: Inappropriate type Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs): @@ -32,37 +35,43 @@ Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs): major: Error in IO minor: Error in H5Dwrite HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #002: (file name) line (number) in H5Dwrite(): dset_id is not a dataset ID + #002: (file name) line (number) in H5Dwrite(): can't synchronously write data + major: Dataset + minor: Write failed + #003: (file name) line (number) in H5D__write_api_common(): dset_id is not a dataset ID major: Invalid arguments to routine minor: Inappropriate type Testing error message during data reading when filter isn't registered HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Dread(): can't read data + #000: (file name) line (number) in H5Dread(): can't synchronously read data + major: Dataset + minor: Read failed + #001: (file name) line (number) in H5D__read_api_common(): can't read data major: Dataset minor: Read failed - #001: (file name) line (number) in H5VL_dataset_read(): dataset read failed + #002: (file name) line (number) in H5VL_dataset_read(): dataset read failed major: Virtual Object Layer minor: Read failed - #002: (file name) line (number) in H5VL__dataset_read(): dataset read failed + #003: (file name) line (number) in H5VL__dataset_read(): dataset read failed major: Virtual Object Layer minor: Read failed - #003: (file name) line (number) in H5VL__native_dataset_read(): can't read data + #004: (file name) line (number) in H5VL__native_dataset_read(): can't read data major: Dataset minor: Read failed - #004: (file name) line (number) in H5D__read(): can't read data + #005: (file name) line (number) in H5D__read(): can't read data major: Dataset minor: Read failed - #005: (file name) line (number) in H5D__chunk_read(): unable to read raw data chunk + #006: (file name) line (number) in H5D__chunk_read(): unable to read raw data chunk major: Low-level I/O minor: Read failed - #006: (file name) line (number) in H5D__chunk_lock(): data pipeline read failed + #007: (file name) line (number) in H5D__chunk_lock(): data pipeline read failed major: Dataset minor: Filter operation failed - #007: (file name) line (number) in H5Z_pipeline(): required filter 'bogus' is not registered + #008: (file name) line (number) in H5Z_pipeline(): required filter 'bogus' is not registered major: Data filters minor: Read failed - #008: (file name) line (number) in H5PL_load(): filter plugins disabled + #009: (file name) line (number) in H5PL_load(): filter plugins disabled major: Plugin for dynamically loaded library minor: Unable to load metadata into cache diff --git a/test/testfiles/plist_files/dcpl_32be b/test/testfiles/plist_files/dcpl_32be Binary files differindex c8241a6..667c67f 100644 --- a/test/testfiles/plist_files/dcpl_32be +++ b/test/testfiles/plist_files/dcpl_32be diff --git a/test/testfiles/plist_files/dcpl_32le b/test/testfiles/plist_files/dcpl_32le Binary files differindex c8241a6..667c67f 100644 --- a/test/testfiles/plist_files/dcpl_32le +++ b/test/testfiles/plist_files/dcpl_32le diff --git a/test/testfiles/plist_files/dcpl_64be b/test/testfiles/plist_files/dcpl_64be Binary files differindex c8241a6..667c67f 100644 --- a/test/testfiles/plist_files/dcpl_64be +++ b/test/testfiles/plist_files/dcpl_64be diff --git a/test/testfiles/plist_files/dcpl_64le b/test/testfiles/plist_files/dcpl_64le Binary files differindex c8241a6..667c67f 100644 --- a/test/testfiles/plist_files/dcpl_64le +++ b/test/testfiles/plist_files/dcpl_64le diff --git a/test/testfiles/plist_files/def_dcpl_32be b/test/testfiles/plist_files/def_dcpl_32be Binary files differindex 0909391..01b233c 100644 --- a/test/testfiles/plist_files/def_dcpl_32be +++ b/test/testfiles/plist_files/def_dcpl_32be diff --git a/test/testfiles/plist_files/def_dcpl_32le b/test/testfiles/plist_files/def_dcpl_32le Binary files differindex 0909391..01b233c 100644 --- a/test/testfiles/plist_files/def_dcpl_32le +++ b/test/testfiles/plist_files/def_dcpl_32le diff --git a/test/testfiles/plist_files/def_dcpl_64be b/test/testfiles/plist_files/def_dcpl_64be Binary files differindex 0909391..01b233c 100644 --- a/test/testfiles/plist_files/def_dcpl_64be +++ b/test/testfiles/plist_files/def_dcpl_64be diff --git a/test/testfiles/plist_files/def_dcpl_64le b/test/testfiles/plist_files/def_dcpl_64le Binary files differindex 0909391..01b233c 100644 --- a/test/testfiles/plist_files/def_dcpl_64le +++ b/test/testfiles/plist_files/def_dcpl_64le diff --git a/test/testfiles/plist_files/def_dxpl_32be b/test/testfiles/plist_files/def_dxpl_32be Binary files differindex da29037..b13f456 100644 --- a/test/testfiles/plist_files/def_dxpl_32be +++ b/test/testfiles/plist_files/def_dxpl_32be diff --git a/test/testfiles/plist_files/def_dxpl_32le b/test/testfiles/plist_files/def_dxpl_32le Binary files differindex da29037..b13f456 100644 --- a/test/testfiles/plist_files/def_dxpl_32le +++ b/test/testfiles/plist_files/def_dxpl_32le diff --git a/test/testfiles/plist_files/def_dxpl_64be b/test/testfiles/plist_files/def_dxpl_64be Binary files differindex da29037..b13f456 100644 --- a/test/testfiles/plist_files/def_dxpl_64be +++ b/test/testfiles/plist_files/def_dxpl_64be diff --git a/test/testfiles/plist_files/def_dxpl_64le b/test/testfiles/plist_files/def_dxpl_64le Binary files differindex da29037..b13f456 100644 --- a/test/testfiles/plist_files/def_dxpl_64le +++ b/test/testfiles/plist_files/def_dxpl_64le diff --git a/test/testfiles/plist_files/def_fapl_32be b/test/testfiles/plist_files/def_fapl_32be Binary files differindex 6738cda..53ef572 100644 --- a/test/testfiles/plist_files/def_fapl_32be +++ b/test/testfiles/plist_files/def_fapl_32be diff --git a/test/testfiles/plist_files/def_fapl_32le b/test/testfiles/plist_files/def_fapl_32le Binary files differindex 6738cda..53ef572 100644 --- a/test/testfiles/plist_files/def_fapl_32le +++ b/test/testfiles/plist_files/def_fapl_32le diff --git a/test/testfiles/plist_files/def_fapl_64be b/test/testfiles/plist_files/def_fapl_64be Binary files differindex 6738cda..53ef572 100644 --- a/test/testfiles/plist_files/def_fapl_64be +++ b/test/testfiles/plist_files/def_fapl_64be diff --git a/test/testfiles/plist_files/def_fapl_64le b/test/testfiles/plist_files/def_fapl_64le Binary files differindex 6738cda..53ef572 100644 --- a/test/testfiles/plist_files/def_fapl_64le +++ b/test/testfiles/plist_files/def_fapl_64le diff --git a/test/testfiles/plist_files/dxpl_32be b/test/testfiles/plist_files/dxpl_32be Binary files differindex cac7e50..5ff2ea0 100644 --- a/test/testfiles/plist_files/dxpl_32be +++ b/test/testfiles/plist_files/dxpl_32be diff --git a/test/testfiles/plist_files/dxpl_32le b/test/testfiles/plist_files/dxpl_32le Binary files differindex cac7e50..5ff2ea0 100644 --- a/test/testfiles/plist_files/dxpl_32le +++ b/test/testfiles/plist_files/dxpl_32le diff --git a/test/testfiles/plist_files/dxpl_64be b/test/testfiles/plist_files/dxpl_64be Binary files differindex cac7e50..5ff2ea0 100644 --- a/test/testfiles/plist_files/dxpl_64be +++ b/test/testfiles/plist_files/dxpl_64be diff --git a/test/testfiles/plist_files/dxpl_64le b/test/testfiles/plist_files/dxpl_64le Binary files differindex cac7e50..5ff2ea0 100644 --- a/test/testfiles/plist_files/dxpl_64le +++ b/test/testfiles/plist_files/dxpl_64le diff --git a/test/testfiles/plist_files/fapl_32be b/test/testfiles/plist_files/fapl_32be Binary files differindex 807c04a..d89a44c 100644 --- a/test/testfiles/plist_files/fapl_32be +++ b/test/testfiles/plist_files/fapl_32be diff --git a/test/testfiles/plist_files/fapl_32le b/test/testfiles/plist_files/fapl_32le Binary files differindex 807c04a..d89a44c 100644 --- a/test/testfiles/plist_files/fapl_32le +++ b/test/testfiles/plist_files/fapl_32le diff --git a/test/testfiles/plist_files/fapl_64be b/test/testfiles/plist_files/fapl_64be Binary files differindex 807c04a..d89a44c 100644 --- a/test/testfiles/plist_files/fapl_64be +++ b/test/testfiles/plist_files/fapl_64be diff --git a/test/testfiles/plist_files/fapl_64le b/test/testfiles/plist_files/fapl_64le Binary files differindex 807c04a..d89a44c 100644 --- a/test/testfiles/plist_files/fapl_64le +++ b/test/testfiles/plist_files/fapl_64le diff --git a/test/testfiles/plist_files/lapl_32be b/test/testfiles/plist_files/lapl_32be Binary files differindex 3db7163..eee238e 100644 --- a/test/testfiles/plist_files/lapl_32be +++ b/test/testfiles/plist_files/lapl_32be diff --git a/test/testfiles/plist_files/lapl_32le b/test/testfiles/plist_files/lapl_32le Binary files differindex 3db7163..eee238e 100644 --- a/test/testfiles/plist_files/lapl_32le +++ b/test/testfiles/plist_files/lapl_32le diff --git a/test/testfiles/plist_files/lapl_64be b/test/testfiles/plist_files/lapl_64be Binary files differindex 3db7163..eee238e 100644 --- a/test/testfiles/plist_files/lapl_64be +++ b/test/testfiles/plist_files/lapl_64be diff --git a/test/testfiles/plist_files/lapl_64le b/test/testfiles/plist_files/lapl_64le Binary files differindex 3db7163..eee238e 100644 --- a/test/testfiles/plist_files/lapl_64le +++ b/test/testfiles/plist_files/lapl_64le diff --git a/test/testvfdswmr.sh.in b/test/testvfdswmr.sh.in index 819d51a..ea2fd7b 100644 --- a/test/testvfdswmr.sh.in +++ b/test/testvfdswmr.sh.in @@ -150,13 +150,15 @@ if test -z "$srcdir"; then fi # Check to see if the VFD specified by the HDF5_DRIVER environment variable -# supports SWMR. ??? DO I NEED TO MODIFY THIS ???? -./swmr_check_compat_vfd +# supports SWMR and/or if we are using parallel HDF5, which does not +# currently support SWMR. +./vfd_swmr_check_compat rc=$? if [ $rc -ne 0 ] ; then echo - echo "The VFD specified by the HDF5_DRIVER environment variable" - echo "does not support VFD SWMR." + echo "Either the VFD specified by the HDF5_DRIVER environment variable" + echo "does not support VFD SWMR or parallel HDF5 was configured, which" + echo "currently does not support SWMR." echo echo "VFD SWMR acceptance tests skipped" echo diff --git a/test/tgenprop.c b/test/tgenprop.c index 7e805e2..55e5a9b 100644 --- a/test/tgenprop.c +++ b/test/tgenprop.c @@ -55,7 +55,7 @@ char prop3_def[10] = "Ten chars"; /* Property 3 default value */ #define PROP3_DEF_VALUE (&prop3_def) #define PROP4_NAME "Property 4" -double prop4_def = 1.41F; /* Property 4 default value */ +double prop4_def = 1.41; /* Property 4 default value */ #define PROP4_SIZE sizeof(prop4_def) #define PROP4_DEF_VALUE (&prop4_def) diff --git a/test/th5s.c b/test/th5s.c index 30c3396..51216dc 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -2575,7 +2575,7 @@ test_h5s_chunk(void) for (i = 0; i < CHUNK_DATA_NX; i++) { for (j = 0; j < CHUNK_DATA_NY; j++) { /* Check if the two values are within 0.001% range. */ - if (!H5_DBL_REL_EQUAL(chunk_data_dbl[i][j], (double)chunk_data_flt[i][j], (double)0.00001F)) + if (!H5_DBL_REL_EQUAL(chunk_data_dbl[i][j], (double)chunk_data_flt[i][j], 0.00001)) TestErrPrintf("%u: chunk_data_dbl[%d][%d]=%e, chunk_data_flt[%d][%d]=%e\n", (unsigned)__LINE__, i, j, chunk_data_dbl[i][j], i, j, (double)chunk_data_flt[i][j]); diff --git a/test/thread_id.c b/test/thread_id.c index cdd3418..c7b2b44 100644 --- a/test/thread_id.c +++ b/test/thread_id.c @@ -25,6 +25,8 @@ */ #include "testhdf5.h" +#if defined(H5_HAVE_THREADSAFE) && !defined(H5_HAVE_WIN_THREADS) + static void my_errx(int, const char *, ...) H5_ATTR_FORMAT(printf, 2, 3); static void @@ -40,8 +42,6 @@ my_errx(int code, const char *fmt, ...) HDexit(code); } -#if defined(H5_HAVE_THREADSAFE) && !defined(H5_HAVE_WIN_THREADS) - #if defined(H5_HAVE_DARWIN) typedef struct _pthread_barrierattr { @@ -73,7 +73,7 @@ pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrierattr_t *at if (attr != NULL) return EINVAL; - memset(barrier, 0, sizeof(*barrier)); + HDmemset(barrier, 0, sizeof(*barrier)); barrier->count = count; @@ -96,7 +96,7 @@ barrier_lock(pthread_barrier_t *barrier) int rc; if ((rc = pthread_mutex_lock(&barrier->mtx)) != 0) { - my_errx(EXIT_FAILURE, "%s: pthread_mutex_lock: %s", __func__, strerror(rc)); + my_errx(EXIT_FAILURE, "%s: pthread_mutex_lock: %s", __func__, HDstrerror(rc)); } } @@ -106,7 +106,7 @@ barrier_unlock(pthread_barrier_t *barrier) int rc; if ((rc = pthread_mutex_unlock(&barrier->mtx)) != 0) { - my_errx(EXIT_FAILURE, "%s: pthread_mutex_unlock: %s", __func__, strerror(rc)); + my_errx(EXIT_FAILURE, "%s: pthread_mutex_unlock: %s", __func__, HDstrerror(rc)); } } @@ -203,16 +203,16 @@ atomic_printf(const char *fmt, ...) va_list ap; ssize_t nprinted, nwritten; - va_start(ap, fmt); - nprinted = vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); + HDva_start(ap, fmt); + nprinted = HDvsnprintf(buf, sizeof(buf), fmt, ap); + HDva_end(ap); if (nprinted == -1) my_err(EXIT_FAILURE, "%s.%d: vsnprintf", __func__, __LINE__); else if (nprinted >= (ssize_t)sizeof(buf)) my_errx(EXIT_FAILURE, "%s.%d: vsnprintf overflowed", __func__, __LINE__); - nwritten = write(STDOUT_FILENO, buf, (size_t)nprinted); + nwritten = HDwrite(STDOUT_FILENO, buf, (size_t)nprinted); if (nwritten < nprinted) { my_errx(EXIT_FAILURE, "%s.%d: write error or short write", __func__, __LINE__); } @@ -867,6 +867,509 @@ error: return -1; } /* end test_remove_clear_type() */ +/* Typedef for future objects */ +typedef struct { + H5I_type_t obj_type; /* ID type for actual object */ +} future_obj_t; + +/* Global (static) future ID object type */ +H5I_type_t future_obj_type_g = H5I_BADID; + +/* Callback to free the actual object for future object test */ +static herr_t +free_actual_object(void *_p, void H5_ATTR_UNUSED **_ctx) +{ + int *p = (int *)_p; + + if (7 != *p) + return FAIL; + + HDfree(p); + + return SUCCEED; +} + +/* Callback to realize a future object */ +static herr_t +realize_future_cb(void *_future_obj, hid_t *actual_id) +{ + future_obj_t *future_obj = (future_obj_t *)_future_obj; /* Future object */ + int * actual_obj; /* Pointer to the actual object */ + + /* Check for bad future object */ + if (NULL == future_obj) + return FAIL; + + /* Determine type of object to realize */ + if (H5I_DATASPACE == future_obj->obj_type) { + hsize_t dims = 13; + + if ((*actual_id = H5Screate_simple(1, &dims, NULL)) < 0) + return FAIL; + } + else if (H5I_DATATYPE == future_obj->obj_type) { + if ((*actual_id = H5Tcopy(H5T_NATIVE_INT)) < 0) + return FAIL; + } + else if (H5I_GENPROP_LST == future_obj->obj_type) { + if ((*actual_id = H5Pcreate(H5P_DATASET_XFER)) < 0) + return FAIL; + } + else { + /* Create a new object (the 'actual object') of the correct type */ + if (NULL == (actual_obj = HDmalloc(sizeof(int)))) + return FAIL; + *actual_obj = 7; + + /* Register actual object of the user-defined type */ + *actual_id = H5Iregister(future_obj->obj_type, actual_obj); + CHECK(*actual_id, FAIL, "H5Iregister"); + if (*actual_id == FAIL) + return FAIL; + } + + return SUCCEED; +} + +/* Callback to discard a future object */ +static herr_t +discard_future_cb(void *future_obj) +{ + if (NULL == future_obj) + return FAIL; + + HDfree(future_obj); + + return SUCCEED; +} + +/* Callback to realize a future object when future objects are NULL*/ +static herr_t +realize_future_generate_cb(void *_future_obj, hid_t *actual_id) +{ + future_obj_t *future_obj = (future_obj_t *)_future_obj; /* Future object */ + int * actual_obj; /* Pointer to the actual object */ + + if (NULL != future_obj) + return FAIL; + /* Create a new object (the 'actual object') of the correct type */ + if (NULL == (actual_obj = HDmalloc(sizeof(int)))) + return FAIL; + *actual_obj = 7; + + /* Register actual object without using future object info */ + *actual_id = H5Iregister(future_obj_type_g, actual_obj); + CHECK(*actual_id, FAIL, "H5Iregister"); + if (*actual_id == FAIL) + return FAIL; + + return SUCCEED; +} + +/* Callback to discard a future object when future objects are NULL */ +static herr_t +discard_future_generate_cb(void *future_obj) +{ + if (NULL != future_obj) + return FAIL; + + return SUCCEED; +} + +/* Test function */ +static int +test_future_ids(void) +{ + H5I_type_t obj_type; /* New user-defined ID type */ + hid_t future_id; /* ID for future object */ + int fake_future_obj; /* "Fake" future object for tests */ + future_obj_t *future_obj; /* Future object */ + int * actual_obj; /* Actual object */ + int * actual_obj2; /* Another actual object */ + H5I_type_t id_type; /* Type of ID */ + H5T_class_t type_class; /* Datatype class */ + herr_t ret; /* Return value */ + + /* Register a user-defined type with our custom ID-deleting callback */ + obj_type = H5Iregister_type((size_t)15, 0, free_actual_object); + CHECK(obj_type, H5I_BADID, "H5Iregister_type"); + if (H5I_BADID == obj_type) + goto error; + + /* Test basic error conditions */ + fake_future_obj = 0; + H5E_BEGIN_TRY + { + future_id = H5Iregister_future(obj_type, &fake_future_obj, NULL, NULL); + } + H5E_END_TRY + VERIFY(future_id, H5I_INVALID_HID, "H5Iregister_future"); + if (H5I_INVALID_HID != future_id) + goto error; + + H5E_BEGIN_TRY + { + future_id = H5Iregister_future(obj_type, &fake_future_obj, realize_future_cb, NULL); + } + H5E_END_TRY + VERIFY(future_id, H5I_INVALID_HID, "H5Iregister_future"); + if (H5I_INVALID_HID != future_id) + goto error; + + H5E_BEGIN_TRY + { + future_id = H5Iregister_future(obj_type, &fake_future_obj, NULL, discard_future_cb); + } + H5E_END_TRY + VERIFY(future_id, H5I_INVALID_HID, "H5Iregister_future"); + if (H5I_INVALID_HID != future_id) + goto error; + + H5E_BEGIN_TRY + { + future_id = H5Iregister_future(H5I_BADID, &fake_future_obj, realize_future_cb, discard_future_cb); + } + H5E_END_TRY + VERIFY(future_id, H5I_INVALID_HID, "H5Iregister_future"); + if (H5I_INVALID_HID != future_id) + goto error; + + /* Test base use-case: create a future object and destroy type without + * realizing the future object. + */ + future_obj = HDmalloc(sizeof(future_obj_t)); + future_obj->obj_type = obj_type; + future_id = H5Iregister_future(obj_type, future_obj, realize_future_cb, discard_future_cb); + CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future"); + if (H5I_INVALID_HID == future_id) + goto error; + + /* Destroy the type */ + ret = H5Idestroy_type(obj_type); + CHECK(ret, FAIL, "H5Idestroy_type"); + if (FAIL == ret) + goto error; + + /* Re-register a user-defined type with our custom ID-deleting callback */ + obj_type = H5Iregister_type((size_t)15, 0, free_actual_object); + CHECK(obj_type, H5I_BADID, "H5Iregister_type"); + if (H5I_BADID == obj_type) + goto error; + + /* Test base use-case: create a future object and realize the actual object. */ + future_obj = HDmalloc(sizeof(future_obj_t)); + future_obj->obj_type = obj_type; + future_id = H5Iregister_future(obj_type, future_obj, realize_future_cb, discard_future_cb); + CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future"); + if (H5I_INVALID_HID == future_id) + goto error; + + actual_obj = H5Iobject_verify(future_id, obj_type); + CHECK_PTR(actual_obj, "H5Iobject_verify"); + if (NULL == actual_obj) + goto error; + VERIFY(*actual_obj, 7, "H5Iobject_verify"); + if (7 != *actual_obj) + goto error; + + /* Retrieve the object again and verify that it's the same actual object */ + actual_obj2 = H5Iobject_verify(future_id, obj_type); + CHECK_PTR(actual_obj2, "H5Iobject_verify"); + if (NULL == actual_obj2) + goto error; + VERIFY(*actual_obj2, 7, "H5Iobject_verify"); + if (7 != *actual_obj2) + goto error; + CHECK_PTR_EQ(actual_obj, actual_obj2, "H5Iobject_verify"); + if (actual_obj != actual_obj2) + goto error; + + /* Destroy the type */ + ret = H5Idestroy_type(obj_type); + CHECK(ret, FAIL, "H5Idestroy_type"); + if (FAIL == ret) + goto error; + + /* Re-register a user-defined type with our custom ID-deleting callback */ + obj_type = H5Iregister_type((size_t)15, 0, free_actual_object); + CHECK(obj_type, H5I_BADID, "H5Iregister_type"); + if (H5I_BADID == obj_type) + goto error; + + /* Set the global future object type */ + future_obj_type_g = obj_type; + + /* Test "actual object generator" use-case: create a future object with + * NULL object pointer, to create new object of predefined type when + * future object is realized. + */ + future_id = H5Iregister_future(obj_type, NULL, realize_future_generate_cb, discard_future_generate_cb); + CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future"); + if (H5I_INVALID_HID == future_id) + goto error; + + /* Realize the actual object, with will be dynamically allocated within + * the 'realize' callback. + */ + actual_obj = H5Iobject_verify(future_id, obj_type); + CHECK_PTR(actual_obj, "H5Iobject_verify"); + if (NULL == actual_obj) + goto error; + VERIFY(*actual_obj, 7, "H5Iobject_verify"); + if (7 != *actual_obj) + goto error; + + /* Reset the global future object type */ + future_obj_type_g = H5I_BADID; + + /* Retrieve the object again and verify that it's the same actual object */ + /* (Will fail if global future object type used) */ + actual_obj2 = H5Iobject_verify(future_id, obj_type); + CHECK_PTR(actual_obj2, "H5Iobject_verify"); + if (NULL == actual_obj2) + goto error; + VERIFY(*actual_obj2, 7, "H5Iobject_verify"); + if (7 != *actual_obj2) + goto error; + CHECK_PTR_EQ(actual_obj, actual_obj2, "H5Iobject_verify"); + if (actual_obj != actual_obj2) + goto error; + + /* Destroy the type */ + ret = H5Idestroy_type(obj_type); + CHECK(ret, FAIL, "H5Idestroy_type"); + if (FAIL == ret) + goto error; + + /* Test base use-case: create a future object for a pre-defined type */ + /* (DATASPACE) */ + future_obj = HDmalloc(sizeof(future_obj_t)); + future_obj->obj_type = H5I_DATASPACE; + future_id = H5Iregister_future(H5I_DATASPACE, future_obj, realize_future_cb, discard_future_cb); + CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future"); + if (H5I_INVALID_HID == future_id) + goto error; + + /* (Can't verify the type of the future ID, because the library's current + * implementation realizes the object during sanity checks on the ID) + */ + + /* Close future object for pre-defined type without realizing it */ + ret = H5Idec_ref(future_id); + CHECK(ret, FAIL, "H5Idec_ref"); + if (FAIL == ret) + goto error; + + /* Test base use-case: create a future object for a pre-defined type */ + future_obj = HDmalloc(sizeof(future_obj_t)); + future_obj->obj_type = H5I_DATASPACE; + future_id = H5Iregister_future(H5I_DATASPACE, future_obj, realize_future_cb, discard_future_cb); + CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future"); + if (H5I_INVALID_HID == future_id) + goto error; + + /* Verify that the application believes the future ID is a dataspace */ + /* (Currently realizes the object "implicitly" during a sanity check) */ + id_type = H5Iget_type(future_id); + CHECK(id_type, H5I_BADID, "H5Iget_type"); + if (H5I_BADID == id_type) + goto error; + if (H5I_DATASPACE != id_type) + goto error; + + /* Close future object for pre-defined type without realizing it */ + ret = H5Idec_ref(future_id); + CHECK(ret, FAIL, "H5Idec_ref"); + if (FAIL == ret) + goto error; + + /* Test base use-case: create a future object for a pre-defined type */ + future_obj = HDmalloc(sizeof(future_obj_t)); + future_obj->obj_type = H5I_DATASPACE; + future_id = H5Iregister_future(H5I_DATASPACE, future_obj, realize_future_cb, discard_future_cb); + CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future"); + if (H5I_INVALID_HID == future_id) + goto error; + + /* Realize future dataspace by requesting its rank */ + ret = H5Sget_simple_extent_ndims(future_id); + CHECK(ret, FAIL, "H5Sget_simple_extent_ndims"); + if (FAIL == ret) + goto error; + if (1 != ret) + goto error; + + /* Verify that the application believes the ID is still a dataspace */ + id_type = H5Iget_type(future_id); + CHECK(id_type, H5I_BADID, "H5Iget_type"); + if (H5I_BADID == id_type) + goto error; + if (H5I_DATASPACE != id_type) + goto error; + + /* Close future object for pre-defined type after realizing it */ + ret = H5Idec_ref(future_id); + CHECK(ret, FAIL, "H5Idec_ref"); + if (FAIL == ret) + goto error; + + /* Test base use-case: create a future object for a pre-defined type */ + /* (DATATYPE) */ + future_obj = HDmalloc(sizeof(future_obj_t)); + future_obj->obj_type = H5I_DATATYPE; + future_id = H5Iregister_future(H5I_DATATYPE, future_obj, realize_future_cb, discard_future_cb); + CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future"); + if (H5I_INVALID_HID == future_id) + goto error; + + /* (Can't verify the type of the future ID, because the library's current + * implementation realizes the object during sanity checks on the ID) + */ + + /* Close future object for pre-defined type without realizing it */ + ret = H5Idec_ref(future_id); + CHECK(ret, FAIL, "H5Idec_ref"); + if (FAIL == ret) + goto error; + + /* Test base use-case: create a future object for a pre-defined type */ + future_obj = HDmalloc(sizeof(future_obj_t)); + future_obj->obj_type = H5I_DATATYPE; + future_id = H5Iregister_future(H5I_DATATYPE, future_obj, realize_future_cb, discard_future_cb); + CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future"); + if (H5I_INVALID_HID == future_id) + goto error; + + /* Verify that the application believes the future ID is a datatype */ + /* (Currently realizes the object "implicitly" during a sanity check) */ + id_type = H5Iget_type(future_id); + CHECK(id_type, H5I_BADID, "H5Iget_type"); + if (H5I_BADID == id_type) + goto error; + if (H5I_DATATYPE != id_type) + goto error; + + /* Close future object for pre-defined type without realizing it */ + ret = H5Idec_ref(future_id); + CHECK(ret, FAIL, "H5Idec_ref"); + if (FAIL == ret) + goto error; + + /* Test base use-case: create a future object for a pre-defined type */ + future_obj = HDmalloc(sizeof(future_obj_t)); + future_obj->obj_type = H5I_DATATYPE; + future_id = H5Iregister_future(H5I_DATATYPE, future_obj, realize_future_cb, discard_future_cb); + CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future"); + if (H5I_INVALID_HID == future_id) + goto error; + + /* Realize future datatype by requesting its class */ + type_class = H5Tget_class(future_id); + CHECK(ret, FAIL, "H5Tget_class"); + if (FAIL == ret) + goto error; + if (H5T_INTEGER != type_class) + goto error; + + /* Verify that the application believes the ID is still a datatype */ + id_type = H5Iget_type(future_id); + CHECK(id_type, H5I_BADID, "H5Iget_type"); + if (H5I_BADID == id_type) + goto error; + if (H5I_DATATYPE != id_type) + goto error; + + /* Close future object for pre-defined type after realizing it */ + ret = H5Idec_ref(future_id); + CHECK(ret, FAIL, "H5Idec_ref"); + if (FAIL == ret) + goto error; + + /* Test base use-case: create a future object for a pre-defined type */ + /* (PROPERTY LIST) */ + future_obj = HDmalloc(sizeof(future_obj_t)); + future_obj->obj_type = H5I_GENPROP_LST; + future_id = H5Iregister_future(H5I_GENPROP_LST, future_obj, realize_future_cb, discard_future_cb); + CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future"); + if (H5I_INVALID_HID == future_id) + goto error; + + /* (Can't verify the type of the future ID, because the library's current + * implementation realizes the object during sanity checks on the ID) + */ + + /* Close future object for pre-defined type without realizing it */ + ret = H5Idec_ref(future_id); + CHECK(ret, FAIL, "H5Idec_ref"); + if (FAIL == ret) + goto error; + + /* Test base use-case: create a future object for a pre-defined type */ + future_obj = HDmalloc(sizeof(future_obj_t)); + future_obj->obj_type = H5I_GENPROP_LST; + future_id = H5Iregister_future(H5I_GENPROP_LST, future_obj, realize_future_cb, discard_future_cb); + CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future"); + if (H5I_INVALID_HID == future_id) + goto error; + + /* Verify that the application believes the future ID is a property list */ + /* (Currently realizes the object "implicitly" during a sanity check) */ + id_type = H5Iget_type(future_id); + CHECK(id_type, H5I_BADID, "H5Iget_type"); + if (H5I_BADID == id_type) + goto error; + if (H5I_GENPROP_LST != id_type) + goto error; + + /* Close future object for pre-defined type without realizing it */ + ret = H5Idec_ref(future_id); + CHECK(ret, FAIL, "H5Idec_ref"); + if (FAIL == ret) + goto error; + + /* Test base use-case: create a future object for a pre-defined type */ + future_obj = HDmalloc(sizeof(future_obj_t)); + future_obj->obj_type = H5I_GENPROP_LST; + future_id = H5Iregister_future(H5I_GENPROP_LST, future_obj, realize_future_cb, discard_future_cb); + CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future"); + if (H5I_INVALID_HID == future_id) + goto error; + + /* Realize future property list by verifying its class */ + ret = H5Pisa_class(future_id, H5P_DATASET_XFER); + CHECK(ret, FAIL, "H5Pisa_class"); + if (FAIL == ret) + goto error; + if (TRUE != ret) + goto error; + + /* Verify that the application believes the ID is still a property list */ + id_type = H5Iget_type(future_id); + CHECK(id_type, H5I_BADID, "H5Iget_type"); + if (H5I_BADID == id_type) + goto error; + if (H5I_GENPROP_LST != id_type) + goto error; + + /* Close future object for pre-defined type after realizing it */ + ret = H5Idec_ref(future_id); + CHECK(ret, FAIL, "H5Idec_ref"); + if (FAIL == ret) + goto error; + + return 0; + +error: + /* Cleanup. For simplicity, just destroy the types and ignore errors. */ + H5E_BEGIN_TRY + { + H5Idestroy_type(obj_type); + } + H5E_END_TRY + + return -1; +} /* end test_future_ids() */ + void test_ids(void) { @@ -885,4 +1388,6 @@ test_ids(void) TestErrPrintf("ID type list test failed\n"); if (test_remove_clear_type() < 0) TestErrPrintf("ID remove during H5Iclear_type test failed\n"); + if (test_future_ids() < 0) + TestErrPrintf("Future ID test failed\n"); } diff --git a/test/timer.c b/test/timer.c index 24f3245..bb474ca 100644 --- a/test/timer.c +++ b/test/timer.c @@ -144,7 +144,7 @@ test_timer_system_user(void) /* The system and user times may not be present on some systems. They * will be -1.0 if they are not. */ - if (timer.initial.system < (double)0.0f || timer.initial.user < (double)0.0f) { + if (timer.initial.system < 0.0 || timer.initial.user < 0.0) { SKIPPED(); HDprintf("NOTE: No suitable way to get system/user times on this platform.\n"); return 0; @@ -165,7 +165,7 @@ test_timer_system_user(void) TEST_ERROR; /* System and user times should be non-negative. */ - if (times.system < (double)0.0f || times.user < (double)0.0f) + if (times.system < 0.0 || times.user < 0.0) TEST_ERROR; PASSED(); @@ -224,7 +224,7 @@ test_timer_elapsed(void) TEST_ERROR; /* Elapsed time should be non-negative. */ - if (times.elapsed < (double)0.0f) + if (times.elapsed < 0.0) TEST_ERROR; PASSED(); @@ -260,11 +260,11 @@ test_timer_functionality(void) /* Times should be initialized to zero */ err = H5_timer_get_times(timer, ×); - if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, (double)0.0f)) + if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, 0.0)) TEST_ERROR; err = H5_timer_get_total_times(timer, ×); - if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, (double)0.0f)) + if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, 0.0)) TEST_ERROR; /******************** @@ -289,11 +289,11 @@ test_timer_functionality(void) /* Times should be positive and non-negative */ err = H5_timer_get_times(timer, ×); - if (err < 0 || times.elapsed < (double)0.0f) + if (err < 0 || times.elapsed < 0.0) TEST_ERROR; err = H5_timer_get_total_times(timer, ×); - if (err < 0 || times.elapsed < (double)0.0f) + if (err < 0 || times.elapsed < 0.0) TEST_ERROR; /********************** @@ -306,11 +306,11 @@ test_timer_functionality(void) TEST_ERROR; err = H5_timer_get_times(timer, ×); - if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, (double)0.0f)) + if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, 0.0)) TEST_ERROR; err = H5_timer_get_total_times(timer, ×); - if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, (double)0.0f)) + if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, 0.0)) TEST_ERROR; /* Timer state should flip */ @@ -326,12 +326,12 @@ test_timer_functionality(void) /* Times should be non-negative */ err = H5_timer_get_times(timer, ×); - if (err < 0 || times.elapsed < (double)0.0f) + if (err < 0 || times.elapsed < 0.0) TEST_ERROR; prev_etime = times.elapsed; err = H5_timer_get_total_times(timer, ×); - if (err < 0 || times.elapsed < (double)0.0f) + if (err < 0 || times.elapsed < 0.0) TEST_ERROR; prev_total_etime = times.elapsed; diff --git a/test/tmisc.c b/test/tmisc.c index b078eed..302da0d 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -2521,17 +2521,17 @@ test_misc13(void) static void test_misc14(void) { - hid_t file_id; /* File ID */ - hid_t fapl; /* File access property list ID */ - hid_t DataSpace; /* Dataspace ID */ - hid_t Dataset1; /* Dataset ID #1 */ - hid_t Dataset2; /* Dataset ID #2 */ - hid_t Dataset3; /* Dataset ID #3 */ - double data1 = 5.0F; /* Data to write for dataset #1 */ - double data2 = 10.0F; /* Data to write for dataset #2 */ - double data3 = 15.0F; /* Data to write for dataset #3 */ - double rdata; /* Data read in */ - herr_t ret; /* Generic return value */ + hid_t file_id; /* File ID */ + hid_t fapl; /* File access property list ID */ + hid_t DataSpace; /* Dataspace ID */ + hid_t Dataset1; /* Dataset ID #1 */ + hid_t Dataset2; /* Dataset ID #2 */ + hid_t Dataset3; /* Dataset ID #3 */ + double data1 = 5.0; /* Data to write for dataset #1 */ + double data2 = 10.0; /* Data to write for dataset #2 */ + double data3 = 15.0; /* Data to write for dataset #3 */ + double rdata; /* Data read in */ + herr_t ret; /* Generic return value */ /* Test creating two datasets and deleting the second */ @@ -5905,6 +5905,119 @@ test_misc35(void) } /* end test_misc35() */ +/* Context to pass to 'atclose' callbacks */ +static int test_misc36_context; + +/* 'atclose' callbacks for test_misc36 */ +static void +test_misc36_cb1(void *_ctx) +{ + int * ctx = (int *)_ctx; /* Set up context pointer */ + hbool_t is_terminating; /* Flag indicating the library is terminating */ + herr_t ret; /* Return value */ + + /* Check whether the library thinks it's terminating */ + is_terminating = FALSE; + ret = H5is_library_terminating(&is_terminating); + CHECK(ret, FAIL, "H5is_library_terminating"); + VERIFY(is_terminating, TRUE, "H5is_library_terminating"); + + /* Verify correct ordering for 'atclose' callbacks */ + if (0 != *ctx) + HDabort(); + + /* Update context value */ + *ctx = 1; +} + +static void +test_misc36_cb2(void *_ctx) +{ + int * ctx = (int *)_ctx; /* Set up context pointer */ + hbool_t is_terminating; /* Flag indicating the library is terminating */ + herr_t ret; /* Return value */ + + /* Check whether the library thinks it's terminating */ + is_terminating = FALSE; + ret = H5is_library_terminating(&is_terminating); + CHECK(ret, FAIL, "H5is_library_terminating"); + VERIFY(is_terminating, TRUE, "H5is_library_terminating"); + + /* Verify correct ordering for 'atclose' callbacks */ + if (1 != *ctx) + HDabort(); + + /* Update context value */ + *ctx = 2; +} + +/**************************************************************** +** +** test_misc36(): Exercise H5atclose and H5is_library_terminating +** +****************************************************************/ +static void +test_misc36(void) +{ + hbool_t is_terminating; /* Flag indicating the library is terminating */ + herr_t ret; /* Return value */ + + /* Output message about test being performed */ + MESSAGE(5, ("H5atclose and H5is_library_terminating API calls")); + + /* Check whether the library thinks it's terminating */ + is_terminating = TRUE; + ret = H5is_library_terminating(&is_terminating); + CHECK(ret, FAIL, "H5is_library_terminating"); + VERIFY(is_terminating, FALSE, "H5is_library_terminating"); + + /* Shut the library down */ + test_misc36_context = 0; + H5close(); + + /* Check whether the library thinks it's terminating */ + is_terminating = TRUE; + ret = H5is_library_terminating(&is_terminating); + CHECK(ret, FAIL, "H5is_library_terminating"); + VERIFY(is_terminating, FALSE, "H5is_library_terminating"); + + /* Check the close context was not changed */ + VERIFY(test_misc36_context, 0, "H5atclose"); + + /* Restart the library */ + H5open(); + + /* Check whether the library thinks it's terminating */ + is_terminating = TRUE; + ret = H5is_library_terminating(&is_terminating); + CHECK(ret, FAIL, "H5is_library_terminating"); + VERIFY(is_terminating, FALSE, "H5is_library_terminating"); + + /* Register the 'atclose' callbacks */ + /* (Note that these will be called in reverse order, which is checked) */ + ret = H5atclose(&test_misc36_cb2, &test_misc36_context); + CHECK(ret, FAIL, "H5atclose"); + ret = H5atclose(&test_misc36_cb1, &test_misc36_context); + CHECK(ret, FAIL, "H5atclose"); + + /* Shut the library down */ + test_misc36_context = 0; + H5close(); + + /* Check the close context was changed correctly */ + VERIFY(test_misc36_context, 2, "H5atclose"); + + /* Restart the library */ + H5open(); + + /* Close the library again */ + test_misc36_context = 0; + H5close(); + + /* Check the close context was not changed */ + VERIFY(test_misc36_context, 0, "H5atclose"); +} /* end test_misc36() */ + /**************************************************************** ** ** test_misc(): Main misc. test routine. @@ -5956,6 +6069,7 @@ test_misc(void) test_misc33(); /* Test to verify that H5HL_offset_into() returns error if offset exceeds heap block */ test_misc34(); /* Test behavior of 0 and NULL in H5MM API calls */ test_misc35(); /* Test behavior of free-list & allocation statistics API calls */ + test_misc36(); /* Exercise H5atclose and H5is_library_terminating */ } /* test_misc() */ diff --git a/test/trefer.c b/test/trefer.c index 9ea2a8e..9b6c415 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -21,17 +21,18 @@ #include "testhdf5.h" -#define FILE_REF_PARAM "trefer_param.h5" -#define FILE_REF_OBJ "trefer_obj.h5" -#define FILE_REF_VL_OBJ "trefer_vl_obj.h5" -#define FILE_REF_REG "trefer_reg.h5" -#define FILE_REF_REG_1D "trefer_reg_1d.h5" -#define FILE_REF_OBJ_DEL "trefer_obj_del.h5" -#define FILE_REF_GRP "trefer_grp.h5" -#define FILE_REF_ATTR "trefer_attr.h5" -#define FILE_REF_EXT1 "trefer_ext1.h5" -#define FILE_REF_EXT2 "trefer_ext2.h5" -#define FILE_REF_COMPAT "trefer_compat.h5" +#define FILE_REF_PARAM "trefer_param.h5" +#define FILE_REF_OBJ "trefer_obj.h5" +#define FILE_REF_VL_OBJ "trefer_vl_obj.h5" +#define FILE_REF_CMPND_OBJ "trefer_cmpnd_obj.h5" +#define FILE_REF_REG "trefer_reg.h5" +#define FILE_REF_REG_1D "trefer_reg_1d.h5" +#define FILE_REF_OBJ_DEL "trefer_obj_del.h5" +#define FILE_REF_GRP "trefer_grp.h5" +#define FILE_REF_ATTR "trefer_attr.h5" +#define FILE_REF_EXT1 "trefer_ext1.h5" +#define FILE_REF_EXT2 "trefer_ext2.h5" +#define FILE_REF_COMPAT "trefer_compat.h5" /* 1-D dataset with fixed dimensions */ #define SPACE1_RANK 1 @@ -56,6 +57,15 @@ typedef struct s1_t { float c; } s1_t; +/* Compound datatype with reference */ +typedef struct s2_t { + H5R_ref_t ref0; /* reference */ + H5R_ref_t ref1; /* reference */ + H5R_ref_t ref2; /* reference */ + H5R_ref_t ref3; /* reference */ + unsigned int dim_idx; /* dimension index of the dataset */ +} s2_t; + #define GROUPNAME "/group" #define GROUPNAME2 "group2" #define GROUPNAME3 "group3" @@ -556,7 +566,7 @@ test_reference_vlen_obj(void) hsize_t vl_dims[] = {1}; hid_t dapl_id; /* Dataset access property list */ H5R_ref_t *wbuf, /* buffer to write to disk */ - *rbuf; /* buffer read from disk */ + *rbuf = NULL; /* buffer read from disk */ unsigned * ibuf, *obuf; unsigned i, j; /* Counters */ H5O_type_t obj_type; /* Object type */ @@ -568,7 +578,6 @@ test_reference_vlen_obj(void) /* Allocate write & read buffers */ wbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1); - rbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1); ibuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1); obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1); @@ -805,6 +814,295 @@ test_reference_vlen_obj(void) /**************************************************************** ** +** test_reference_cmpnd_obj(): Test basic H5R (reference) object reference +** within a compound type. +** Tests references to various kinds of objects +** +****************************************************************/ +static void +test_reference_cmpnd_obj(void) +{ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset, /* Dataset ID */ + dset2; /* Dereferenced dataset ID */ + hid_t group; /* Group ID */ + hid_t sid1; /* Dataspace ID */ + hid_t tid1; /* Datatype ID */ + hsize_t dims1[] = {SPACE1_DIM1}; + hsize_t cmpnd_dims[] = {1}; + hid_t dapl_id; /* Dataset access property list */ + unsigned * ibuf, *obuf; + unsigned i; /* Counter */ + H5O_type_t obj_type; /* Object type */ + herr_t ret; /* Generic return value */ + s2_t cmpnd_wbuf, cmpnd_rbuf; + + /* Output message about test being performed */ + MESSAGE(5, ("Testing Object Reference Functions within compound type\n")); + + /* Allocate write & read buffers */ + ibuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1); + obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1); + + for (i = 0; i < SPACE1_DIM1; i++) + obuf[i] = i * 3; + + /* Create file */ + fid1 = H5Fcreate(FILE_REF_CMPND_OBJ, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + CHECK(fid1, H5I_INVALID_HID, "H5Fcreate"); + + /* Create dataspace for datasets */ + sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL); + CHECK(sid1, H5I_INVALID_HID, "H5Screate_simple"); + + /* Create dataset access property list */ + dapl_id = H5Pcreate(H5P_DATASET_ACCESS); + CHECK(dapl_id, H5I_INVALID_HID, "H5Pcreate"); + + /* Create a group */ + group = H5Gcreate2(fid1, "Group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(group, H5I_INVALID_HID, "H5Gcreate2"); + + /* Create a dataset (inside Group1) */ + dataset = H5Dcreate2(group, "Dataset1", H5T_NATIVE_UINT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2"); + + /* Write selection to disk */ + ret = H5Dwrite(dataset, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obuf); + CHECK(ret, FAIL, "H5Dwrite"); + + /* Close Dataset */ + ret = H5Dclose(dataset); + CHECK(ret, FAIL, "H5Dclose"); + + /* Create another dataset (inside Group1) */ + dataset = H5Dcreate2(group, "Dataset2", H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(dataset, FAIL, "H5Dcreate2"); + + /* Close Dataset */ + ret = H5Dclose(dataset); + CHECK(ret, FAIL, "H5Dclose"); + + /* Close disk dataspace */ + ret = H5Sclose(sid1); + CHECK(ret, FAIL, "H5Sclose"); + + /* Create a datatype to refer to */ + tid1 = H5Tcreate(H5T_COMPOUND, sizeof(s1_t)); + CHECK(tid1, H5I_INVALID_HID, "H5Tcreate"); + + /* Insert fields */ + ret = H5Tinsert(tid1, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT); + CHECK(ret, FAIL, "H5Tinsert"); + + ret = H5Tinsert(tid1, "b", HOFFSET(s1_t, b), H5T_NATIVE_INT); + CHECK(ret, FAIL, "H5Tinsert"); + + ret = H5Tinsert(tid1, "c", HOFFSET(s1_t, c), H5T_NATIVE_FLOAT); + CHECK(ret, FAIL, "H5Tinsert"); + + /* Save datatype for later */ + ret = H5Tcommit2(group, "Datatype1", tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); + + /* Close datatype */ + ret = H5Tclose(tid1); + CHECK(ret, FAIL, "H5Tclose"); + + /* Close group */ + ret = H5Gclose(group); + CHECK(ret, FAIL, "H5Gclose"); + + /* Create compound type */ + tid1 = H5Tcreate(H5T_COMPOUND, sizeof(s2_t)); + CHECK(tid1, H5I_INVALID_HID, "H5Tcreate"); + + /* Insert fields */ + ret = H5Tinsert(tid1, "ref0", HOFFSET(s2_t, ref0), H5T_STD_REF); + CHECK(ret, FAIL, "H5Tinsert"); + + ret = H5Tinsert(tid1, "ref1", HOFFSET(s2_t, ref1), H5T_STD_REF); + CHECK(ret, FAIL, "H5Tinsert"); + + ret = H5Tinsert(tid1, "ref2", HOFFSET(s2_t, ref2), H5T_STD_REF); + CHECK(ret, FAIL, "H5Tinsert"); + + ret = H5Tinsert(tid1, "ref3", HOFFSET(s2_t, ref3), H5T_STD_REF); + CHECK(ret, FAIL, "H5Tinsert"); + + ret = H5Tinsert(tid1, "dim_idx", HOFFSET(s2_t, dim_idx), H5T_NATIVE_INT); + CHECK(ret, FAIL, "H5Tinsert"); + + /* Create dataspace for datasets */ + sid1 = H5Screate_simple(SPACE1_RANK, cmpnd_dims, NULL); + CHECK(sid1, H5I_INVALID_HID, "H5Screate_simple"); + + /* Create a dataset */ + dataset = H5Dcreate2(fid1, "Dataset3", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2"); + + /* Reset buffer for writing */ + HDmemset(&cmpnd_wbuf, 0, sizeof(cmpnd_wbuf)); + + /* Create reference to dataset */ + ret = H5Rcreate_object(fid1, "/Group1/Dataset1", H5P_DEFAULT, &cmpnd_wbuf.ref0); + CHECK(ret, FAIL, "H5Rcreate_object"); + ret = H5Rget_obj_type3(&cmpnd_wbuf.ref0, H5P_DEFAULT, &obj_type); + CHECK(ret, FAIL, "H5Rget_obj_type3"); + VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3"); + + /* Create reference to dataset */ + ret = H5Rcreate_object(fid1, "/Group1/Dataset2", H5P_DEFAULT, &cmpnd_wbuf.ref1); + CHECK(ret, FAIL, "H5Rcreate_object"); + ret = H5Rget_obj_type3(&cmpnd_wbuf.ref1, H5P_DEFAULT, &obj_type); + CHECK(ret, FAIL, "H5Rget_obj_type3"); + VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3"); + + /* Create reference to group */ + ret = H5Rcreate_object(fid1, "/Group1", H5P_DEFAULT, &cmpnd_wbuf.ref2); + CHECK(ret, FAIL, "H5Rcreate_object"); + ret = H5Rget_obj_type3(&cmpnd_wbuf.ref2, H5P_DEFAULT, &obj_type); + CHECK(ret, FAIL, "H5Rget_obj_type3"); + VERIFY(obj_type, H5O_TYPE_GROUP, "H5Rget_obj_type3"); + + /* Create reference to named datatype */ + ret = H5Rcreate_object(fid1, "/Group1/Datatype1", H5P_DEFAULT, &cmpnd_wbuf.ref3); + CHECK(ret, FAIL, "H5Rcreate_object"); + ret = H5Rget_obj_type3(&cmpnd_wbuf.ref3, H5P_DEFAULT, &obj_type); + CHECK(ret, FAIL, "H5Rget_obj_type3"); + VERIFY(obj_type, H5O_TYPE_NAMED_DATATYPE, "H5Rget_obj_type3"); + + /* Store dimensions */ + cmpnd_wbuf.dim_idx = SPACE1_DIM1; + + /* Write selection to disk */ + ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, &cmpnd_wbuf); + CHECK(ret, FAIL, "H5Dwrite"); + + /* Close disk dataspace */ + ret = H5Sclose(sid1); + CHECK(ret, FAIL, "H5Sclose"); + + /* Close Dataset */ + ret = H5Dclose(dataset); + CHECK(ret, FAIL, "H5Dclose"); + + /* Close datatype */ + ret = H5Tclose(tid1); + CHECK(ret, FAIL, "H5Tclose"); + + /* Close file */ + ret = H5Fclose(fid1); + CHECK(ret, FAIL, "H5Fclose"); + + /* Re-open the file */ + fid1 = H5Fopen(FILE_REF_CMPND_OBJ, H5F_ACC_RDWR, H5P_DEFAULT); + CHECK(fid1, H5I_INVALID_HID, "H5Fopen"); + + /* Open the dataset */ + dataset = H5Dopen2(fid1, "/Dataset3", H5P_DEFAULT); + CHECK(dataset, H5I_INVALID_HID, "H5Dopen2"); + + tid1 = H5Dget_type(dataset); + CHECK(tid1, H5I_INVALID_HID, "H5Dget_type"); + + /* Read selection from disk */ + ret = H5Dread(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, &cmpnd_rbuf); + CHECK(ret, FAIL, "H5Dread"); + + VERIFY(cmpnd_rbuf.dim_idx, SPACE1_DIM1, "H5Dread"); + + /* Close datatype */ + ret = H5Tclose(tid1); + CHECK(ret, FAIL, "H5Tclose"); + + /* Open dataset object */ + dset2 = H5Ropen_object(&cmpnd_rbuf.ref0, H5P_DEFAULT, dapl_id); + CHECK(dset2, H5I_INVALID_HID, "H5Ropen_object"); + + /* Check information in referenced dataset */ + sid1 = H5Dget_space(dset2); + CHECK(sid1, H5I_INVALID_HID, "H5Dget_space"); + + ret = (int)H5Sget_simple_extent_npoints(sid1); + VERIFY(ret, SPACE1_DIM1, "H5Sget_simple_extent_npoints"); + + /* Read from disk */ + ret = H5Dread(dset2, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf); + CHECK(ret, FAIL, "H5Dread"); + + for (i = 0; i < SPACE1_DIM1; i++) + VERIFY(ibuf[i], i * 3, "Data"); + + /* Close dereferenced Dataset */ + ret = H5Dclose(dset2); + CHECK(ret, FAIL, "H5Dclose"); + + /* Open group object. GAPL isn't supported yet. But it's harmless to pass in */ + group = H5Ropen_object(&cmpnd_rbuf.ref2, H5P_DEFAULT, H5P_DEFAULT); + CHECK(group, H5I_INVALID_HID, "H5Ropen_object"); + + /* Close group */ + ret = H5Gclose(group); + CHECK(ret, FAIL, "H5Gclose"); + + /* Open datatype object. TAPL isn't supported yet. But it's harmless to pass in */ + tid1 = H5Ropen_object(&cmpnd_rbuf.ref3, H5P_DEFAULT, H5P_DEFAULT); + CHECK(tid1, H5I_INVALID_HID, "H5Ropen_object"); + + /* Verify correct datatype */ + { + H5T_class_t tclass; + + tclass = H5Tget_class(tid1); + VERIFY(tclass, H5T_COMPOUND, "H5Tget_class"); + + ret = H5Tget_nmembers(tid1); + VERIFY(ret, 3, "H5Tget_nmembers"); + } + + /* Close datatype */ + ret = H5Tclose(tid1); + CHECK(ret, FAIL, "H5Tclose"); + + /* Close Dataset */ + ret = H5Dclose(dataset); + CHECK(ret, FAIL, "H5Dclose"); + + /* Close dataset access property list */ + ret = H5Pclose(dapl_id); + CHECK(ret, FAIL, "H5Pclose"); + + /* Close file */ + ret = H5Fclose(fid1); + CHECK(ret, FAIL, "H5Fclose"); + + /* Destroy references */ + ret = H5Rdestroy(&cmpnd_wbuf.ref0); + CHECK(ret, FAIL, "H5Rdestroy"); + ret = H5Rdestroy(&cmpnd_wbuf.ref1); + CHECK(ret, FAIL, "H5Rdestroy"); + ret = H5Rdestroy(&cmpnd_wbuf.ref2); + CHECK(ret, FAIL, "H5Rdestroy"); + ret = H5Rdestroy(&cmpnd_wbuf.ref3); + CHECK(ret, FAIL, "H5Rdestroy"); + + ret = H5Rdestroy(&cmpnd_rbuf.ref0); + CHECK(ret, FAIL, "H5Rdestroy"); + ret = H5Rdestroy(&cmpnd_rbuf.ref1); + CHECK(ret, FAIL, "H5Rdestroy"); + ret = H5Rdestroy(&cmpnd_rbuf.ref2); + CHECK(ret, FAIL, "H5Rdestroy"); + ret = H5Rdestroy(&cmpnd_rbuf.ref3); + CHECK(ret, FAIL, "H5Rdestroy"); + + /* Free memory buffers */ + HDfree(ibuf); + HDfree(obuf); +} /* test_reference_cmpnd_obj() */ + +/**************************************************************** +** ** test_reference_region(): Test basic H5R (reference) object reference code. ** Tests references to various kinds of objects ** @@ -832,11 +1130,11 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high) hsize_t * coords; /* Coordinate buffer */ hsize_t low[SPACE2_RANK]; /* Selection bounds */ hsize_t high[SPACE2_RANK]; /* Selection bounds */ - H5R_ref_t *wbuf, /* buffer to write to disk */ - *rbuf; /* buffer read from disk */ + H5R_ref_t *wbuf = NULL, /* buffer to write to disk */ + *rbuf = NULL; /* buffer read from disk */ H5R_ref_t nvrbuf[3] = {{{{0}}}, {{{101}}}, {{{255}}}}; /* buffer with non-valid refs */ - uint8_t * dwbuf, /* Buffer for writing numeric data to disk */ - *drbuf; /* Buffer for reading numeric data from disk */ + uint8_t * dwbuf = NULL, /* Buffer for writing numeric data to disk */ + *drbuf = NULL; /* Buffer for reading numeric data from disk */ uint8_t * tu8; /* Temporary pointer to uint8 data */ H5O_type_t obj_type; /* Type of object */ int i, j; /* Counters */ @@ -1255,13 +1553,14 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high) ret = H5Rdestroy(&rbuf[j]); CHECK(ret, FAIL, "H5Rdestroy"); } - - /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); - HDfree(dwbuf); - HDfree(drbuf); } + + /* Free memory buffers */ + HDfree(wbuf); + HDfree(rbuf); + HDfree(dwbuf); + HDfree(drbuf); + } /* test_reference_region() */ /**************************************************************** @@ -1294,10 +1593,10 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high) hsize_t * coords; /* Coordinate buffer */ hsize_t low[SPACE3_RANK]; /* Selection bounds */ hsize_t high[SPACE3_RANK]; /* Selection bounds */ - H5R_ref_t *wbuf, /* buffer to write to disk */ - *rbuf; /* buffer read from disk */ - uint8_t *dwbuf, /* Buffer for writing numeric data to disk */ - *drbuf; /* Buffer for reading numeric data from disk */ + H5R_ref_t *wbuf = NULL, /* buffer to write to disk */ + *rbuf = NULL; /* buffer read from disk */ + uint8_t *dwbuf = NULL, /* Buffer for writing numeric data to disk */ + *drbuf = NULL; /* Buffer for reading numeric data from disk */ uint8_t * tu8; /* Temporary pointer to uint8 data */ H5O_type_t obj_type; /* Object type */ int i; /* Counter */ @@ -1595,13 +1894,14 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high) ret = H5Rdestroy(&rbuf[i]); CHECK(ret, FAIL, "H5Rdestroy"); } - - /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); - HDfree(dwbuf); - HDfree(drbuf); } + + /* Free memory buffers */ + HDfree(wbuf); + HDfree(rbuf); + HDfree(dwbuf); + HDfree(drbuf); + } /* test_reference_region_1D() */ /**************************************************************** @@ -2438,10 +2738,10 @@ test_reference_compat_conv(void) hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */ hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */ hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */ - hobj_ref_t * wbuf_obj; /* Buffer to write to disk */ - H5R_ref_t * rbuf_obj; /* Buffer read from disk */ - hdset_reg_ref_t *wbuf_reg; /* Buffer to write to disk */ - H5R_ref_t * rbuf_reg; /* Buffer read from disk */ + hobj_ref_t * wbuf_obj = NULL; /* Buffer to write to disk */ + H5R_ref_t * rbuf_obj = NULL; /* Buffer read from disk */ + hdset_reg_ref_t *wbuf_reg = NULL; /* Buffer to write to disk */ + H5R_ref_t * rbuf_reg = NULL; /* Buffer read from disk */ H5O_type_t obj_type; /* Object type */ herr_t ret; /* Generic return value */ unsigned int i; /* Counter */ @@ -3157,9 +3457,10 @@ test_reference(void) /* Output message about test being performed */ MESSAGE(5, ("Testing References\n")); - test_reference_params(); /* Test for correct parameter checking */ - test_reference_obj(); /* Test basic H5R object reference code */ - test_reference_vlen_obj(); /* Test reference within vlen */ + test_reference_params(); /* Test for correct parameter checking */ + test_reference_obj(); /* Test basic H5R object reference code */ + test_reference_vlen_obj(); /* Test reference within vlen */ + test_reference_cmpnd_obj(); /* Test reference within compound type */ /* Loop through all the combinations of low/high version bounds */ for (low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) { @@ -3205,6 +3506,7 @@ cleanup_reference(void) HDremove(FILE_REF_PARAM); HDremove(FILE_REF_OBJ); HDremove(FILE_REF_VL_OBJ); + HDremove(FILE_REF_CMPND_OBJ); HDremove(FILE_REF_REG); HDremove(FILE_REF_REG_1D); HDremove(FILE_REF_OBJ_DEL); diff --git a/test/trefer_deprec.c b/test/trefer_deprec.c index 0985933..24371ef 100644 --- a/test/trefer_deprec.c +++ b/test/trefer_deprec.c @@ -1421,9 +1421,9 @@ test_reference_group(void) /* Create bottom dataset */ did = H5Dcreate2(gid, DSETNAME2, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - assert(did > 0); + HDassert(did > 0); ret = H5Dclose(did); - assert(ret >= 0); + HDassert(ret >= 0); ret = H5Gclose(gid); CHECK(ret, FAIL, "H5Gclose"); diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c index 0f7d6f6..d30ed48 100644 --- a/test/ttsafe_error.c +++ b/test/ttsafe_error.c @@ -38,7 +38,7 @@ /* Having a common dataset name is an error */ #define DATASETNAME "commonname" -#define EXPECTED_ERROR_DEPTH 10 +#define EXPECTED_ERROR_DEPTH 11 #define WRITE_NUMBER 37 /* Typedefs */ @@ -72,34 +72,37 @@ tts_error(void) /* Must initialize these at runtime */ expected_g[0].maj_num = H5E_DATASET; - expected_g[0].min_num = H5E_CANTINIT; + expected_g[0].min_num = H5E_CANTCREATE; - expected_g[1].maj_num = H5E_VOL; + expected_g[1].maj_num = H5E_DATASET; expected_g[1].min_num = H5E_CANTCREATE; expected_g[2].maj_num = H5E_VOL; expected_g[2].min_num = H5E_CANTCREATE; - expected_g[3].maj_num = H5E_DATASET; - expected_g[3].min_num = H5E_CANTINIT; + expected_g[3].maj_num = H5E_VOL; + expected_g[3].min_num = H5E_CANTCREATE; expected_g[4].maj_num = H5E_DATASET; expected_g[4].min_num = H5E_CANTINIT; - expected_g[5].maj_num = H5E_LINK; + expected_g[5].maj_num = H5E_DATASET; expected_g[5].min_num = H5E_CANTINIT; expected_g[6].maj_num = H5E_LINK; - expected_g[6].min_num = H5E_CANTINSERT; + expected_g[6].min_num = H5E_CANTINIT; - expected_g[7].maj_num = H5E_SYM; - expected_g[7].min_num = H5E_NOTFOUND; + expected_g[7].maj_num = H5E_LINK; + expected_g[7].min_num = H5E_CANTINSERT; expected_g[8].maj_num = H5E_SYM; - expected_g[8].min_num = H5E_CALLBACK; + expected_g[8].min_num = H5E_NOTFOUND; - expected_g[9].maj_num = H5E_LINK; - expected_g[9].min_num = H5E_EXISTS; + expected_g[9].maj_num = H5E_SYM; + expected_g[9].min_num = H5E_CALLBACK; + + expected_g[10].maj_num = H5E_LINK; + expected_g[10].min_num = H5E_EXISTS; /* set up mutex for global count of errors */ H5TS_mutex_init(&error_mutex_g); @@ -134,7 +137,8 @@ tts_error(void) if (error_flag_g) { TestErrPrintf( "At least one thread reported a value that was different from the expected value\n"); - HDprintf("(Update this test if the error stack changed!)\n"); + HDprintf( + "(Update the expected_g[] array in tts_error for this test if the error stack changed!)\n"); } if (error_count_g != NUM_THREAD - 1) @@ -241,7 +245,18 @@ walk_error_callback(unsigned n, const H5E_error2_t *err_desc, void H5_ATTR_UNUSE return SUCCEED; } + /* Unexpected error stack entry, print some info and set flag */ + HDfprintf(stderr, "Unexpected error stack entry!\n"); + HDfprintf(stderr, "Stack entry: %d\n", n); + HDfprintf(stderr, + "Actual: maj_num = %" PRIxHID ", min_num = %" PRIxHID + ", line = %u, func = '%s', file = '%s', desc = '%s'\n", + err_desc->maj_num, err_desc->min_num, err_desc->line, err_desc->func_name, err_desc->file_name, + err_desc->desc); + HDfprintf(stderr, "Expected: maj_num = %" PRIxHID ", min_num = %" PRIxHID "\n", expected_g[n].maj_num, + expected_g[n].min_num); error_flag_g = -1; + return SUCCEED; } @@ -33,11 +33,57 @@ const char *FILENAME[] = {"vds_virt_0", "vds_virt_1", "vds_src_0", "vds_src_1", "vds_dapl", "vds_virt_2", "vds_virt_3", "vds_src_2", "vds_src_3", "vds%%_src2", "vds_dapl2", NULL}; +/* Define to enable verbose test output */ +/* #define VDS_TEST_VERBOSE 1 */ + +#ifdef VDS_TEST_VERBOSE + +/* For verbose output just use standard error printing */ +#define TESTING_2_SUPPRESSED(WHAT) TESTING_2(WHAT) +#define PASSED_SUPPRESSED() PASSED() +#define TEST_ERROR_SUPPRESSED TEST_ERROR + +/* Print config directly to output */ +#define PRINT_CONFIG(...) \ + { \ + HDprintf("Config: " __VA_ARGS__); \ + HDputs(""); \ + } + +#else /* VDS_TEST_VERBOSE */ + +/* Global strings for error output */ +char vds_config_str_g[128] = ""; +char vds_test_str_g[128] = ""; + +/* Replacement for TESTING_2 for non-verbose-output */ +#define TESTING_2_SUPPRESSED(WHAT) \ + { \ + HDsnprintf(vds_test_str_g, sizeof(vds_test_str_g), WHAT); \ + } + +/* Suppress output from PASSED() */ +#define PASSED_SUPPRESSED() + +/* Replacement for TEST_ERROR for non-verbose output */ +#define TEST_ERROR_SUPPRESSED \ + { \ + printf("Failed config: %s\nFailed test: %s\n", vds_config_str_g, vds_test_str_g); \ + TEST_ERROR \ + } + +/* Replacement for HDprintf for printing configuration for non-verbose output */ +#define PRINT_CONFIG(...) HDsnprintf(vds_config_str_g, sizeof(vds_config_str_g), __VA_ARGS__); + +#endif /* VDS_TEST_VERBOSE */ + /* I/O test config flags */ #define TEST_IO_CLOSE_SRC 0x01u #define TEST_IO_DIFFERENT_FILE 0x02u #define TEST_IO_REOPEN_VIRT 0x04u -#define TEST_IO_NTESTS 0x08u +#define TEST_IO_FCLOSE_SEMI 0x08u +#define TEST_IO_FCLOSE_STRONG 0x10u +#define TEST_IO_NTESTS 0x20u #define LIST_DOUBLE_SIZE (H5D_VIRTUAL_DEF_LIST_SIZE + 1) @@ -488,22 +534,22 @@ test_api(test_api_config_t config, hid_t fapl, H5F_libver_t low) switch (config) { case TEST_API_BASIC: - TESTING("virtual dataset API functions") + TESTING_2("virtual dataset API functions") break; case TEST_API_COPY_PLIST: - TESTING("virtual dataset API functions with copied plists") + TESTING_2("virtual dataset API functions with copied plists") break; case TEST_API_ENCDEC_PLIST: - TESTING("virtual dataset API functions with encoded and decoded plists") + TESTING_2("virtual dataset API functions with encoded and decoded plists") break; case TEST_API_CREATE_DSET: - TESTING("virtual dataset create") + TESTING_2("virtual dataset create") break; case TEST_API_REOPEN_DSET: - TESTING("virtual dataset create with reopened dataset") + TESTING_2("virtual dataset create with reopened dataset") break; case TEST_API_REOPEN_FILE: - TESTING("virtual dataset create with reopened file") + TESTING_2("virtual dataset create with reopened file") break; case TEST_API_NTESTS: default: @@ -1121,7 +1167,7 @@ error: *------------------------------------------------------------------------- */ static int -test_vds_prefix_first(unsigned config, hid_t fapl) +test_vds_prefix_first(unsigned config, hid_t vds_fapl, hid_t src_fapl) { char * srcfilename = NULL; char * srcfilename_map = NULL; @@ -1145,97 +1191,97 @@ test_vds_prefix_first(unsigned config, hid_t fapl) int i, j; char buffer[1024]; /* buffer to read vds_prefix */ - TESTING("basic virtual dataset I/O via H5Pset_vds_prefix(): all selection") + TESTING_2_SUPPRESSED("basic virtual dataset I/O via H5Pset_vds_prefix(): all selection") if ((srcfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL) - TEST_ERROR; + TEST_ERROR_SUPPRESSED; if ((srcfilename_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL) - TEST_ERROR; + TEST_ERROR_SUPPRESSED; if ((vfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL) - TEST_ERROR; + TEST_ERROR_SUPPRESSED; if ((srcfilenamepct = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL) - TEST_ERROR; + TEST_ERROR_SUPPRESSED; if ((srcfilenamepct_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL) - TEST_ERROR; + TEST_ERROR_SUPPRESSED; - h5_fixname(FILENAME[0], fapl, vfilename, FILENAME_BUF_SIZE); - h5_fixname(FILENAME[8], fapl, srcfilename, FILENAME_BUF_SIZE); - h5_fixname_printf(FILENAME[8], fapl, srcfilename_map, FILENAME_BUF_SIZE); - h5_fixname(FILENAME[10], fapl, srcfilenamepct, FILENAME_BUF_SIZE); - h5_fixname_printf(srcfilenamepct_map_orig, fapl, srcfilenamepct_map, FILENAME_BUF_SIZE); + h5_fixname(FILENAME[0], vds_fapl, vfilename, FILENAME_BUF_SIZE); + h5_fixname(FILENAME[8], src_fapl, srcfilename, FILENAME_BUF_SIZE); + h5_fixname_printf(FILENAME[8], src_fapl, srcfilename_map, FILENAME_BUF_SIZE); + h5_fixname(FILENAME[10], src_fapl, srcfilenamepct, FILENAME_BUF_SIZE); + h5_fixname_printf(srcfilenamepct_map_orig, src_fapl, srcfilenamepct_map, FILENAME_BUF_SIZE); /* create tmp directory and get current working directory path */ if (HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create DCPL */ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Set fill value */ if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Initialize VDS prefix items */ if ((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_prefix(dapl, TMPDIR) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pget_virtual_prefix(dapl, buffer, sizeof(buffer)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (HDstrcmp(buffer, TMPDIR) != 0) FAIL_PUTS_ERROR("vds prefix not set correctly"); /* Create source dataspace */ if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspace */ if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select all (should not be necessary, but just to be sure) */ if (H5Sselect_all(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sselect_all(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Add virtual layout mapping */ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { if (NULL == HDgetcwd(buffer, 1024)) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (HDchdir(TMPDIR) < 0) - TEST_ERROR - if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED + if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if (HDchdir(buffer) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create source dataset */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -1244,17 +1290,17 @@ test_vds_prefix_first(unsigned config, hid_t fapl) /* Write data directly to source dataset */ if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close srcdset and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -1262,27 +1308,27 @@ test_vds_prefix_first(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Read data through virtual dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) { for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != buf[i][j]) { - TEST_ERROR + TEST_ERROR_SUPPRESSED } } @@ -1293,59 +1339,59 @@ test_vds_prefix_first(unsigned config, hid_t fapl) /* Write data through virtual dataset */ if (H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reopen srcdset and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) { if (NULL == HDgetcwd(buffer, 1024)) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (HDchdir(TMPDIR) < 0) - TEST_ERROR - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if (HDchdir(buffer) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Read data directly from source dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); if (H5Dread(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != buf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close */ if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[0] = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; if (H5Pclose(dapl) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED dapl = -1; if (H5Pclose(dcpl) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED dcpl = -1; HDfree(srcfilename); @@ -1354,7 +1400,7 @@ test_vds_prefix_first(unsigned config, hid_t fapl) HDfree(srcfilenamepct); HDfree(srcfilenamepct_map); - PASSED(); + PASSED_SUPPRESSED(); return 0; error: @@ -1377,7 +1423,7 @@ error: H5E_END_TRY; if (HDsetenv("HDF5_VDS_PREFIX", "", 1) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED HDfree(srcfilename); HDfree(srcfilename_map); @@ -1399,7 +1445,7 @@ error: *------------------------------------------------------------------------- */ static int -test_basic_io(unsigned config, hid_t fapl) +test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl) { char * srcfilename = NULL; char * srcfilename_map = NULL; @@ -1432,81 +1478,81 @@ test_basic_io(unsigned config, hid_t fapl) herr_t ret; /* Generic return value */ int i, j, u, v; - TESTING("basic virtual dataset I/O") + TESTING_2_SUPPRESSED("basic virtual dataset I/O") if ((srcfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL) - TEST_ERROR; + TEST_ERROR_SUPPRESSED; if ((srcfilename_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL) - TEST_ERROR; + TEST_ERROR_SUPPRESSED; if ((vfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL) - TEST_ERROR; + TEST_ERROR_SUPPRESSED; if ((vfilename2 = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL) - TEST_ERROR; + TEST_ERROR_SUPPRESSED; if ((srcfilenamepct = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL) - TEST_ERROR; + TEST_ERROR_SUPPRESSED; if ((srcfilenamepct_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL) - TEST_ERROR; + TEST_ERROR_SUPPRESSED; - h5_fixname(FILENAME[0], fapl, vfilename, FILENAME_BUF_SIZE); - h5_fixname(FILENAME[1], fapl, vfilename2, FILENAME_BUF_SIZE); - h5_fixname(FILENAME[2], fapl, srcfilename, FILENAME_BUF_SIZE); - h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, FILENAME_BUF_SIZE); - h5_fixname(FILENAME[4], fapl, srcfilenamepct, FILENAME_BUF_SIZE); - h5_fixname_printf(srcfilenamepct_map_orig, fapl, srcfilenamepct_map, FILENAME_BUF_SIZE); + h5_fixname(FILENAME[0], vds_fapl, vfilename, FILENAME_BUF_SIZE); + h5_fixname(FILENAME[1], vds_fapl, vfilename2, FILENAME_BUF_SIZE); + h5_fixname(FILENAME[2], src_fapl, srcfilename, FILENAME_BUF_SIZE); + h5_fixname_printf(FILENAME[2], src_fapl, srcfilename_map, FILENAME_BUF_SIZE); + h5_fixname(FILENAME[4], src_fapl, srcfilenamepct, FILENAME_BUF_SIZE); + h5_fixname_printf(srcfilenamepct_map_orig, src_fapl, srcfilenamepct_map, FILENAME_BUF_SIZE); /* Create DCPL */ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Set fill value */ if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* * Test 1: All - all selection */ /* Create source dataspace */ if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspace */ if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select all (should not be necessary, but just to be sure) */ if (H5Sselect_all(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sselect_all(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Add virtual layout mapping */ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create source dataset */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -1515,17 +1561,17 @@ test_basic_io(unsigned config, hid_t fapl) /* Write data directly to source dataset */ if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close srcdset and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -1533,27 +1579,27 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Read data through virtual dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != buf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -1562,46 +1608,46 @@ test_basic_io(unsigned config, hid_t fapl) /* Write data through virtual dataset */ if (H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reopen srcdset and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Read data directly from source dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); if (H5Dread(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != buf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close */ if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[0] = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; /* @@ -1610,70 +1656,70 @@ test_basic_io(unsigned config, hid_t fapl) */ /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspaces */ if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspace */ dims[1] = 13; if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select all in source space (should not be necessary, but just to be sure) */ if (H5Sselect_all(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs in virtual spaces */ start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 13; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Add virtual layout mappings */ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "%%src_dset1", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2%%", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reset dims */ dims[1] = 26; /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create source datasets */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "%src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2%", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -1682,22 +1728,22 @@ test_basic_io(unsigned config, hid_t fapl) /* Write data directly to source datasets */ if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -1705,27 +1751,27 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Read data through virtual dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != buf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -1734,40 +1780,40 @@ test_basic_io(unsigned config, hid_t fapl) /* Write data through virtual dataset */ if (H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reopen srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Read data directly from source datasets */ HDmemset(rbuf[0], 0, sizeof(rbuf)); if (H5Dread(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dread(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != buf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Test H5Ocopy() to same file */ /* Copy virtual dataset */ if (H5Ocopy(vfile, "v_dset", vfile, "v_dset2", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close v_dset */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; /* Adjust write buffer */ @@ -1777,22 +1823,22 @@ test_basic_io(unsigned config, hid_t fapl) /* Write data directly to source datasets */ if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -1800,36 +1846,36 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen virtual file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } /* Open v_dset2 */ if ((vdset = H5Dopen2(vfile, "v_dset2", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through copied virtual dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != buf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reopen srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Only copy to a different file if the source datasets are in a different @@ -1837,16 +1883,16 @@ test_basic_io(unsigned config, hid_t fapl) if (config & TEST_IO_DIFFERENT_FILE) { /* Close v_dset2 */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; /* Create file to copy virtual dataset to */ - if ((vfile2 = H5Fcreate(vfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile2 = H5Fcreate(vfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Copy virtual dataset */ if (H5Ocopy(vfile, "v_dset", vfile2, "v_dset3", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -1855,22 +1901,22 @@ test_basic_io(unsigned config, hid_t fapl) /* Write data directly to source datasets */ if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -1878,68 +1924,66 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen copied virtual file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile2) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile2 = -1; - if ((vfile2 = H5Fopen(vfilename2, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile2 = H5Fopen(vfilename2, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } /* Open v_dset3 */ if ((vdset = H5Dopen2(vfile2, "v_dset3", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through copied virtual dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != buf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reopen srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } - - /* Close copied virtual file */ - if (H5Fclose(vfile2) < 0) - TEST_ERROR - vfile2 = -1; } /* Close */ if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; + if (vfile2 >= 0 && H5Fclose(vfile2) < 0) + TEST_ERROR_SUPPRESSED + vfile2 = -1; if (H5Sclose(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[0] = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; if (H5Sclose(vspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[1] = -1; /* @@ -1947,71 +1991,71 @@ test_basic_io(unsigned config, hid_t fapl) */ /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspaces */ if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspace */ dims[1] = 13; if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select all in source space (should not be necessary, but just to be sure) */ if (H5Sselect_all(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs in virtual spaces */ start[0] = 0; start[1] = 3; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Add virtual layout mappings */ offset[1] = -3; if (H5Soffset_simple(vspace[0], offset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "%%src_dset1", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED offset[1] = 10; if (H5Soffset_simple(vspace[0], offset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2%%", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reset dims */ dims[1] = 26; /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create source datasets */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "%src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2%", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -2021,27 +2065,27 @@ test_basic_io(unsigned config, hid_t fapl) /* Write data directly to source datasets */ offset[1] = -3; if (H5Soffset_simple(vspace[0], offset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED offset[1] = 10; if (H5Soffset_simple(vspace[0], offset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -2049,27 +2093,27 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Read data through virtual dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != buf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -2078,59 +2122,59 @@ test_basic_io(unsigned config, hid_t fapl) /* Write data through virtual dataset */ if (H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reopen srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Read data directly from source datasets */ HDmemset(rbuf[0], 0, sizeof(rbuf)); offset[1] = -3; if (H5Soffset_simple(vspace[0], offset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dread(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED offset[1] = 10; if (H5Soffset_simple(vspace[0], offset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dread(srcdset[1], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != buf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close */ if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[0] = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; /* @@ -2139,70 +2183,70 @@ test_basic_io(unsigned config, hid_t fapl) */ /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspaces */ if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspace */ dims[1] = 13; if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select all in source space (should not be necessary, but just to be sure) */ if (H5Sselect_all(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs in virtual spaces */ start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 13; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Add virtual layout mappings */ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_map : ".", "src_dset1", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_map : ".", "src_dset2", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reset dims */ dims[1] = 26; /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create source datasets */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -2211,22 +2255,22 @@ test_basic_io(unsigned config, hid_t fapl) /* Write data directly to source datasets */ if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -2234,38 +2278,38 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Read first source dataset through virtual dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); if (H5Dread(vdset, H5T_NATIVE_INT, vspace[0], vspace[0], H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != (j < (int)(sizeof(buf[0]) / sizeof(buf[0][0]) / 2) ? buf[i][j] : 0)) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read second source dataset through virtual dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); if (H5Dread(vdset, H5T_NATIVE_INT, vspace[1], vspace[1], H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != (j < (int)(sizeof(buf[0]) / sizeof(buf[0][0]) / 2) ? 0 : buf[i][j])) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -2274,7 +2318,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Write first source dataset through virtual dataset */ if (H5Dwrite(vdset, H5T_NATIVE_INT, vspace[0], vspace[0], H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -2283,25 +2327,25 @@ test_basic_io(unsigned config, hid_t fapl) /* Write second source dataset through virtual dataset */ if (H5Dwrite(vdset, H5T_NATIVE_INT, vspace[1], vspace[1], H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reopen srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDONLY, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDONLY, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Read data directly from source datasets */ HDmemset(rbuf[0], 0, sizeof(rbuf)); if (H5Dread(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dread(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -2309,32 +2353,32 @@ test_basic_io(unsigned config, hid_t fapl) if (rbuf[i][j] != (j < (int)(sizeof(buf[0]) / sizeof(buf[0][0]) / 2) ? (buf[i][j] - (int)(sizeof(buf) / sizeof(buf[0][0]))) : buf[i][j])) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close */ if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[0] = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; if (H5Sclose(vspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[1] = -1; /* @@ -2342,19 +2386,19 @@ test_basic_io(unsigned config, hid_t fapl) */ /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspaces */ if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspaces */ if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcspace[1] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs in source space */ start[0] = 0; @@ -2362,10 +2406,10 @@ test_basic_io(unsigned config, hid_t fapl) count[0] = 10; count[1] = 13; if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 13; if (H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs in virtual spaces */ start[0] = 0; @@ -2373,45 +2417,45 @@ test_basic_io(unsigned config, hid_t fapl) count[0] = 5; count[1] = 26; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 5; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Add virtual layout mappings */ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2", srcspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create source datasets */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[1], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -2421,7 +2465,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Write data directly to source datasets */ /* Write first dataset */ if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update evbuf */ for (i = 0; i < 5; i++) { @@ -2438,7 +2482,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Write second dataset */ if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update evbuf */ for (i = 0; i < 5; i++) { @@ -2451,15 +2495,15 @@ test_basic_io(unsigned config, hid_t fapl) /* Close srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -2467,15 +2511,15 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Read data through virtual dataset by hyperslab */ @@ -2484,7 +2528,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Read first slice */ if (H5Dread(vdset, H5T_NATIVE_INT, vspace[0], srcspace[0], H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 5; i++) { @@ -2496,7 +2540,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Read second slice */ if (H5Dread(vdset, H5T_NATIVE_INT, vspace[1], srcspace[1], H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 5; i++) { @@ -2510,7 +2554,7 @@ test_basic_io(unsigned config, hid_t fapl) for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -2520,7 +2564,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Write data through virtual dataset */ /* Write first slice */ if (H5Dwrite(vdset, H5T_NATIVE_INT, vspace[0], srcspace[0], H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update evbuf */ for (i = 0; i < 5; i++) { @@ -2537,7 +2581,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Write second slice */ if (H5Dwrite(vdset, H5T_NATIVE_INT, vspace[1], srcspace[1], H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update evbuf */ for (i = 0; i < 5; i++) { @@ -2550,12 +2594,12 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Read data directly from source datasets */ @@ -2564,7 +2608,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Read first dataset */ if (H5Dread(srcdset[0], H5T_NATIVE_INT, srcspace[0], srcspace[0], H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 5; i++) { @@ -2576,7 +2620,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Read second dataset */ if (H5Dread(srcdset[1], H5T_NATIVE_INT, srcspace[1], srcspace[1], H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 5; i++) { @@ -2590,35 +2634,35 @@ test_basic_io(unsigned config, hid_t fapl) for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close */ if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[0] = -1; if (H5Sclose(srcspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[1] = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; if (H5Sclose(vspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[1] = -1; /* @@ -2627,25 +2671,25 @@ test_basic_io(unsigned config, hid_t fapl) */ /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create memory dataspace */ if ((memspace = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspaces */ dims[1] = 52; if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspace and file space for second operation (srcspace[1]) */ if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcspace[1] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reset dims */ dims[1] = 26; @@ -2661,10 +2705,10 @@ test_basic_io(unsigned config, hid_t fapl) block[0] = 10; block[1] = 1; if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 1; if (H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs (checkerboard) in virtual spaces */ start[0] = 0; @@ -2676,53 +2720,53 @@ test_basic_io(unsigned config, hid_t fapl) block[0] = 1; block[1] = 1; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 1; start[1] = 1; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_OR, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 0; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 1; start[1] = 0; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Add virtual layout mappings */ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create source datasets */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -2732,7 +2776,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Write data directly to source datasets */ /* Write first dataset */ if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i += 2) @@ -2746,7 +2790,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Write second dataset */ if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 1; i < 10; i += 2) @@ -2756,15 +2800,15 @@ test_basic_io(unsigned config, hid_t fapl) /* Close srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -2772,15 +2816,15 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Read data through virtual dataset by hyperslab */ @@ -2789,17 +2833,17 @@ test_basic_io(unsigned config, hid_t fapl) /* Read first stripe pattern */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read second stripe pattern */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, srcspace[1], H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i += 2) @@ -2812,7 +2856,7 @@ test_basic_io(unsigned config, hid_t fapl) for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -2822,7 +2866,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Write data through virtual dataset */ /* Write first slice */ if (H5Dwrite(vdset, H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i += 2) @@ -2836,7 +2880,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Write second slice */ if (H5Dwrite(vdset, H5T_NATIVE_INT, memspace, srcspace[1], H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 1; i < 10; i += 2) @@ -2846,12 +2890,12 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Read data directly from source datasets */ @@ -2860,13 +2904,13 @@ test_basic_io(unsigned config, hid_t fapl) /* Read first dataset */ if (H5Dread(srcdset[0], H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i += 2) @@ -2877,44 +2921,44 @@ test_basic_io(unsigned config, hid_t fapl) /* Read second dataset */ if (H5Dread(srcdset[1], H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close */ if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[0] = -1; if (H5Sclose(srcspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[1] = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; if (H5Sclose(vspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[1] = -1; if (H5Sclose(memspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED memspace = -1; /* @@ -2923,11 +2967,11 @@ test_basic_io(unsigned config, hid_t fapl) */ /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create memory dataspace */ if ((memspace = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspaces */ dims[0] = 3; @@ -2935,18 +2979,18 @@ test_basic_io(unsigned config, hid_t fapl) dims[2] = 3; dims[3] = 3; if ((vspace[0] = H5Screate_simple(4, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((vspace[1] = H5Screate_simple(4, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspaces */ dims[0] = 2; dims[1] = 4; dims[2] = 4; if ((srcspace[0] = H5Screate_simple(3, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcspace[1] = H5Screate_simple(3, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reset dims */ dims[0] = 10; @@ -2966,10 +3010,10 @@ test_basic_io(unsigned config, hid_t fapl) block[1] = 1; block[2] = 4; if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 1; if (H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs (corners) in first virtual space */ start[0] = 0; @@ -2989,7 +3033,7 @@ test_basic_io(unsigned config, hid_t fapl) block[2] = 1; block[3] = 1; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs ("+" pattern) in second virtual space */ start[0] = 1; @@ -3009,61 +3053,61 @@ test_basic_io(unsigned config, hid_t fapl) block[2] = 1; block[3] = 1; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 0; start[2] = 1; count[1] = 2; count[2] = 1; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 0; start[1] = 1; count[0] = 2; count[1] = 1; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 1; count[0] = 1; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 0; start[3] = 1; count[1] = 2; count[3] = 1; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Add virtual layout mappings */ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create source dataset */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -3076,21 +3120,21 @@ test_basic_io(unsigned config, hid_t fapl) count[0] = 2; count[1] = 16; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Write data directly to source dataset */ if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close srcdset and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -3098,15 +3142,15 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Read data through virtual dataset */ @@ -3119,7 +3163,7 @@ test_basic_io(unsigned config, hid_t fapl) count[0] = 9; count[1] = 3; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset by hyperslab */ /* Reset rbuf */ @@ -3135,11 +3179,11 @@ test_basic_io(unsigned config, hid_t fapl) count[2] = 1; count[3] = 3; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read first stripe pattern */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ HDmemset(erbuf, 0, sizeof(erbuf)); @@ -3161,7 +3205,7 @@ test_basic_io(unsigned config, hid_t fapl) for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reset rbuf */ HDmemset(rbuf[0], 0, sizeof(rbuf)); @@ -3176,7 +3220,7 @@ test_basic_io(unsigned config, hid_t fapl) count[2] = 1; count[3] = 3; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslab in memory space */ start[0] = 0; @@ -3184,11 +3228,11 @@ test_basic_io(unsigned config, hid_t fapl) count[0] = 9; count[1] = 3; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read second stripe pattern */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 9; i++) @@ -3212,10 +3256,10 @@ test_basic_io(unsigned config, hid_t fapl) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if ((j >= 3) && (j < 6)) { if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reset rbuf */ HDmemset(rbuf[0], 0, sizeof(rbuf)); @@ -3230,7 +3274,7 @@ test_basic_io(unsigned config, hid_t fapl) count[2] = 1; count[3] = 3; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslab in memory space */ start[0] = 0; @@ -3238,11 +3282,11 @@ test_basic_io(unsigned config, hid_t fapl) count[0] = 9; count[1] = 3; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read third stripe pattern */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 9; i++) @@ -3264,10 +3308,10 @@ test_basic_io(unsigned config, hid_t fapl) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if ((j >= 6) && (j < 9)) { if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Now read entire VDS */ /* Set memory space extent to 9x9, select all in order to reach part of the @@ -3275,19 +3319,19 @@ test_basic_io(unsigned config, hid_t fapl) dims[0] = 9; dims[1] = 9; if (H5Sset_extent_simple(memspace, 2, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sselect_all(memspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read third stripe pattern */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf99[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(rbuf99) / sizeof(rbuf99[0])); i++) for (j = 0; j < (int)(sizeof(rbuf99[0]) / sizeof(rbuf99[0][0])); j++) if (rbuf99[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -3309,7 +3353,7 @@ test_basic_io(unsigned config, hid_t fapl) count[2] = 1; count[3] = 2; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 1; start[1] = 1; start[2] = 0; @@ -3323,24 +3367,24 @@ test_basic_io(unsigned config, hid_t fapl) count[2] = 1; count[3] = 2; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_OR, start, stride, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reset extent of memspace, select hyperslab */ dims[0] = 10; dims[1] = 26; if (H5Sset_extent_simple(memspace, 2, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 0; start[1] = 0; count[0] = 1; count[1] = 10; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Write data through virtual dataset by hyperslab */ /* Write first stripe pattern */ if (H5Dwrite(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ HDmemset(erbuf, 0, sizeof(erbuf)); @@ -3374,7 +3418,7 @@ test_basic_io(unsigned config, hid_t fapl) count[2] = 1; count[3] = 2; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 1; start[1] = 0; start[2] = 1; @@ -3388,7 +3432,7 @@ test_basic_io(unsigned config, hid_t fapl) count[2] = 1; count[3] = 3; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_OR, start, stride, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslab in memory space */ start[0] = 0; @@ -3396,11 +3440,11 @@ test_basic_io(unsigned config, hid_t fapl) count[0] = 1; count[1] = 12; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Write second slice */ if (H5Dwrite(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ erbuf[0][4] = buf[0][0]; @@ -3435,7 +3479,7 @@ test_basic_io(unsigned config, hid_t fapl) count[2] = 1; count[3] = 2; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 1; start[1] = 1; start[2] = 2; @@ -3449,7 +3493,7 @@ test_basic_io(unsigned config, hid_t fapl) count[2] = 1; count[3] = 2; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_OR, start, stride, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslab in memory space */ start[0] = 0; @@ -3457,11 +3501,11 @@ test_basic_io(unsigned config, hid_t fapl) count[0] = 1; count[1] = 10; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Write third slice */ if (H5Dwrite(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ erbuf[0][2] = buf[0][0]; @@ -3478,10 +3522,10 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen srcdset and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Read data directly from source dataset */ @@ -3491,61 +3535,61 @@ test_basic_io(unsigned config, hid_t fapl) count[0] = 2; count[1] = 16; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reset rbuf */ HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Read dataset */ if (H5Dread(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Now try writing to whole VDS (should fail due to unmapped elements) */ count[0] = 9; count[1] = 9; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED H5E_BEGIN_TRY { ret = H5Dwrite(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]); } H5E_END_TRY if (ret >= 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close */ if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[0] = -1; if (H5Sclose(srcspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[1] = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; if (H5Sclose(vspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[1] = -1; if (H5Sclose(memspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED memspace = -1; /* @@ -3554,77 +3598,77 @@ test_basic_io(unsigned config, hid_t fapl) */ /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create memory dataspace */ if ((memspace = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspaces */ dims[0] = 8; dims[1] = 15; if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspace */ dims[0] = 4; if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select all in source space (should not be necessary, but just to be sure) */ if (H5Sselect_all(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs in virtual spaces */ start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 4; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Add virtual layout mappings */ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reset dims */ dims[0] = 10; dims[1] = 26; /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create source datasets */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reset erbuf */ HDmemset(erbuf[0], 0, sizeof(rbuf)); @@ -3640,11 +3684,11 @@ test_basic_io(unsigned config, hid_t fapl) count[0] = 4; count[1] = 15; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Write data directly to first source dataset */ if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ u = 0; @@ -3662,11 +3706,11 @@ test_basic_io(unsigned config, hid_t fapl) /* Select hyperslab in memory */ start[0] = 4; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Write data directly to second source dataset */ if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 4; i < 6; i++) @@ -3682,28 +3726,28 @@ test_basic_io(unsigned config, hid_t fapl) /* Close srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Select hyperslab in memory */ @@ -3716,7 +3760,7 @@ test_basic_io(unsigned config, hid_t fapl) block[0] = 1; block[1] = 1; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslab in file */ start[0] = 2; @@ -3724,48 +3768,48 @@ test_basic_io(unsigned config, hid_t fapl) count[0] = 4; count[1] = 15; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); if (H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close */ if (!(config & TEST_IO_CLOSE_SRC)) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[0] = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; if (H5Sclose(vspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[1] = -1; if (H5Sclose(memspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED memspace = -1; /* @@ -3774,90 +3818,90 @@ test_basic_io(unsigned config, hid_t fapl) */ /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create memory dataspace */ dims[1] = 13; dims[2] = 2; if ((memspace = H5Screate_simple(3, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspaces */ dims[0] = 6; dims[1] = 10; if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((vspace[2] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspace */ dims[0] = 2; if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select all in source space (should not be necessary, but just to be sure) */ if (H5Sselect_all(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs in virtual spaces */ start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 2; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 4; if (H5Sselect_hyperslab(vspace[2], H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Add virtual layout mappings */ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[2], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset3", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reset dims */ dims[0] = 10; dims[1] = 26; /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create source datasets */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset3", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reset erbuf */ HDmemset(erbuf[0], 0, sizeof(rbuf)); @@ -3875,11 +3919,11 @@ test_basic_io(unsigned config, hid_t fapl) count[1] = 5; count[2] = 2; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Write data directly to first source dataset */ if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ u = 0; @@ -3898,11 +3942,11 @@ test_basic_io(unsigned config, hid_t fapl) /* Select hyperslab in memory */ start[0] = 2; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Write data directly to second source dataset */ if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 2; i < 4; i++) @@ -3919,11 +3963,11 @@ test_basic_io(unsigned config, hid_t fapl) /* Select hyperslab in memory */ start[0] = 4; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Write data directly to third source dataset */ if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 4; i < 6; i++) @@ -3940,31 +3984,31 @@ test_basic_io(unsigned config, hid_t fapl) /* Close srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Dclose(srcdset[2]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[2] = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Select hyperslab in memory */ @@ -3981,54 +4025,54 @@ test_basic_io(unsigned config, hid_t fapl) block[1] = 3; block[2] = 2; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close */ if (!(config & TEST_IO_CLOSE_SRC)) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Dclose(srcdset[2]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[2] = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[0] = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; if (H5Sclose(vspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[1] = -1; if (H5Sclose(vspace[2]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[2] = -1; if (H5Sclose(memspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED memspace = -1; /* @@ -4037,30 +4081,30 @@ test_basic_io(unsigned config, hid_t fapl) */ /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create memory dataspace */ if ((memspace = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspaces */ dims[0] = 10; dims[1] = 9; dims[2] = 6; if ((vspace[0] = H5Screate_simple(3, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((vspace[1] = H5Screate_simple(3, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspace */ dims[1] = 12; if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select all in source space (should not be necessary, but just to be sure) */ if (H5Sselect_all(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs in virtual spaces */ start[0] = 0; @@ -4076,49 +4120,49 @@ test_basic_io(unsigned config, hid_t fapl) block[1] = 1; block[2] = 1; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[2] = 1; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Add virtual layout mappings */ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reset dims */ dims[0] = 10; dims[1] = 26; /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create source datasets */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Initialize erbuf */ HDmemset(erbuf[0], 0, sizeof(rbuf)); @@ -4139,11 +4183,11 @@ test_basic_io(unsigned config, hid_t fapl) count[0] = 10; count[1] = 12; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Write data directly to first source dataset */ if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ u = 0; @@ -4164,11 +4208,11 @@ test_basic_io(unsigned config, hid_t fapl) /* Select hyperslab in memory */ start[1] = 8; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Write data directly to second source dataset */ if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ u = 0; @@ -4189,28 +4233,28 @@ test_basic_io(unsigned config, hid_t fapl) /* Close srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Select hyperslab in memory */ @@ -4223,7 +4267,7 @@ test_basic_io(unsigned config, hid_t fapl) block[0] = 10; block[1] = 2; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslab in file */ start[0] = 0; @@ -4233,53 +4277,53 @@ test_basic_io(unsigned config, hid_t fapl) count[1] = 4; count[2] = 2; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); if (H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close */ if (!(config & TEST_IO_CLOSE_SRC)) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[0] = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; if (H5Sclose(vspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[1] = -1; if (H5Sclose(memspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED memspace = -1; /* Close */ if (H5Pclose(dcpl) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED dcpl = -1; HDfree(srcfilename); @@ -4289,7 +4333,7 @@ test_basic_io(unsigned config, hid_t fapl) HDfree(srcfilenamepct); HDfree(srcfilenamepct_map); - PASSED(); + PASSED_SUPPRESSED(); return 0; error: @@ -4331,7 +4375,7 @@ error: *------------------------------------------------------------------------- */ static int -test_unlim(unsigned config, hid_t fapl) +test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl) { char srcfilename[FILENAME_BUF_SIZE]; char srcfilename_map[FILENAME_BUF_SIZE]; @@ -4362,52 +4406,52 @@ test_unlim(unsigned config, hid_t fapl) H5D_vds_view_t virtual_view; /* Virtual view property */ int i, j; - TESTING("virtual dataset I/O with unlimited selections") + TESTING_2_SUPPRESSED("virtual dataset I/O with unlimited selections") - h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename); - h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename); - h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, sizeof srcfilename_map); + h5_fixname(FILENAME[0], vds_fapl, vfilename, sizeof vfilename); + h5_fixname(FILENAME[2], src_fapl, srcfilename, sizeof srcfilename); + h5_fixname_printf(FILENAME[2], src_fapl, srcfilename_map, sizeof srcfilename_map); /* Create DCPLs */ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Set fill value */ if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Set chunk dimensions */ if (H5Pset_chunk(srcdcpl, 2, cdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create DAPL */ if ((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create memory space */ if ((memspace = H5Screate_simple(2, mdims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* * Test 1: 2 Source datasets, single unlimited hyperslab virtual mappings */ /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspaces */ if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspace */ dims[0] = 5; mdims[0] = 5; if ((srcspace[0] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED mdims[0] = 10; /* Select hyperslab in source space */ @@ -4416,49 +4460,49 @@ test_unlim(unsigned config, hid_t fapl) count[0] = 5; count[1] = H5S_UNLIMITED; if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs in virtual spaces */ if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 5; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Add virtual layout mappings */ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create source datasets */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -4475,11 +4519,11 @@ test_unlim(unsigned config, hid_t fapl) start[0] = 0; count[1] = 10; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Write first dataset */ if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 5; i++) @@ -4493,7 +4537,7 @@ test_unlim(unsigned config, hid_t fapl) /* Write second dataset */ if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 5; i++) @@ -4503,15 +4547,15 @@ test_unlim(unsigned config, hid_t fapl) /* Close srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -4519,40 +4563,40 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -4561,74 +4605,74 @@ test_unlim(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ start[0] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Test H5Pget_virtual_view() */ if (H5Pget_virtual_view(dapl, &virtual_view) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (virtual_view != H5D_VDS_LAST_AVAILABLE) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Test H5Pget_virtual_view() */ if (H5Pget_virtual_view(dapl, &virtual_view) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (virtual_view != H5D_VDS_FIRST_MISSING) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -4636,33 +4680,33 @@ test_unlim(unsigned config, hid_t fapl) /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcdset[0] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Extend srcdset[0] */ dims[0] = 5; dims[1] = 15; if (H5Dset_extent(srcdset[0], dims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -4672,26 +4716,26 @@ test_unlim(unsigned config, hid_t fapl) /* Write to new area of srcdset */ count[1] = 5; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((filespace = H5Dget_space(srcdset[0])) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 10; if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close srcdset[0] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -4699,42 +4743,42 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions. Note that since we are using * H5D_VDS_FIRST_MISSING and we only extended one source dataset the * dimensions will not have changed. */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -4743,38 +4787,38 @@ test_unlim(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file * as well if config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf to reflect new data that is now visible due to the change to * H5D_VDS_LAST_AVAILABLE */ @@ -4784,27 +4828,27 @@ test_unlim(unsigned config, hid_t fapl) /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 15) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -4813,37 +4857,37 @@ test_unlim(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcdset[1] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Extend srcdset[1] */ dims[0] = 5; dims[1] = 20; if (H5Dset_extent(srcdset[1], dims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -4853,16 +4897,16 @@ test_unlim(unsigned config, hid_t fapl) /* Write to new area of srcdset */ count[1] = 10; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((filespace = H5Dget_space(srcdset[1])) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 10; if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 5; i++) @@ -4872,12 +4916,12 @@ test_unlim(unsigned config, hid_t fapl) /* Close srcdset[1] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -4885,40 +4929,40 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -4927,17 +4971,17 @@ test_unlim(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Now just read middle 2 rows */ HDmemset(rbuf[0], 0, sizeof(rbuf)); @@ -4945,9 +4989,9 @@ test_unlim(unsigned config, hid_t fapl) count[0] = 2; count[1] = 20; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dread(vdset, H5T_NATIVE_INT, memspace, memspace, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data - algorithmically check for only 2 middle rows being * read so we don't have to wipe out erbuf and then restore it afterwards */ @@ -4955,24 +4999,24 @@ test_unlim(unsigned config, hid_t fapl) for (j = 0; j < (int)mdims[1]; j++) if ((i == 4) || (i == 5)) { if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Now test reopening virtual dataset without calling H5Dget_space, if * REOPEN_VIRT flag set */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -4982,23 +5026,23 @@ test_unlim(unsigned config, hid_t fapl) start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Now try setting extent manually */ /* Shrink to 18 */ dims[1] = 18; if (H5Dset_extent(vdset, dims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -5008,27 +5052,27 @@ test_unlim(unsigned config, hid_t fapl) start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Shrink to 15 */ dims[1] = 15; if (H5Dset_extent(vdset, dims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -5038,63 +5082,63 @@ test_unlim(unsigned config, hid_t fapl) start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } } /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 15) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -5104,36 +5148,36 @@ test_unlim(unsigned config, hid_t fapl) start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Now test reopening virtual dataset without calling H5Dget_space, if * REOPEN_VIRT flag set */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -5142,28 +5186,28 @@ test_unlim(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Now try setting extent manually */ /* Grow to 18 */ dims[1] = 18; if (H5Dset_extent(vdset, dims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -5173,27 +5217,27 @@ test_unlim(unsigned config, hid_t fapl) start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Grow to 20 */ dims[1] = 20; if (H5Dset_extent(vdset, dims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -5203,50 +5247,50 @@ test_unlim(unsigned config, hid_t fapl) start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close */ if (!(config & TEST_IO_CLOSE_SRC)) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } else if (!(config & TEST_IO_DIFFERENT_FILE)) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[0] = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; if (H5Sclose(vspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[1] = -1; /* @@ -5254,21 +5298,21 @@ test_unlim(unsigned config, hid_t fapl) */ /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspaces */ dims[0] = 10; dims[1] = 10; if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspace */ dims[1] = 5; mdims[1] = 10; if ((srcspace[0] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED mdims[1] = 20; /* Select hyperslab in source space */ @@ -5277,7 +5321,7 @@ test_unlim(unsigned config, hid_t fapl) count[0] = 10; count[1] = H5S_UNLIMITED; if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs in virtual spaces */ stride[0] = 1; @@ -5287,46 +5331,46 @@ test_unlim(unsigned config, hid_t fapl) block[0] = 10; block[1] = 1; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 1; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 0; /* Add virtual layout mappings */ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create source datasets */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -5343,11 +5387,11 @@ test_unlim(unsigned config, hid_t fapl) count[0] = 10; count[1] = 5; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Write first dataset */ if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -5361,7 +5405,7 @@ test_unlim(unsigned config, hid_t fapl) /* Write second dataset */ if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -5371,15 +5415,15 @@ test_unlim(unsigned config, hid_t fapl) /* Close srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -5387,40 +5431,40 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -5428,62 +5472,62 @@ test_unlim(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -5491,32 +5535,32 @@ test_unlim(unsigned config, hid_t fapl) /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcdset[0] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Extend srcdset[0] */ dims[1] = 7; if (H5Dset_extent(srcdset[0], dims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -5526,17 +5570,17 @@ test_unlim(unsigned config, hid_t fapl) /* Write to new area of srcdset */ count[1] = 2; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((filespace = H5Dget_space(srcdset[0])) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 5; if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 0; if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf to reflect only new data that is now visible under * H5D_VDS_FIRST_MISSING (first slice) */ @@ -5546,12 +5590,12 @@ test_unlim(unsigned config, hid_t fapl) /* Close srcdset[0] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -5559,42 +5603,42 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions. Note that since we are using * H5D_VDS_FIRST_MISSING and we only extended one source dataset the * dimension will only have changed to add one more slice. */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 11) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -5602,38 +5646,38 @@ test_unlim(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file * as well if config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf to reflect new data that is now visible due to the change to * H5D_VDS_LAST_AVAILABLE (second new slice) */ @@ -5642,27 +5686,27 @@ test_unlim(unsigned config, hid_t fapl) /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 13) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -5670,36 +5714,36 @@ test_unlim(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcdset[1] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Extend srcdset[1] */ dims[1] = 10; if (H5Dset_extent(srcdset[1], dims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -5709,17 +5753,17 @@ test_unlim(unsigned config, hid_t fapl) /* Write to new area of srcdset */ count[1] = 5; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((filespace = H5Dget_space(srcdset[1])) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 5; if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 0; if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -5729,12 +5773,12 @@ test_unlim(unsigned config, hid_t fapl) /* Close srcdset[1] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -5742,40 +5786,40 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -5783,17 +5827,17 @@ test_unlim(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Now just read middle 2 rows */ HDmemset(rbuf[0], 0, sizeof(rbuf)); @@ -5801,10 +5845,10 @@ test_unlim(unsigned config, hid_t fapl) count[0] = 2; count[1] = 20; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 0; if (H5Dread(vdset, H5T_NATIVE_INT, memspace, memspace, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data - algorithmically check for only 2 middle rows being * read so we don't have to wipe out erbuf and then restore it afterwards */ @@ -5812,26 +5856,26 @@ test_unlim(unsigned config, hid_t fapl) for (j = 0; j < (int)mdims[1]; j++) if ((i == 4) || (i == 5)) { if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf to reflect new data that is no longer visible due to the * change to H5D_VDS_FIRST_MISSING */ @@ -5841,27 +5885,27 @@ test_unlim(unsigned config, hid_t fapl) /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 14) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -5869,54 +5913,54 @@ test_unlim(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close */ if (!(config & TEST_IO_CLOSE_SRC)) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } else if (!(config & TEST_IO_DIFFERENT_FILE)) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[0] = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; if (H5Sclose(vspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[1] = -1; /* @@ -5924,31 +5968,31 @@ test_unlim(unsigned config, hid_t fapl) */ /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspaces */ dims[0] = 10; dims[1] = 10; if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((vspace[2] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspaces */ dims[1] = 4; mdims[1] = 8; if ((srcspace[0] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED dims[1] = 4; mdims[1] = 6; if ((srcspace[1] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED dims[1] = 2; mdims[1] = 6; if ((srcspace[2] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED mdims[1] = 20; /* Select hyperslab in source spaces */ @@ -5957,11 +6001,11 @@ test_unlim(unsigned config, hid_t fapl) count[0] = 10; count[1] = H5S_UNLIMITED; if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sselect_hyperslab(srcspace[2], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs in virtual spaces */ stride[0] = 1; @@ -5971,55 +6015,55 @@ test_unlim(unsigned config, hid_t fapl) block[0] = 10; block[1] = 2; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 2; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 4; if (H5Sselect_hyperslab(vspace[2], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 0; /* Add virtual layout mappings */ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2", srcspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[2], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset3", srcspace[2]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create source datasets */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[1], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset3", H5T_NATIVE_INT, srcspace[2], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -6036,11 +6080,11 @@ test_unlim(unsigned config, hid_t fapl) count[0] = 10; count[1] = 4; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Write first dataset */ if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -6056,7 +6100,7 @@ test_unlim(unsigned config, hid_t fapl) /* Write second dataset */ if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -6074,11 +6118,11 @@ test_unlim(unsigned config, hid_t fapl) count[0] = 10; count[1] = 2; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Write third dataset */ if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) { @@ -6089,18 +6133,18 @@ test_unlim(unsigned config, hid_t fapl) /* Close srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Dclose(srcdset[2]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[2] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -6108,40 +6152,40 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -6149,62 +6193,62 @@ test_unlim(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -6212,32 +6256,32 @@ test_unlim(unsigned config, hid_t fapl) /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcdset[0] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Extend srcdset[0] */ dims[1] = 7; if (H5Dset_extent(srcdset[0], dims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -6247,27 +6291,27 @@ test_unlim(unsigned config, hid_t fapl) /* Write to new area of srcdset */ count[1] = 3; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((filespace = H5Dget_space(srcdset[0])) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 4; if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 0; if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close srcdset[0] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -6275,41 +6319,41 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions. Note that since we are using * H5D_VDS_FIRST_MISSING the size will not have changed. */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -6317,38 +6361,38 @@ test_unlim(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file * as well if config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf to reflect new data that is now visible due to the change to * H5D_VDS_LAST_AVAILABLE */ @@ -6360,27 +6404,27 @@ test_unlim(unsigned config, hid_t fapl) /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 19) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -6388,36 +6432,36 @@ test_unlim(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcdset[2] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[2] = H5Dopen2(srcfile[0], "src_dset3", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Extend srcdset[2] */ dims[1] = 5; if (H5Dset_extent(srcdset[2], dims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -6427,17 +6471,17 @@ test_unlim(unsigned config, hid_t fapl) /* Write to new area of srcdset */ count[1] = 3; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((filespace = H5Dget_space(srcdset[2])) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 2; if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 0; if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) { @@ -6449,12 +6493,12 @@ test_unlim(unsigned config, hid_t fapl) /* Close srcdset[2] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[2]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[2] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -6462,41 +6506,41 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions. Note that the dimensions will not have * changed. */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 19) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -6504,62 +6548,62 @@ test_unlim(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 14) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -6567,36 +6611,36 @@ test_unlim(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcdset[1] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Extend srcdset[1] */ dims[1] = 6; if (H5Dset_extent(srcdset[1], dims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -6606,17 +6650,17 @@ test_unlim(unsigned config, hid_t fapl) /* Write to new area of srcdset */ count[1] = 2; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((filespace = H5Dget_space(srcdset[1])) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 4; if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 0; if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) { @@ -6627,12 +6671,12 @@ test_unlim(unsigned config, hid_t fapl) /* Close srcdset[1] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -6640,40 +6684,40 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 17) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -6681,58 +6725,58 @@ test_unlim(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file * as well if config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 19) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -6740,21 +6784,21 @@ test_unlim(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Now just read middle 2 rows */ @@ -6763,16 +6807,16 @@ test_unlim(unsigned config, hid_t fapl) count[0] = 2; count[1] = 19; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 0; if (H5Dread(vdset, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data - algorithmically check for only 2 middle rows being * read */ @@ -6780,55 +6824,55 @@ test_unlim(unsigned config, hid_t fapl) for (j = 0; j < (int)mdims[1]; j++) if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if ((i == 4) || (i == 5)) { if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close */ if (!(config & TEST_IO_CLOSE_SRC)) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Dclose(srcdset[2]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[2] = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } else if (!(config & TEST_IO_DIFFERENT_FILE)) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[0] = -1; if (H5Sclose(srcspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[1] = -1; if (H5Sclose(srcspace[2]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[2] = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; if (H5Sclose(vspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[1] = -1; /* @@ -6836,23 +6880,23 @@ test_unlim(unsigned config, hid_t fapl) */ /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspaces */ if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspaces */ dims[0] = 5; dims[1] = 0; mdims[0] = 5; if ((srcspace[0] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED dims[1] = 5; if ((srcspace[1] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED mdims[0] = 10; /* Select hyperslab in source spaces */ @@ -6861,53 +6905,53 @@ test_unlim(unsigned config, hid_t fapl) count[0] = 5; count[1] = H5S_UNLIMITED; if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs in virtual spaces */ start[1] = 10; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 5; start[1] = 0; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Add virtual layout mappings */ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2", srcspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create source datasets */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[1], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -6926,11 +6970,11 @@ test_unlim(unsigned config, hid_t fapl) count[0] = 5; count[1] = 5; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Write second dataset */ if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 5; i++) @@ -6940,15 +6984,15 @@ test_unlim(unsigned config, hid_t fapl) /* Close srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -6956,40 +7000,40 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 5) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -6999,62 +7043,62 @@ test_unlim(unsigned config, hid_t fapl) start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 5) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -7062,33 +7106,33 @@ test_unlim(unsigned config, hid_t fapl) /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcdset[0] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Extend srcdset[0] */ dims[0] = 5; dims[1] = 5; if (H5Dset_extent(srcdset[0], dims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -7101,9 +7145,9 @@ test_unlim(unsigned config, hid_t fapl) count[0] = 5; count[1] = 5; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 5; i++) @@ -7113,12 +7157,12 @@ test_unlim(unsigned config, hid_t fapl) /* Close srcdset[0] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -7126,40 +7170,40 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 5) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -7169,62 +7213,62 @@ test_unlim(unsigned config, hid_t fapl) start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file * as well if config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 15) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -7234,74 +7278,74 @@ test_unlim(unsigned config, hid_t fapl) start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close */ if (!(config & TEST_IO_CLOSE_SRC)) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } else if (!(config & TEST_IO_DIFFERENT_FILE)) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[0] = -1; if (H5Sclose(srcspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[1] = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; if (H5Sclose(vspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[1] = -1; /* Close */ if (H5Pclose(dcpl) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED dcpl = -1; if (H5Pclose(srcdcpl) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED dcpl = -1; if (H5Pclose(dapl) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED dapl = -1; if (H5Sclose(memspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED memspace = -1; - PASSED(); + PASSED_SUPPRESSED(); return 0; error: @@ -7339,7 +7383,7 @@ error: *------------------------------------------------------------------------- */ static int -test_printf(unsigned config, hid_t fapl) +test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl) { char * srcfilename = NULL; char * srcfilename_map = NULL; @@ -7375,65 +7419,65 @@ test_printf(unsigned config, hid_t fapl) hsize_t gap_size; /* Gap size property */ int i, j; - TESTING("virtual dataset I/O with printf source") + TESTING_2_SUPPRESSED("virtual dataset I/O with printf source") if ((srcfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL) - TEST_ERROR; + TEST_ERROR_SUPPRESSED; if ((srcfilename_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL) - TEST_ERROR; + TEST_ERROR_SUPPRESSED; if ((srcfilename2 = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL) - TEST_ERROR; + TEST_ERROR_SUPPRESSED; if ((srcfilename2_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL) - TEST_ERROR; + TEST_ERROR_SUPPRESSED; if ((vfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL) - TEST_ERROR; + TEST_ERROR_SUPPRESSED; if ((printf_srcfilename_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL) - TEST_ERROR; + TEST_ERROR_SUPPRESSED; if ((srcfilenamepct = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL) - TEST_ERROR; + TEST_ERROR_SUPPRESSED; if ((srcfilenamepct_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL) - TEST_ERROR; + TEST_ERROR_SUPPRESSED; - h5_fixname(FILENAME[0], fapl, vfilename, FILENAME_BUF_SIZE); - h5_fixname(FILENAME[2], fapl, srcfilename, FILENAME_BUF_SIZE); - h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, FILENAME_BUF_SIZE); - h5_fixname(FILENAME[3], fapl, srcfilename2, FILENAME_BUF_SIZE); - h5_fixname_printf(FILENAME[2], fapl, srcfilename2_map, FILENAME_BUF_SIZE); - h5_fixname_printf(printf_srcfilename_map_orig, fapl, printf_srcfilename_map, FILENAME_BUF_SIZE); - h5_fixname(FILENAME[4], fapl, srcfilenamepct, FILENAME_BUF_SIZE); - h5_fixname_printf(srcfilenamepct_map_orig, fapl, srcfilenamepct_map, FILENAME_BUF_SIZE); + h5_fixname(FILENAME[0], vds_fapl, vfilename, FILENAME_BUF_SIZE); + h5_fixname(FILENAME[2], src_fapl, srcfilename, FILENAME_BUF_SIZE); + h5_fixname_printf(FILENAME[2], src_fapl, srcfilename_map, FILENAME_BUF_SIZE); + h5_fixname(FILENAME[3], src_fapl, srcfilename2, FILENAME_BUF_SIZE); + h5_fixname_printf(FILENAME[2], src_fapl, srcfilename2_map, FILENAME_BUF_SIZE); + h5_fixname_printf(printf_srcfilename_map_orig, src_fapl, printf_srcfilename_map, FILENAME_BUF_SIZE); + h5_fixname(FILENAME[4], src_fapl, srcfilenamepct, FILENAME_BUF_SIZE); + h5_fixname_printf(srcfilenamepct_map_orig, src_fapl, srcfilenamepct_map, FILENAME_BUF_SIZE); /* Create DCPL */ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Set fill value */ if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create DAPL */ if ((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create memory space */ if ((memspace = H5Screate_simple(2, mdims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* * Test 1: 1 Source dataset mapping, 10x5 blocks */ /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspace */ if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspace */ dims[1] = 5; if ((srcspace = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs in virtual space */ stride[0] = 1; @@ -7443,91 +7487,91 @@ test_printf(unsigned config, hid_t fapl) block[0] = 10; block[1] = 5; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Add virtual layout mapping */ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset%b", srcspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reopen srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create 2 source datasets */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -7541,9 +7585,9 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[0] */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -7557,7 +7601,7 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[1] */ if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -7567,15 +7611,15 @@ test_printf(unsigned config, hid_t fapl) /* Close srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -7583,40 +7627,40 @@ test_printf(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -7624,32 +7668,32 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcfile if config option specified */ if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create 3rd source dataset */ if ((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -7658,9 +7702,9 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[2] */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -7670,12 +7714,12 @@ test_printf(unsigned config, hid_t fapl) /* Close srcdset[2] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[2]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[2] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -7683,36 +7727,36 @@ test_printf(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 15) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -7720,21 +7764,21 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Now try with different selections */ @@ -7746,25 +7790,25 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslab in file space */ if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if ((j < (int)start[1]) || (j >= (int)(start[1] + count[1]))) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } } start[1] = 0; @@ -7772,11 +7816,11 @@ test_printf(unsigned config, hid_t fapl) /* Now try writing through VDS */ /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslab in file space */ if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -7785,83 +7829,83 @@ test_printf(unsigned config, hid_t fapl) /* Write data through VDS */ if (H5Dwrite(vdset, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reopen srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset0", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[2] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Read srcdset[0] */ count[0] = 10; count[1] = 5; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dread(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < 10; i++) for (j = 0; j < 5; j++) if (rbuf[i][j] != buf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read srcdset[1] */ if (H5Dread(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < 10; i++) for (j = 0; j < 5; j++) if (rbuf[i][j] != buf[i][j + 5]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read srcdset[2] */ if (H5Dread(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < 10; i++) for (j = 0; j < 5; j++) if (rbuf[i][j] != buf[i][j + 10]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close */ if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Dclose(srcdset[2]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[2] = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; /* @@ -7870,16 +7914,16 @@ test_printf(unsigned config, hid_t fapl) */ /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspaces */ if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspace */ dims[1] = 1; if ((srcspace = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs in virtual space */ stride[0] = 1; @@ -7889,104 +7933,104 @@ test_printf(unsigned config, hid_t fapl) block[0] = 10; block[1] = 1; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Add virtual layout mapping */ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_map : ".", "src_dset%b", srcspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reopen srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source datasets in a pattern with increasing gaps: * XX-X--X---X----X */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset3", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[3] = H5Dcreate2(srcfile[0], "src_dset6", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[4] = H5Dcreate2(srcfile[0], "src_dset10", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[5] = H5Dcreate2(srcfile[0], "src_dset15", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -8000,9 +8044,9 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[0] */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -8015,7 +8059,7 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[1] */ if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -8028,7 +8072,7 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[2] */ if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -8041,7 +8085,7 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[3] */ if (H5Dwrite(srcdset[3], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -8054,7 +8098,7 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[4] */ if (H5Dwrite(srcdset[4], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -8067,7 +8111,7 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[5] */ if (H5Dwrite(srcdset[5], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -8077,13 +8121,13 @@ test_printf(unsigned config, hid_t fapl) if (config & TEST_IO_CLOSE_SRC) { for (i = 0; i < 6; i++) { if (H5Dclose(srcdset[i]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[i] = -1; } if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -8091,40 +8135,40 @@ test_printf(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -8132,74 +8176,74 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Test H5Pget_virtual_printf_gap() */ if (H5Pget_virtual_printf_gap(dapl, &gap_size) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (gap_size != (hsize_t)0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close VDS and reopen with printf gap set to 1, reopen file as well if * config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_printf_gap(dapl, (hsize_t)1) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Test H5Pget_virtual_printf_gap() */ if (H5Pget_virtual_printf_gap(dapl, &gap_size) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (gap_size != (hsize_t)1) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 4) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -8207,68 +8251,68 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close VDS and reopen with printf gap set to 2, reopen file as well if * config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_printf_gap(dapl, (hsize_t)2) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Test H5Pget_virtual_printf_gap() */ if (H5Pget_virtual_printf_gap(dapl, &gap_size) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (gap_size != (hsize_t)2) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 7) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -8276,68 +8320,68 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close VDS and reopen with printf gap set to 3, reopen file as well if * config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_printf_gap(dapl, (hsize_t)3) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Test H5Pget_virtual_printf_gap() */ if (H5Pget_virtual_printf_gap(dapl, &gap_size) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (gap_size != (hsize_t)3) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 11) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -8345,68 +8389,68 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close VDS and reopen with printf gap set to 4, reopen file as well if * config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_printf_gap(dapl, (hsize_t)4) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Test H5Pget_virtual_printf_gap() */ if (H5Pget_virtual_printf_gap(dapl, &gap_size) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (gap_size != (hsize_t)4) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 16) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -8414,62 +8458,62 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -8477,56 +8521,56 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reset dapl */ if (H5Pset_virtual_printf_gap(dapl, (hsize_t)0) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close */ if (!(config & TEST_IO_CLOSE_SRC)) { for (i = 0; i < 6; i++) { if (H5Dclose(srcdset[i]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[i] = -1; } if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } else if (!(config & TEST_IO_DIFFERENT_FILE)) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; /* Next 2 tests are always run with a different source file, so only run if @@ -8537,21 +8581,21 @@ test_printf(unsigned config, hid_t fapl) * Test 3: 1 Source dataset mapping, 10x5 blocks, printf source file */ /* Clean up files so the source files do not exist yet */ - H5Iinc_ref(fapl); /* Prevent FAPL from being closed */ - h5_clean_files(FILENAME, fapl); + H5Iinc_ref(vds_fapl); /* Prevent FAPL from being closed */ + h5_clean_files(FILENAME, vds_fapl); /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspaces */ if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspace */ dims[1] = 5; if ((srcspace = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs in virtual space */ stride[0] = 1; @@ -8561,66 +8605,66 @@ test_printf(unsigned config, hid_t fapl) block[0] = 10; block[1] = 5; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Add virtual layout mapping */ if (H5Pset_virtual(dcpl, vspace[0], printf_srcfilename_map, "src_dset", srcspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create 2 source files, one source dataset */ - if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR - if ((srcfile[1] = H5Fcreate(srcfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED + if ((srcfile[1] = H5Fcreate(srcfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -8634,9 +8678,9 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[0] */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -8646,53 +8690,53 @@ test_printf(unsigned config, hid_t fapl) /* Close srcdset and srcfiles if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; if (H5Fclose(srcfile[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[1] = -1; } /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 5) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -8700,32 +8744,32 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcfile[1] if config option specified */ if (config & TEST_IO_CLOSE_SRC) - if ((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create 2nd source dataset */ if ((srcdset[1] = H5Dcreate2(srcfile[1], "src_dset", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -8734,9 +8778,9 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[1] */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -8746,50 +8790,50 @@ test_printf(unsigned config, hid_t fapl) /* Close srcdset[1] and srcfile[1] if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Fclose(srcfile[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[1] = -1; } /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -8797,49 +8841,49 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close */ if (!(config & TEST_IO_CLOSE_SRC)) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; if (H5Fclose(srcfile[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[1] = -1; } if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; /* @@ -8847,21 +8891,21 @@ test_printf(unsigned config, hid_t fapl) * source dset, extra %%s in source dataset name */ /* Clean up files so the source files do not exist yet */ - H5Iinc_ref(fapl); /* Prevent FAPL from being closed */ - h5_clean_files(FILENAME, fapl); + H5Iinc_ref(vds_fapl); /* Prevent FAPL from being closed */ + h5_clean_files(FILENAME, vds_fapl); /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspaces */ if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspace */ dims[1] = 5; if ((srcspace = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs in virtual space */ stride[0] = 1; @@ -8871,66 +8915,66 @@ test_printf(unsigned config, hid_t fapl) block[0] = 10; block[1] = 5; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Add virtual layout mapping */ if (H5Pset_virtual(dcpl, vspace[0], printf_srcfilename_map, "%%src%%_dset%%%b", srcspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create 2 source files, one source dataset */ - if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[0] = H5Dcreate2(srcfile[0], "%src%_dset%0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR - if ((srcfile[1] = H5Fcreate(srcfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED + if ((srcfile[1] = H5Fcreate(srcfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -8944,9 +8988,9 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[0] */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -8956,53 +9000,53 @@ test_printf(unsigned config, hid_t fapl) /* Close srcdset and srcfiles if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; if (H5Fclose(srcfile[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[1] = -1; } /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 5) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -9010,32 +9054,32 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcfile[1] if config option specified */ if (config & TEST_IO_CLOSE_SRC) - if ((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create 2nd source dataset */ if ((srcdset[1] = H5Dcreate2(srcfile[1], "%src%_dset%1", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -9044,9 +9088,9 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[1] */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -9056,50 +9100,50 @@ test_printf(unsigned config, hid_t fapl) /* Close srcdset[1] and srcfile[1] if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Fclose(srcfile[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[1] = -1; } /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -9107,49 +9151,49 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close */ if (!(config & TEST_IO_CLOSE_SRC)) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; if (H5Fclose(srcfile[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[1] = -1; } if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; } @@ -9159,26 +9203,26 @@ test_printf(unsigned config, hid_t fapl) */ /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspaces */ dims[0] = 10; dims[1] = 10; if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspace (2 elements wide) */ dims[1] = 2; if ((srcspace = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslab in source space */ count[0] = 10; count[1] = 1; if (H5Sselect_hyperslab(srcspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs in virtual spaces */ stride[0] = 1; @@ -9188,98 +9232,98 @@ test_printf(unsigned config, hid_t fapl) block[0] = 10; block[1] = 1; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 1; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[1] = 0; /* Add virtual layout mappings */ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "%bsrc_dset_a%b%%", srcspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset_b%b%%%%", srcspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reopen srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create 2 source datasets */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "0src_dset_a0%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset_b0%%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -9295,9 +9339,9 @@ test_printf(unsigned config, hid_t fapl) block[0] = 10; block[1] = 2; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -9310,7 +9354,7 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[1] */ if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -9319,15 +9363,15 @@ test_printf(unsigned config, hid_t fapl) /* Close srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -9335,40 +9379,40 @@ test_printf(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -9376,32 +9420,32 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcfile if config option specified */ if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create 3rd source dataset */ if ((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset_b1%%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -9410,9 +9454,9 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[2] */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -9421,12 +9465,12 @@ test_printf(unsigned config, hid_t fapl) /* Close srcdset[2] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[2]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[2] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -9434,40 +9478,40 @@ test_printf(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 4) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -9475,63 +9519,63 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions. Make sure that the 4th slice is no longer * visible due to the change to H5D_VDS_FIRST_MISSING. */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -9539,32 +9583,32 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcfile if config option specified */ if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create 4th source dataset */ if ((srcdset[3] = H5Dcreate2(srcfile[0], "2src_dset_a2%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -9573,9 +9617,9 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[3] */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[3], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -9584,12 +9628,12 @@ test_printf(unsigned config, hid_t fapl) /* Close srcdset[3] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[3]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[3] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -9597,40 +9641,40 @@ test_printf(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -9638,63 +9682,63 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file * as well if config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions. Make sure that the 4th slice is now visible * due to the change to H5D_VDS_LAST_AVAILABLE. */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 4) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -9702,63 +9746,63 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close VDS and reopen with printf_gap set to 1, reopen file as well if * config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_printf_gap(dapl, (hsize_t)1) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions. Make sure that the 6th slice is now visible * due to the change to printf_gap. */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 5) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -9766,59 +9810,59 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reset dapl */ if (H5Pset_virtual_printf_gap(dapl, (hsize_t)0) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close */ if (!(config & TEST_IO_CLOSE_SRC)) { for (i = 0; i < 4; i++) { if (H5Dclose(srcdset[i]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[i] = -1; } if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } else if (!(config & TEST_IO_DIFFERENT_FILE)) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; if (H5Sclose(vspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[1] = -1; /* @@ -9826,25 +9870,25 @@ test_printf(unsigned config, hid_t fapl) */ /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspaces */ dims[0] = 10; dims[1] = 10; if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspace (1 dimensional) */ dims[0] = 50; if ((srcspace = H5Screate_simple(1, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslab in source space */ count[0] = 25; if (H5Sselect_hyperslab(srcspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs in virtual spaces */ stride[0] = 1; @@ -9854,103 +9898,103 @@ test_printf(unsigned config, hid_t fapl) block[0] = 5; block[1] = 5; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 5; stride[1] = 10; block[1] = 10; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 0; /* Add virtual layout mappings (select ALL in source space for second * mapping) */ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset_a%b", srcspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sselect_all(srcspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset_b%b", srcspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reopen srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create 2 source datasets */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset_a0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset_b0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -9966,12 +10010,12 @@ test_printf(unsigned config, hid_t fapl) block[0] = 5; block[1] = 5; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED count[0] = 25; if (H5Sselect_hyperslab(srcspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, srcspace, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 5; i++) @@ -9986,11 +10030,11 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[1] */ block[1] = 10; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sselect_all(srcspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, srcspace, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 5; i++) @@ -10000,15 +10044,15 @@ test_printf(unsigned config, hid_t fapl) /* Close srcdsets and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -10016,40 +10060,40 @@ test_printf(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -10057,63 +10101,63 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions. Make sure that the 4th slice is no longer * visible due to the change to H5D_VDS_FIRST_MISSING. */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 5) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -10121,32 +10165,32 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcfile if config option specified */ if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create 3rd source dataset */ if ((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset_a1", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -10156,11 +10200,11 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[2] */ block[1] = 5; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sselect_hyperslab(srcspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, srcspace, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 5; i++) @@ -10170,12 +10214,12 @@ test_printf(unsigned config, hid_t fapl) /* Close srcdset[2] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[2]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[2] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -10183,40 +10227,40 @@ test_printf(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -10224,62 +10268,62 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file * as well if config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions. There should be no change. */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -10287,32 +10331,32 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcfile if config option specified */ if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) - if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create 4th source dataset */ if ((srcdset[3] = H5Dcreate2(srcfile[0], "src_dset_a2", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -10321,9 +10365,9 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[3] */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[3], H5T_NATIVE_INT, memspace, srcspace, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 5; i++) @@ -10333,12 +10377,12 @@ test_printf(unsigned config, hid_t fapl) /* Close srcdset[3] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[3]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[3] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -10346,40 +10390,40 @@ test_printf(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 15) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -10387,36 +10431,36 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Now test reopening virtual dataset without calling H5Dget_space, if * REOPEN_VIRT flag set */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -10424,28 +10468,28 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Now try setting extent manually */ /* Shrink to 12 */ dims[1] = 12; if (H5Dset_extent(vdset, dims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -10453,27 +10497,27 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Shrink to 10 */ dims[1] = 12; if (H5Dset_extent(vdset, dims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -10481,63 +10525,63 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } } /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -10545,36 +10589,36 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Now test reopening virtual dataset without calling H5Dget_space, if * REOPEN_VIRT flag set */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -10582,28 +10626,28 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Now try setting extent manually */ /* Grow to 12 */ dims[1] = 12; if (H5Dset_extent(vdset, dims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -10611,27 +10655,27 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Grow to 15 */ dims[1] = 15; if (H5Dset_extent(vdset, dims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -10639,58 +10683,58 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } } /* Reset dapl */ if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close */ if (!(config & TEST_IO_CLOSE_SRC)) { for (i = 0; i < 4; i++) { if (H5Dclose(srcdset[i]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[i] = -1; } if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } else if (!(config & TEST_IO_DIFFERENT_FILE)) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; if (H5Sclose(vspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[1] = -1; /* @@ -10699,16 +10743,16 @@ test_printf(unsigned config, hid_t fapl) */ /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual dataspaces */ if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create source dataspace */ dims[1] = 1; if ((srcspace = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Select hyperslabs in virtual space */ stride[0] = 1; @@ -10718,88 +10762,88 @@ test_printf(unsigned config, hid_t fapl) block[0] = 10; block[1] = 1; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Add virtual layout mapping */ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_map : ".", "src_dset%b", srcspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile[0] = vfile; if (H5Iinc_ref(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reopen srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create 1 source dataset */ if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -10813,9 +10857,9 @@ test_printf(unsigned config, hid_t fapl) /* Write to srcdset[0] */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 10; i++) @@ -10824,12 +10868,12 @@ test_printf(unsigned config, hid_t fapl) /* Close srcdset[0] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } } @@ -10837,40 +10881,40 @@ test_printf(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 1) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -10878,62 +10922,62 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Close VDS and reopen with printf gap set to 127, reopen file as well if * config option specified */ if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual_printf_gap(dapl, (hsize_t)127) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (config & TEST_IO_REOPEN_VIRT) { if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED } if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 1) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 20) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -10941,63 +10985,63 @@ test_printf(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reset dapl */ if (H5Pset_virtual_printf_gap(dapl, (hsize_t)0) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close */ if (!(config & TEST_IO_CLOSE_SRC)) { if (H5Dclose(srcdset[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[0] = -1; if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } else if (!(config & TEST_IO_DIFFERENT_FILE)) { if (H5Fclose(srcfile[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile[0] = -1; } if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; if (H5Sclose(srcspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace = -1; if (H5Sclose(vspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[0] = -1; /* Close */ if (H5Pclose(dcpl) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED dcpl = -1; if (H5Pclose(dapl) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED dapl = -1; if (H5Sclose(memspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED memspace = -1; HDfree(srcfilename); @@ -11009,7 +11053,7 @@ test_printf(unsigned config, hid_t fapl) HDfree(srcfilenamepct); HDfree(srcfilenamepct_map); - PASSED(); + PASSED_SUPPRESSED(); return 0; error: @@ -11054,7 +11098,7 @@ error: *------------------------------------------------------------------------- */ static int -test_all(unsigned config, hid_t fapl) +test_all(unsigned config, hid_t vds_fapl, hid_t src_fapl) { char vfilename[FILENAME_BUF_SIZE]; char srcfilename[FILENAME_BUF_SIZE]; @@ -11083,52 +11127,52 @@ test_all(unsigned config, hid_t fapl) int fill = -1; /* Fill value */ int i, j; - TESTING("virtual dataset I/O with mixed selection types") + TESTING_2_SUPPRESSED("virtual dataset I/O with mixed selection types") - h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename); - h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename); - h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, sizeof srcfilename_map); + h5_fixname(FILENAME[0], vds_fapl, vfilename, sizeof vfilename); + h5_fixname(FILENAME[2], src_fapl, srcfilename, sizeof srcfilename); + h5_fixname_printf(FILENAME[2], src_fapl, srcfilename_map, sizeof srcfilename_map); /* Create DCPLs */ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcdcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Set fill value */ if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Set chunk dimensions */ if (H5Pset_chunk(srcdcpl, 2, cdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create memory space */ if ((memspace = H5Screate_simple(2, mdims, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create fixed mapping */ if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 3; start[1] = 3; count[0] = 3; count[1] = 3; if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcspace[0] = H5Screate_simple(2, count, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset_fixed", srcspace[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create unlimited mapping */ if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 3; start[1] = 0; count[0] = 1; @@ -11136,21 +11180,21 @@ test_all(unsigned config, hid_t fapl) block[0] = H5S_UNLIMITED; block[1] = 3; if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED dims[0] = 0; dims[1] = 3; if ((srcspace[1] = H5Screate_simple(2, dims, block)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 0; if (H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset_unlim", srcspace[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create printf mapping */ if ((vspace[2] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 0; start[1] = 2; stride[0] = 1; @@ -11160,93 +11204,93 @@ test_all(unsigned config, hid_t fapl) block[0] = 3; block[1] = 2; if (H5Sselect_hyperslab(vspace[2], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((srcspace[2] = H5Screate_simple(2, block, NULL)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Pset_virtual(dcpl, vspace[2], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset_printf_%b", srcspace[2]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create virtual file */ - if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create source file if requested */ if (config & TEST_IO_DIFFERENT_FILE) { - if ((srcfile = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + if ((srcfile = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED } else { srcfile = vfile; if (H5Iinc_ref(srcfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Create virtual dataset */ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile = -1; } /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 6) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 6) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Reopen srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create fixed source dataset */ if ((srcdset[0] = H5Dcreate2(srcfile, "src_dset_fixed", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Create unlimited source_dataset */ if ((srcdset[1] = H5Dcreate2(srcfile, "src_dset_unlim", H5T_NATIVE_INT, srcspace[1], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Populate write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -11264,9 +11308,9 @@ test_all(unsigned config, hid_t fapl) block[0] = 3; block[1] = 3; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 3; i++) @@ -11277,13 +11321,13 @@ test_all(unsigned config, hid_t fapl) if (config & TEST_IO_CLOSE_SRC) { for (i = 0; i < 2; i++) { if (H5Dclose(srcdset[i]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[i] = -1; } if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile = -1; } } @@ -11291,40 +11335,40 @@ test_all(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 6) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 6) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -11334,37 +11378,37 @@ test_all(unsigned config, hid_t fapl) start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if ((i >= (int)dims[0]) || (j >= (int)dims[1])) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcdset[1] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dopen2(srcfile, "src_dset_unlim", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Extend srcdset[1] */ dims[0] = 2; dims[1] = 3; if (H5Dset_extent(srcdset[1], dims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -11375,9 +11419,9 @@ test_all(unsigned config, hid_t fapl) start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 2; i++) @@ -11387,11 +11431,11 @@ test_all(unsigned config, hid_t fapl) /* Close srcdset[1] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile = -1; } } @@ -11399,40 +11443,40 @@ test_all(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 6) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 6) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -11442,32 +11486,32 @@ test_all(unsigned config, hid_t fapl) start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if ((i >= (int)dims[0]) || (j >= (int)dims[1])) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcfile if config option specified */ if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) - if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create first printf source dataset */ if ((srcdset[2] = H5Dcreate2(srcfile, "src_dset_printf_0", H5T_NATIVE_INT, srcspace[2], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -11480,9 +11524,9 @@ test_all(unsigned config, hid_t fapl) block[0] = 3; block[1] = 2; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 3; i++) @@ -11492,11 +11536,11 @@ test_all(unsigned config, hid_t fapl) /* Close srcdset[2] srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[2]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[2] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile = -1; } } @@ -11504,40 +11548,40 @@ test_all(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 6) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 6) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -11547,37 +11591,37 @@ test_all(unsigned config, hid_t fapl) start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if ((i >= (int)dims[0]) || (j >= (int)dims[1])) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcdset[1] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dopen2(srcfile, "src_dset_unlim", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Extend srcdset[1] */ dims[0] = 3; dims[1] = 3; if (H5Dset_extent(srcdset[1], dims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -11590,17 +11634,17 @@ test_all(unsigned config, hid_t fapl) block[0] = 1; block[1] = 3; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((filespace = H5Dget_space(srcdset[1])) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 2; start[1] = 0; if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 3; i++) @@ -11609,11 +11653,11 @@ test_all(unsigned config, hid_t fapl) /* Close srcdset[1] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile = -1; } } @@ -11621,40 +11665,40 @@ test_all(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 6) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 6) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -11664,32 +11708,32 @@ test_all(unsigned config, hid_t fapl) start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if ((i >= (int)dims[0]) || (j >= (int)dims[1])) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcfile if config option specified */ if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) - if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create second printf source dataset, this time without using srcdcpl */ if ((srcdset[3] = H5Dcreate2(srcfile, "src_dset_printf_1", H5T_NATIVE_INT, srcspace[2], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -11702,9 +11746,9 @@ test_all(unsigned config, hid_t fapl) block[0] = 3; block[1] = 2; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[3], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 3; i++) @@ -11714,11 +11758,11 @@ test_all(unsigned config, hid_t fapl) /* Close srcdset[3] srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[3]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[3] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile = -1; } } @@ -11726,40 +11770,40 @@ test_all(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 6) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 7) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -11769,37 +11813,37 @@ test_all(unsigned config, hid_t fapl) start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if ((i >= (int)dims[0]) || (j >= (int)dims[1])) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcdset[1] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (config & TEST_IO_DIFFERENT_FILE) - if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((srcdset[1] = H5Dopen2(srcfile, "src_dset_unlim", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Extend srcdset[1] */ dims[0] = 7; dims[1] = 3; if (H5Dset_extent(srcdset[1], dims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -11812,17 +11856,17 @@ test_all(unsigned config, hid_t fapl) block[0] = 4; block[1] = 3; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if ((filespace = H5Dget_space(srcdset[1])) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED start[0] = 3; start[1] = 0; if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 4; i++) @@ -11832,11 +11876,11 @@ test_all(unsigned config, hid_t fapl) /* Close srcdset[1] and srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[1]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[1] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile = -1; } } @@ -11844,40 +11888,40 @@ test_all(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 7) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -11887,32 +11931,32 @@ test_all(unsigned config, hid_t fapl) start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) { if (j >= (int)dims[1]) { if (rbuf[i][j] != 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } else if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Reopen srcfile if config option specified */ if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) - if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0) + TEST_ERROR_SUPPRESSED /* Create third printf source dataset */ if ((srcdset[4] = H5Dcreate2(srcfile, "src_dset_printf_2", H5T_NATIVE_INT, srcspace[2], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Adjust write buffer */ for (i = 0; i < (int)mdims[0]; i++) @@ -11925,9 +11969,9 @@ test_all(unsigned config, hid_t fapl) block[0] = 3; block[1] = 2; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Dwrite(srcdset[4], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Update erbuf */ for (i = 0; i < 3; i++) @@ -11937,11 +11981,11 @@ test_all(unsigned config, hid_t fapl) /* Close srcdset[4] srcfile if config option specified */ if (config & TEST_IO_CLOSE_SRC) { if (H5Dclose(srcdset[4]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[4] = -1; if (config & TEST_IO_DIFFERENT_FILE) { if (H5Fclose(srcfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile = -1; } } @@ -11949,40 +11993,40 @@ test_all(unsigned config, hid_t fapl) /* Reopen virtual dataset and file if config option specified */ if (config & TEST_IO_REOPEN_VIRT) { if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; - if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0) + TEST_ERROR_SUPPRESSED if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED } /* Get VDS space */ if ((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Get VDS space dimensions */ if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (ndims != 2) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (dims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[0] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED if (mdims[1] != 10) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close filespace */ if (H5Sclose(filespace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data through virtual dataset */ /* Reset rbuf */ @@ -11992,61 +12036,61 @@ test_all(unsigned config, hid_t fapl) start[0] = 0; start[1] = 0; if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Read data */ if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Verify read data */ for (i = 0; i < (int)mdims[0]; i++) for (j = 0; j < (int)mdims[1]; j++) if (rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + TEST_ERROR_SUPPRESSED /* Close */ if (!(config & TEST_IO_CLOSE_SRC)) { for (i = 0; i < 5; i++) { if (H5Dclose(srcdset[i]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdset[i] = -1; } if (H5Fclose(srcfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile = -1; } else if (!(config & TEST_IO_DIFFERENT_FILE)) { if (H5Fclose(srcfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcfile = -1; } if (H5Dclose(vdset) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vdset = -1; if (H5Fclose(vfile) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vfile = -1; for (i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++) { if (H5Sclose(srcspace[i]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcspace[i] = -1; } for (i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) { if (H5Sclose(vspace[i]) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED vspace[i] = -1; } if (H5Pclose(dcpl) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED dcpl = -1; if (H5Pclose(srcdcpl) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED srcdcpl = -1; if (H5Sclose(memspace) < 0) - TEST_ERROR + TEST_ERROR_SUPPRESSED memspace = -1; - PASSED(); + PASSED_SUPPRESSED(); return 0; error: @@ -12101,7 +12145,7 @@ test_dapl_values(hid_t fapl_id) hsize_t gap_size; /* gap size from dapl */ char filename[1024]; /* file names */ - TESTING("H5Dget_access_plist() returns dapl w/ correct values"); + TESTING_2("H5Dget_access_plist() returns dapl w/ correct values"); /* Create the file */ h5_fixname(FILENAME[5], fapl_id, filename, sizeof(filename)); @@ -12240,7 +12284,8 @@ main(void) { char filename[FILENAME_BUF_SIZE]; hid_t fapl; - hid_t my_fapl = -1; /* File access property list */ + hid_t vds_fapl = -1; /* File access property list */ + hid_t src_fapl = -1; /* File access property list */ int test_api_config; unsigned bit_config; H5F_libver_t low, high; /* Low and high bounds */ @@ -12252,16 +12297,21 @@ main(void) h5_fixname(FILENAME[0], fapl, filename, sizeof(filename)); - /* Set to use the latest file format */ - if ((my_fapl = H5Pcopy(fapl)) < 0) + /* Create FAPLs for VDS and source files */ + if ((vds_fapl = H5Pcopy(fapl)) < 0) + TEST_ERROR + if ((src_fapl = H5Pcopy(fapl)) < 0) TEST_ERROR /* Loop through all the combinations of low/high version bounds */ for (low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) { for (high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) { - char msg[80]; /* Message for file version bounds */ + char msg[128]; /* Message for file version bounds */ const char *low_string; /* The low bound string */ const char *high_string; /* The high bound string */ +#ifndef VDS_TEST_VERBOSE + int tmp_nerrors; +#endif /* VDS_TEST_VERBOSE */ /* Invalid combinations, just continue */ if (high == H5F_LIBVER_EARLIEST || high < low) @@ -12272,39 +12322,83 @@ main(void) continue; /* Set the low/high version bounds */ - if (H5Pset_libver_bounds(my_fapl, low, high) < 0) + if (H5Pset_libver_bounds(vds_fapl, low, high) < 0) + TEST_ERROR + if (H5Pset_libver_bounds(src_fapl, low, high) < 0) TEST_ERROR /* Display testing info */ low_string = h5_get_version_string(low); high_string = h5_get_version_string(high); - HDsprintf(msg, "Testing virtual dataset with file version bounds: (%s, %s):", low_string, - high_string); + HDsnprintf(msg, sizeof(msg), + "Testing virtual dataset I/O with file version bounds: (%s, %s):", low_string, + high_string); HDputs(msg); for (test_api_config = (int)TEST_API_BASIC; test_api_config < (int)TEST_API_NTESTS; test_api_config++) - nerrors += test_api((test_api_config_t)test_api_config, my_fapl, low); + nerrors += test_api((test_api_config_t)test_api_config, vds_fapl, low); + + TESTING_2("Virtual dataset I/O") +#ifdef VDS_TEST_VERBOSE + HDputs(""); +#else /* VDS_TEST_VERBOSE */ + tmp_nerrors = nerrors; +#endif /* VDS_TEST_VERBOSE */ + for (bit_config = 0; bit_config < TEST_IO_NTESTS; bit_config++) { - HDprintf("Config: %s%s%s\n", bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "", - bit_config & TEST_IO_DIFFERENT_FILE ? "different source file" : "same source file", - bit_config & TEST_IO_REOPEN_VIRT ? ", reopen virtual file" : ""); - nerrors += test_basic_io(bit_config, my_fapl); - nerrors += test_vds_prefix_first(bit_config, my_fapl); - nerrors += test_unlim(bit_config, my_fapl); - nerrors += test_printf(bit_config, my_fapl); - nerrors += test_all(bit_config, my_fapl); + /* Skip invalid configurations */ + if ((bit_config & TEST_IO_FCLOSE_SEMI) && (bit_config & TEST_IO_FCLOSE_STRONG)) + continue; + + /* Print message */ + PRINT_CONFIG( + "%s%s%s, %s file close degree", + bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "", + bit_config & TEST_IO_DIFFERENT_FILE ? "different source file" : "same source file", + bit_config & TEST_IO_REOPEN_VIRT ? ", reopen virtual file" : "", + bit_config & TEST_IO_FCLOSE_SEMI + ? "H5F_CLOSE_SEMI" + : (bit_config & TEST_IO_FCLOSE_STRONG ? "H5F_CLOSE_STRONG" : "H5F_CLOSE_WEAK")); + + /* Set file close degree */ + if (bit_config & TEST_IO_FCLOSE_SEMI) { + if (H5Pset_fclose_degree(vds_fapl, H5F_CLOSE_SEMI) < 0) + TEST_ERROR + } + else if (bit_config & TEST_IO_FCLOSE_STRONG) { + if (H5Pset_fclose_degree(vds_fapl, H5F_CLOSE_STRONG) < 0) + TEST_ERROR + } + else { + if (H5Pset_fclose_degree(vds_fapl, H5F_CLOSE_WEAK) < 0) + TEST_ERROR + } + + /* Run tests */ + nerrors += test_basic_io(bit_config, vds_fapl, src_fapl); + nerrors += test_vds_prefix_first(bit_config, vds_fapl, src_fapl); + nerrors += test_unlim(bit_config, vds_fapl, src_fapl); + nerrors += test_printf(bit_config, vds_fapl, src_fapl); + nerrors += test_all(bit_config, vds_fapl, src_fapl); } - nerrors += test_dapl_values(my_fapl); +#ifndef VDS_TEST_VERBOSE + if (tmp_nerrors == nerrors) + PASSED(); +#endif /* VDS_TEST_VERBOSE */ + + nerrors += test_dapl_values(vds_fapl); /* Verify symbol table messages are cached */ - nerrors += (h5_verify_cached_stabs(FILENAME, my_fapl) < 0 ? 1 : 0); + nerrors += (h5_verify_cached_stabs(FILENAME, vds_fapl) < 0 ? 1 : 0); } /* end for high */ } /* end for low */ - if (H5Pclose(my_fapl) < 0) + if (H5Pclose(vds_fapl) < 0) + TEST_ERROR + if (H5Pclose(src_fapl) < 0) TEST_ERROR if (nerrors) diff --git a/test/vfd_swmr_check_compat.c b/test/vfd_swmr_check_compat.c new file mode 100644 index 0000000..dec88c5 --- /dev/null +++ b/test/vfd_swmr_check_compat.c @@ -0,0 +1,62 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://www.hdfgroup.org/licenses. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* Purpose: This is a small program that checks if the HDF5_DRIVER + * environment variable is set to a value that supports VFD SWMR. + * + * Also checks to see if this is a parallel build, as VFD SWMR + * and parallel HDF5 are fundamentally incompatible due to the + * page buffer changes. + * + * It is intended for use in shell scripts. + */ + +#include "h5test.h" + +/* This file needs to access the file driver testing code */ +#define H5FD_FRIEND /*suppress error about including H5FDpkg */ +#define H5FD_TESTING +#include "H5FDpkg.h" /* File drivers */ + +/*------------------------------------------------------------------------- + * Function: main + * + * Purpose: Inspects the HDF5_DRIVER environment variable, which + * determines the VFD that the test harness will use with + * the majority of the tests. + * + * Return: VFD supports SWMR: EXIT_SUCCESS + * + * VFD does not support SWMR + * or failure: EXIT_FAILURE + * + *------------------------------------------------------------------------- + */ +int +main(void) +{ +#ifdef H5_HAVE_PARALLEL + return EXIT_FAILURE; +#else + char *driver = NULL; + + driver = HDgetenv("HDF5_DRIVER"); + + /* Currently using SWMR support as a proxy for VFD SWMR support */ + if (H5FD__supports_swmr_test(driver)) + return EXIT_SUCCESS; + else + return EXIT_FAILURE; +#endif + +} /* end main() */ @@ -18,6 +18,7 @@ * other mechanisms. */ +/* Headers needed */ #include "h5test.h" /* Filename */ @@ -41,9 +42,10 @@ const char *FILENAME[] = {"native_vol_test", NULL}; * functionality. */ static const H5VL_class_t fake_vol_g = { - 0, /* version */ + H5VL_VERSION, /* VOL class struct version */ FAKE_VOL_VALUE, /* value */ FAKE_VOL_NAME, /* name */ + 0, /* connector version */ 0, /* capability flags */ NULL, /* initialize */ NULL, /* terminate */ @@ -90,7 +92,7 @@ static const H5VL_class_t fake_vol_g = { /* datatype_cls */ NULL, /* commit */ NULL, /* open */ - NULL, /* get_size */ + NULL, /* get */ NULL, /* specific */ NULL, /* optional */ NULL /* close */ @@ -173,13 +175,14 @@ static const H5VL_class_t fake_vol_g = { static herr_t test_vol_registration(void) { - hid_t native_id = H5I_INVALID_HID; - hid_t lapl_id = H5I_INVALID_HID; - hid_t vipl_id = H5I_INVALID_HID; - herr_t ret = SUCCEED; - htri_t is_registered = FAIL; - hid_t vol_id = H5I_INVALID_HID; - hid_t vol_id2 = H5I_INVALID_HID; + hid_t native_id = H5I_INVALID_HID; + hid_t lapl_id = H5I_INVALID_HID; + hid_t vipl_id = H5I_INVALID_HID; + herr_t ret = SUCCEED; + htri_t is_registered = FAIL; + hid_t vol_id = H5I_INVALID_HID; + hid_t vol_id2 = H5I_INVALID_HID; + H5VL_class_t *bad_fake_vol_class = NULL; TESTING("VOL registration"); @@ -206,6 +209,21 @@ test_vol_registration(void) if (H5Pclose(lapl_id) < 0) TEST_ERROR; + /* Test registering a VOL connector with an incompatible version # */ + if (NULL == (bad_fake_vol_class = HDmalloc(sizeof(H5VL_class_t)))) + TEST_ERROR; + HDmemcpy(bad_fake_vol_class, &fake_vol_g, sizeof(H5VL_class_t)); + bad_fake_vol_class->version = H5VL_VERSION + 1; + H5E_BEGIN_TRY + { + vol_id = H5VLregister_connector(bad_fake_vol_class, H5P_DEFAULT); + } + H5E_END_TRY; + if (H5I_INVALID_HID != vol_id) + FAIL_PUTS_ERROR("should not be able to register a connector with an incompatible version #"); + HDfree(bad_fake_vol_class); + bad_fake_vol_class = NULL; + /* Load a VOL interface * The vipl_id does nothing without a VOL that needs it, but we do need to * test creating a property list of that class and passing it along as a @@ -282,6 +300,10 @@ error: H5Pclose(vipl_id); } H5E_END_TRY; + + if (bad_fake_vol_class) + HDfree(bad_fake_vol_class); + return FAIL; } /* end test_vol_registration() */ |