diff options
author | jhendersonHDF <jhenderson@hdfgroup.org> | 2023-11-13 19:49:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-13 19:49:38 (GMT) |
commit | 28d2b6771f41396f1e243e00cb9dd57c4c891613 (patch) | |
tree | 238e77e247ac6b688d0eea0a6f81df95e47448dc /test/tarray.c | |
parent | 8b3ffdef3099d2699ec71a5f855966132b3d3c25 (diff) | |
download | hdf5-28d2b6771f41396f1e243e00cb9dd57c4c891613.zip hdf5-28d2b6771f41396f1e243e00cb9dd57c4c891613.tar.gz hdf5-28d2b6771f41396f1e243e00cb9dd57c4c891613.tar.bz2 |
HDF5 API test updates (#3835)
* HDF5 API test updates
Removed test duplication from bringing API tests
back into the library from external VOL tests
repo
Synced changes between API tests and library's
tests
Updated API tests CMake code to directly use and
install testhdf5, testphdf5, etc. instead of
creating duplicate binaries
Added new h5_using_native_vol() test function to
determine whether the VOL connector being used
is (or the VOL connector stack being used resolves
to) the native VOL connector
* Remove duplicate variable
Diffstat (limited to 'test/tarray.c')
-rw-r--r-- | test/tarray.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/test/tarray.c b/test/tarray.c index 494b65c..09f300d 100644 --- a/test/tarray.c +++ b/test/tarray.c @@ -1918,6 +1918,7 @@ test_compat(void) size_t off; /* Offset of compound field */ hid_t mtid; /* Datatype ID for field */ int i; /* Index variables */ + bool vol_is_native; bool driver_is_default_compatible; herr_t ret; /* Generic return value */ @@ -1934,17 +1935,26 @@ test_compat(void) * the tarrold.h5 file. */ - if (h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible) < 0) - TestErrPrintf("can't check if VFD is default VFD compatible\n"); - if (!driver_is_default_compatible) { - printf(" -- SKIPPED --\n"); - return; - } - /* Open the testfile */ fid1 = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT); CHECK_I(fid1, "H5Fopen"); + /* Check if native VOL is being used */ + CHECK(h5_using_native_vol(H5P_DEFAULT, fid1, &vol_is_native), FAIL, "h5_using_native_vol"); + if (!vol_is_native) { + CHECK(H5Fclose(fid1), FAIL, "H5Fclose"); + MESSAGE(5, (" -- SKIPPED --\n")); + return; + } + /* Check if VFD used is native file format compatible */ + CHECK(h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible), FAIL, + "h5_driver_is_default_vfd_compatible"); + if (!driver_is_default_compatible) { + CHECK(H5Fclose(fid1), FAIL, "H5Fclose"); + MESSAGE(5, (" -- SKIPPED --\n")); + return; + } + /* Only try to proceed if the file is around */ if (fid1 >= 0) { /* Open the first dataset (with no array fields) */ |