summaryrefslogtreecommitdiffstats
path: root/test/cache_tagging.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/cache_tagging.c')
-rw-r--r--test/cache_tagging.c73
1 files changed, 67 insertions, 6 deletions
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 7ce4e88..564e5bc 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -24,6 +24,7 @@
#include "H5CXprivate.h" /* API Contexts */
#include "H5HLprivate.h"
+#include "H5VLnative_private.h" /* Native VOL connector */
/* ============ */
/* Test Defines */
@@ -374,14 +375,15 @@ error:
static int
get_object_header_tag(hid_t loc_id, haddr_t *tag)
{
- H5O_info_t oinfo; /* Object info */
+ H5O_info2_t oinfo; /* Object info */
/* Retrieve the info for the object */
- if(H5Oget_info2(loc_id, &oinfo, H5O_INFO_ALL) < 0)
+ if(H5Oget_info3(loc_id, &oinfo, H5O_INFO_BASIC) < 0)
TEST_ERROR;
/* Set the tag to return */
- *tag = oinfo.addr;
+ if(H5VLnative_token_to_addr(loc_id, oinfo.token, tag) < 0)
+ TEST_ERROR;
return 0;
@@ -439,7 +441,9 @@ check_file_creation_tags(hid_t fcpl_id, int type)
{
/* Variable Declarations */
hid_t fid = -1; /* File Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose test outout */
+#endif /* NDEBUG */ /* end debugging functions */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0;
haddr_t sbe_tag = 0;
@@ -526,7 +530,9 @@ check_file_open_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
hid_t fid = -1; /* File Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag; /* Root Group Tag */
haddr_t sbe_tag; /* Sblock Extension Tag */
@@ -639,7 +645,9 @@ check_group_creation_tags(void)
/* Variable Declarations */
hid_t fid = -1; /* File Identifier */
hid_t gid = -1; /* Group Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF; /* Root Group Tag */
haddr_t g_tag; /* Group Tag */
@@ -740,7 +748,9 @@ check_multi_group_creation_tags(void)
/* Variable Declarations */
hid_t fid = -1; /* File Identifier */
hid_t gid = -1; /* Group Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
char gname[16]; /* group name buffer */
int i = 0; /* iterator */
hid_t fapl = -1; /* File access prop list */
@@ -869,7 +879,9 @@ check_link_iteration_tags(void)
hid_t fid = -1; /* File Identifier */
hid_t sid = -1; /* Group Identifier */
hid_t did = -1; /* Group Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
int i = 0; /* iterator */
haddr_t root_tag = 0; /* Root Group Tag Value */
char dsetname[500]; /* Name of dataset */
@@ -989,7 +1001,9 @@ check_dense_attribute_tags(void)
hid_t sid = -1; /* Group Identifier */
hid_t did = -1; /* Group Identifier */
hid_t dcpl = -1; /* Group Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
int i = 0; /* iterator */
hid_t fapl = -1; /* File access property list */
haddr_t d_tag = 0; /* Dataset tag value */
@@ -1171,7 +1185,9 @@ check_group_open_tags(void)
/* Variable Declarations */
hid_t fid = -1; /* File Identifier */
hid_t gid = -1; /* Group Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file output */
+#endif /* NDEBUG */ /* end debugging functions */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
@@ -1280,7 +1296,9 @@ check_attribute_creation_tags(hid_t fcpl, int type)
hid_t aid = -1; /* Attribute Identifier */
hid_t gid = -1; /* Group Identifier */
hid_t sid = -1; /* Dataspace Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0; /* Root group tag */
haddr_t g_tag = 0;
@@ -1414,7 +1432,9 @@ check_attribute_open_tags(hid_t fcpl, int type)
hid_t aid = -1; /* Attribute Identifier */
hid_t gid = -1; /* Group Identifier */
hid_t sid = -1; /* Dataspace Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0;
haddr_t g_tag = 0;
@@ -1551,7 +1571,9 @@ check_attribute_rename_tags(hid_t fcpl, int type)
hid_t gid = -1; /* Group Identifier */
hid_t aid = -1; /* Attribute Identifier */
hid_t sid = -1; /* Dataset Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
int *data = NULL; /* data buffer */
int i,j,k = 0; /* iterators */
hid_t fapl = -1; /* File access prop list */
@@ -1726,7 +1748,9 @@ check_attribute_delete_tags(hid_t fcpl, int type)
hid_t gid = -1; /* Group Identifier */
hid_t aid = -1; /* Attribute Identifier */
hid_t sid = -1; /* Dataset Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
int *data = NULL; /* data buffer */
int i,j,k = 0; /* iterators */
hid_t fapl = -1; /* File access prop list */
@@ -1892,7 +1916,9 @@ check_dataset_creation_tags(hid_t fcpl, int type)
hid_t fid = -1; /* File Identifier */
hid_t did = -1; /* Dataset Identifier */
hid_t sid = -1; /* Dataspace Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1,1}; /* chunk dimensions */
int fillval = 0;
@@ -2025,7 +2051,9 @@ check_dataset_creation_earlyalloc_tags(hid_t fcpl, int type)
hid_t fid = -1; /* File Identifier */
hid_t did = -1; /* Dataset Identifier */
hid_t sid = -1; /* Dataspace Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1,1}; /* chunk dimensions */
int fillval = 0;
@@ -2162,7 +2190,9 @@ check_dataset_open_tags(void)
hid_t fid = -1; /* File Identifier */
hid_t did = -1; /* Dataset Identifier */
hid_t sid = -1; /* Dataspace Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1,1}; /* chunk dimensions */
int fillval = 0;
@@ -2288,7 +2318,9 @@ check_dataset_write_tags(void)
hid_t fid = -1; /* File Identifier */
hid_t did = -1; /* Dataset Identifier */
hid_t sid = -1; /* Dataspace Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1,1}; /* chunk dimensions */
int fillval = 0;
@@ -2430,7 +2462,9 @@ check_attribute_write_tags(hid_t fcpl, int type)
hid_t gid = -1; /* Group Identifier */
hid_t aid = -1; /* Attribute Identifier */
hid_t sid = -1; /* Dataset Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
int *data = NULL; /* data buffer */
int i,j,k = 0; /* iterators */
hid_t fapl = -1; /* File access prop list */
@@ -2583,7 +2617,9 @@ check_dataset_read_tags(void)
hid_t fid = -1; /* File Identifier */
hid_t did = -1; /* Dataset Identifier */
hid_t sid = -1; /* Dataspace Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1,1}; /* chunk dimensions */
int fillval = 0;
@@ -2720,7 +2756,9 @@ check_dataset_size_retrieval(void)
hid_t fid = -1; /* File Identifier */
hid_t did = -1; /* Dataset Identifier */
hid_t sid = -1; /* Dataspace Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1,1}; /* chunk dimensions */
int fillval = 0;
@@ -2859,7 +2897,9 @@ check_dataset_extend_tags(void)
hid_t fid = -1; /* File Identifier */
hid_t did = -1; /* Dataset Identifier */
hid_t sid = -1; /* Dataspace Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1,1}; /* chunk dimensions */
int fillval = 0;
@@ -2996,11 +3036,13 @@ check_object_info_tags(void)
/* Variable Declarations */
hid_t fid = -1; /* File Identifier */
hid_t gid = -1; /* Group Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file output */
+#endif /* NDEBUG */ /* end debugging functions */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
- H5O_info_t oinfo; /* Object info struct */
+ H5O_native_info_t ninfo; /* Native object info struct */
/* Testing Macro */
TESTING("tag application during object info retrieval");
@@ -3040,7 +3082,10 @@ check_object_info_tags(void)
/* Get information on an object by name */
/* ===================================== */
- if ( H5Oget_info_by_name2(fid, GROUPNAME, &oinfo, H5O_INFO_ALL, H5P_DEFAULT) < 0 ) TEST_ERROR;
+ /* Even though we do nothing with this, touching the internal
+ * data structures is needed for the test to pass.
+ */
+ if ( H5Oget_native_info_by_name(fid, GROUPNAME, &ninfo, H5O_NATIVE_INFO_ALL, H5P_DEFAULT) < 0 ) TEST_ERROR;
/* =================================== */
/* Verification of Metadata Tag Values */
@@ -3105,7 +3150,9 @@ check_object_copy_tags(void)
/* Variable Declarations */
hid_t fid = -1; /* File Identifier */
hid_t gid = -1; /* Group Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file output */
+#endif /* NDEBUG */ /* end debugging functions */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
@@ -3226,7 +3273,9 @@ check_link_removal_tags(hid_t fcpl, int type)
hid_t did = -1; /* Dataset Identifier */
hid_t sid = -1; /* Dataspace Identifier */
hid_t gid = -1; /* Dataspace Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1,1}; /* chunk dimensions */
int fillval = 0;
@@ -3385,7 +3434,9 @@ check_link_getname_tags(void)
hid_t did = -1; /* Dataset Identifier */
hid_t sid = -1; /* Dataspace Identifier */
hid_t gid = -1; /* Dataspace Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1,1}; /* chunk dimensions */
int fillval = 0;
@@ -3534,7 +3585,9 @@ check_external_link_creation_tags(void)
hid_t fid = -1; /* File Identifier */
hid_t fid2 = -1; /* File Identifier */
hid_t gid = -1; /* Dataspace Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0;
@@ -3640,7 +3693,10 @@ check_external_link_open_tags(void)
hid_t fid2 = -1; /* File Identifier */
hid_t gid = -1; /* Dataspace Identifier */
hid_t xid = -1; /* Dataspace Identifier */
+#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */ /* end debugging functions */
+ H5O_native_info_t ninfo; /* Native object info struct */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0;
haddr_t root2_tag = 0;
@@ -3694,6 +3750,11 @@ check_external_link_open_tags(void)
if ( (fid2 = H5Iget_file_id(xid)) < 0) TEST_ERROR;
if ( get_object_header_tag(xid, &link_tag) < 0 ) TEST_ERROR;
+ /* Even though we do nothing with this, touching the internal
+ * data structures is needed for the test to pass.
+ */
+ if ( H5Oget_native_info(xid, &ninfo, H5O_NATIVE_INFO_ALL) < 0 ) TEST_ERROR;
+
/* =================================== */
/* Verification of Metadata Tag Values */
/* =================================== */
@@ -3836,8 +3897,8 @@ check_invalid_tag_application(void)
return 0;
-error:
#if H5C_DO_TAGGING_SANITY_CHECKS
+error:
if(api_ctx_pushed) H5CX_pop();
#endif /* H5C_DO_TAGGING_SANITY_CHECKS */