summaryrefslogtreecommitdiffstats
path: root/test/app_ref.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/app_ref.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/app_ref.c')
-rw-r--r--test/app_ref.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/test/app_ref.c b/test/app_ref.c
index 09cfb72..2777dc0 100644
--- a/test/app_ref.c
+++ b/test/app_ref.c
@@ -79,11 +79,12 @@ Abrt_Handler(int H5_ATTR_UNUSED sig)
int
main(void)
{
- hid_t ids[T_NUMCLASSES];
- hid_t fapl; /* File Access Property List */
- int ninc;
- int i;
- char filename[1024];
+ const char *env_h5_drvr; /* File Driver value from environment */
+ hid_t ids[T_NUMCLASSES];
+ hid_t fapl; /* File Access Property List */
+ int ninc;
+ int i;
+ char filename[1024];
h5_reset();
h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof filename);
@@ -92,6 +93,19 @@ main(void)
TESTING("library shutdown with reference count > 1");
+ /* Get the VFD to use */
+ env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ if (env_h5_drvr == NULL)
+ env_h5_drvr = "nomatch";
+
+ /* Don't run this test with the multi/split VFD. A bug in library shutdown
+ * ordering causes problems with the multi VFD when IDs are left dangling.
+ */
+ if (!HDstrcmp(env_h5_drvr, "multi") || !HDstrcmp(env_h5_drvr, "split")) {
+ HDputs("\n -- SKIPPED for incompatible VFD --");
+ return 0;
+ }
+
/* Create the file */
if ((ids[T_FILE] = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR