summaryrefslogtreecommitdiffstats
path: root/test/h5test.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2019-04-26 19:10:54 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2019-04-26 19:10:54 (GMT)
commite66bf948a7acba0ddc76239f6d02f17c8b10eb0f (patch)
treed3edd6259fe0228fedcd576356c51c00f494bb76 /test/h5test.c
parent568c3624de786dd3240fbddea4f5035febe6ee01 (diff)
downloadhdf5-e66bf948a7acba0ddc76239f6d02f17c8b10eb0f.zip
hdf5-e66bf948a7acba0ddc76239f6d02f17c8b10eb0f.tar.gz
hdf5-e66bf948a7acba0ddc76239f6d02f17c8b10eb0f.tar.bz2
Fix for split VFD and file cleanup when testing H5Fis_hdf5
and H5Fis_accessible in tfile.c.
Diffstat (limited to 'test/h5test.c')
-rw-r--r--test/h5test.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/test/h5test.c b/test/h5test.c
index 3b17c72..dba8cf7 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -574,6 +574,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix,
char *fullname, size_t size, hbool_t nest_printf, hbool_t subst_for_superblock)
{
const char *prefix = NULL;
+ const char *env = NULL; /* HDF5_DRIVER environment variable */
char *ptr, last = '\0';
const char *suffix = _suffix;
size_t i, j;
@@ -598,10 +599,31 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix,
suffix = nest_printf ? "%%05d.h5" : "%05d.h5";
}
else if (H5FD_MULTI == driver) {
- if(subst_for_superblock)
- suffix = "-s.h5";
- else
- suffix = NULL;
+
+ /* Get the environment variable, if it exists, in case
+ * we are using the split driver since both of those
+ * use the multi VFD under the hood.
+ */
+ env = HDgetenv("HDF5_DRIVER");
+#ifdef HDF5_DRIVER
+ /* Use the environment variable, then the compile-time constant */
+ if(!env)
+ env = HDF5_DRIVER;
+#endif
+ if(!HDstrcmp(env, "split")) {
+ /* split VFD */
+ if(subst_for_superblock)
+ suffix = "-m.h5";
+ else
+ suffix = NULL;
+ }
+ else {
+ /* multi VFD */
+ if(subst_for_superblock)
+ suffix = "-s.h5";
+ else
+ suffix = NULL;
+ }
}
}
}