summaryrefslogtreecommitdiffstats
path: root/test/vol.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-04-28 20:37:04 (GMT)
committerGitHub <noreply@github.com>2023-04-28 20:37:04 (GMT)
commita150e5fc2567b9b0f2a6dafec1fd3f330fca2e55 (patch)
treee300ebb600a0f29f83f27c12d2ecbb911fbbe350 /test/vol.c
parentf82f056d7b4804f9f29abf0c3cac36fdd9e9d7a3 (diff)
downloadhdf5-a150e5fc2567b9b0f2a6dafec1fd3f330fca2e55.zip
hdf5-a150e5fc2567b9b0f2a6dafec1fd3f330fca2e55.tar.gz
hdf5-a150e5fc2567b9b0f2a6dafec1fd3f330fca2e55.tar.bz2
Sync with develop (#2849)
Cherry pick of ea7dfcd (Change Powershell to PowerShell in docs) to 4497feb (Update H5Dget_space_status bug note to reference 1.14.0)
Diffstat (limited to 'test/vol.c')
-rw-r--r--test/vol.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/test/vol.c b/test/vol.c
index 27ffdcd..29bbb06 100644
--- a/test/vol.c
+++ b/test/vol.c
@@ -2227,9 +2227,10 @@ test_vol_cap_flags(void)
hid_t fapl_id = H5I_INVALID_HID;
hid_t vol_id = H5I_INVALID_HID;
uint64_t vol_cap_flags = H5VL_CAP_FLAG_NONE;
+ char *vol_env = NULL;
H5VL_pass_through_info_t passthru_info;
- TESTING("VOL capacity flags");
+ TESTING("VOL capability flags");
/* Register a fake VOL */
if ((vol_id = H5VLregister_connector(&fake_vol_g, H5P_DEFAULT)) < 0)
@@ -2251,6 +2252,29 @@ test_vol_cap_flags(void)
if (vol_cap_flags & H5VL_CAP_FLAG_ATTR_BASIC)
TEST_ERROR;
+ /* If using the native VOL by default, check flags again with H5P_DEFAULT */
+ vol_env = HDgetenv(HDF5_VOL_CONNECTOR);
+ if (!vol_env || (0 == HDstrcmp(vol_env, "native"))) {
+ H5VL_class_t *cls;
+ hid_t connector_id;
+
+ if (H5Pget_vol_id(H5P_DEFAULT, &connector_id) < 0)
+ TEST_ERROR;
+ if (NULL == (cls = H5I_object(connector_id)))
+ TEST_ERROR;
+
+ vol_cap_flags = H5VL_CAP_FLAG_NONE;
+
+ if (H5Pget_vol_cap_flags(H5P_DEFAULT, &vol_cap_flags) < 0)
+ TEST_ERROR;
+
+ if (vol_cap_flags != cls->cap_flags)
+ TEST_ERROR;
+
+ if (H5VLclose(connector_id) < 0)
+ TEST_ERROR;
+ }
+
/* Stack the [internal] passthrough VOL connector on top of the fake connector */
passthru_info.under_vol_id = vol_id;
passthru_info.under_vol_info = NULL;