summaryrefslogtreecommitdiffstats
path: root/test/th5o.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/th5o.c')
-rw-r--r--test/th5o.c47
1 files changed, 44 insertions, 3 deletions
diff --git a/test/th5o.c b/test/th5o.c
index 17cfad7..801091f 100644
--- a/test/th5o.c
+++ b/test/th5o.c
@@ -267,7 +267,8 @@ test_h5o_open_by_addr(void)
H5I_type_t id_type; /* Type of IDs returned from H5Oopen */
H5G_info_t ginfo; /* Group info struct */
H5T_class_t type_class; /* Class of the datatype */
- herr_t ret; /* Value returned from API calls */
+ bool vol_is_native;
+ herr_t ret; /* Value returned from API calls */
h5_fixname(TEST_FILENAME, H5P_DEFAULT, filename, sizeof filename);
@@ -275,6 +276,13 @@ test_h5o_open_by_addr(void)
fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fcreate");
+ /* Check if native VOL is being used */
+ CHECK(h5_using_native_vol(H5P_DEFAULT, fid, &vol_is_native), FAIL, "h5_using_native_vol");
+ if (!vol_is_native) {
+ CHECK(H5Fclose(fid), FAIL, "H5Fclose");
+ return;
+ }
+
/* Create a group, dataset, and committed datatype within the file */
/* Create the group */
grp = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -1109,6 +1117,7 @@ test_h5o_comment(void)
char check_comment[64];
ssize_t comment_len = 0;
ssize_t len;
+ bool vol_is_native;
herr_t ret; /* Value returned from API calls */
int ret_value;
@@ -1118,6 +1127,13 @@ test_h5o_comment(void)
fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fcreate");
+ /* Check if native VOL is being used */
+ CHECK(h5_using_native_vol(H5P_DEFAULT, fid, &vol_is_native), FAIL, "h5_using_native_vol");
+ if (!vol_is_native) {
+ CHECK(H5Fclose(fid), FAIL, "H5Fclose");
+ return;
+ }
+
/* Create an attribute for the file */
attr_space = H5Screate_simple(1, &attr_dims, NULL);
CHECK(attr_space, FAIL, "H5Screate_simple");
@@ -1284,6 +1300,7 @@ test_h5o_comment_by_name(void)
char check_comment[64];
ssize_t comment_len = 0;
ssize_t len;
+ bool vol_is_native;
herr_t ret; /* Value returned from API calls */
int ret_value;
@@ -1293,6 +1310,13 @@ test_h5o_comment_by_name(void)
fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fcreate");
+ /* Check if native VOL is being used */
+ CHECK(h5_using_native_vol(H5P_DEFAULT, fid, &vol_is_native), FAIL, "h5_using_native_vol");
+ if (!vol_is_native) {
+ CHECK(H5Fclose(fid), FAIL, "H5Fclose");
+ return;
+ }
+
/* Create an attribute for the file */
attr_space = H5Screate_simple(1, &attr_dims, NULL);
CHECK(attr_space, FAIL, "H5Screate_simple");
@@ -1556,7 +1580,8 @@ test_h5o_open_by_addr_deprec(void)
H5I_type_t id_type; /* Type of IDs returned from H5Oopen */
H5G_info_t ginfo; /* Group info struct */
H5T_class_t type_class; /* Class of the datatype */
- herr_t ret; /* Value returned from API calls */
+ bool vol_is_native;
+ herr_t ret; /* Value returned from API calls */
h5_fixname(TEST_FILENAME, H5P_DEFAULT, filename, sizeof filename);
@@ -1564,6 +1589,13 @@ test_h5o_open_by_addr_deprec(void)
fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fcreate");
+ /* Check if native VOL is being used */
+ CHECK(h5_using_native_vol(H5P_DEFAULT, fid, &vol_is_native), FAIL, "h5_using_native_vol");
+ if (!vol_is_native) {
+ CHECK(H5Fclose(fid), FAIL, "H5Fclose");
+ return;
+ }
+
/* Create a group, dataset, and committed datatype within the file */
/* Create the group */
grp = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -1739,7 +1771,8 @@ test_h5o_getinfo_visit(void)
H5O_info1_t oinfo1, oinfo2; /* Object info structs */
char attrname[25]; /* Attribute name */
int j; /* Local index variable */
- herr_t ret; /* Value returned from API calls */
+ bool vol_is_native;
+ herr_t ret; /* Value returned from API calls */
/* Output message about test being performed */
MESSAGE(5, ("Testing info returned by H5Oget_info vs H5Ovisit\n"));
@@ -1750,6 +1783,14 @@ test_h5o_getinfo_visit(void)
fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fcreate");
+ /* Check if native VOL is being used */
+ CHECK(h5_using_native_vol(H5P_DEFAULT, fid, &vol_is_native), FAIL, "h5_using_native_vol");
+ if (!vol_is_native) {
+ CHECK(H5Fclose(fid), FAIL, "H5Fclose");
+ MESSAGE(5, (" -- SKIPPED --\n"));
+ return;
+ }
+
/* Create "group1" in the file */
gid1 = H5Gcreate2(fid, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(gid1, FAIL, "H5Gcreate2");