summaryrefslogtreecommitdiffstats
path: root/test/cache_api.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/cache_api.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/cache_api.c')
-rw-r--r--test/cache_api.c47
1 files changed, 26 insertions, 21 deletions
diff --git a/test/cache_api.c b/test/cache_api.c
index 7858c65..432dab3 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -306,10 +306,10 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
pass = FALSE;
failure_mssg = "H5Fclose() failed.\n";
}
- else if (HDremove(filename) < 0) {
+ else if (H5Fdelete(filename, H5P_DEFAULT) < 0) {
pass = FALSE;
- failure_mssg = "HDremove() failed.\n";
+ failure_mssg = "H5Fdelete() failed.\n";
}
}
@@ -442,28 +442,28 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
}
}
- /* close the fapl used to create the file */
+ /* close the file and delete it */
if (pass) {
- if (H5Pclose(fapl_id) < 0) {
+ if (H5Fclose(file_id) < 0) {
pass = FALSE;
- failure_mssg = "H5Pclose() failed.\n";
+ failure_mssg = "H5Fclose() failed.\n";
+ }
+ else if (H5Fdelete(filename, fapl_id) < 0) {
+
+ pass = FALSE;
+ failure_mssg = "H5Fdelete() failed.\n";
}
}
- /* close the file and delete it */
+ /* close the fapl used to create the file */
if (pass) {
- if (H5Fclose(file_id) < 0) {
-
- pass = FALSE;
- failure_mssg = "H5Fclose() failed.\n";
- }
- else if (HDremove(filename) < 0) {
+ if (H5Pclose(fapl_id) < 0) {
pass = FALSE;
- failure_mssg = "HDremove() failed.\n";
+ failure_mssg = "H5Pclose() failed.\n";
}
}
@@ -803,10 +803,10 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
pass = FALSE;
failure_mssg = "H5Fclose() failed.\n";
}
- else if (HDremove(filename) < 0) {
+ else if (H5Fdelete(filename, H5P_DEFAULT) < 0) {
pass = FALSE;
- failure_mssg = "HDremove() failed.\n";
+ failure_mssg = "H5Fdelete() failed.\n";
}
}
@@ -1445,10 +1445,10 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
pass = FALSE;
failure_mssg = "H5Fclose() failed.\n";
}
- else if (HDremove(filename) < 0) {
+ else if (H5Fdelete(filename, H5P_DEFAULT) < 0) {
pass = FALSE;
- failure_mssg = "HDremove() failed.\n";
+ failure_mssg = "H5Fdelete() failed.\n";
}
}
@@ -2170,10 +2170,10 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
pass = FALSE;
failure_mssg = "H5Fclose() failed.\n";
}
- else if (HDremove(filename) < 0) {
+ else if (H5Fdelete(filename, H5P_DEFAULT) < 0) {
pass = FALSE;
- failure_mssg = "HDremove() failed.\n";
+ failure_mssg = "H5Fdelete() failed.\n";
}
}
@@ -2258,8 +2258,13 @@ main(void)
for (paged = FALSE; paged <= TRUE; paged++) {
hid_t my_fcpl = fcpl_id;
- if (paged)
- my_fcpl = fcpl2_id;
+ if (paged) {
+ /* Only run paged aggregation tests with sec2/default driver */
+ if (!h5_using_default_driver(NULL))
+ continue;
+ else
+ my_fcpl = fcpl2_id;
+ }
if (!check_fapl_mdc_api_calls(paged, my_fcpl))
nerrs += 1;