diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2019-01-08 01:19:09 (GMT) |
---|---|---|
committer | Larry Knox <lrknox@hdfgroup.org> | 2019-01-08 01:19:09 (GMT) |
commit | 91ec0f52764d43f77097987414391bbd5cecfa45 (patch) | |
tree | 8604b25f568a29f96f9491e46f6559dc17adac07 | |
parent | 98b2d7d8bb01bc72751a75631c405cd130df26d5 (diff) | |
parent | 00f835f6403728c3caf298636522e526996010a2 (diff) | |
download | hdf5-91ec0f52764d43f77097987414391bbd5cecfa45.zip hdf5-91ec0f52764d43f77097987414391bbd5cecfa45.tar.gz hdf5-91ec0f52764d43f77097987414391bbd5cecfa45.tar.bz2 |
Merge pull request #1449 in HDFFV/hdf5 from ~JAKE.SMITH/hdf5:dset_ohdr_minimize_110 to hdf5_1_10
* commit '00f835f6403728c3caf298636522e526996010a2':
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).
-rw-r--r-- | test/dsets.c | 10 | ||||
-rw-r--r-- | test/ohdr.c | 18 |
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); |