summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@koziol.gov>2019-12-20 04:41:37 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-05-20 14:20:21 (GMT)
commit996e12e796bff4c2d2b4f2fed189f542f0d8f58d (patch)
treeef2ae576f797f87e5e530929a65716ca9e86fd88 /test
parent68373c2d788d06bd140dd2ef546db71b54b4ff50 (diff)
downloadhdf5-996e12e796bff4c2d2b4f2fed189f542f0d8f58d.zip
hdf5-996e12e796bff4c2d2b4f2fed189f542f0d8f58d.tar.gz
hdf5-996e12e796bff4c2d2b4f2fed189f542f0d8f58d.tar.bz2
Refactor all the 'H5VL_*_optional' callbacks to move the type of operation out
of the va_list, so it's at least possible for another connector to know what the operation is and decide whether to implement it or not. Added a new VOL sub-class called "introspect" where callbacks that report information about the connector or container can be placed. Added an 'opt_query' callback to this sub-class, for a connector to report back to the library whether a particular optional callback operation is supported. Also added a 'get_conn_cls' introspection callback, to retrieve the H5VL_class_t of a connector (either the "current" connector, H5VL_GET_CONN_LVL_CURR, or the terminal connector, H5VL_GET_CONN_LVL_TERM). Moved the "post open" operation from a file 'specific' operation to a file 'optional' operation, now that it's possible to detect (with the 'opt_query' introspection callback) whether a VOL connector implements an optional operation, without just returning an error. Added new internal VOL helper routines: H5VL_object_is_native, to determine if an object is in (or is a) native file, and H5VL_file_is_same, to determine if two objects are in (or are) the same terminal VOL connector's container. (And moved the special handling for FILE_IS_EQUAL operation out of internal VOL callback routine into H5VL_file_is_same) Made new dataset 'get' operation for H5Dvlen_get_buf_size, aligning it better with other 'get' operations in API. Fixed several issues with pass-through connectors, which are now passing the 'make check-passthrough-vol' tests again. A bunch of warning and style cleanups as well.
Diffstat (limited to 'test')
-rw-r--r--test/null_vol_connector.c4
-rw-r--r--test/trefer.c36
-rw-r--r--test/vol.c4
3 files changed, 32 insertions, 12 deletions
diff --git a/test/null_vol_connector.c b/test/null_vol_connector.c
index 14e1a38..884bc65 100644
--- a/test/null_vol_connector.c
+++ b/test/null_vol_connector.c
@@ -108,6 +108,10 @@ static const H5VL_class_t null_vol_g = {
NULL, /* specific */
NULL /* optional */
},
+ { /* introspect_cls */
+ NULL, /* get_conn_cls */
+ NULL, /* opt_query */
+ },
{ /* request_cls */
NULL, /* wait */
NULL, /* notify */
diff --git a/test/trefer.c b/test/trefer.c
index b412fc2..04b34eb 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -2516,7 +2516,8 @@ test_reference_perf(void)
ret = H5Rdestroy(&wbuf[0]);
CHECK(ret, FAIL, "H5Rdestroy");
}
- HDprintf("--- Object reference create time: %lfs\n", t / MAX_ITER_CREATE);
+ if(VERBOSE_MED)
+ HDprintf("--- Object reference create time: %lfs\n", t / MAX_ITER_CREATE);
/* Create reference to dataset */
ret = H5Rcreate_object(fid1, "/Group1/Dataset1", H5P_DEFAULT, &wbuf[0]);
@@ -2534,7 +2535,8 @@ test_reference_perf(void)
t2 = H5_get_time();
t += t2 - t1;
}
- HDprintf("--- Object reference write time: %lfs\n", t / MAX_ITER_WRITE);
+ if(VERBOSE_MED)
+ HDprintf("--- Object reference write time: %lfs\n", t / MAX_ITER_WRITE);
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -2552,7 +2554,8 @@ test_reference_perf(void)
t2 = H5_get_time();
t += t2 - t1;
}
- HDprintf("--- Deprecated object reference create time: %lfs\n", t / MAX_ITER_CREATE);
+ if(VERBOSE_MED)
+ HDprintf("--- Deprecated object reference create time: %lfs\n", t / MAX_ITER_CREATE);
/* Create reference to dataset */
ret = H5Rcreate(&wbuf_deprec[0], fid1, "/Group1/Dataset1", H5R_OBJECT1, H5I_INVALID_HID);
@@ -2567,7 +2570,8 @@ test_reference_perf(void)
t2 = H5_get_time();
t += t2 - t1;
}
- HDprintf("--- Deprecated object reference write time: %lfs\n", t / MAX_ITER_WRITE);
+ if(VERBOSE_MED)
+ HDprintf("--- Deprecated object reference write time: %lfs\n", t / MAX_ITER_WRITE);
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -2588,7 +2592,8 @@ test_reference_perf(void)
ret = H5Rdestroy(&wbuf_reg[0]);
CHECK(ret, FAIL, "H5Rdestroy");
}
- HDprintf("--- Region reference create time: %lfs\n", t / MAX_ITER_CREATE);
+ if(VERBOSE_MED)
+ HDprintf("--- Region reference create time: %lfs\n", t / MAX_ITER_CREATE);
/* Store first dataset region */
ret = H5Rcreate_region(fid1, "/Group1/Dataset1", sid1, H5P_DEFAULT, &wbuf_reg[0]);
@@ -2603,7 +2608,8 @@ test_reference_perf(void)
t2 = H5_get_time();
t += t2 - t1;
}
- HDprintf("--- Region reference write time: %lfs\n", t / MAX_ITER_WRITE);
+ if(VERBOSE_MED)
+ HDprintf("--- Region reference write time: %lfs\n", t / MAX_ITER_WRITE);
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -2622,7 +2628,8 @@ test_reference_perf(void)
t2 = H5_get_time();
t += t2 - t1;
}
- HDprintf("--- Deprecated region reference create time: %lfs\n", t / MAX_ITER_CREATE);
+ if(VERBOSE_MED)
+ HDprintf("--- Deprecated region reference create time: %lfs\n", t / MAX_ITER_CREATE);
t = 0;
for(i = 0; i < MAX_ITER_WRITE; i++) {
@@ -2633,7 +2640,8 @@ test_reference_perf(void)
t2 = H5_get_time();
t += t2 - t1;
}
- HDprintf("--- Deprecated region reference write time: %lfs\n", t / MAX_ITER_WRITE);
+ if(VERBOSE_MED)
+ HDprintf("--- Deprecated region reference write time: %lfs\n", t / MAX_ITER_WRITE);
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -2666,7 +2674,8 @@ test_reference_perf(void)
ret = H5Rdestroy(&rbuf[0]);
CHECK(ret, FAIL, "H5Rdestroy");
}
- HDprintf("--- Object reference read time: %lfs\n", t / MAX_ITER_READ);
+ if(VERBOSE_MED)
+ HDprintf("--- Object reference read time: %lfs\n", t / MAX_ITER_READ);
/* Read selection from disk */
ret = H5Dread(dataset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf);
@@ -2711,7 +2720,8 @@ test_reference_perf(void)
t2 = H5_get_time();
t += t2 - t1;
}
- HDprintf("--- Deprecated object reference read time: %lfs\n", t / MAX_ITER_READ);
+ if(VERBOSE_MED)
+ HDprintf("--- Deprecated object reference read time: %lfs\n", t / MAX_ITER_READ);
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -2732,7 +2742,8 @@ test_reference_perf(void)
ret = H5Rdestroy(&rbuf_reg[0]);
CHECK(ret, FAIL, "H5Rdestroy");
}
- HDprintf("--- Region reference read time: %lfs\n", t / MAX_ITER_READ);
+ if(VERBOSE_MED)
+ HDprintf("--- Region reference read time: %lfs\n", t / MAX_ITER_READ);
/* Read selection from disk */
ret = H5Dread(dataset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf_reg);
@@ -2755,7 +2766,8 @@ test_reference_perf(void)
t2 = H5_get_time();
t += t2 - t1;
}
- HDprintf("--- Deprecated region reference read time: %lfs\n", t / MAX_ITER_READ);
+ if(VERBOSE_MED)
+ HDprintf("--- Deprecated region reference read time: %lfs\n", t / MAX_ITER_READ);
/* Close Dataset */
ret = H5Dclose(dataset);
diff --git a/test/vol.c b/test/vol.c
index da42a1e..e7020e7 100644
--- a/test/vol.c
+++ b/test/vol.c
@@ -123,6 +123,10 @@ static const H5VL_class_t fake_vol_g = {
NULL, /* specific */
NULL /* optional */
},
+ { /* introspect_cls */
+ NULL, /* get_conn_cls */
+ NULL, /* opt_query */
+ },
{ /* request_cls */
NULL, /* wait */
NULL, /* notify */