summaryrefslogtreecommitdiffstats
path: root/test/vfd.c
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2021-09-29 18:28:12 (GMT)
committerGitHub <noreply@github.com>2021-09-29 18:28:12 (GMT)
commit3da0802c40d58759995916bf9d0880e19f0af44d (patch)
tree809ada78cec1cbaaf6ec2ace5b4429a56d0f6574 /test/vfd.c
parent0fa5836cc5f037dd9f2cdd7f9a1051ddcc1c9ad0 (diff)
downloadhdf5-3da0802c40d58759995916bf9d0880e19f0af44d.zip
hdf5-3da0802c40d58759995916bf9d0880e19f0af44d.tar.gz
hdf5-3da0802c40d58759995916bf9d0880e19f0af44d.tar.bz2
VFD plugins (#602)
* Implement support for loading of Virtual File Drivers as plugins Fix plugin caching for VOL connector and VFD plugins Fix plugin iteration to skip paths that can't be opened * Enable dynamic loading of VFDs with HDF5_DRIVER environment variable * Temporarily disable error reporting during H5F_open double file open * Default to using HDstat in h5_get_file_size for unknown VFDs * Use macros for some environment variables that HDF5 interprets * Update "null" and "ctl testing" VFDs
Diffstat (limited to 'test/vfd.c')
-rw-r--r--test/vfd.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/test/vfd.c b/test/vfd.c
index 4e9b9ee..ea526b1 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -51,7 +51,7 @@
const char *FILENAME[] = {"sec2_file", /*0*/
"core_file", /*1*/
"family_file", /*2*/
- "new_family_v16_", /*3*/
+ "new_family_v16", /*3*/
"multi_file", /*4*/
"direct_file", /*5*/
"log_file", /*6*/
@@ -68,7 +68,7 @@ const char *FILENAME[] = {"sec2_file", /*0*/
#define LOG_FILENAME "log_vfd_out.log"
-#define COMPAT_BASENAME "family_v16_"
+#define COMPAT_BASENAME "family_v16"
#define MULTI_COMPAT_BASENAME "multi_file_v16"
#define SPLITTER_DATASET_NAME "dataset"
@@ -3488,6 +3488,7 @@ H5FD__ctl_test_vfd_ctl(H5FD_t H5_ATTR_UNUSED *_file, uint64_t op_code, uint64_t
/* Minimal VFD for ctl feature tests */
static const H5FD_class_t H5FD_ctl_test_vfd_g = {
+ (H5FD_class_value_t)201, /* value */
"ctl_test_vfd", /* name */
HADDR_MAX, /* maxaddr */
H5F_CLOSE_SEMI, /* fc_degree */
@@ -3925,7 +3926,18 @@ error:
int
main(void)
{
- int nerrors = 0;
+ char *env_h5_drvr = NULL;
+ int nerrors = 0;
+
+ /* Don't run VFD tests when HDF5_DRIVER is set. These tests expect a
+ * specific VFD to be set and HDF5_DRIVER being set can interfere
+ * with that.
+ */
+ env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ if (env_h5_drvr) {
+ HDprintf(" -- SKIPPED VFD tests because %s is set -- \n", HDF5_DRIVER);
+ HDexit(EXIT_SUCCESS);
+ }
h5_reset();