summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJacob Smith <jake.smith@hdfgroup.org>2019-01-07 22:58:52 (GMT)
committerJacob Smith <jake.smith@hdfgroup.org>2019-01-07 23:04:50 (GMT)
commit00f835f6403728c3caf298636522e526996010a2 (patch)
tree985db51b4881a9a6f7cafd19a84bcadd2c28a02b /test
parentd378fad6ea48956e0315efa7c6bb11d444e55ca0 (diff)
downloadhdf5-00f835f6403728c3caf298636522e526996010a2.zip
hdf5-00f835f6403728c3caf298636522e526996010a2.tar.gz
hdf5-00f835f6403728c3caf298636522e526996010a2.tar.bz2
Fix fapl passed into h5_fixname() calls in minimized tests.
Fix creation of duplicate, unclosed FAPL. Fix wrong statement-string after TEST_ERROR macro (refactoring mistake).
Diffstat (limited to 'test')
-rw-r--r--test/dsets.c10
-rw-r--r--test/ohdr.c18
2 files changed, 14 insertions, 14 deletions
diff --git a/test/dsets.c b/test/dsets.c
index 2634632..9562ec9 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -13059,7 +13059,7 @@ test_versionbounds(void)
*-----------------------------------------------------------------------------
*/
static herr_t
-test_object_header_minimization_dcpl(void)
+test_object_header_minimization_dcpl(hid_t fapl_id)
{
hid_t dcpl_id = -1;
hid_t file_id = -1;
@@ -13073,10 +13073,10 @@ test_object_header_minimization_dcpl(void)
/* SETUP */
/*********/
- if(NULL == h5_fixname(OHMIN_FILENAME_A, H5P_DEFAULT, filename, sizeof(filename)))
- TEST_ERROR("unable to prepare filename");
+ if(NULL == h5_fixname(OHMIN_FILENAME_A, fapl_id, filename, sizeof(filename)))
+ TEST_ERROR
- file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
if (file_id == H5I_INVALID_HID)
TEST_ERROR
@@ -13370,7 +13370,7 @@ main(void)
/* Tests version bounds using its own file */
nerrors += (test_versionbounds() < 0 ? 1 : 0);
- nerrors += (test_object_header_minimization_dcpl() < 0 ? 1 : 0);
+ nerrors += (test_object_header_minimization_dcpl(fapl) < 0 ? 1 : 0);
/* Run misc tests */
nerrors += dls_01_main();
diff --git a/test/ohdr.c b/test/ohdr.c
index 318169f..fada430 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -166,7 +166,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
* SETUP *
*********/
- if(h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename)) == NULL)
+ if(h5_fixname(FILENAME[1], fapl_id, filename, sizeof(filename)) == NULL)
TEST_ERROR
dspace_id = H5Screate_simple(1, array_10, NULL);
@@ -397,10 +397,10 @@ test_minimized_dset_ohdr_size_comparisons(hid_t fapl_id)
* SETUP *
*********/
- if(h5_fixname(FILENAME[1], H5P_DEFAULT, filename_a, sizeof(filename_a)) == NULL)
+ if(h5_fixname(FILENAME[1], fapl_id, filename_a, sizeof(filename_a)) == NULL)
TEST_ERROR
- if(h5_fixname(FILENAME[2], H5P_DEFAULT, filename_b, sizeof(filename_b)) == NULL)
+ if(h5_fixname(FILENAME[2], fapl_id, filename_b, sizeof(filename_b)) == NULL)
TEST_ERROR
for (compact = 0; compact < 2; compact++) { /* 0 or 1 */
@@ -560,7 +560,7 @@ test_minimized_dset_ohdr_with_filter(hid_t fapl_id)
* SETUP *
*********/
- if(h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename)) == NULL)
+ if(h5_fixname(FILENAME[1], fapl_id, filename, sizeof(filename)) == NULL)
TEST_ERROR
dcpl_mx_id = H5Pcreate(H5P_DATASET_CREATE);
@@ -699,7 +699,7 @@ test_minimized_dset_ohdr_modification_times(hid_t _fapl_id)
* SETUP *
*********/
- if(h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename)) == NULL)
+ if(h5_fixname(FILENAME[1], _fapl_id, filename, sizeof(filename)) == NULL)
TEST_ERROR
dcpl_mx_id = H5Pcreate(H5P_DATASET_CREATE);
@@ -738,14 +738,14 @@ test_minimized_dset_ohdr_modification_times(hid_t _fapl_id)
* per-case setup *
* -------------- */
- fapl_id = H5Pcopy(_fapl_id);
- if(fapl_id < 0) TEST_ERROR
-
if(cases[i].oh_version > 1) {
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
if(fapl_id < 0) TEST_ERROR
ret = H5Pset_libver_bounds(fapl_id, H5F_LIBVER_V18, H5F_LIBVER_V110);
if(ret < 0) TEST_ERROR
+ } else {
+ fapl_id = H5Pcopy(_fapl_id);
+ if(fapl_id < 0) TEST_ERROR
}
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
@@ -850,7 +850,7 @@ test_minimized_dset_ohdr_fillvalue_backwards_compatability(hid_t _fapl_id)
TESTING("minimized dset object headers with fill values and different libver support");
- if(h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename)) == NULL)
+ if(h5_fixname(FILENAME[1], _fapl_id, filename, sizeof(filename)) == NULL)
TEST_ERROR
dspace_id = H5Screate_simple(1, extents, extents);