summaryrefslogtreecommitdiffstats
path: root/test/links.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2021-10-14 11:56:28 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2021-10-14 11:56:28 (GMT)
commit03a42d466557f7e1f483d62eb1b1b9f91babb09f (patch)
tree47d839c87a561505897faf495126bca2e0a13341 /test/links.c
parentcd40809dde88ecb7cd97825e3522da928b3a1b03 (diff)
parent780dc11e6eb23d58b9418c46d829372e89ee0237 (diff)
downloadhdf5-03a42d466557f7e1f483d62eb1b1b9f91babb09f.zip
hdf5-03a42d466557f7e1f483d62eb1b1b9f91babb09f.tar.gz
hdf5-03a42d466557f7e1f483d62eb1b1b9f91babb09f.tar.bz2
Merge remote-tracking branch 'canonical/develop' into hpcio/post_open_fix
Diffstat (limited to 'test/links.c')
-rw-r--r--test/links.c38
1 files changed, 28 insertions, 10 deletions
diff --git a/test/links.c b/test/links.c
index d151e80..5c05968 100644
--- a/test/links.c
+++ b/test/links.c
@@ -9897,7 +9897,7 @@ external_set_elink_cb(hid_t fapl, hbool_t new_format)
would report FALSE, causing problems */
base_driver = H5Pget_driver(fapl);
op_data.base_fapl = (base_driver == H5FD_FAMILY || base_driver == H5FD_MULTI ||
- base_driver == H5FD_MPIO || base_driver == H5FD_CORE)
+ base_driver == H5FD_MPIO || base_driver == H5FD_CORE || base_driver == H5FD_DIRECT)
? H5P_DEFAULT
: fapl;
op_data.fam_size = ELINK_CB_FAM_SIZE;
@@ -10071,8 +10071,11 @@ external_reset_register(void)
if (H5Fclose(file) < 0)
TEST_ERROR
- if (HDremove(filename) != 0)
- TEST_ERROR
+ H5E_BEGIN_TRY
+ {
+ H5Fdelete(filename, H5P_DEFAULT);
+ }
+ H5E_END_TRY;
PASSED();
return SUCCEED;
@@ -16629,11 +16632,14 @@ link_filters(hid_t fapl, hbool_t new_format)
/* Close file, get file size */
if (H5Fclose(fid) < 0)
TEST_ERROR
- filesize_filtered = h5_get_file_size(filename, fapl);
- /* Check that the file size is smaller with the filter */
- if ((double)filesize_filtered > ((double)filesize_unfiltered * FILTER_FILESIZE_MAX_FRACTION))
- TEST_ERROR
+ if (h5_using_default_driver(NULL)) {
+ filesize_filtered = h5_get_file_size(filename, fapl);
+
+ /* Check that the file size is smaller with the filter */
+ if ((double)filesize_filtered > ((double)filesize_unfiltered * FILTER_FILESIZE_MAX_FRACTION))
+ TEST_ERROR
+ }
/* Close */
if (H5Pclose(fcpl) < 0)
@@ -22574,8 +22580,9 @@ main(void)
unsigned minimize_dset_oh;
unsigned efc; /* Whether to use the external file cache */
const char *env_h5_drvr; /* File Driver value from environment */
+ hbool_t driver_uses_modified_filename = h5_driver_uses_modified_filename();
- env_h5_drvr = HDgetenv("HDF5_DRIVER");
+ env_h5_drvr = HDgetenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -22651,6 +22658,9 @@ main(void)
if (!is_native) {
HDputs(" External link tests skipped - not using native VOL connector");
}
+ else if (HDstrcmp(env_h5_drvr, "splitter") == 0) {
+ HDputs(" External link tests skipped - splitter VFD does not currently support external links");
+ }
else {
/* tests for external link */
/* Test external file cache first, so it sees the default efc setting on the fapl
@@ -22702,7 +22712,11 @@ main(void)
#ifndef H5_NO_DEPRECATED_SYMBOLS
nerrors += external_link_closing_deprec(my_fapl, new_format) < 0 ? 1 : 0;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
- nerrors += external_link_endian(new_format) < 0 ? 1 : 0;
+
+ if (!driver_uses_modified_filename) {
+ nerrors += external_link_endian(new_format) < 0 ? 1 : 0;
+ }
+
nerrors += external_link_strong(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_link_prefix(my_fapl, new_format) < 0 ? 1 : 0;
@@ -22713,7 +22727,11 @@ main(void)
nerrors += external_link_abstar_cur(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_link_reltar(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_link_chdir(my_fapl, new_format) < 0 ? 1 : 0;
- nerrors += external_set_elink_fapl1(my_fapl, new_format) < 0 ? 1 : 0;
+
+ if (!driver_uses_modified_filename) {
+ nerrors += external_set_elink_fapl1(my_fapl, new_format) < 0 ? 1 : 0;
+ }
+
nerrors += external_set_elink_fapl2(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_set_elink_fapl3(new_format) < 0 ? 1 : 0;
nerrors += external_set_elink_cb(my_fapl, new_format) < 0 ? 1 : 0;