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.c442
1 files changed, 221 insertions, 221 deletions
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 9af8bf2..61b1dbe 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -205,7 +205,7 @@ mark_all_entries_investigated(hid_t fid)
entry_ptr = cache_ptr->index[i];
while (entry_ptr != NULL) {
if (!entry_ptr->dirtied)
- entry_ptr->dirtied = TRUE;
+ entry_ptr->dirtied = true;
entry_ptr = entry_ptr->ht_next;
} /* end if */
@@ -247,7 +247,7 @@ reset_all_entries_investigated(hid_t fid)
entry_ptr = cache_ptr->index[i];
while (entry_ptr != NULL) {
if (entry_ptr->dirtied)
- entry_ptr->dirtied = FALSE;
+ entry_ptr->dirtied = false;
entry_ptr = entry_ptr->ht_next;
} /* end if */
@@ -295,7 +295,7 @@ verify_tag(hid_t fid, int id, haddr_t tag)
TEST_ERROR;
/* Mark the entry/tag pair as found */
- entry_ptr->dirtied = TRUE;
+ entry_ptr->dirtied = true;
/* leave now that we've found the entry */
goto done;
@@ -328,7 +328,7 @@ evict_entries(hid_t fid)
mark_all_entries_investigated(fid);
/* setup the skip list prior to calling H5C_flush_cache() */
- if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0)
+ if (H5C_set_slist_enabled(f->shared->cache, true, false) < 0)
TEST_ERROR;
/* Evict all we can from the cache to examine full tag creation tree */
@@ -338,7 +338,7 @@ evict_entries(hid_t fid)
H5C_flush_cache(f, H5C__FLUSH_INVALIDATE_FLAG);
/* shutdown the slist -- allow it to be non-empty */
- if (H5C_set_slist_enabled(f->shared->cache, FALSE, TRUE) < 0)
+ if (H5C_set_slist_enabled(f->shared->cache, false, true) < 0)
TEST_ERROR;
return 0;
@@ -416,11 +416,11 @@ static unsigned
check_file_creation_tags(hid_t fcpl_id, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose test output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose test output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t sbe_tag = 0;
@@ -517,13 +517,13 @@ static unsigned
check_file_open_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
- haddr_t root_tag; /* Root Group Tag */
- haddr_t sbe_tag = HADDR_UNDEF; /* Sblock Extension Tag */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
+ haddr_t root_tag; /* Root Group Tag */
+ haddr_t sbe_tag = HADDR_UNDEF; /* Sblock Extension Tag */
/* Testing Macro */
TESTING("tag application during file open");
@@ -643,14 +643,14 @@ static unsigned
check_group_creation_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
- haddr_t root_tag = HADDR_UNDEF; /* Root Group Tag */
- haddr_t g_tag; /* Group Tag */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
+ haddr_t root_tag = HADDR_UNDEF; /* Root Group Tag */
+ haddr_t g_tag; /* Group Tag */
/* Testing Macro */
TESTING("tag application during group creation");
@@ -763,16 +763,16 @@ static unsigned
check_multi_group_creation_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- char gname[16]; /* group name buffer */
- int i = 0; /* iterator */
- hid_t fapl = -1; /* File access prop list */
- haddr_t g_tag = 0; /* Group tag value */
- haddr_t root_tag = 0; /* Root group tag value */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ char gname[16]; /* group name buffer */
+ int i = 0; /* iterator */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
+ haddr_t g_tag = 0; /* Group tag value */
+ haddr_t root_tag = 0; /* Root group tag value */
/* Testing Macro */
TESTING("tag application during multiple group creation");
@@ -805,7 +805,7 @@ check_multi_group_creation_tags(void)
for (i = 0; i < MULTIGROUPS; i++) {
- HDsnprintf(gname, sizeof(gname), "%d", i);
+ snprintf(gname, sizeof(gname), "%d", i);
if ((gid = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(gid) < 0)
@@ -827,7 +827,7 @@ check_multi_group_creation_tags(void)
for (i = 0; i < MULTIGROUPS; i++) {
/* Re-open the group */
- HDsnprintf(gname, sizeof(gname), "%d", i);
+ snprintf(gname, sizeof(gname), "%d", i);
if ((gid = H5Gopen2(fid, gname, H5P_DEFAULT)) < 0)
TEST_ERROR;
@@ -911,18 +911,18 @@ static unsigned
check_link_iteration_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t sid = -1; /* Group Identifier */
- hid_t did = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t did = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- int i = 0; /* iterator */
- haddr_t root_tag = 0; /* Root Group Tag Value */
- char dsetname[500]; /* Name of dataset */
- H5G_info_t ginfo; /* Group Info Struct */
- hid_t fapl = -1; /* File access prop list */
- hid_t root_group = -1; /* Root Group Identifier */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ int i = 0; /* iterator */
+ haddr_t root_tag = 0; /* Root Group Tag Value */
+ char dsetname[500]; /* Name of dataset */
+ H5G_info_t ginfo; /* Group Info Struct */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
+ hid_t root_group = H5I_INVALID_HID; /* Root Group Identifier */
/* Testing Macro */
TESTING("tag application during iteration over links in a group");
@@ -951,7 +951,7 @@ check_link_iteration_tags(void)
/* Create many datasets in root group */
for (i = 0; i < 500; i++) {
- HDsnprintf(dsetname, sizeof(dsetname), "Dset %d", i);
+ snprintf(dsetname, sizeof(dsetname), "Dset %d", i);
if ((did = H5Dcreate2(fid, dsetname, H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
0)
TEST_ERROR;
@@ -1048,19 +1048,19 @@ static unsigned
check_dense_attribute_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t aid = -1; /* File Identifier */
- hid_t sid = -1; /* Group Identifier */
- hid_t did = -1; /* Group Identifier */
- hid_t dcpl = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t aid = H5I_INVALID_HID; /* File Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t did = H5I_INVALID_HID; /* Group Identifier */
+ hid_t dcpl = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- int i = 0; /* iterator */
- hid_t fapl = -1; /* File access property list */
- haddr_t d_tag = 0; /* Dataset tag value */
- haddr_t root_tag = 0; /* Root group tag value */
- char attrname[500]; /* Name of attribute */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ int i = 0; /* iterator */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ haddr_t d_tag = 0; /* Dataset tag value */
+ haddr_t root_tag = 0; /* Root group tag value */
+ char attrname[500]; /* Name of attribute */
/* Testing Macro */
TESTING("tag application during dense attribute manipulation");
@@ -1111,7 +1111,7 @@ check_dense_attribute_tags(void)
for (i = 0; i < 50; i++) {
- HDsnprintf(attrname, sizeof(attrname), "attr %d", i);
+ snprintf(attrname, sizeof(attrname), "attr %d", i);
if ((aid = H5Acreate2(did, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Awrite(aid, H5T_NATIVE_UINT, &i) < 0)
@@ -1278,12 +1278,12 @@ static unsigned
check_group_open_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
@@ -1404,15 +1404,15 @@ static unsigned
check_attribute_creation_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t aid = -1; /* Attribute Identifier */
- hid_t gid = -1; /* Group Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t aid = H5I_INVALID_HID; /* Attribute Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
- haddr_t root_tag = 0; /* Root group tag */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
+ haddr_t root_tag = 0; /* Root group tag */
haddr_t g_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* dimensions */
@@ -1566,14 +1566,14 @@ static unsigned
check_attribute_open_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t aid = -1; /* Attribute Identifier */
- hid_t gid = -1; /* Group Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t aid = H5I_INVALID_HID; /* Attribute Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t g_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -1730,21 +1730,21 @@ static unsigned
check_attribute_rename_tags(hid_t fcpl, int type)
{
/* Variable declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
- hid_t aid = -1; /* Attribute Identifier */
- hid_t sid = -1; /* Dataset Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t aid = H5I_INVALID_HID; /* Attribute Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataset Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- int *data = NULL; /* data buffer */
- int i, j, k = 0; /* iterators */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ int *data = NULL; /* data buffer */
+ int i, j, k = 0; /* iterators */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t g_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* dimensions */
- hbool_t persistent_fsms = FALSE;
+ bool persistent_fsms = false;
/* Testing Macro */
TESTING("tag application during attribute renaming");
@@ -1940,21 +1940,21 @@ static unsigned
check_attribute_delete_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
- hid_t aid = -1; /* Attribute Identifier */
- hid_t sid = -1; /* Dataset Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t aid = H5I_INVALID_HID; /* Attribute Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataset Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- int *data = NULL; /* data buffer */
- int i, j, k = 0; /* iterators */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ int *data = NULL; /* data buffer */
+ int i, j, k = 0; /* iterators */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t g_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* dimensions */
- hbool_t persistent_fsms = FALSE;
+ bool persistent_fsms = false;
/* Testing Macro */
TESTING("tag application during attribute delete");
@@ -2129,16 +2129,16 @@ static unsigned
check_dataset_creation_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -2286,16 +2286,16 @@ static unsigned
check_dataset_creation_earlyalloc_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -2449,16 +2449,16 @@ static unsigned
check_dataset_open_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -2598,16 +2598,16 @@ static unsigned
check_dataset_write_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -2761,16 +2761,16 @@ static unsigned
check_attribute_write_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
- hid_t aid = -1; /* Attribute Identifier */
- hid_t sid = -1; /* Dataset Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t aid = H5I_INVALID_HID; /* Attribute Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataset Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- int *data = NULL; /* data buffer */
- int i, j, k = 0; /* iterators */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ int *data = NULL; /* data buffer */
+ int i, j, k = 0; /* iterators */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t g_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -2945,16 +2945,16 @@ static unsigned
check_dataset_read_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -3104,16 +3104,16 @@ static unsigned
check_dataset_size_retrieval(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -3265,16 +3265,16 @@ check_dataset_extend_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -3425,12 +3425,12 @@ static unsigned
check_object_info_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
H5O_native_info_t ninfo; /* Native object info struct */
@@ -3557,12 +3557,12 @@ static unsigned
check_object_copy_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
haddr_t copy_tag;
@@ -3702,17 +3702,17 @@ static unsigned
check_link_removal_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
- hid_t gid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
haddr_t g_tag = 0;
@@ -3888,17 +3888,17 @@ check_link_getname_tags(void)
{
/* Variable Declarations */
char name[500];
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
- hid_t gid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
haddr_t g_tag = 0;
@@ -4063,13 +4063,13 @@ static unsigned
check_external_link_creation_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t fid2 = -1; /* File Identifier */
- hid_t gid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t fid2 = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
/* Testing Macro */
@@ -4185,16 +4185,16 @@ static unsigned
check_external_link_open_tags(void)
{
/* Variable Declarations */
- haddr_t link_tag = 0; /* link tag */
- hid_t fid = -1; /* File Identifier */
- hid_t fid2 = -1; /* File Identifier */
- hid_t gid = -1; /* Dataspace Identifier */
- hid_t xid = -1; /* Dataspace Identifier */
+ haddr_t link_tag = 0; /* link tag */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t fid2 = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Dataspace Identifier */
+ hid_t xid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- H5O_native_info_t ninfo; /* Native object info struct */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ H5O_native_info_t ninfo; /* Native object info struct */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t root2_tag = 0;
@@ -4357,12 +4357,12 @@ check_invalid_tag_application(void)
#ifdef H5C_DO_TAGGING_SANITY_CHECKS
/* Variables */
H5F_t *f = NULL;
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
haddr_t addr;
H5HL_t *lheap = NULL;
- hid_t fapl = -1; /* File access prop list */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
-#endif /* H5C_DO_TAGGING_SANITY_CHECKS */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
+#endif /* H5C_DO_TAGGING_SANITY_CHECKS */
/* Testing Macro */
TESTING("failure on invalid tag application");
@@ -4382,7 +4382,7 @@ check_invalid_tag_application(void)
/* Push API context */
if (H5CX_push() < 0)
TEST_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get internal file pointer*/
if (NULL == (f = (H5F_t *)H5VL_object(fid)))
@@ -4420,9 +4420,9 @@ check_invalid_tag_application(void)
TEST_ERROR;
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
TEST_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
/* Close open objects and file */
if (H5Fclose(fid) < 0)
@@ -4440,7 +4440,7 @@ check_invalid_tag_application(void)
#ifdef H5C_DO_TAGGING_SANITY_CHECKS
error:
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
return 1;
#endif /* H5C_DO_TAGGING_SANITY_CHECKS */
@@ -4460,18 +4460,18 @@ int
main(void)
{
/* Variable Declarations */
- hid_t fcpl_default = -1; /* file creation prop list */
- hid_t fcpl_shmesg_all = -1; /* file creation prop list */
- hid_t fcpl = -1; /* file creation prop list */
- unsigned nerrs = 0; /* Error Encountered */
- int test_type = 0; /* test type iterator */
+ hid_t fcpl_default = H5I_INVALID_HID; /* file creation prop list */
+ hid_t fcpl_shmesg_all = H5I_INVALID_HID; /* file creation prop list */
+ hid_t fcpl = H5I_INVALID_HID; /* file creation prop list */
+ unsigned nerrs = 0; /* Error Encountered */
+ int test_type = 0; /* test type iterator */
/* Open the HDF5 Library */
H5open();
/* Only run with sec2/default driver */
if (!h5_using_default_driver(NULL)) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ puts(" -- SKIPPED for incompatible VFD --");
exit(EXIT_SUCCESS);
}
@@ -4486,7 +4486,7 @@ main(void)
fcpl_shmesg_all = H5Pcreate(H5P_FILE_CREATE);
H5Pset_shared_mesg_nindexes(fcpl_shmesg_all, 1);
H5Pset_shared_mesg_index(fcpl_shmesg_all, 0, H5O_SHMESG_ALL_FLAG, 20);
- H5Pset_file_space_strategy(fcpl_shmesg_all, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)0);
+ H5Pset_file_space_strategy(fcpl_shmesg_all, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)0);
/* ========= */
/* Run Tests */