summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhdftest <hdftest@hdfgroup.org>2018-09-20 19:59:17 (GMT)
committerhdftest <hdftest@hdfgroup.org>2018-09-20 19:59:17 (GMT)
commit04a2d68778bc978ac62b03b5b5bfa034e2ced7f7 (patch)
tree8eb0dde943224b0caed11dee349862ce7a9aefa6
parente2f6e6f62f8885e85540c870ff3e3370b7617c79 (diff)
parentd3074fa8bd8cb5eb266741203b68ce9129c2d7dc (diff)
downloadhdf5-04a2d68778bc978ac62b03b5b5bfa034e2ced7f7.zip
hdf5-04a2d68778bc978ac62b03b5b5bfa034e2ced7f7.tar.gz
hdf5-04a2d68778bc978ac62b03b5b5bfa034e2ced7f7.tar.bz2
Merge branch 'develop' of ssh://bitbucket.hdfgroup.org:7999/~hdftest/hdf5_hft into develop
-rw-r--r--java/test/TestH5E.java2
-rw-r--r--src/H5ACprivate.h2
-rw-r--r--src/H5Atest.c34
-rw-r--r--src/H5Ctest.c2
-rw-r--r--src/H5Dtest.c8
-rw-r--r--src/H5EApkg.h4
-rw-r--r--src/H5EAtest.c16
-rw-r--r--src/H5Edeprec.c10
-rw-r--r--src/H5FApkg.h4
-rw-r--r--src/H5FAtest.c25
-rw-r--r--src/H5FDspace.c1
-rw-r--r--src/H5FSpkg.h4
-rw-r--r--src/H5FStest.c20
-rw-r--r--src/H5Fpkg.h10
-rw-r--r--src/H5Ftest.c105
-rw-r--r--src/H5Gpkg.h3
-rw-r--r--src/H5Gtest.c80
-rw-r--r--src/H5HLdbg.c46
-rw-r--r--src/H5Ipublic.h2
-rw-r--r--src/H5MF.c3
-rw-r--r--src/H5MFprivate.h3
-rw-r--r--src/H5Opkg.h19
-rw-r--r--src/H5Otest.c130
-rw-r--r--src/H5PBprivate.h6
-rw-r--r--src/H5Ppkg.h4
-rw-r--r--src/H5Ptest.c40
-rw-r--r--src/H5SMtest.c2
-rw-r--r--src/H5TS.c6
-rw-r--r--src/H5TSprivate.h1
-rw-r--r--test/cache_common.c107
-rw-r--r--test/cache_logging.c9
-rw-r--r--test/cache_tagging.c25
-rw-r--r--test/dangle.c3
-rw-r--r--test/earray.c10
-rw-r--r--test/efc.c13
-rw-r--r--test/err_compat.c2
-rw-r--r--test/evict_on_close.c48
-rw-r--r--test/farray.c328
-rw-r--r--test/fheap.c2
-rw-r--r--test/fillval.c57
-rw-r--r--test/freespace.c22
-rw-r--r--test/gheap.c344
-rw-r--r--test/h5test.c10
-rw-r--r--test/istore.c2
-rw-r--r--test/lheap.c12
-rw-r--r--test/mf.c74
-rw-r--r--test/objcopy.c1
-rw-r--r--test/ohdr.c30
-rw-r--r--test/page_buffer.c10
-rw-r--r--test/swmr.c4
-rw-r--r--test/swmr_generator.c4
-rw-r--r--test/tarray.c40
-rw-r--r--test/tattr.c1154
-rw-r--r--test/testfiles/err_compat_12
-rw-r--r--test/testframe.c8
-rw-r--r--test/testhdf5.c4
-rw-r--r--test/tfile.c37
-rw-r--r--test/tgenprop.c12
-rw-r--r--test/th5s.c1
-rw-r--r--test/tmisc.c30
-rw-r--r--test/tsohm.c24
-rw-r--r--test/tunicode.c2
-rw-r--r--test/tvltypes.c4
-rw-r--r--test/unregister.c239
-rw-r--r--test/vfd.c21
65 files changed, 1628 insertions, 1659 deletions
diff --git a/java/test/TestH5E.java b/java/test/TestH5E.java
index f6db1ed..1f4e658 100644
--- a/java/test/TestH5E.java
+++ b/java/test/TestH5E.java
@@ -328,7 +328,7 @@ public class TestH5E {
fail("testH5Ewalk:H5Ewalk2 " + err);
}
assertFalse("testH5Ewalk:H5Ewalk2 ",((H5E_walk_data)walk_data).walkdata.isEmpty());
- assertTrue("testH5Ewalk:H5Ewalk2 "+((H5E_walk_data)walk_data).walkdata.size(),((H5E_walk_data)walk_data).walkdata.size()==4);
+ assertTrue("testH5Ewalk:H5Ewalk2 "+((H5E_walk_data)walk_data).walkdata.size(),((H5E_walk_data)walk_data).walkdata.size()==TestH5E.ERRSTACK_CNT);
}
}
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index 99cc0e9..0e8620d 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -435,7 +435,7 @@ H5_DLL herr_t H5AC_get_mdc_image_info(H5AC_t *cache_ptr, haddr_t *image_addr,
/* Tag & Ring routines */
H5_DLL void H5AC_tag(haddr_t metadata_tag, haddr_t *prev_tag);
H5_DLL herr_t H5AC_flush_tagged_metadata(H5F_t *f, haddr_t metadata_tag);
-H5_DLL herr_t H5AC_evict_tagged_metadata(H5F_t * f, haddr_t metadata_tag, hbool_t match_global);
+H5_DLL herr_t H5AC_evict_tagged_metadata(H5F_t *f, haddr_t metadata_tag, hbool_t match_global);
H5_DLL herr_t H5AC_retag_copied_metadata(const H5F_t *f, haddr_t metadata_tag);
H5_DLL herr_t H5AC_ignore_tags(const H5F_t *f);
H5_DLL herr_t H5AC_cork(H5F_t *f, haddr_t obj_addr, unsigned action, hbool_t *corked);
diff --git a/src/H5Atest.c b/src/H5Atest.c
index 31fbe8e..36c3d35 100644
--- a/src/H5Atest.c
+++ b/src/H5Atest.c
@@ -13,11 +13,9 @@
/*-------------------------------------------------------------------------
*
- * Created: H5Atest.c
- * Dec 18 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5Atest.c
*
- * Purpose: Attribute testing routines.
+ * Purpose: Attribute testing routines.
*
*-------------------------------------------------------------------------
*/
@@ -27,19 +25,19 @@
/****************/
#include "H5Amodule.h" /* This source code file is part of the H5A module */
-#define H5A_TESTING /*suppress warning about H5A testing funcs*/
+#define H5A_TESTING /* Suppress warning about H5A testing funcs */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Apkg.h" /* Attributes */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5CXprivate.h" /* API Contexts */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-#include "H5SMprivate.h" /* Shared object header messages */
+#include "H5private.h" /* Generic Functions */
+#include "H5Apkg.h" /* Attributes */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5CXprivate.h" /* API Contexts */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5SMprivate.h" /* Shared object header messages */
/****************/
@@ -78,12 +76,11 @@
/*-------------------------------------------------------------------------
- * Function: H5A__is_shared_test
+ * Function: H5A__is_shared_test
*
* Purpose: Check if an attribute is shared
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: TRUE/FALSE/FAIL
*
* Programmer: Quincey Koziol
* Dec 19, 2006
@@ -111,12 +108,11 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5A__get_shared_rc_test
+ * Function: H5A__get_shared_rc_test
*
* Purpose: Retrieve the refcount for a shared attribute
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Dec 19, 2006
@@ -127,7 +123,7 @@ herr_t
H5A__get_shared_rc_test(hid_t attr_id, hsize_t *ref_count)
{
H5A_t *attr; /* Attribute object for ID */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
diff --git a/src/H5Ctest.c b/src/H5Ctest.c
index 2cd0a5d..9da6350 100644
--- a/src/H5Ctest.c
+++ b/src/H5Ctest.c
@@ -143,7 +143,7 @@ H5C__verify_cork_tag_test(hid_t fid, haddr_t tag, hbool_t status)
/* Get file pointer */
if(NULL == (f = (H5F_t *)H5I_object_verify(fid, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
/* Get cache pointer */
cache = f->shared->cache;
diff --git a/src/H5Dtest.c b/src/H5Dtest.c
index c2b6199..ac1d05a 100644
--- a/src/H5Dtest.c
+++ b/src/H5Dtest.c
@@ -28,10 +28,10 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
/****************/
diff --git a/src/H5EApkg.h b/src/H5EApkg.h
index fb9afc0..0adcde2 100644
--- a/src/H5EApkg.h
+++ b/src/H5EApkg.h
@@ -469,8 +469,8 @@ H5_DLL herr_t H5EA__dblock_debug(H5F_t *f, haddr_t addr,
/* Testing routines */
#ifdef H5EA_TESTING
-H5_DLL herr_t H5EA_get_cparam_test(const H5EA_t *ea, H5EA_create_t *cparam);
-H5_DLL int H5EA_cmp_cparam_test(const H5EA_create_t *cparam1, const H5EA_create_t *cparam2);
+H5_DLL herr_t H5EA__get_cparam_test(const H5EA_t *ea, H5EA_create_t *cparam);
+H5_DLL int H5EA__cmp_cparam_test(const H5EA_create_t *cparam1, const H5EA_create_t *cparam2);
#endif /* H5EA_TESTING */
#endif /* _H5EApkg_H */
diff --git a/src/H5EAtest.c b/src/H5EAtest.c
index 3da7996..7c02e16 100644
--- a/src/H5EAtest.c
+++ b/src/H5EAtest.c
@@ -401,7 +401,7 @@ END_FUNC(STATIC) /* end H5EA__test_dst_dbg_context() */
/*-------------------------------------------------------------------------
- * Function: H5EA_get_cparam_test
+ * Function: H5EA__get_cparam_test
*
* Purpose: Retrieve the parameters used to create the extensible array
*
@@ -413,9 +413,9 @@ END_FUNC(STATIC) /* end H5EA__test_dst_dbg_context() */
*
*-------------------------------------------------------------------------
*/
-BEGIN_FUNC(PRIV, NOERR,
+BEGIN_FUNC(PKG, NOERR,
herr_t, SUCCEED, -,
-H5EA_get_cparam_test(const H5EA_t *ea, H5EA_create_t *cparam))
+H5EA__get_cparam_test(const H5EA_t *ea, H5EA_create_t *cparam))
/* Check arguments. */
HDassert(ea);
@@ -429,11 +429,11 @@ H5EA_get_cparam_test(const H5EA_t *ea, H5EA_create_t *cparam))
cparam->data_blk_min_elmts = ea->hdr->cparam.data_blk_min_elmts;
cparam->max_dblk_page_nelmts_bits = ea->hdr->cparam.max_dblk_page_nelmts_bits;
-END_FUNC(PRIV) /* end H5EA_get_cparam_test() */
+END_FUNC(PKG) /* end H5EA__get_cparam_test() */
/*-------------------------------------------------------------------------
- * Function: H5EA_cmp_cparam_test
+ * Function: H5EA__cmp_cparam_test
*
* Purpose: Compare the parameters used to create the extensible array
*
@@ -445,9 +445,9 @@ END_FUNC(PRIV) /* end H5EA_get_cparam_test() */
*
*-------------------------------------------------------------------------
*/
-BEGIN_FUNC(PRIV, ERRCATCH,
+BEGIN_FUNC(PKG, ERRCATCH,
int, 0, -,
-H5EA_cmp_cparam_test(const H5EA_create_t *cparam1, const H5EA_create_t *cparam2))
+H5EA__cmp_cparam_test(const H5EA_create_t *cparam1, const H5EA_create_t *cparam2))
/* Check arguments. */
HDassert(cparam1);
@@ -481,5 +481,5 @@ H5EA_cmp_cparam_test(const H5EA_create_t *cparam1, const H5EA_create_t *cparam2)
CATCH
-END_FUNC(PRIV) /* end H5EA_cmp_cparam_test() */
+END_FUNC(PKG) /* end H5EA__cmp_cparam_test() */
diff --git a/src/H5Edeprec.c b/src/H5Edeprec.c
index 603d448..4462303 100644
--- a/src/H5Edeprec.c
+++ b/src/H5Edeprec.c
@@ -227,7 +227,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Eclear1
*
- * Purpose: This function is for backward compatbility.
+ * Purpose: This function is for backward compatibility.
* Clears the error stack for the specified error stack.
*
* Return: SUCCEED/FAIL
@@ -258,7 +258,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Eprint1
*
- * Purpose: This function is for backward compatbility.
+ * Purpose: This function is for backward compatibility.
* Prints the error stack in some default way. This is just a
* convenience function for H5Ewalk() with a function that
* prints error messages. Users are encouraged to write there
@@ -296,7 +296,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Ewalk1
*
- * Purpose: This function is for backward compatbility.
+ * Purpose: This function is for backward compatibility.
* Walks the error stack for the current thread and calls some
* function for each error along the way.
*
@@ -335,7 +335,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Eget_auto1
*
- * Purpose: This function is for backward compatbility.
+ * Purpose: This function is for backward compatibility.
* Returns the current settings for the automatic error stack
* traversal function and its data for specific error stack.
* Either (or both) arguments may be null in which case the
@@ -381,7 +381,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Eset_auto1
*
- * Purpose: This function is for backward compatbility.
+ * Purpose: This function is for backward compatibility.
* Turns on or off automatic printing of errors for certain
* error stack. When turned on (non-null FUNC pointer) any
* API function which returns an error indication will first
diff --git a/src/H5FApkg.h b/src/H5FApkg.h
index 720c046..6ce899e 100644
--- a/src/H5FApkg.h
+++ b/src/H5FApkg.h
@@ -307,8 +307,8 @@ H5_DLL herr_t H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream,
/* Testing routines */
#ifdef H5FA_TESTING
-H5_DLL herr_t H5FA_get_cparam_test(const H5FA_t *ea, H5FA_create_t *cparam);
-H5_DLL int H5FA_cmp_cparam_test(const H5FA_create_t *cparam1, const H5FA_create_t *cparam2);
+H5_DLL herr_t H5FA__get_cparam_test(const H5FA_t *ea, H5FA_create_t *cparam);
+H5_DLL int H5FA__cmp_cparam_test(const H5FA_create_t *cparam1, const H5FA_create_t *cparam2);
#endif /* H5FA_TESTING */
#endif /* _H5FApkg_H */
diff --git a/src/H5FAtest.c b/src/H5FAtest.c
index 4b03036..27cd8b7 100644
--- a/src/H5FAtest.c
+++ b/src/H5FAtest.c
@@ -70,12 +70,9 @@ typedef struct H5FA__test_ctx_t {
static void *H5FA__test_crt_context(void *udata);
static herr_t H5FA__test_dst_context(void *ctx);
static herr_t H5FA__test_fill(void *nat_blk, size_t nelmts);
-static herr_t H5FA__test_encode(void *raw, const void *elmt, size_t nelmts,
- void *ctx);
-static herr_t H5FA__test_decode(const void *raw, void *elmt, size_t nelmts,
- void *ctx);
-static herr_t H5FA__test_debug(FILE *stream, int indent, int fwidth,
- hsize_t idx, const void *elmt);
+static herr_t H5FA__test_encode(void *raw, const void *elmt, size_t nelmts, void *ctx);
+static herr_t H5FA__test_decode(const void *raw, void *elmt, size_t nelmts, void *ctx);
+static herr_t H5FA__test_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void *elmt);
static void *H5FA__test_crt_dbg_context(H5F_t *f, haddr_t obj_addr);
@@ -361,7 +358,7 @@ END_FUNC(STATIC) /* end H5FA__test_crt_dbg_context() */
/*-------------------------------------------------------------------------
- * Function: H5FA_get_cparam_test
+ * Function: H5FA__get_cparam_test
*
* Purpose: Retrieve the parameters used to create the fixed array
*
@@ -372,9 +369,9 @@ END_FUNC(STATIC) /* end H5FA__test_crt_dbg_context() */
*
*-------------------------------------------------------------------------
*/
-BEGIN_FUNC(PRIV, NOERR,
+BEGIN_FUNC(PKG, NOERR,
herr_t, SUCCEED, -,
-H5FA_get_cparam_test(const H5FA_t *fa, H5FA_create_t *cparam))
+H5FA__get_cparam_test(const H5FA_t *fa, H5FA_create_t *cparam))
/* Check arguments. */
HDassert(fa);
@@ -384,11 +381,11 @@ H5FA_get_cparam_test(const H5FA_t *fa, H5FA_create_t *cparam))
cparam->raw_elmt_size = fa->hdr->cparam.raw_elmt_size;
cparam->nelmts = fa->hdr->cparam.nelmts;
-END_FUNC(PRIV) /* end H5FA_get_cparam_test() */
+END_FUNC(PKG) /* end H5FA__get_cparam_test() */
/*-------------------------------------------------------------------------
- * Function: H5FA_cmp_cparam_test
+ * Function: H5FA__cmp_cparam_test
*
* Purpose: Compare the parameters used to create the fixed array
*
@@ -399,9 +396,9 @@ END_FUNC(PRIV) /* end H5FA_get_cparam_test() */
*
*-------------------------------------------------------------------------
*/
-BEGIN_FUNC(PRIV, ERRCATCH,
+BEGIN_FUNC(PKG, ERRCATCH,
int, 0, -,
-H5FA_cmp_cparam_test(const H5FA_create_t *cparam1, const H5FA_create_t *cparam2))
+H5FA__cmp_cparam_test(const H5FA_create_t *cparam1, const H5FA_create_t *cparam2))
/* Check arguments. */
HDassert(cparam1);
@@ -415,5 +412,5 @@ H5FA_cmp_cparam_test(const H5FA_create_t *cparam1, const H5FA_create_t *cparam2)
CATCH
-END_FUNC(PRIV) /* end H5FA_cmp_cparam_test() */
+END_FUNC(PKG) /* end H5FA__cmp_cparam_test() */
diff --git a/src/H5FDspace.c b/src/H5FDspace.c
index e158a44..69fcb96 100644
--- a/src/H5FDspace.c
+++ b/src/H5FDspace.c
@@ -38,6 +38,7 @@
#include "H5Fprivate.h" /* File access */
#include "H5FDpkg.h" /* File Drivers */
#include "H5FDmulti.h" /* Usage-partitioned file family */
+#include "H5FLprivate.h" /* Free lists */
/****************/
diff --git a/src/H5FSpkg.h b/src/H5FSpkg.h
index a5896ee..f160055 100644
--- a/src/H5FSpkg.h
+++ b/src/H5FSpkg.h
@@ -242,8 +242,8 @@ H5_DLL void H5FS__sect_assert(const H5FS_t *fspace);
/* Testing routines */
#ifdef H5FS_TESTING
-H5_DLL herr_t H5FS_get_cparam_test(const H5FS_t *fh, H5FS_create_t *cparam);
-H5_DLL int H5FS_cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2);
+H5_DLL herr_t H5FS__get_cparam_test(const H5FS_t *fh, H5FS_create_t *cparam);
+H5_DLL int H5FS__cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2);
#endif /* H5FS_TESTING */
#endif /* _H5FSpkg_H */
diff --git a/src/H5FStest.c b/src/H5FStest.c
index 5ab0219..120a9a8 100644
--- a/src/H5FStest.c
+++ b/src/H5FStest.c
@@ -69,7 +69,7 @@
/*-------------------------------------------------------------------------
- * Function: H5FS_get_cparam_test
+ * Function: H5FS__get_cparam_test
*
* Purpose: Retrieve the parameters used to create the free-space manager
* similar to H5HF_get_cparam_test()
@@ -82,9 +82,9 @@
*-------------------------------------------------------------------------
*/
herr_t
-H5FS_get_cparam_test(const H5FS_t *frsp, H5FS_create_t *cparam)
+H5FS__get_cparam_test(const H5FS_t *frsp, H5FS_create_t *cparam)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
HDassert(frsp);
@@ -97,16 +97,16 @@ H5FS_get_cparam_test(const H5FS_t *frsp, H5FS_create_t *cparam)
cparam->max_sect_size = frsp->max_sect_size;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5FS_get_cparam_test() */
+} /* H5FS__get_cparam_test() */
/*-------------------------------------------------------------------------
- * Function: H5FS_cmp_cparam_test
+ * Function: H5FS__cmp_cparam_test
*
* Purpose: Compare the parameters used to create the free space manager
* similar to H5HF_cmp_cparam_test()
*
- * Return: SUCCEED/FAIL
+ * Return: A value like strcmp()
*
* Programmer: Vailin Choi
* August 25th, 2008
@@ -114,11 +114,11 @@ H5FS_get_cparam_test(const H5FS_t *frsp, H5FS_create_t *cparam)
*-------------------------------------------------------------------------
*/
int
-H5FS_cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2)
+H5FS__cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2)
{
- int ret_value = SUCCEED; /* Return value */
+ int ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
HDassert(cparam1);
@@ -151,5 +151,5 @@ H5FS_cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5FS_cmp_cparam_test */
+} /* H5FS__cmp_cparam_test */
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index 2e8a793..3716c66 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -30,7 +30,7 @@
#include "H5Fprivate.h"
/* Other public headers needed by this file */
-#include "H5Bpublic.h" /* B-tree header, for H5B_NUM_BTREE_ID */
+#include "H5Bpublic.h" /* B-tree header (for H5B_NUM_BTREE_ID) */
/* Other private headers needed by this file */
#include "H5private.h" /* Generic Functions */
@@ -462,10 +462,10 @@ H5_DLL herr_t H5F__evict_cache_entries(H5F_t *f);
/* Testing functions */
#ifdef H5F_TESTING
-H5_DLL herr_t H5F_get_sohm_mesg_count_test(hid_t fid, unsigned type_id, size_t *mesg_count);
-H5_DLL herr_t H5F_check_cached_stab_test(hid_t file_id);
-H5_DLL herr_t H5F_get_maxaddr_test(hid_t file_id, haddr_t *maxaddr);
-H5_DLL herr_t H5F_get_sbe_addr_test(hid_t file_id, haddr_t *sbe_addr);
+H5_DLL herr_t H5F__get_sohm_mesg_count_test(hid_t fid, unsigned type_id, size_t *mesg_count);
+H5_DLL herr_t H5F__check_cached_stab_test(hid_t file_id);
+H5_DLL herr_t H5F__get_maxaddr_test(hid_t file_id, haddr_t *maxaddr);
+H5_DLL herr_t H5F__get_sbe_addr_test(hid_t file_id, haddr_t *sbe_addr);
#endif /* H5F_TESTING */
#endif /* _H5Fpkg_H */
diff --git a/src/H5Ftest.c b/src/H5Ftest.c
index bdecad2..df9c933 100644
--- a/src/H5Ftest.c
+++ b/src/H5Ftest.c
@@ -26,24 +26,24 @@
/* Module Setup */
/****************/
-#include "H5Fmodule.h" /* This source code file is part of the H5F module */
-#define H5F_TESTING /*suppress warning about H5F testing funcs*/
-#define H5G_FRIEND /*suppress error about including H5Gpkg */
-#define H5G_TESTING /*suppress warning about H5G testing funcs*/
-#define H5SM_FRIEND /*suppress error about including H5SMpkg */
-#define H5SM_TESTING /*suppress warning about H5SM testing funcs*/
+#include "H5Fmodule.h" /* This source code file is part of the H5F module */
+#define H5F_TESTING /* Suppress warning about H5F testing funcs */
+#define H5G_FRIEND /* Suppress error about including H5Gpkg.h */
+#define H5G_TESTING /* Suppress warning about H5G testing funcs */
+#define H5SM_FRIEND /* Suppress error about including H5SMpkg.h */
+#define H5SM_TESTING /* Suppress warning about H5SM testing funcs */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5CXprivate.h" /* API Contexts */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5Gpkg.h" /* Groups */
-#include "H5Iprivate.h" /* IDs */
-#include "H5SMpkg.h" /* Shared object header messages */
+#include "H5private.h" /* Generic Functions */
+#include "H5CXprivate.h" /* API Contexts */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5Gpkg.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
+#include "H5SMpkg.h" /* Shared object header messages */
/****************/
@@ -82,31 +82,29 @@
/*-------------------------------------------------------------------------
- * Function: H5F_get_sohm_mesg_count_test
+ * Function: H5F__get_sohm_mesg_count_test
*
* Purpose: Retrieve the number of shared messages of a given type in a file
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * Jan 3, 2007
+ * Programmer: Quincey Koziol
+ * Jan 3, 2007
*
*-------------------------------------------------------------------------
*/
herr_t
-H5F_get_sohm_mesg_count_test(hid_t file_id, unsigned type_id,
- size_t *mesg_count)
+H5F__get_sohm_mesg_count_test(hid_t file_id, unsigned type_id, size_t *mesg_count)
{
- H5F_t *file; /* File info */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File info */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
/* Push API context */
if(H5CX_push() < 0)
@@ -122,19 +120,18 @@ done:
HDONE_ERROR(H5E_FILE, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F_get_sohm_mesg_count_test() */
+} /* end H5F__get_sohm_mesg_count_test() */
/*-------------------------------------------------------------------------
- * Function: H5F_check_cached_stab_test
+ * Function: H5F__check_cached_stab_test
*
* Purpose: Check that a file's superblock contains a cached symbol
* table entry, that the entry matches that in the root
* group's object header, and check that the addresses are
* valid.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Neil Fortner
* Mar 31, 2009
@@ -142,17 +139,17 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5F_check_cached_stab_test(hid_t file_id)
+H5F__check_cached_stab_test(hid_t file_id)
{
- H5F_t *file; /* File info */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File info */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
/* Push API context */
if(H5CX_push() < 0)
@@ -168,16 +165,15 @@ done:
HDONE_ERROR(H5E_FILE, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F_check_cached_stab_test() */
+} /* end H5F__check_cached_stab_test() */
/*-------------------------------------------------------------------------
- * Function: H5F_get_maxaddr_test
+ * Function: H5F__get_maxaddr_test
*
* Purpose: Retrieve the maximum address for a file
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Jun 10, 2009
@@ -185,33 +181,32 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5F_get_maxaddr_test(hid_t file_id, haddr_t *maxaddr)
+H5F__get_maxaddr_test(hid_t file_id, haddr_t *maxaddr)
{
- H5F_t *file; /* File info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File info */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
/* Retrieve maxaddr for file */
*maxaddr = file->shared->maxaddr;
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F_get_maxaddr_test() */
+} /* end H5F__get_maxaddr_test() */
/*-------------------------------------------------------------------------
- * Function: H5F_get_sbe_addr_test
+ * Function: H5F__get_sbe_addr_test
*
* Purpose: Retrieve the address of a superblock extension's object header
- * for a file
+ * for a file
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Jul 10, 2016
@@ -219,21 +214,21 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5F_get_sbe_addr_test(hid_t file_id, haddr_t *sbe_addr)
+H5F__get_sbe_addr_test(hid_t file_id, haddr_t *sbe_addr)
{
- H5F_t *file; /* File info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File info */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
/* Retrieve maxaddr for file */
*sbe_addr = file->shared->sblock->ext_addr;
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F_get_sbe_addr_test() */
+} /* end H5F__get_sbe_addr_test() */
diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h
index b89777d..ae697ad 100644
--- a/src/H5Gpkg.h
+++ b/src/H5Gpkg.h
@@ -429,8 +429,7 @@ H5_DLL herr_t H5G__link_sort_table(H5G_link_table_t *ltable, H5_index_t idx_type
H5_DLL herr_t H5G__link_iterate_table(const H5G_link_table_t *ltable,
hsize_t skip, hsize_t *last_lnk, const H5G_lib_iterate_t op, void *op_data);
H5_DLL herr_t H5G__link_release_table(H5G_link_table_t *ltable);
-H5_DLL herr_t H5G__link_name_replace(H5F_t *file, H5RS_str_t *grp_full_path_r,
- const H5O_link_t *lnk);
+H5_DLL herr_t H5G__link_name_replace(H5F_t *file, H5RS_str_t *grp_full_path_r, const H5O_link_t *lnk);
/* Functions that understand "compact" link storage */
H5_DLL herr_t H5G__compact_insert(const H5O_loc_t *grp_oloc, H5O_link_t *obj_lnk);
diff --git a/src/H5Gtest.c b/src/H5Gtest.c
index f2f3e3a..1899606 100644
--- a/src/H5Gtest.c
+++ b/src/H5Gtest.c
@@ -28,13 +28,13 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5CXprivate.h" /* API Contexts */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Gpkg.h" /* Groups */
-#include "H5HLprivate.h" /* Local Heaps */
-#include "H5Iprivate.h" /* IDs */
+#include "H5private.h" /* Generic Functions */
+#include "H5CXprivate.h" /* API Contexts */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Gpkg.h" /* Groups */
+#include "H5HLprivate.h" /* Local Heaps */
+#include "H5Iprivate.h" /* IDs */
/****************/
/* Local Macros */
@@ -80,7 +80,7 @@
htri_t H5G__is_empty_test(gid)
hid_t gid; IN: group to check
RETURNS
- Non-negative TRUE/FALSE on success, negative on failure
+ TRUE/FALSE on success, FAIL on failure
DESCRIPTION
Checks to see if the group has no link messages and no symbol table message
and no "dense" link storage
@@ -114,7 +114,7 @@ H5G__is_empty_test(hid_t gid)
/* Check if the group has any link messages */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(msg_exists > 0) {
/* Sanity check that new group format shouldn't have old messages */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0)
@@ -127,7 +127,7 @@ H5G__is_empty_test(hid_t gid)
/* Check for a link info message */
if((linfo_exists = H5O_msg_exists(&(grp->oloc), H5O_LINFO_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(linfo_exists > 0) {
H5O_linfo_t linfo; /* Link info message */
@@ -158,7 +158,7 @@ H5G__is_empty_test(hid_t gid)
/* Check if the group has a symbol table message */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(msg_exists > 0) {
H5O_stab_t stab; /* Info about local heap & B-tree */
hsize_t nlinks; /* Number of links in the group */
@@ -202,7 +202,7 @@ done:
hid_t gid; IN: group to check
unsigned *nmsgs; OUT: # of link messages in header
RETURNS
- Non-negative TRUE/FALSE on success, negative on failure
+ TRUE/FALSE on success, FAIL on failure
DESCRIPTION
Checks to see if the group has link messages and how many.
GLOBAL VARIABLES
@@ -232,15 +232,15 @@ H5G__has_links_test(hid_t gid, unsigned *nmsgs)
/* Check if the group has any link messages */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(msg_exists == 0)
HGOTO_DONE(FALSE)
/* Check if the group has a symbol table message */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(msg_exists > 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found")
+ HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found")
/* Check if we should retrieve the number of link messages */
if(nmsgs) {
@@ -269,7 +269,7 @@ done:
htri_t H5G__has_stab_test(gid)
hid_t gid; IN: group to check
RETURNS
- Non-negative TRUE/FALSE on success, negative on failure
+ TRUE/FALSE on success, FAIL on failure
DESCRIPTION
Checks to see if the group has a symbol table message.
GLOBAL VARIABLES
@@ -299,15 +299,15 @@ H5G__has_stab_test(hid_t gid)
/* Check if the group has a symbol table message */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(msg_exists == 0)
HGOTO_DONE(FALSE)
/* Check if the group has any link messages */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(msg_exists > 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found")
+ HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found")
done:
if(api_ctx_pushed && H5CX_pop() < 0)
@@ -326,7 +326,7 @@ done:
htri_t H5G__is_new_dense_test(gid)
hid_t gid; IN: group to check
RETURNS
- Non-negative TRUE/FALSE on success, negative on failure
+ TRUE/FALSE on success, FAIL on failure
DESCRIPTION
Checks to see if the group is in the "new" format for groups (link messages/
fractal heap+v2 B-tree) and if it is in "dense" storage form (ie. it has
@@ -358,19 +358,19 @@ H5G__is_new_dense_test(hid_t gid)
/* Check if the group has a symbol table message */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(msg_exists > 0)
HGOTO_DONE(FALSE)
/* Check if the group has any link messages */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(msg_exists > 0)
HGOTO_DONE(FALSE)
/* Check if the group has link info message */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINFO_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(msg_exists > 0) {
H5O_linfo_t linfo; /* Link info message */
@@ -404,7 +404,7 @@ done:
hsize_t *name_count; OUT: Number of links in name index
hsize_t *corder_count; OUT: Number of links in creation order index
RETURNS
- Non-negative on success, negative on failure
+ SUCCEED/FAIL
DESCRIPTION
Currently, just retrieves the number of links in each index and returns
them.
@@ -495,7 +495,7 @@ done:
hid_t gid; IN: group to check
size_t *lheap_size; OUT: Size of local heap
RETURNS
- Non-negative on success, negative on failure
+ SUCCEED/FAIL
DESCRIPTION
Checks the size of the local heap for a group
GLOBAL VARIABLES
@@ -525,11 +525,11 @@ H5G__lheap_size_test(hid_t gid, size_t *lheap_size)
/* Make certain the group has a symbol table message */
if(NULL == H5O_msg_read(&(grp->oloc), H5O_STAB_ID, &stab))
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read symbol table message")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read symbol table message")
/* Check the size of the local heap for the group */
if(H5HL_get_size(grp->oloc.file, stab.heap_addr, lheap_size) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't query local heap size")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't query local heap size")
done:
if(api_ctx_pushed && H5CX_pop() < 0)
@@ -551,7 +551,7 @@ done:
size_t *user_path_len; OUT: Size of user path
unsigned *obj_hidden; OUT: Whether object is hidden
RETURNS
- Non-negative on success, negative on failure
+ SUCCEED/FAIL
DESCRIPTION
Retrieves the user path for an ID. A zero for the length is returned in
the case of no user path.
@@ -648,15 +648,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G__verify_cached_stab_test
+ * Function: H5G__verify_cached_stab_test
*
* Purpose: Check that a that the provided group entry contains a
* cached symbol table entry, that the entry matches that in
* the provided group's object header, and check that the
* addresses are valid.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Neil Fortner
* Mar 31, 2009
@@ -666,9 +665,9 @@ done:
herr_t
H5G__verify_cached_stab_test(H5O_loc_t *grp_oloc, H5G_entry_t *ent)
{
- H5O_stab_t stab; /* Symbol table */
- H5HL_t *heap = NULL; /* Pointer to local heap */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_stab_t stab; /* Symbol table */
+ H5HL_t *heap = NULL; /* Pointer to local heap */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_TAG(grp_oloc->addr)
@@ -681,7 +680,8 @@ H5G__verify_cached_stab_test(H5O_loc_t *grp_oloc, H5G_entry_t *ent)
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "unable to read symbol table message")
/* Verify that the cached symbol table info matches the symbol table message
- * in the object header */
+ * in the object header.
+ */
if((ent->cache.stab.btree_addr != stab.btree_addr)
|| (ent->cache.stab.heap_addr != stab.heap_addr))
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "cached stab info does not match object header")
@@ -711,7 +711,7 @@ done:
* group with a symbol table, and that that information is
* correct.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: H5_ITER_STOP/H5_ITER_CONT/H5_ITER_ERROR
*
* Programmer: Neil Fortner
* Apr 8, 2011
@@ -732,9 +732,7 @@ H5G__verify_cached_stabs_test_cb(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key,
FUNC_ENTER_STATIC
- /*
- * Check arguments.
- */
+ /* Check arguments */
HDassert(f);
HDassert(H5F_addr_defined(addr));
@@ -749,7 +747,7 @@ H5G__verify_cached_stabs_test_cb(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key,
targ_oloc.holding_file = FALSE;
/* Iterate over entries */
- for(i=0; i<sn->nsyms; i++) {
+ for(i = 0; i < sn->nsyms; i++) {
/* Update oloc address */
targ_oloc.addr = sn->entry[i].header;
@@ -773,7 +771,7 @@ H5G__verify_cached_stabs_test_cb(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key,
if((sn->entry[i].cache.stab.btree_addr != stab.btree_addr)
|| (sn->entry[i].cache.stab.heap_addr != stab.heap_addr))
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, H5_ITER_ERROR, "cached symbol table information is incorrect")
- } /* end if */
+ }
else if(sn->entry[i].type == H5G_CACHED_STAB)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, H5_ITER_ERROR, "nonexistent STAB message is cached")
diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c
index e4e6fa8..edb0261 100644
--- a/src/H5HLdbg.c
+++ b/src/H5HLdbg.c
@@ -76,10 +76,10 @@ H5HL_debug(H5F_t *f, haddr_t addr, FILE * stream, int indent, int fwidth))
"Data bytes allocated for heap:",
h->dblk_size);
- /*
- * Traverse the free list and check that all free blocks fall within
+ /* Traverse the free list and check that all free blocks fall within
* the heap and that no two free blocks point to the same region of
- * the heap. */
+ * the heap.
+ */
if(NULL == (marker = (uint8_t *)H5MM_calloc(h->dblk_size)))
H5E_THROW(H5E_CANTALLOC, "memory allocation failed");
@@ -88,35 +88,30 @@ H5HL_debug(H5F_t *f, haddr_t addr, FILE * stream, int indent, int fwidth))
char temp_str[32];
HDsnprintf(temp_str, sizeof(temp_str), "Block #%d:", free_block);
- HDfprintf(stream, "%*s%-*s %8Zu, %8Zu\n", indent+3, "", MAX(0,fwidth-9),
- temp_str,
- freelist->offset, freelist->size);
- if((freelist->offset + freelist->size) > h->dblk_size)
- HDfprintf(stream, "***THAT FREE BLOCK IS OUT OF BOUNDS!\n");
- else {
+ HDfprintf(stream, "%*s%-*s %8Zu, %8Zu\n", indent+3, "", MAX(0,fwidth-9), temp_str, freelist->offset, freelist->size);
+ if((freelist->offset + freelist->size) > h->dblk_size)
+ HDfprintf(stream, "***THAT FREE BLOCK IS OUT OF BOUNDS!\n");
+ else {
int overlap = 0;
size_t i;
- for(i = 0; i < freelist->size; i++) {
- if(marker[freelist->offset + i])
- overlap++;
- marker[freelist->offset + i] = 1;
- } /* end for */
- if(overlap)
- HDfprintf(stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
- else
- amount_free += freelist->size;
- } /* end for */
+ for(i = 0; i < freelist->size; i++) {
+ if(marker[freelist->offset + i])
+ overlap++;
+ marker[freelist->offset + i] = 1;
+ } /* end for */
+ if(overlap)
+ HDfprintf(stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
+ else
+ amount_free += freelist->size;
+ } /* end else */
} /* end for */
if(h->dblk_size)
- HDfprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth,
- "Percent of heap used:",
- ((double)100.0f * (double)(h->dblk_size - amount_free) / (double)h->dblk_size));
+ HDfprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of heap used:",
+ ((double)100.0f * (double)(h->dblk_size - amount_free) / (double)h->dblk_size));
- /*
- * Print the data in a VMS-style octal dump.
- */
+ /* Print the data in a VMS-style octal dump */
H5_buffer_dump(stream, indent, h->dblk_image, marker, (size_t)0, h->dblk_size);
CATCH
@@ -127,3 +122,4 @@ CATCH
H5E_THROW(H5E_CANTFREE, "can't free marker buffer");
END_FUNC(PRIV) /* end H5HL_debug() */
+
diff --git a/src/H5Ipublic.h b/src/H5Ipublic.h
index c737bbe..c471e5a 100644
--- a/src/H5Ipublic.h
+++ b/src/H5Ipublic.h
@@ -66,7 +66,7 @@ typedef int64_t hid_t;
* can be removed from the ID type. If the function returns negative
* (failure) then the object will remain in the ID type.
*/
-typedef herr_t (*H5I_free_t)(void*);
+typedef herr_t (*H5I_free_t)(void *);
/* Type of the function to compare objects & keys */
typedef int (*H5I_search_func_t)(void *obj, hid_t id, void *key);
diff --git a/src/H5MF.c b/src/H5MF.c
index 65b27db..0d368d4 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -2291,6 +2291,7 @@ H5MF_get_freespace(H5F_t *f, hsize_t *tot_space, hsize_t *meta_size)
needed_ring = H5AC_RING_MDFSM;
else
needed_ring = H5AC_RING_RDFSM;
+
if(needed_ring != curr_ring) {
H5AC_set_ring(needed_ring, NULL);
curr_ring = needed_ring;
@@ -2320,6 +2321,7 @@ H5MF_get_freespace(H5F_t *f, hsize_t *tot_space, hsize_t *meta_size)
needed_ring = H5AC_RING_MDFSM;
else
needed_ring = H5AC_RING_RDFSM;
+
if(needed_ring != curr_ring) {
H5AC_set_ring(needed_ring, &curr_ring);
curr_ring = needed_ring;
@@ -2435,6 +2437,7 @@ H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t
needed_ring = H5AC_RING_MDFSM;
else
needed_ring = H5AC_RING_RDFSM;
+
if(needed_ring != curr_ring) {
H5AC_set_ring(needed_ring, &curr_ring);
curr_ring = needed_ring;
diff --git a/src/H5MFprivate.h b/src/H5MFprivate.h
index 58e5054..bd57f05 100644
--- a/src/H5MFprivate.h
+++ b/src/H5MFprivate.h
@@ -60,8 +60,7 @@ H5_DLL herr_t H5MF_xfree(H5F_t *f, H5FD_mem_t type, haddr_t addr,
hsize_t size);
H5_DLL herr_t H5MF_try_extend(H5F_t *f, H5FD_mem_t type, haddr_t addr,
hsize_t size, hsize_t extra_requested);
-H5_DLL htri_t H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr,
- hsize_t size);
+H5_DLL htri_t H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size);
H5_DLL ssize_t H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects,
H5F_sect_info_t *sect_info);
diff --git a/src/H5Opkg.h b/src/H5Opkg.h
index 19d90c5..059b46a 100644
--- a/src/H5Opkg.h
+++ b/src/H5Opkg.h
@@ -648,16 +648,15 @@ H5_DLLVAR const unsigned H5O_pline_ver_bounds[H5F_LIBVER_NBOUNDS];
/* Testing functions */
#ifdef H5O_TESTING
-H5_DLL htri_t H5O_is_attr_empty_test(hid_t oid);
-H5_DLL htri_t H5O_is_attr_dense_test(hid_t oid);
-H5_DLL herr_t H5O_num_attrs_test(hid_t oid, hsize_t *nattrs);
-H5_DLL herr_t H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count);
-H5_DLL herr_t H5O_check_msg_marked_test(hid_t oid, hbool_t flag_val);
-H5_DLL herr_t H5O_expunge_chunks_test(const H5O_loc_t *oloc);
-H5_DLL herr_t H5O_get_rc(const H5O_loc_t *oloc, unsigned *rc);
-H5_DLL herr_t H5O_msg_get_chunkno_test(hid_t oid, unsigned msg_type,
- unsigned *chunk_num);
-H5_DLL herr_t H5O_msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type);
+H5_DLL htri_t H5O__is_attr_empty_test(hid_t oid);
+H5_DLL htri_t H5O__is_attr_dense_test(hid_t oid);
+H5_DLL herr_t H5O__num_attrs_test(hid_t oid, hsize_t *nattrs);
+H5_DLL herr_t H5O__attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count);
+H5_DLL herr_t H5O__check_msg_marked_test(hid_t oid, hbool_t flag_val);
+H5_DLL herr_t H5O__expunge_chunks_test(const H5O_loc_t *oloc);
+H5_DLL herr_t H5O__get_rc_test(const H5O_loc_t *oloc, unsigned *rc);
+H5_DLL herr_t H5O__msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num);
+H5_DLL herr_t H5O__msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type);
#endif /* H5O_TESTING */
/* Object header debugging routines */
diff --git a/src/H5Otest.c b/src/H5Otest.c
index 32b31f2..7cb7b3d 100644
--- a/src/H5Otest.c
+++ b/src/H5Otest.c
@@ -75,11 +75,11 @@
/*--------------------------------------------------------------------------
NAME
- H5O_is_attr_dense_test
+ H5O__is_attr_dense_test
PURPOSE
Determine whether attributes for an object are stored "densely"
USAGE
- htri_t H5O_is_attr_dense_test(oid)
+ htri_t H5O__is_attr_dense_test(oid)
hid_t oid; IN: object to check
RETURNS
Non-negative TRUE/FALSE on success, negative on failure
@@ -93,7 +93,7 @@
REVISION LOG
--------------------------------------------------------------------------*/
htri_t
-H5O_is_attr_dense_test(hid_t oid)
+H5O__is_attr_dense_test(hid_t oid)
{
H5O_t *oh = NULL; /* Object header */
H5O_ainfo_t ainfo; /* Attribute information for object */
@@ -101,7 +101,7 @@ H5O_is_attr_dense_test(hid_t oid)
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Get object location for object */
if(NULL == (loc = H5O_get_loc(oid)))
@@ -114,7 +114,7 @@ H5O_is_attr_dense_test(hid_t oid)
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Check for attribute info stored */
ainfo.fheap_addr = HADDR_UNDEF;
@@ -136,21 +136,21 @@ H5O_is_attr_dense_test(hid_t oid)
done:
if(oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
if(api_ctx_pushed && H5CX_pop() < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_is_attr_dense_test() */
+} /* H5O__is_attr_dense_test() */
/*--------------------------------------------------------------------------
NAME
- H5O_is_attr_empty_test
+ H5O__is_attr_empty_test
PURPOSE
Determine whether there are any attributes for an object
USAGE
- htri_t H5O_is_attr_empty_test(oid)
+ htri_t H5O__is_attr_empty_test(oid)
hid_t oid; IN: object to check
RETURNS
Non-negative TRUE/FALSE on success, negative on failure
@@ -163,7 +163,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
htri_t
-H5O_is_attr_empty_test(hid_t oid)
+H5O__is_attr_empty_test(hid_t oid)
{
H5O_t *oh = NULL; /* Object header */
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
@@ -174,7 +174,7 @@ H5O_is_attr_empty_test(hid_t oid)
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Get object location for object */
if(NULL == (loc = H5O_get_loc(oid)))
@@ -187,7 +187,7 @@ H5O_is_attr_empty_test(hid_t oid)
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Check for attribute info stored */
if(oh->version > H5O_VERSION_1) {
@@ -237,21 +237,21 @@ done:
if(bt2_name && H5B2_close(bt2_name) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index")
if(oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
if(api_ctx_pushed && H5CX_pop() < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_is_attr_empty_test() */
+} /* H5O__is_attr_empty_test() */
/*--------------------------------------------------------------------------
NAME
- H5O_num_attrs_test
+ H5O__num_attrs_test
PURPOSE
Determine whether there are any attributes for an object
USAGE
- herr_t H5O_num_attrs_test(oid, nattrs)
+ herr_t H5O__num_attrs_test(oid, nattrs)
hid_t oid; IN: object to check
hsize_t *nattrs; OUT: Number of attributes on object
RETURNS
@@ -265,7 +265,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5O_num_attrs_test(hid_t oid, hsize_t *nattrs)
+H5O__num_attrs_test(hid_t oid, hsize_t *nattrs)
{
H5O_t *oh = NULL; /* Object header */
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
@@ -275,7 +275,7 @@ H5O_num_attrs_test(hid_t oid, hsize_t *nattrs)
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Get object location for object */
if(NULL == (loc = H5O_get_loc(oid)))
@@ -288,7 +288,7 @@ H5O_num_attrs_test(hid_t oid, hsize_t *nattrs)
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Check for attribute info stored */
ainfo.fheap_addr = HADDR_UNDEF;
@@ -335,21 +335,21 @@ done:
if(bt2_name && H5B2_close(bt2_name) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index")
if(oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
if(api_ctx_pushed && H5CX_pop() < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_num_attrs_test() */
+} /* H5O__num_attrs_test() */
/*--------------------------------------------------------------------------
NAME
- H5O_attr_dense_info_test
+ H5O__attr_dense_info_test
PURPOSE
Retrieve information about the state of the "dense" storage for attributes
USAGE
- herr_t H5O_attr_dense_info_test(oid, name_count, corder_count)
+ herr_t H5O__attr_dense_info_test(oid, name_count, corder_count)
hid_t oid; IN: Object to check
hsize_t *name_count; OUT: Number of attributes in name index
hsize_t *corder_count; OUT: Number of attributes in creation order index
@@ -365,7 +365,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
+H5O__attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
{
H5O_t *oh = NULL; /* Object header */
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
@@ -375,7 +375,7 @@ H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Get object location for object */
if(NULL == (loc = H5O_get_loc(oid)))
@@ -391,7 +391,7 @@ H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
- HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Check for attribute info stored */
ainfo.fheap_addr = HADDR_UNDEF;
@@ -438,22 +438,22 @@ done:
if(bt2_corder && H5B2_close(bt2_corder) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for creation order index")
if(oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
if(api_ctx_pushed && H5CX_pop() < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_attr_dense_info_test() */
+} /* H5O__attr_dense_info_test() */
/*--------------------------------------------------------------------------
NAME
- H5O_check_msg_marked_test
+ H5O__check_msg_marked_test
PURPOSE
Check if an unknown message with the "mark if unknown" flag actually gets
marked.
USAGE
- herr_t H5O_check_msg_marked_test(oid, flag_val)
+ herr_t H5O__check_msg_marked_test(oid, flag_val)
hid_t oid; IN: Object to check
hbool_t flag_val; IN: Desired flag value
RETURNS
@@ -468,7 +468,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5O_check_msg_marked_test(hid_t oid, hbool_t flag_val)
+H5O__check_msg_marked_test(hid_t oid, hbool_t flag_val)
{
H5O_t *oh = NULL; /* Object header */
H5O_loc_t *loc; /* Pointer to object's location */
@@ -476,7 +476,7 @@ H5O_check_msg_marked_test(hid_t oid, hbool_t flag_val)
unsigned idx; /* Index of message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Get object location for object */
if(NULL == (loc = H5O_get_loc(oid)))
@@ -484,11 +484,11 @@ H5O_check_msg_marked_test(hid_t oid, hbool_t flag_val)
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Locate "unknown" message */
for(idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++)
- if(idx_msg->type->id == H5O_UNKNOWN_ID) {
+ if(idx_msg->type->id == H5O_UNKNOWN_ID) {
/* Check for "unknown" message having the correct flags */
if(((idx_msg->flags & H5O_MSG_FLAG_WAS_UNKNOWN) > 0) != flag_val)
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "'unknown' message has incorrect 'was unknown' flag value")
@@ -503,15 +503,15 @@ H5O_check_msg_marked_test(hid_t oid, hbool_t flag_val)
done:
if(oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_check_msg_marked_test() */
+} /* H5O__check_msg_marked_test() */
/*--------------------------------------------------------------------------
NAME
- H5O_expunge_chunks_test
+ H5O__expunge_chunks_test
PURPOSE
Expunge all the chunks for an object header from the cache.
USAGE
@@ -529,7 +529,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5O_expunge_chunks_test(const H5O_loc_t *loc)
+H5O__expunge_chunks_test(const H5O_loc_t *loc)
{
H5O_t *oh = NULL; /* Object header */
haddr_t chk_addr[16]; /* Array of chunk addresses */
@@ -537,11 +537,11 @@ H5O_expunge_chunks_test(const H5O_loc_t *loc)
size_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
/* Safety check */
nchunks = oh->nchunks;
@@ -553,7 +553,7 @@ H5O_expunge_chunks_test(const H5O_loc_t *loc)
/* Release the object header */
if(H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header")
/* Iterate over all the saved chunk addresses, evicting them from the cache */
/* (in reverse order, so that chunk #0 is unpinned) */
@@ -563,16 +563,16 @@ H5O_expunge_chunks_test(const H5O_loc_t *loc)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_expunge_chunks_test() */
+} /* H5O__expunge_chunks_test() */
/*--------------------------------------------------------------------------
NAME
- H5O_get_rc
+ H5O__get_rc_test
PURPOSE
Retrieve the refcount for the object header
USAGE
- herr_t H5O_expunge_chunks_test(loc, rc)
+ herr_t H5O__get_rc_test(loc, rc)
const H5O_loc_t *loc; IN: Object location for object header to query
unsigned *rc; OUT: Pointer to refcount for object header
RETURNS
@@ -587,12 +587,12 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5O_get_rc(const H5O_loc_t *loc, unsigned *rc)
+H5O__get_rc_test(const H5O_loc_t *loc, unsigned *rc)
{
H5O_t *oh = NULL; /* Object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(loc);
@@ -600,7 +600,7 @@ H5O_get_rc(const H5O_loc_t *loc, unsigned *rc)
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
/* Save the refcount for the object header */
*rc = oh->nlink;
@@ -608,19 +608,19 @@ H5O_get_rc(const H5O_loc_t *loc, unsigned *rc)
done:
/* Release the object header */
if(oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header")
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_expunge_chunks_test() */
+} /* H5O__get_rc_test() */
/*--------------------------------------------------------------------------
NAME
- H5O_msg_get_chunkno_test
+ H5O__msg_get_chunkno_test
PURPOSE
Retrieve the chunk number for an object header message of a given type.
USAGE
- herr_t H5O_check_msg_marked_test(oid, chunk_num)
+ herr_t H5O__msg_get_chunkno_test(oid, msg_type, chunk_num)
hid_t oid; IN: Object to check
unsigned msg_type; IN: Object header message type to check
unsigned *chunk_num; OUT: Object header chunk that the message is in
@@ -636,7 +636,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5O_msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num)
+H5O__msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num)
{
H5O_t *oh = NULL; /* Object header */
H5O_loc_t *loc; /* Pointer to object's location */
@@ -645,7 +645,7 @@ H5O_msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num)
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Get object location for object */
if(NULL == (loc = H5O_get_loc(oid)))
@@ -658,11 +658,11 @@ H5O_msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num)
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Locate first message of given type */
for(idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++)
- if(idx_msg->type->id == msg_type) {
+ if(idx_msg->type->id == msg_type) {
/* Set the chunk number for the message */
*chunk_num = idx_msg->chunkno;
@@ -676,21 +676,21 @@ H5O_msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num)
done:
if(oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
if(api_ctx_pushed && H5CX_pop() < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_msg_get_chunkno_test() */
+} /* H5O__msg_get_chunkno_test() */
/*--------------------------------------------------------------------------
NAME
- H5O_msg_move_to_new_chunk_test
+ H5O__msg_move_to_new_chunk_test
PURPOSE
Move a message into a new chunk
USAGE
- herr_t H5O_msg_move_to_new_chunk_test(oid, msg_type)
+ herr_t H5O__msg_move_to_new_chunk_test(oid, msg_type)
hid_t oid; IN: Object to check
unsigned msg_type; IN: Object header message type to check
RETURNS
@@ -704,7 +704,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5O_msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type)
+H5O__msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type)
{
H5O_t *oh = NULL; /* Object header */
H5O_loc_t *loc; /* Pointer to object's location */
@@ -713,7 +713,7 @@ H5O_msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type)
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Get object location for object */
if(NULL == (loc = H5O_get_loc(oid)))
@@ -726,11 +726,11 @@ H5O_msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type)
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Locate first message of given type */
for(idx = 0, curr_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, curr_msg++)
- if(curr_msg->type->id == msg_type) {
+ if(curr_msg->type->id == msg_type) {
H5O_msg_alloc_info_t found_msg; /* Information about message to move */
unsigned msg_chunkno = curr_msg->chunkno; /* Chunk that the message is in */
uint8_t *end_chunk_data = (oh->chunk[msg_chunkno].image + oh->chunk[msg_chunkno].size) - (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[msg_chunkno].gap); /* End of message data in chunk */
@@ -784,10 +784,10 @@ H5O_msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type)
done:
if(oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
if(api_ctx_pushed && H5CX_pop() < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_msg_get_chunkno_test() */
+} /* H5O__msg_get_chunkno_test() */
diff --git a/src/H5PBprivate.h b/src/H5PBprivate.h
index aef87e1..b94b845 100644
--- a/src/H5PBprivate.h
+++ b/src/H5PBprivate.h
@@ -91,10 +91,8 @@ H5_DLL herr_t H5PB_dest(H5F_t *f);
H5_DLL herr_t H5PB_add_new_page(H5F_t *f, H5FD_mem_t type, haddr_t page_addr);
H5_DLL herr_t H5PB_update_entry(H5PB_t *page_buf, haddr_t addr, size_t size, const void *buf);
H5_DLL herr_t H5PB_remove_entry(const H5F_t *f, haddr_t addr);
-H5_DLL herr_t H5PB_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size,
- void *buf/*out*/);
-H5_DLL herr_t H5PB_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size,
- const void *buf);
+H5_DLL herr_t H5PB_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/);
+H5_DLL herr_t H5PB_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, const void *buf);
/* Statistics routines */
H5_DLL herr_t H5PB_reset_stats(H5PB_t *page_buf);
diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h
index 60b2363..19ff7f9 100644
--- a/src/H5Ppkg.h
+++ b/src/H5Ppkg.h
@@ -200,8 +200,8 @@ H5_DLL herr_t H5P_get_filter(const struct H5Z_filter_info_t *filter,
/* Testing functions */
#ifdef H5P_TESTING
-H5_DLL char *H5P_get_class_path_test(hid_t pclass_id);
-H5_DLL hid_t H5P_open_class_path_test(const char *path);
+H5_DLL char *H5P__get_class_path_test(hid_t pclass_id);
+H5_DLL hid_t H5P__open_class_path_test(const char *path);
#endif /* H5P_TESTING */
#endif /* _H5Ppkg_H */
diff --git a/src/H5Ptest.c b/src/H5Ptest.c
index 475a164..075040d 100644
--- a/src/H5Ptest.c
+++ b/src/H5Ptest.c
@@ -35,11 +35,11 @@
/*--------------------------------------------------------------------------
NAME
- H5P_get_class_path_test
+ H5P__get_class_path_test
PURPOSE
Routine to query the full path of a generic property list class
USAGE
- char *H5P_get_class_name_test(pclass_id)
+ char *H5P__get_class_name_test(pclass_id)
hid_t pclass_id; IN: Property class to query
RETURNS
Success: Pointer to a malloc'ed string containing the full path of class
@@ -51,17 +51,17 @@
GLOBAL VARIABLES
COMMENTS, BUGS, ASSUMPTIONS
- DO NOT USE THIS FUNCTION FOR ANYTHING EXCEPT TESTING H5P_get_class_path()
+ DO NOT USE THIS FUNCTION FOR ANYTHING EXCEPT TESTING H5P__get_class_path()
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
char *
-H5P_get_class_path_test(hid_t pclass_id)
+H5P__get_class_path_test(hid_t pclass_id)
{
H5P_genclass_t *pclass; /* Property class to query */
char *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI(NULL)
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
if(NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(pclass_id, H5I_GENPROP_CLS)))
@@ -73,53 +73,53 @@ H5P_get_class_path_test(hid_t pclass_id)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_get_class_path_test() */
+} /* H5P__get_class_path_test() */
/*--------------------------------------------------------------------------
NAME
- H5P_open_class_path_test
+ H5P__open_class_path_test
PURPOSE
Routine to open a [copy of] a class with its full path name
USAGE
- hid_t H5P_open_class_name_test(path)
+ hid_t H5P__open_class_name_test(path)
const char *path; IN: Full path name of class to open [copy of]
RETURNS
Success: ID of generic property class
- Failure: NULL
+ Failure: H5I_INVALID_HID
DESCRIPTION
This routine opens [a copy] of the class indicated by the full path.
GLOBAL VARIABLES
COMMENTS, BUGS, ASSUMPTIONS
- DO NOT USE THIS FUNCTION FOR ANYTHING EXCEPT TESTING H5P_open_class_path()
+ DO NOT USE THIS FUNCTION FOR ANYTHING EXCEPT TESTING H5P__open_class_path()
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
hid_t
-H5P_open_class_path_test(const char *path)
+H5P__open_class_path_test(const char *path)
{
H5P_genclass_t *pclass = NULL; /* Property class to query */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
- if (NULL == path || *path=='\0')
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid class path");
+ if(NULL == path || *path=='\0')
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid class path");
/* Open the property list class */
- if ((pclass=H5P_open_class_path(path))==NULL)
- HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "unable to find class with full path");
+ if(NULL == (pclass = H5P_open_class_path(path)))
+ HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, H5I_INVALID_HID, "unable to find class with full path");
/* Get an atom for the class */
- if ((ret_value=H5I_register(H5I_GENPROP_CLS, pclass, TRUE))<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to atomize property list class");
+ if((ret_value = H5I_register(H5I_GENPROP_CLS, pclass, TRUE)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize property list class");
done:
- if(ret_value<0 && pclass)
+ if(H5I_INVALID_HID == ret_value && pclass)
H5P_close_class(pclass);
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_open_class_path_test() */
+} /* H5P__open_class_path_test() */
diff --git a/src/H5SMtest.c b/src/H5SMtest.c
index 490265c..0a6149d 100644
--- a/src/H5SMtest.c
+++ b/src/H5SMtest.c
@@ -113,7 +113,7 @@ H5SM__get_mesg_count_test(H5F_t *f, unsigned type_id, size_t *mesg_count)
done:
/* Release resources */
if(table && H5AC_unprotect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
+ HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5SM__get_mesg_count_test() */
diff --git a/src/H5TS.c b/src/H5TS.c
index d239e09..10e14d5 100644
--- a/src/H5TS.c
+++ b/src/H5TS.c
@@ -359,7 +359,6 @@ H5TS_win32_process_enter(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *lpContex)
ret_value = FALSE;
#endif /* H5_HAVE_CODESTACK */
- /* Set up thread local storage */
if(TLS_OUT_OF_INDEXES == (H5TS_apictx_key_g = TlsAlloc()))
ret_value = FALSE;
@@ -428,12 +427,9 @@ H5TS_win32_process_exit(void)
/* Clean up per-process thread local storage */
TlsFree(H5TS_errstk_key_g);
-
#ifdef H5_HAVE_CODESTACK
TlsFree(H5TS_funcstk_key_g);
#endif /* H5_HAVE_CODESTACK */
-
- /* Clean up per-process thread local storage */
TlsFree(H5TS_apictx_key_g);
return;
@@ -479,7 +475,6 @@ H5TS_win32_thread_exit(void)
LocalFree((HLOCAL)lpvData);
#endif /* H5_HAVE_CODESTACK */
- /* Clean up per-thread thread local storage */
lpvData = TlsGetValue(H5TS_apictx_key_g);
if(lpvData)
LocalFree((HLOCAL)lpvData);
@@ -534,3 +529,4 @@ H5TS_create_thread(void *(*func)(void *), H5TS_attr_t *attr, void *udata)
} /* H5TS_create_thread */
#endif /* H5_HAVE_THREADSAFE */
+
diff --git a/src/H5TSprivate.h b/src/H5TSprivate.h
index 8d74676..9e093a6 100644
--- a/src/H5TSprivate.h
+++ b/src/H5TSprivate.h
@@ -128,3 +128,4 @@ H5_DLL H5TS_thread_t H5TS_create_thread(void *(*func)(void *), H5TS_attr_t * att
#endif /* c_plusplus || __cplusplus */
#endif /* H5TSprivate_H_ */
+
diff --git a/test/cache_common.c b/test/cache_common.c
index 2cc188e..b078964 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -20,6 +20,7 @@
#include "H5CXprivate.h" /* API Contexts */
#include "H5MFprivate.h"
#include "H5MMprivate.h"
+
#include "cache_common.h"
@@ -3276,23 +3277,24 @@ setup_cache(size_t max_cache_size,
FUNC, mile_stone++, (int)pass);
if(pass) {
- HDassert(fid >= 0);
- saved_fid = fid;
+ HDassert(fid >= 0);
+ saved_fid = fid;
if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) {
pass = FALSE;
failure_mssg = "H5Fflush() failed.";
if(verbose)
HDfprintf(stdout, "%s: H5Fflush() failed.\n", FUNC);
- } else {
+ }
+ else {
file_ptr = (H5F_t *)H5I_object_verify(fid, H5I_FILE);
- if(file_ptr == NULL) {
+ if(file_ptr == NULL) {
pass = FALSE;
failure_mssg = "Can't get file_ptr.";
if(verbose)
HDfprintf(stdout, "%s: H5Fflush() failed.\n", FUNC);
- }
+ }
}
}
@@ -3303,36 +3305,36 @@ setup_cache(size_t max_cache_size,
if(pass) {
/* A bit of fancy footwork here:
- *
- * The call to H5Fcreate() allocates an instance of H5C_t,
- * initializes it, and stores its address in f->shared->cache.
- *
- * We don't want to use this cache, as it has a bunch of extra
- * initialization that may change over time, and in any case
- * it will not in general be configured the way we want it.
- *
- * We used to deal with this problem by storing the file pointer
- * in another instance of H5C_t, and then ignoring the original
- * version. However, this strategy doesn't work any more, as
- * we can't store the file pointer in the instance of H5C_t,
- * and we have modified many cache routines to use a file
- * pointer to look up the target cache.
- *
- * Thus we now make note of the address of the instance of
- * H5C_t created by the call to H5Fcreate(), set
- * file_ptr->shared->cache to NULL, call H5C_create()
- * to allocate a new instance of H5C_t for test purposes,
- * and store than new instance's address in
- * file_ptr->shared->cache.
- *
- * On shut down, we call H5C_dest on our instance of H5C_t,
- * set file_ptr->shared->cache to point to the original
- * instance, and then close the file normally.
- */
+ *
+ * The call to H5Fcreate() allocates an instance of H5C_t,
+ * initializes it, and stores its address in f->shared->cache.
+ *
+ * We don't want to use this cache, as it has a bunch of extra
+ * initialization that may change over time, and in any case
+ * it will not in general be configured the way we want it.
+ *
+ * We used to deal with this problem by storing the file pointer
+ * in another instance of H5C_t, and then ignoring the original
+ * version. However, this strategy doesn't work any more, as
+ * we can't store the file pointer in the instance of H5C_t,
+ * and we have modified many cache routines to use a file
+ * pointer to look up the target cache.
+ *
+ * Thus we now make note of the address of the instance of
+ * H5C_t created by the call to H5Fcreate(), set
+ * file_ptr->shared->cache to NULL, call H5C_create()
+ * to allocate a new instance of H5C_t for test purposes,
+ * and store than new instance's address in
+ * file_ptr->shared->cache.
+ *
+ * On shut down, we call H5C_dest on our instance of H5C_t,
+ * set file_ptr->shared->cache to point to the original
+ * instance, and then close the file normally.
+ */
HDassert(saved_cache == NULL);
- saved_cache = file_ptr->shared->cache;
- file_ptr->shared->cache = NULL;
+ saved_cache = file_ptr->shared->cache;
+ file_ptr->shared->cache = NULL;
cache_ptr = H5C_create(max_cache_size,
min_clean_size,
@@ -3351,19 +3353,20 @@ setup_cache(size_t max_cache_size,
FUNC, mile_stone++, (int)pass);
if(pass) {
- if(cache_ptr == NULL) {
+ if(cache_ptr == NULL) {
pass = FALSE;
failure_mssg = "H5C_create() failed.";
if(verbose)
HDfprintf(stdout, "%s: H5C_create() failed.\n", FUNC);
- } else if(cache_ptr->magic != H5C__H5C_T_MAGIC) {
+ }
+ else if(cache_ptr->magic != H5C__H5C_T_MAGIC) {
pass = FALSE;
- failure_mssg = "Bad cache_ptr magic.";
+ failure_mssg = "Bad cache_ptr magic.";
if(verbose)
HDfprintf(stdout, "%s: Bad cache_ptr magic.\n", FUNC);
- }
+ }
}
if(show_progress) /* 7 */
@@ -3446,7 +3449,7 @@ takedown_cache(H5F_t * file_ptr,
H5C_stats(cache_ptr, "test cache", dump_detailed_stats);
}
- if ( H5C_prep_for_file_close(file_ptr) < 0 ) {
+ if ( H5C_prep_for_file_close(file_ptr) < 0 ) {
pass = FALSE;
failure_mssg = "unexpected failure of prep for file close.\n";
@@ -3456,23 +3459,23 @@ takedown_cache(H5F_t * file_ptr,
H5C_dest(file_ptr);
- if ( saved_cache != NULL ) {
+ if ( saved_cache != NULL ) {
- file_ptr->shared->cache = saved_cache;
- saved_cache = NULL;
- }
+ file_ptr->shared->cache = saved_cache;
+ saved_cache = NULL;
+ }
}
if ( saved_fapl_id != H5P_DEFAULT ) {
H5Pclose(saved_fapl_id);
- saved_fapl_id = H5P_DEFAULT;
+ saved_fapl_id = H5P_DEFAULT;
}
if ( saved_fcpl_id != H5P_DEFAULT ) {
H5Pclose(saved_fcpl_id);
- saved_fcpl_id = H5P_DEFAULT;
+ saved_fcpl_id = H5P_DEFAULT;
}
if ( saved_fid != -1 ) {
@@ -3489,21 +3492,21 @@ takedown_cache(H5F_t * file_ptr,
saved_actual_base_addr = HADDR_UNDEF;
}
- if ( H5Fclose(saved_fid) < 0 ) {
+ if ( H5Fclose(saved_fid) < 0 ) {
pass = FALSE;
- failure_mssg = "couldn't close test file.";
+ failure_mssg = "couldn't close test file.";
- } else {
+ } else {
- saved_fid = -1;
+ saved_fid = -1;
}
/* Pop API context */
H5CX_pop();
- if ( ( ! try_core_file_driver ) || ( core_file_driver_failed ) ) {
+ if ( ( ! try_core_file_driver ) || ( core_file_driver_failed ) ) {
if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
== NULL ) {
@@ -3515,10 +3518,10 @@ takedown_cache(H5F_t * file_ptr,
if ( HDremove(filename) < 0 ) {
pass = FALSE;
- failure_mssg = "couldn't delete test file.";
+ failure_mssg = "couldn't delete test file.";
- }
- }
+ }
+ }
}
return;
diff --git a/test/cache_logging.c b/test/cache_logging.c
index 1eb9d41..6fd48d8 100644
--- a/test/cache_logging.c
+++ b/test/cache_logging.c
@@ -40,8 +40,8 @@ test_logging_api(void)
char *location = NULL;
size_t size;
- hid_t fid;
- hid_t gid;
+ hid_t fid = -1;
+ hid_t gid = -1;
hbool_t is_currently_logging;
char group_name[8];
char filename[1024];
@@ -166,10 +166,11 @@ main(void)
if(nerrors) {
HDprintf("***** %d Metadata cache logging TEST%s FAILED! *****\n",
nerrors, nerrors > 1 ? "S" : "");
- return 1;
+ HDexit(EXIT_FAILURE);
}
HDprintf("All Metadata Cache Logging tests passed.\n");
- return 0;
+
+ HDexit(EXIT_SUCCESS);
}
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 119ba62..0160607 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -394,7 +394,7 @@ error:
* Function: get_sbe_tag()
*
* Purpose: This function retrieves the tag associated with the superblock
- * extension (the object header address stored in the superblock)
+ * extension (the object header address stored in the superblock)
*
* Return: 0 on Success; 1 on Failure
*
@@ -407,7 +407,7 @@ static int
get_sbe_tag(hid_t fid, haddr_t *tag)
{
/* Retrieve the superblock extension's object header address for the file */
- if(H5F_get_sbe_addr_test(fid, tag) < 0)
+ if(H5F__get_sbe_addr_test(fid, tag) < 0)
TEST_ERROR;
return 0;
@@ -3599,7 +3599,7 @@ check_external_link_open_tags(void)
/* =========================== */
/* Close open objects and file */
/* =========================== */
- if ( (H5Gclose(xid)) < 0 ) TEST_ERROR;
+ if ( H5Gclose(xid) < 0 ) TEST_ERROR;
if ( H5Fclose(fid) < 0 ) TEST_ERROR;
if ( H5Fclose(fid2) < 0 ) TEST_ERROR;
@@ -3672,7 +3672,7 @@ check_invalid_tag_application(void)
/* This should fail as no tag is set up during the protect call */
if (( lheap = H5HL_protect(f, addr, H5AC__NO_FLAGS_SET)) != NULL ) TEST_ERROR;
- /* Again, set up a valid tag in the DXPL */
+ /* Again, set up a valid tag in the API context */
H5AC_tag((haddr_t)25, NULL);
/* Call H5HL_protect again to protect the local heap. This should succeed. */
@@ -3711,9 +3711,7 @@ error:
*
* Purpose: Run tests on library's ability to tag metadata entries.
*
- * Return: Success:
- *
- * Failure:
+ * Return: EXIT_SUCCESS/EXIT_FAILURE
*
* Programmer: Mike McGreevy
* January 15, 2009
@@ -3755,12 +3753,12 @@ main(void)
/* Run tests on each fcpl set up above. */
if (test_type == TEST_DEFAULT) {
- if (!nerrs) printf("Testing standard tag application cases w/ default fcpl:\n");
+ if (!nerrs) HDprintf("Testing standard tag application cases w/ default fcpl:\n");
fcpl = fcpl_default;
} else if (test_type == TEST_SHMESG) {
- if (!nerrs) printf("Testing standard tag application cases w/ shared messages:\n");
+ if (!nerrs) HDprintf("Testing standard tag application cases w/ shared messages:\n");
fcpl = fcpl_shmesg_all;
} else {
@@ -3780,7 +3778,7 @@ main(void)
if (!nerrs) nerrs += check_link_removal_tags(fcpl, test_type);
} /* end for */
- if (!nerrs) printf("Testing other specific tag application cases:\n");
+ if (!nerrs) HDprintf("Testing other specific tag application cases:\n");
if (!nerrs) nerrs += check_group_creation_tags();
if (!nerrs) nerrs += check_multi_group_creation_tags();
if (!nerrs) nerrs += check_group_open_tags();
@@ -3804,10 +3802,13 @@ main(void)
HDremove(FILENAME2);
/* Return Errors */
- return nerrs > 0;
+ if (nerrs > 0)
+ return EXIT_FAILURE;
+ else
+ return EXIT_SUCCESS;
error:
/* Return with Error */
- return 1;
+ return EXIT_FAILURE;
} /* main */
diff --git a/test/dangle.c b/test/dangle.c
index 75e9c84..9f30f10 100644
--- a/test/dangle.c
+++ b/test/dangle.c
@@ -602,7 +602,8 @@ test_dangle_force(void)
TEST_ERROR;
/* Allocate the array of object IDs */
- objs = (hid_t*)HDmalloc(sizeof(hid_t) * (size_t)count);
+ if(NULL == (objs = (hid_t *)HDcalloc((size_t)count, sizeof(hid_t))))
+ TEST_ERROR;
/* Get the list of open IDs */
if(H5Fget_obj_ids((hid_t)H5F_OBJ_ALL, H5F_OBJ_ALL, (size_t)count, objs) < 0)
diff --git a/test/earray.c b/test/earray.c
index d72b3f5..02e4d85 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -521,18 +521,18 @@ verify_cparam(const H5EA_t *ea, const H5EA_create_t *cparam)
/* Retrieve creation parameters */
HDmemset(&test_cparam, 0, sizeof(H5EA_create_t));
- if(H5EA_get_cparam_test(ea, &test_cparam) < 0)
+ if(H5EA__get_cparam_test(ea, &test_cparam) < 0)
FAIL_STACK_ERROR
/* Verify creation parameters */
- if(H5EA_cmp_cparam_test(cparam, &test_cparam))
+ if(H5EA__cmp_cparam_test(cparam, &test_cparam))
TEST_ERROR
/* Success */
- return(0);
+ return 0;
error:
- return(-1);
+ return -1;
} /* verify_cparam() */
@@ -2398,7 +2398,7 @@ error:
H5E_BEGIN_TRY {
if(ea)
H5EA_close(ea);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return 1;
diff --git a/test/efc.c b/test/efc.c
index 5a946bb..d63ef34 100644
--- a/test/efc.c
+++ b/test/efc.c
@@ -2885,8 +2885,7 @@ error:
*
* Purpose: Test the external file cache code
*
- * Return: Success: SUCCEED
- * Failure: FAIL
+ * Return: EXIT_SUCCESS/EXIT_FAILURE
*
* Programmer: Neil Fortner
* December 16, 2010
@@ -2900,7 +2899,7 @@ main(void)
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
/* Test Setup */
- puts("Testing the external file cache");
+ HDputs("Testing the external file cache");
/* Create property lists */
fcpl_id = H5Pcreate(H5P_FILE_CREATE);
@@ -2937,14 +2936,14 @@ main(void)
if(nerrors)
goto error;
- puts("All external file cache tests passed.");
+ HDputs("All external file cache tests passed.");
h5_clean_files(FILENAME, fapl_id);
- return 0;
+ return EXIT_SUCCESS;
error:
- puts("*** TESTS FAILED ***");
+ HDputs("*** TESTS FAILED ***");
H5E_BEGIN_TRY {
H5Pclose(fapl_id);
@@ -2952,6 +2951,6 @@ error:
if(api_ctx_pushed) H5CX_pop();
- return 1;
+ return EXIT_FAILURE;
} /* end main() */
diff --git a/test/err_compat.c b/test/err_compat.c
index eee150b..4860a3c 100644
--- a/test/err_compat.c
+++ b/test/err_compat.c
@@ -469,7 +469,7 @@ main(void)
char filename[1024];
const char *FUNC_main="main";
- fprintf(stderr, " This program tests the Error API compatible with HDF5 v1.6. There're supposed to be some error messages\n");
+ fprintf(stderr, " This program tests the Error API compatible with HDF5 v1.6. There are supposed to be some error messages\n");
fapl = h5_fileaccess();
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
diff --git a/test/evict_on_close.c b/test/evict_on_close.c
index 6536837..9d23f2f 100644
--- a/test/evict_on_close.c
+++ b/test/evict_on_close.c
@@ -11,11 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/*
- * Programmer: Dana Robinson
- * Spring 2016
- *
- * Purpose: Tests the basic operation of the evict-on-close cache
+/* Purpose: Tests the basic operation of the evict-on-close cache
* behavior. Tests that ensure the tagging is handled correctly
* are located in cache.c.
*/
@@ -91,9 +87,6 @@ static herr_t check_group_layout(hid_t fid, const char *group_name);
*
* Return: TRUE/FALSE
*
- * Programmer: Dana Robinson
- * Fall 2016
- *
*-------------------------------------------------------------------------
*/
static hbool_t
@@ -114,8 +107,8 @@ verify_tag_not_in_cache(H5F_t *f, haddr_t tag)
return TRUE;
else
entry_ptr = entry_ptr->ht_next;
- } /* end while */
- } /* end for */
+ }
+ }
return FALSE;
} /* end verify_tag_not_in_cache() */
@@ -129,9 +122,6 @@ verify_tag_not_in_cache(H5F_t *f, haddr_t tag)
* Return: Success: The file ID of the created file
* Failure: -1
*
- * Programmer: Dana Robinson
- * Fall 2016
- *
*-------------------------------------------------------------------------
*/
static hid_t
@@ -207,7 +197,7 @@ generate_eoc_test_file(hid_t fapl_id)
TEST_ERROR;
if(H5Gclose(gid2) < 0)
TEST_ERROR;
- } /* end for */
+ }
if(H5Gclose(gid1) < 0)
TEST_ERROR;
@@ -303,7 +293,7 @@ generate_eoc_test_file(hid_t fapl_id)
TEST_ERROR;
if(H5Gclose(gid2) < 0)
TEST_ERROR;
- } /* end for */
+ }
if(H5Gclose(gid1) < 0)
TEST_ERROR;
@@ -593,9 +583,6 @@ error:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Dana Robinson
- * Fall 2016
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -710,9 +697,6 @@ error:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Dana Robinson
- * Fall 2016
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -815,9 +799,6 @@ error:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Dana Robinson
- * Spring 2016
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -873,7 +854,7 @@ check_evict_on_close_api(void)
/* ensure an invalid plist fails */
H5E_BEGIN_TRY {
- status = H5Pget_evict_on_close((hid_t)-1, &evict_on_close);
+ status = H5Pget_evict_on_close(H5I_INVALID_HID, &evict_on_close);
} H5E_END_TRY;
if(status >= 0)
FAIL_PUTS_ERROR("H5Pget_evict_on_close() accepted invalid hid_t.");
@@ -897,9 +878,6 @@ error:
*
* Return: EXIT_FAILURE/EXIT_SUCCESS
*
- * Programmer: Dana Robinson
- * Spring 2016
- *
*-------------------------------------------------------------------------
*/
int
@@ -979,7 +957,7 @@ main(void)
HDprintf("All evict-on-close tests passed.\n");
- return EXIT_SUCCESS;
+ HDexit(EXIT_SUCCESS);
error:
@@ -992,7 +970,7 @@ error:
H5Pclose(fapl_id);
} H5E_END_TRY;
- return EXIT_FAILURE;
+ HDexit(EXIT_FAILURE);
} /* end main() */
@@ -1007,9 +985,6 @@ error:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Dana Robinson
- * Spring 2017
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1052,9 +1027,6 @@ error:
*
* Return: EXIT_FAILURE/EXIT_SUCCESS
*
- * Programmer: Dana Robinson
- * Spring 2016
- *
*-------------------------------------------------------------------------
*/
int
@@ -1076,14 +1048,14 @@ main(void)
HDprintf("All evict-on-close tests passed.\n");
HDprintf("Note that EoC is not supported under parallel so most tests are skipped.\n");
- return EXIT_SUCCESS;
+ HDexit(EXIT_SUCCESS);
error:
HDprintf("***** %u evict-on-close test%s FAILED! *****\n",
nerrors, nerrors > 1 ? "S" : "");
- return EXIT_FAILURE;
+ HDexit(EXIT_FAILURE);
} /* main() - parallel */
diff --git a/test/farray.c b/test/farray.c
index 383cb32..21d3186 100644
--- a/test/farray.c
+++ b/test/farray.c
@@ -25,9 +25,9 @@
#include "H5FApkg.h" /* Fixed Arrays */
/* Other private headers that this test requires */
-#include "H5CXprivate.h" /* API Contexts */
-#include "H5Iprivate.h" /* IDs */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5CXprivate.h" /* API Contexts */
+#include "H5Iprivate.h" /* IDs */
+#include "H5VMprivate.h" /* Vectors and arrays */
/* Local macros */
@@ -113,74 +113,71 @@ h5_stat_size_t empty_size_g;
/*-------------------------------------------------------------------------
- * Function: init_cparam
+ * Function: init_cparam
*
- * Purpose: Initialize array creation parameter structure
+ * Purpose: Initialize array creation parameter structure
*
- * Return: Success: 0
- * Failure: -1
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
-static int
+static herr_t
init_cparam(H5FA_create_t *cparam, farray_test_param_t *tparam)
{
/* Wipe out background */
HDmemset(cparam, 0, sizeof(*cparam));
- cparam->cls = H5FA_CLS_TEST;
- cparam->raw_elmt_size = ELMT_SIZE;
- cparam->max_dblk_page_nelmts_bits = MAX_DBLOCK_PAGE_NELMTS_BITS;
- cparam->nelmts = tparam->nelmts;
+ cparam->cls = H5FA_CLS_TEST;
+ cparam->raw_elmt_size = ELMT_SIZE;
+ cparam->max_dblk_page_nelmts_bits = MAX_DBLOCK_PAGE_NELMTS_BITS;
+ cparam->nelmts = tparam->nelmts;
- return(0);
+ return SUCCEED;
} /* init_cparam() */
/*-------------------------------------------------------------------------
- * Function: create_file
+ * Function: create_file
*
- * Purpose: Create file and retrieve pointer to internal file object
- *
- * Return: Success: 0
- * Failure: -1
+ * Purpose: Create file and retrieve pointer to internal file object
*
+ * Return: SUCCEED/FAIL
+ *
*-------------------------------------------------------------------------
*/
-static int
-create_file(hid_t fapl, hid_t *file, H5F_t **f)
+static herr_t
+create_file(hid_t fapl_id, hid_t *fid, H5F_t **f)
{
/* Create the file to work on */
- if((*file = H5Fcreate(filename_g, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ if((*fid = H5Fcreate(filename_g, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
FAIL_STACK_ERROR
/* Get a pointer to the internal file object */
- if(NULL == (*f = (H5F_t *)H5I_object(*file)))
- FAIL_STACK_ERROR
+ if(NULL == (*f = (H5F_t *)H5I_object(*fid)))
+ FAIL_STACK_ERROR;
/* Ignore metadata tags in the file's cache */
if(H5AC_ignore_tags(*f) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Success */
- return(0);
+ return SUCCEED;
error:
- return(-1);
+ return FAIL;
} /* create_file() */
/*-------------------------------------------------------------------------
- * Function: check_stats
+ * Function: check_stats
*
- * Purpose: Verify stats for a fixed array
+ * Purpose: Verify stats for a fixed array
*
- * Return: Success: 0
- * Failure: -1
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
-static int
+static herr_t
check_stats(const H5FA_t *fa, const farray_state_t *state)
{
H5FA_stat_t farray_stats; /* Statistics about the array */
@@ -194,40 +191,38 @@ check_stats(const H5FA_t *fa, const farray_state_t *state)
HDfprintf(stdout, "farray_stats.hdr_size = %Hu, state->hdr_size = %Hu\n",
farray_stats.hdr_size, state->hdr_size);
TEST_ERROR
- } /* end if */
+ }
if(farray_stats.dblk_size != state->dblk_size) {
HDfprintf(stdout, "farray_stats.dblk_size = %Hu, state->dblk_size = %Hu\n",
farray_stats.dblk_size, state->dblk_size);
TEST_ERROR
- } /* end if */
+ }
if(farray_stats.nelmts != state->nelmts) {
HDfprintf(stdout, "farray_stats.nelmts = %Hu, state->nelmts = %Hu\n",
farray_stats.nelmts, state->nelmts);
TEST_ERROR
- } /* end if */
+ }
- /* All tests passed */
- return(0);
+ /* Success */
+ return SUCCEED;
error:
- return(-1);
+ return FAIL;
} /* check_stats() */
/*-------------------------------------------------------------------------
- * Function: set_fa_state
+ * Function: set_fa_state
*
- * Purpose: Set the state of the Fixed Array
+ * Purpose: Set the state of the Fixed Array
*
- * Return: does not fail
- *
- * Programmer: Vailin Choi; 5th August, 2009
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
-static int
+static herr_t
set_fa_state(const H5FA_create_t *cparam, farray_state_t *state)
{
size_t dblk_page_nelmts; /* # of elements per page */
@@ -242,57 +237,58 @@ set_fa_state(const H5FA_create_t *cparam, farray_state_t *state)
dblk_page_nelmts = (size_t)1 << cparam->max_dblk_page_nelmts_bits;
if(state->nelmts > dblk_page_nelmts) {
- size_t npages = (size_t)(((state->nelmts + dblk_page_nelmts) - 1) / dblk_page_nelmts);
- size_t dblk_page_init_size = (npages + 7) / 8;
- hsize_t checksum_size = npages * 4;
+ size_t npages = (size_t)(((state->nelmts + dblk_page_nelmts) - 1) / dblk_page_nelmts);
+ size_t dblk_page_init_size = (npages + 7) / 8;
+ hsize_t checksum_size = npages * 4;
- state->dblk_size = DBLOCK_PREFIX + dblk_page_init_size + checksum_size +
+ state->dblk_size = DBLOCK_PREFIX + dblk_page_init_size + checksum_size +
state->nelmts * cparam->raw_elmt_size;
- } else
- state->dblk_size = DBLOCK_PREFIX + state->nelmts * cparam->raw_elmt_size;
+ }
+ else
+ state->dblk_size = DBLOCK_PREFIX + state->nelmts * cparam->raw_elmt_size;
- return(0);
+ return SUCCEED;
} /* end set_fa_state() */
/*-------------------------------------------------------------------------
- * Function: reopen_file
+ * Function: reopen_file
*
- * Purpose: Perform common "re-open" operations on file & array for testing
+ * Purpose: Perform common "re-open" operations on file & array for testing
*
- * Return: Success: 0
- * Failure: -1
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
static int
-reopen_file(hid_t *file, H5F_t **f, hid_t fapl,
+reopen_file(hid_t *fid, H5F_t **f, hid_t fapl_id,
H5FA_t **fa, haddr_t fa_addr, const farray_test_param_t *tparam)
{
/* Check for closing & re-opening the array */
/* (actually will close & re-open the file as well) */
if(tparam->reopen_array) {
+
/* Close array, if given */
if(fa && *fa) {
if(H5FA_close(*fa) < 0)
FAIL_STACK_ERROR
*fa = NULL;
- } /* end if */
+ }
/* Close file */
- if(*file) {
- if(H5Fclose(*file) < 0)
+ if(*fid) {
+ if(H5Fclose(*fid) < 0)
FAIL_STACK_ERROR
- *file = (-1);
+ *fid = H5I_INVALID_HID;
*f = NULL;
- } /* end if */
+ }
/* Re-open the file */
- if((*file = H5Fopen(filename_g, H5F_ACC_RDWR, fapl)) < 0)
+ if((*fid = H5Fopen(filename_g, H5F_ACC_RDWR, fapl_id)) < 0)
FAIL_STACK_ERROR
/* Get a pointer to the internal file object */
- if(NULL == (*f = (H5F_t *)H5I_object(*file)))
+ if(NULL == (*f = (H5F_t *)H5I_object(*fid)))
FAIL_STACK_ERROR
/* Ignore metadata tags in the file's cache */
@@ -303,27 +299,26 @@ reopen_file(hid_t *file, H5F_t **f, hid_t fapl,
if(fa)
if(NULL == (*fa = H5FA_open(*f, fa_addr, NULL)))
FAIL_STACK_ERROR
- } /* end if */
+ }
/* Success */
- return(0);
+ return SUCCEED;
error:
- return(-1);
+ return FAIL;
} /* reopen_file() */
/*-------------------------------------------------------------------------
- * Function: create_array
+ * Function: create_array
*
- * Purpose: Create a fixed array and perform initial checks
+ * Purpose: Create a fixed array and perform initial checks
*
- * Return: Success: 0
- * Failure: -1
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
-static int
+static herr_t
create_array(H5F_t *f, const H5FA_create_t *cparam,
H5FA_t **fa, haddr_t *fa_addr)
{
@@ -338,65 +333,65 @@ create_array(H5F_t *f, const H5FA_create_t *cparam,
FAIL_STACK_ERROR
if(!H5F_addr_defined(*fa_addr))
TEST_ERROR
+
+ /* Check array stats */
HDmemset(&state, 0, sizeof(state));
- state.hdr_size = FA_HDR_SIZE;
- state.nelmts = cparam->nelmts;
+ state.hdr_size = FA_HDR_SIZE;
+ state.nelmts = cparam->nelmts;
if(check_stats(*fa, &state))
TEST_ERROR
/* Success */
- return(0);
+ return SUCCEED;
error:
- return(-1);
+ return FAIL;
} /* create_array() */
/*-------------------------------------------------------------------------
- * Function: verify_cparam
+ * Function: verify_cparam
*
- * Purpose: Verify creation parameters are correct
+ * Purpose: Verify creation parameters are correct
*
- * Return: Success: 0
- * Failure: -1
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
-static int
+static herr_t
verify_cparam(const H5FA_t *fa, const H5FA_create_t *cparam)
{
H5FA_create_t test_cparam; /* Creation parameters for array */
/* Retrieve creation parameters */
HDmemset(&test_cparam, 0, sizeof(H5FA_create_t));
- if(H5FA_get_cparam_test(fa, &test_cparam) < 0)
+ if(H5FA__get_cparam_test(fa, &test_cparam) < 0)
FAIL_STACK_ERROR
/* Verify creation parameters */
- if(H5FA_cmp_cparam_test(cparam, &test_cparam))
+ if(H5FA__cmp_cparam_test(cparam, &test_cparam))
TEST_ERROR
/* Success */
- return(0);
+ return SUCCEED;
error:
- return(-1);
+ return FAIL;
} /* verify_cparam() */
/*-------------------------------------------------------------------------
- * Function: finish
+ * Function: finish
*
- * Purpose: Close array, delete array, close file and verify that file
+ * Purpose: Close array, delete array, close file and verify that file
* is empty size
*
- * Return: Success: 0
- * Failure: -1
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
-static int
-finish(hid_t file, hid_t fapl, H5F_t *f, H5FA_t *fa, haddr_t fa_addr)
+static herr_t
+finish(hid_t fid, hid_t fapl_id, H5F_t *f, H5FA_t *fa, haddr_t fa_addr)
{
h5_stat_size_t file_size; /* File size, after deleting array */
@@ -409,11 +404,11 @@ finish(hid_t file, hid_t fapl, H5F_t *f, H5FA_t *fa, haddr_t fa_addr)
FAIL_STACK_ERROR
/* Close the file */
- if(H5Fclose(file) < 0)
+ if(H5Fclose(fid) < 0)
FAIL_STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename_g, fapl)) < 0)
+ if((file_size = h5_get_file_size(filename_g, fapl_id)) < 0)
TEST_ERROR
/* Verify the file is correct size */
@@ -421,10 +416,10 @@ finish(hid_t file, hid_t fapl, H5F_t *f, H5FA_t *fa, haddr_t fa_addr)
TEST_ERROR
/* Success */
- return(0);
+ return SUCCEED;
error:
- return(-1);
+ return FAIL;
} /* finish() */
@@ -627,23 +622,21 @@ error:
*-------------------------------------------------------------------------
*/
static unsigned
-test_open_twice(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
+test_open_twice(hid_t fapl_id, H5FA_create_t *cparam, farray_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- hid_t file2 = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5F_t *f2 = NULL; /* Internal file object pointer */
- H5FA_t *fa = NULL; /* Fixed array wrapper */
- H5FA_t *fa2 = NULL; /* Fixed array wrapper */
- haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fid2 = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5F_t *f2 = NULL; /* Internal file object pointer */
+ H5FA_t *fa = NULL; /* Fixed array wrapper */
+ H5FA_t *fa2 = NULL; /* Fixed array wrapper */
+ haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
/* Create file & retrieve pointer to internal file object */
- if(create_file(fapl, &file, &f) < 0)
+ if(create_file(fapl_id, &fid, &f) < 0)
TEST_ERROR
- /*
- * Display testing message
- */
+ /* Display testing message */
TESTING("open fixed array twice");
/* Create array */
@@ -666,15 +659,15 @@ test_open_twice(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
fa2 = NULL;
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, &fa, fa_addr, tparam) < 0)
+ if(reopen_file(&fid, &f, fapl_id, &fa, fa_addr, tparam) < 0)
TEST_ERROR
/* Re-open the file */
- if((file2 = H5Freopen(file)) < 0)
+ if((fid2 = H5Freopen(fid)) < 0)
FAIL_STACK_ERROR
/* Get a pointer to the internal file object */
- if(NULL == (f2 = (H5F_t *)H5I_object(file2)))
+ if(NULL == (f2 = (H5F_t *)H5I_object(fid2)))
FAIL_STACK_ERROR
/* Open the fixed array through the second file handle */
@@ -694,11 +687,11 @@ test_open_twice(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
/* (close before second file, to detect error on internal array header's
* shared file information)
*/
- if(H5Fclose(file) < 0)
+ if(H5Fclose(fid) < 0)
FAIL_STACK_ERROR
/* Close array, delete array, close file & verify file is empty */
- if(finish(file2, fapl, f2, fa2, fa_addr) < 0)
+ if(finish(fid2, fapl_id, f2, fa2, fa_addr) < 0)
TEST_ERROR
/* All tests passed */
@@ -712,8 +705,8 @@ error:
H5FA_close(fa);
if(fa2)
H5FA_close(fa2);
- H5Fclose(file);
- H5Fclose(file2);
+ H5Fclose(fid);
+ H5Fclose(fid2);
} H5E_END_TRY;
return 1;
@@ -736,26 +729,24 @@ error:
*-------------------------------------------------------------------------
*/
static unsigned
-test_open_twice_diff(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
+test_open_twice_diff(hid_t fapl_id, H5FA_create_t *cparam, farray_test_param_t *tparam)
{
- char filename_tmp[FARRAY_FILENAME_LEN]; /* Temporary file name */
- hid_t file = -1; /* File ID */
- hid_t file2 = -1; /* File ID */
- hid_t file0 = -1; /* File ID */
- hid_t file00 = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5F_t *f2 = NULL; /* Internal file object pointer */
- H5FA_t *fa = NULL; /* Fixed array wrapper */
- H5FA_t *fa2 = NULL; /* Fixed array wrapper */
- haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
-
- /*
- * Display testing message
- */
+ char filename_tmp[FARRAY_FILENAME_LEN]; /* Temporary file name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fid2 = H5I_INVALID_HID; /* File ID */
+ hid_t fid0 = H5I_INVALID_HID; /* File ID */
+ hid_t fid00 = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5F_t *f2 = NULL; /* Internal file object pointer */
+ H5FA_t *fa = NULL; /* Fixed array wrapper */
+ H5FA_t *fa2 = NULL; /* Fixed array wrapper */
+ haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
+
+ /* Display testing message */
TESTING("open fixed array twice, through different file handles");
/* Create file & retrieve pointer to internal file object */
- if(create_file(fapl, &file, &f) < 0)
+ if(create_file(fapl_id, &fid, &f) < 0)
TEST_ERROR
/* Create array */
@@ -781,11 +772,11 @@ test_open_twice_diff(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tpa
/* (So that there is something holding the file open when the extensible
* array is closed)
*/
- if((file0 = H5Fopen(filename_g, H5F_ACC_RDWR, fapl)) < 0)
+ if((fid0 = H5Fopen(filename_g, H5F_ACC_RDWR, fapl_id)) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, &fa, fa_addr, tparam) < 0)
+ if(reopen_file(&fid, &f, fapl_id, &fa, fa_addr, tparam) < 0)
TEST_ERROR
/* Close the first fixed array wrapper */
@@ -797,26 +788,25 @@ test_open_twice_diff(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tpa
/* (close before second file, to detect error on internal array header's
* shared file information)
*/
- if(H5Fclose(file) < 0)
+ if(H5Fclose(fid) < 0)
FAIL_STACK_ERROR
- file = -1;
+ fid = H5I_INVALID_HID;
/* Open a different file */
/* (This re-allocates the 'top' file pointer and assigns it a different
* 'shared' file pointer, making the file pointer in the fixed array's
* header stale)
*/
- h5_fixname(FILENAME[1], fapl, filename_tmp, sizeof(filename_tmp));
- if((file00 = H5Fcreate(filename_tmp, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ h5_fixname(FILENAME[1], fapl_id, filename_tmp, sizeof(filename_tmp));
+ if((fid00 = H5Fcreate(filename_tmp, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
FAIL_STACK_ERROR
-
/* Re-open the file with the fixed array */
- if((file2 = H5Fopen(filename_g, H5F_ACC_RDWR, fapl)) < 0)
+ if((fid2 = H5Fopen(filename_g, H5F_ACC_RDWR, fapl_id)) < 0)
FAIL_STACK_ERROR
/* Get a pointer to the internal file object */
- if(NULL == (f2 = (H5F_t *)H5I_object(file2)))
+ if(NULL == (f2 = (H5F_t *)H5I_object(fid2)))
FAIL_STACK_ERROR
/* Open the fixed array through the second file handle */
@@ -828,13 +818,13 @@ test_open_twice_diff(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tpa
TEST_ERROR
/* Close the extra file handles */
- if(H5Fclose(file0) < 0)
+ if(H5Fclose(fid0) < 0)
FAIL_STACK_ERROR
- if(H5Fclose(file00) < 0)
+ if(H5Fclose(fid00) < 0)
FAIL_STACK_ERROR
/* Close array, delete array, close file & verify file is empty */
- if(finish(file2, fapl, f2, fa2, fa_addr) < 0)
+ if(finish(fid2, fapl_id, f2, fa2, fa_addr) < 0)
TEST_ERROR
/* All tests passed */
@@ -848,10 +838,10 @@ error:
H5FA_close(fa);
if(fa2)
H5FA_close(fa2);
- H5Fclose(file);
- H5Fclose(file2);
- H5Fclose(file0);
- H5Fclose(file00);
+ H5Fclose(fid);
+ H5Fclose(fid2);
+ H5Fclose(fid0);
+ H5Fclose(fid00);
} H5E_END_TRY;
return 1;
@@ -966,7 +956,7 @@ error:
H5FA_close(fa);
if(fa2)
H5FA_close(fa2);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -1666,7 +1656,7 @@ main(void)
fapl = h5_fileaccess();
ExpressMode = GetTestExpress();
if(ExpressMode > 1)
- printf("***Express test mode on. Some tests may be skipped\n");
+ HDprintf("***Express test mode on. Some tests may be skipped\n");
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename_g, sizeof(filename_g));
@@ -1706,12 +1696,12 @@ main(void)
switch(curr_test) {
/* "Normal" testing parameters */
case FARRAY_TEST_NORMAL:
- puts("Testing with NORMAL PARAMETERS");
+ HDputs("Testing with NORMAL PARAMETERS");
break;
/* "Re-open array" testing parameters */
case FARRAY_TEST_REOPEN:
- puts("Testing with reopen array flag set");
+ HDputs("Testing with reopen array flag set");
tparam.reopen_array = FARRAY_TEST_REOPEN;
break;
@@ -1738,25 +1728,25 @@ main(void)
switch(curr_iter) {
/* "Forward" testing parameters */
case FARRAY_ITER_FW:
- puts("Testing with forward iteration");
+ HDputs("Testing with forward iteration");
tparam.fiter = &fa_iter_fw;
break;
/* "Reverse" testing parameters */
case FARRAY_ITER_RV:
- puts("Testing with reverse iteration");
+ HDputs("Testing with reverse iteration");
tparam.fiter = &fa_iter_rv;
break;
/* "Random" testing parameters */
case FARRAY_ITER_RND:
- puts("Testing with random iteration");
+ HDputs("Testing with random iteration");
tparam.fiter = &fa_iter_rnd;
break;
/* "Cyclic" testing parameters */
case FARRAY_ITER_CYC:
- puts("Testing with cyclic iteration");
+ HDputs("Testing with cyclic iteration");
tparam.fiter = &fa_iter_cyc;
break;
@@ -1772,22 +1762,26 @@ main(void)
nerrors += test_set_elmts(fapl, &cparam, &tparam, (hsize_t)tparam.nelmts, "setting all the array elements");
} /* end for */
- /* Check skipping elements */
+ /* Check skipping elements */
nerrors += test_skip_elmts(fapl, &cparam, &tparam, (hsize_t)1, TRUE, "skipping to first element");
nerrors += test_skip_elmts(fapl, &cparam, &tparam, ((hsize_t)1 << cparam.max_dblk_page_nelmts_bits), TRUE, "skipping to first element in data block page");
nerrors += test_skip_elmts(fapl, &cparam, &tparam, (hsize_t)(tparam.nelmts - 1), TRUE, "skipping to last element");
- /* Create Fixed Array of MAX_NELMTS elements */
- /*
- * MAX_NELMTS succeeds on jam and smirom.
- * The value was adjusted for linew due to the following:
- Linew failed with "H5FD_sec2_truncate(): unable to extend file properly"
- Linew failed with "H5FD_sec2_truncate(): File too large"
- */
+ /* Create Fixed Array */
+ /* MAX_NELMTS succeeds on some platforms buy may fail on others:
+ *
+ * "H5FD_sec2_truncate(): unable to extend file properly"
+ *
+ * and
+ *
+ * "H5FD_sec2_truncate(): File too large"
+ *
+ * have both been seen.
+ */
tparam.nelmts = MAX_NELMTS/17;
- init_cparam(&cparam, &tparam);
+ init_cparam(&cparam, &tparam);
- /* Set the last element in the Fixed Array */
+ /* Set the last element in the Fixed Array */
nerrors += test_skip_elmts(fapl, &cparam, &tparam, (hsize_t)(tparam.nelmts - 1), FALSE, "skipping to last element");
} /* end for */
@@ -1800,22 +1794,22 @@ main(void)
if(nerrors)
goto error;
- puts("All fixed array tests passed.");
+ HDputs("All fixed array tests passed.");
/* Clean up file used */
h5_cleanup(FILENAME, fapl);
- return 0;
+ HDexit(EXIT_SUCCESS);
error:
- puts("*** TESTS FAILED ***");
+ HDputs("*** TESTS FAILED ***");
H5E_BEGIN_TRY {
- H5Pclose(fapl);
+ H5Pclose(fapl);
} H5E_END_TRY;
if(api_ctx_pushed) H5CX_pop();
- return 1;
+ HDexit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/fheap.c b/test/fheap.c
index e38d263..1af56a6 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -3037,7 +3037,7 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_size() */
diff --git a/test/fillval.c b/test/fillval.c
index 8c8e902..5b95de9 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -762,15 +762,17 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
comp_datatype *buf_c=NULL;
H5D_space_status_t allocation;
- if(datatype==H5T_INTEGER)
+ if(datatype == H5T_INTEGER) {
fillval = *(int*)_fillval;
- else if(datatype==H5T_COMPOUND) {
- fill_c.a=((comp_datatype*)_fillval)->a;
+ }
+ else if(datatype == H5T_COMPOUND) {
+ fill_c.a=((comp_datatype*)_fillval)->a;
fill_c.x=((comp_datatype*)_fillval)->x;
fill_c.y=((comp_datatype*)_fillval)->y;
fill_c.z=((comp_datatype*)_fillval)->z;
- } else {
- puts("Invalid type for test");
+ }
+ else {
+ HDputs("Invalid type for test");
goto error;
}
@@ -806,7 +808,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
goto error;
}
/* case for compound datatype */
- } else if(datatype==H5T_COMPOUND) {
+ }
+ else if(datatype==H5T_COMPOUND) {
if(H5Dread(dset2, ctype_id, mspace, fspace, H5P_DEFAULT,
&rd_c) < 0) goto error;
if(fill_time != H5D_FILL_TIME_NEVER && (!H5_FLT_ABS_EQUAL(rd_c.a, fill_c.a) ||
@@ -828,10 +831,10 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
/* Select all odd data locations in the file dataset */
for (i=0, nelmts=1; i<5; i++) {
- hs_size[i] = cur_size[i]/2;
- hs_offset[i] = 0;
- hs_stride[i] = 2;
- nelmts *= hs_size[i];
+ hs_size[i] = cur_size[i]/2;
+ hs_offset[i] = 0;
+ hs_stride[i] = 2;
+ nelmts *= hs_size[i];
}
if((mspace=H5Screate_simple(5, hs_size, hs_size)) < 0) goto error;
if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, hs_stride,
@@ -1089,17 +1092,23 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
}
h5_fixname(base_name, fapl, filename, sizeof filename);
- if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
goto error;
- if((dcpl=H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
- if(H5D_CHUNKED==layout) {
- if(H5Pset_chunk(dcpl, 5, ch_size) < 0) goto error;
- } else if(H5D_COMPACT==layout) {
- if(H5Pset_layout(dcpl, H5D_COMPACT) < 0) goto error;
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto error;
+
+ if(H5D_CHUNKED == layout) {
+ if(H5Pset_chunk(dcpl, 5, ch_size) < 0)
+ goto error;
+ }
+ else if(H5D_COMPACT == layout) {
+ if(H5Pset_layout(dcpl, H5D_COMPACT) < 0)
+ goto error;
}
- if((ctype_id=create_compound_type()) < 0) goto error;
+ if((ctype_id = create_compound_type()) < 0)
+ goto error;
/* I. Test H5D_ALLOC_TIME_LATE space allocation cases */
if(H5D_COMPACT != layout) {
@@ -2359,8 +2368,6 @@ test_partalloc(hid_t fapl, const char *base_name)
* Programmer: Robb Matzke
* Thursday, October 1, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
@@ -2380,8 +2387,8 @@ main(int argc, char *argv[])
else if(!strcmp(argv[argno], "compact"))
test_compact =1;
else {
- fprintf(stderr, "usage: %s [contiguous] [chunked] [compact]\n", argv[0]);
- exit(EXIT_FAILURE);
+ HDfprintf(stderr, "usage: %s [contiguous] [chunked] [compact]\n", argv[0]);
+ HDexit(EXIT_FAILURE);
}
} /* end for */
} /* end if */
@@ -2444,15 +2451,15 @@ main(int argc, char *argv[])
if(nerrors)
goto error;
- puts("All fill value tests passed.");
+ HDputs("All fill value tests passed.");
if(h5_cleanup(FILENAME, fapl))
HDremove(FILE_NAME_RAW);
- return 0;
+ HDexit(EXIT_SUCCESS);
error:
- puts("***** FILL VALUE TESTS FAILED *****");
- return 1;
+ HDputs("***** FILL VALUE TESTS FAILED *****");
+ HDexit(EXIT_FAILURE);
}
diff --git a/test/freespace.c b/test/freespace.c
index 33a6f89..f397377 100644
--- a/test/freespace.c
+++ b/test/freespace.c
@@ -24,7 +24,7 @@
#define H5F_FRIEND /*suppress error about including H5Fpkg */
#include "H5Fpkg.h"
-#include "H5CXprivate.h" /* API Contexts */
+#include "H5CXprivate.h" /* API Contexts */
#include "H5Iprivate.h"
#include "H5VMprivate.h"
@@ -496,7 +496,7 @@ test_fs_create(hid_t fapl)
if(!H5F_addr_defined(fs_addr))
TEST_ERROR
- if (frsp->nclasses != nclasses)
+ if(frsp->nclasses != nclasses)
TEST_ERROR
HDmemset(&state, 0, sizeof(frspace_state_t));
@@ -504,9 +504,9 @@ test_fs_create(hid_t fapl)
TEST_ERROR
HDmemset(&test_cparam, 0, sizeof(H5FS_create_t));
- if(H5FS_get_cparam_test(frsp, &test_cparam) < 0)
+ if(H5FS__get_cparam_test(frsp, &test_cparam) < 0)
FAIL_STACK_ERROR
- if (H5FS_cmp_cparam_test(&cparam, &test_cparam))
+ if(H5FS__cmp_cparam_test(&cparam, &test_cparam))
FAIL_STACK_ERROR
/* Close the free space manager */
@@ -1857,14 +1857,14 @@ test_fs_sect_shrink(hid_t fapl)
* Re-add section A that allow shrinking and its section class type defines "can_shrink"
*/
if(NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
can_shrink = FALSE;
if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* should have nothing in free-space */
HDmemset(&state, 0, sizeof(frspace_state_t));
@@ -1875,18 +1875,18 @@ test_fs_sect_shrink(hid_t fapl)
/* section A should not be there in free-space */
if((node_found = H5FS_sect_find(f, frsp,
(hsize_t)(TEST_SECT_SIZE50), (H5FS_section_info_t **)&node)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
if (node_found) TEST_ERROR
/* Close the free space manager */
if(H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
if(H5FS_delete(f, fs_addr) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
/* Close the file */
@@ -2082,7 +2082,7 @@ test_fs_sect_shrink(hid_t fapl)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
- /* Close the file and dxpl */
+ /* Close the file */
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -2357,7 +2357,7 @@ test_fs_sect_change_class(hid_t fapl)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
- /* Close the file and dxpl */
+ /* Close the file */
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
diff --git a/test/gheap.c b/test/gheap.c
index bf0f18a..4dc3fb0 100644
--- a/test/gheap.c
+++ b/test/gheap.c
@@ -15,9 +15,9 @@
* Programmer: Robb Matzke <matzke@llnl.gov>
* Tuesday, March 31, 1998
*
- * Purpose: Tests the global heap. The global heap is the set of all
- * collections but the collections are not related to one
- * another by anything that appears in the file format.
+ * Purpose: Tests the global heap. The global heap is the set of all
+ * collections but the collections are not related to one
+ * another by anything that appears in the file format.
*/
#include "h5test.h"
#include "H5ACprivate.h"
@@ -56,37 +56,35 @@ const char *FILENAME[] = {
NULL
};
-
+
/*-------------------------------------------------------------------------
* Function: test_1
*
- * Purpose: Writes a sequence of objects to the global heap where each
- * object is larger than the one before.
+ * Purpose: Writes a sequence of objects to the global heap where each
+ * object is larger than the one before.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: number of errors
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
test_1 (hid_t fapl)
{
- hid_t file = -1;
- H5F_t *f = NULL;
- H5HG_t *obj = NULL;
- uint8_t out[GHEAP_TEST_NOBJS];
- uint8_t in[GHEAP_TEST_NOBJS];
- size_t u;
- size_t size;
- herr_t status;
- int nerrors = 0;
- char filename[1024];
+ hid_t file = H5I_INVALID_HID;
+ H5F_t *f = NULL;
+ H5HG_t *obj = NULL;
+ uint8_t out[GHEAP_TEST_NOBJS];
+ uint8_t in[GHEAP_TEST_NOBJS];
+ size_t u;
+ size_t size;
+ herr_t status;
+ int nerrors = 0;
+ char filename[1024];
TESTING("monotonically increasing lengths");
@@ -97,10 +95,10 @@ test_1 (hid_t fapl)
/* Open a clean file */
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- goto error;
+ goto error;
if(NULL == (f = (H5F_t *)H5I_object(file))) {
H5_FAILED();
- puts(" Unable to create file");
+ HDputs(" Unable to create file");
goto error;
}
@@ -116,11 +114,12 @@ test_1 (hid_t fapl)
status = H5HG_insert(f, size, out, obj + u);
if(status < 0) {
H5_FAILED();
- puts(" Unable to insert object into global heap");
+ HDputs(" Unable to insert object into global heap");
nerrors++;
- } else if(u && H5F_addr_gt(obj[u - 1].addr, obj[u].addr)) {
+ }
+ else if(u && H5F_addr_gt(obj[u - 1].addr, obj[u].addr)) {
H5_FAILED();
- puts(" Collection addresses are not monotonically increasing");
+ HDputs(" Collection addresses are not monotonically increasing");
nerrors++;
}
}
@@ -134,11 +133,12 @@ test_1 (hid_t fapl)
H5Eclear2(H5E_DEFAULT);
if(NULL == H5HG_read(f, obj + u, in, NULL)) {
H5_FAILED();
- puts(" Unable to read object");
+ HDputs(" Unable to read object");
nerrors++;
- } else if(HDmemcmp(in, out, size)) {
+ }
+ else if(HDmemcmp(in, out, size)) {
H5_FAILED();
- puts(" Value read doesn't match value written");
+ HDputs(" Value read doesn't match value written");
nerrors++;
}
}
@@ -147,51 +147,51 @@ test_1 (hid_t fapl)
HDfree(obj);
obj = NULL;
- if(H5Fclose(file) < 0) goto error;
- if(nerrors) goto error;
+ if(H5Fclose(file) < 0)
+ goto error;
+ if(nerrors)
+ goto error;
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
if(obj)
HDfree(obj);
return MAX(1, nerrors);
}
-
+
/*-------------------------------------------------------------------------
* Function: test_2
*
- * Purpose: Writes a sequence of objects to the global heap where each
- * object is smaller than the one before.
+ * Purpose: Writes a sequence of objects to the global heap where each
+ * object is smaller than the one before.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: number of errors
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
test_2 (hid_t fapl)
{
- hid_t file = -1;
- H5F_t *f = NULL;
- H5HG_t *obj = NULL;
- uint8_t out[GHEAP_TEST_NOBJS];
- uint8_t in[GHEAP_TEST_NOBJS];
- size_t u;
- size_t size;
- int nerrors = 0;
- char filename[1024];
+ hid_t file = H5I_INVALID_HID;
+ H5F_t *f = NULL;
+ H5HG_t *obj = NULL;
+ uint8_t out[GHEAP_TEST_NOBJS];
+ uint8_t in[GHEAP_TEST_NOBJS];
+ size_t u;
+ size_t size;
+ int nerrors = 0;
+ char filename[1024];
TESTING("monotonically decreasing lengths");
@@ -202,10 +202,10 @@ test_2 (hid_t fapl)
/* Open a clean file */
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- goto error;
+ goto error;
if(NULL == (f = (H5F_t *)H5I_object(file))) {
H5_FAILED();
- puts(" Unable to create file");
+ HDputs(" Unable to create file");
goto error;
}
@@ -216,9 +216,9 @@ test_2 (hid_t fapl)
size = GHEAP_TEST_NOBJS - u;
HDmemset(out, (int)('A' + u % 26), size);
H5Eclear2(H5E_DEFAULT);
- if (H5HG_insert (f, size, out, obj + u) < 0) {
+ if(H5HG_insert(f, size, out, obj + u) < 0) {
H5_FAILED();
- puts(" Unable to insert object into global heap");
+ HDputs(" Unable to insert object into global heap");
nerrors++;
}
}
@@ -232,11 +232,12 @@ test_2 (hid_t fapl)
H5Eclear2(H5E_DEFAULT);
if(NULL == H5HG_read(f, obj + u, in, NULL)) {
H5_FAILED();
- puts(" Unable to read object");
+ HDputs(" Unable to read object");
nerrors++;
- } else if (memcmp (in, out, size)) {
+ }
+ else if (memcmp (in, out, size)) {
H5_FAILED();
- puts(" Value read doesn't match value written");
+ HDputs(" Value read doesn't match value written");
nerrors++;
}
}
@@ -245,51 +246,51 @@ test_2 (hid_t fapl)
HDfree(obj);
obj = NULL;
- if (H5Fclose(file)<0) goto error;
- if (nerrors) goto error;
+ if(H5Fclose(file) < 0)
+ goto error;
+ if(nerrors)
+ goto error;
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
if(obj)
HDfree(obj);
return MAX(1, nerrors);
}
-
+
/*-------------------------------------------------------------------------
* Function: test_3
*
- * Purpose: Creates a few global heap objects and then removes them all.
- * The collection should also be removed.
+ * Purpose: Creates a few global heap objects and then removes them all.
+ * The collection should also be removed.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: number of errors
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
test_3 (hid_t fapl)
{
- hid_t file = -1;
- H5F_t *f = NULL;
- H5HG_t *obj = NULL;
- uint8_t out[GHEAP_TEST_NOBJS];
- size_t u;
- size_t size;
- herr_t status;
- int nerrors = 0;
- char filename[1024];
+ hid_t file = H5I_INVALID_HID;
+ H5F_t *f = NULL;
+ H5HG_t *obj = NULL;
+ uint8_t out[GHEAP_TEST_NOBJS];
+ size_t u;
+ size_t size;
+ herr_t status;
+ int nerrors = 0;
+ char filename[1024];
TESTING("complete object removal");
@@ -300,11 +301,11 @@ test_3 (hid_t fapl)
/* Open a clean file */
h5_fixname(FILENAME[2], fapl, filename, sizeof filename);
if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- goto error;
+ goto error;
if(NULL == (f = (H5F_t *)H5I_object(file))) {
- H5_FAILED();
- puts(" Unable to create file");
- goto error;
+ H5_FAILED();
+ HDputs(" Unable to create file");
+ goto error;
}
/* Create some stuff */
@@ -315,7 +316,7 @@ test_3 (hid_t fapl)
status = H5HG_insert(f, size, out, obj + u);
if (status<0) {
H5_FAILED();
- puts(" Unable to insert object into global heap");
+ HDputs(" Unable to insert object into global heap");
nerrors++;
}
}
@@ -325,7 +326,7 @@ test_3 (hid_t fapl)
status = H5HG_remove(f, obj + u);
if (status<0) {
H5_FAILED();
- puts(" Unable to remove object");
+ HDputs(" Unable to remove object");
nerrors++;
}
}
@@ -334,52 +335,52 @@ test_3 (hid_t fapl)
HDfree(obj);
obj = NULL;
- if (H5Fclose(file)<0) goto error;
- if (nerrors) goto error;
+ if(H5Fclose(file) < 0)
+ goto error;
+ if(nerrors)
+ goto error;
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
if(obj)
HDfree(obj);
return MAX(1, nerrors);
}
-
+
/*-------------------------------------------------------------------------
* Function: test_4
*
- * Purpose: Tests the H5HG_remove() feature by writing lots of objects
- * and occassionally removing some. When we're done they're all
- * removed.
+ * Purpose: Tests the H5HG_remove() feature by writing lots of objects
+ * and occassionally removing some. When we're done they're all
+ * removed.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: number of errors
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
test_4 (hid_t fapl)
{
- hid_t file = -1;
- H5F_t *f = NULL;
- H5HG_t *obj = NULL;
- uint8_t out[GHEAP_TEST_NOBJS];
- size_t u;
- size_t size;
- herr_t status;
- int nerrors = 0;
- char filename[1024];
+ hid_t file = H5I_INVALID_HID;
+ H5F_t *f = NULL;
+ H5HG_t *obj = NULL;
+ uint8_t out[GHEAP_TEST_NOBJS];
+ size_t u;
+ size_t size;
+ herr_t status;
+ int nerrors = 0;
+ char filename[1024];
TESTING("partial object removal");
@@ -390,10 +391,10 @@ test_4 (hid_t fapl)
/* Open a clean file */
h5_fixname(FILENAME[3], fapl, filename, sizeof filename);
if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- goto error;
+ goto error;
if(NULL == (f = (H5F_t *)H5I_object(file))) {
H5_FAILED();
- puts(" Unable to create file");
+ HDputs(" Unable to create file");
goto error;
}
@@ -405,21 +406,20 @@ test_4 (hid_t fapl)
status = H5HG_insert(f, size, out, obj + u);
if (status<0) {
H5_FAILED();
- puts(" Unable to insert object into global heap");
+ HDputs(" Unable to insert object into global heap");
nerrors++;
}
- /*
- * Remove every third one beginning with the second, but after the
- * next one has already been inserted. That is, insert A, B, C;
- * remove B, insert D, E, F; remove E; etc.
- */
+ /* Remove every third one beginning with the second, but after the
+ * next one has already been inserted. That is, insert A, B, C;
+ * remove B, insert D, E, F; remove E; etc.
+ */
if(1 == (u % 3)) {
H5Eclear2(H5E_DEFAULT);
status = H5HG_remove(f, obj + u - 1);
if (status<0) {
H5_FAILED();
- puts(" Unable to remove object");
+ HDputs(" Unable to remove object");
nerrors++;
}
HDmemset(obj + u - 1, 0, sizeof *obj);
@@ -430,51 +430,51 @@ test_4 (hid_t fapl)
HDfree(obj);
obj = NULL;
- if (H5Fclose(file)<0) goto error;
- if (nerrors) goto error;
+ if(H5Fclose(file) < 0)
+ goto error;
+ if(nerrors)
+ goto error;
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
if(obj)
HDfree(obj);
return MAX(1, nerrors);
}
-
+
/*-------------------------------------------------------------------------
* Function: test_ooo_indices
*
- * Purpose: Tests that indices can be stored out of order. This can
+ * Purpose: Tests that indices can be stored out of order. This can
* happen when the indices "wrap around" due to many
* insertions and deletions (for example, from rewriting a
* VL dataset).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: number of errors
+ * Failure: number of errors
*
- * Programmer: Neil Fortner
+ * Programmer: Neil Fortner
* Monday, October 26, 2009
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
test_ooo_indices(hid_t fapl)
{
- hid_t file = -1;
- H5F_t *f = NULL;
+ hid_t file = H5I_INVALID_HID;
+ H5F_t *f = NULL;
unsigned i, j;
- H5HG_t *obj = NULL;
- herr_t status;
- int nerrors=0;
- char filename[1024];
+ H5HG_t *obj = NULL;
+ herr_t status;
+ int nerrors = 0;
+ char filename[1024];
TESTING("out of order indices");
@@ -487,16 +487,18 @@ test_ooo_indices(hid_t fapl)
goto error;
if(NULL == (f = (H5F_t *)H5I_object(file))) {
H5_FAILED();
- puts(" Unable to create file");
+ HDputs(" Unable to create file");
goto error;
- } /* end if */
+ }
/* Alternately insert 1000 entries and remove the previous group of 1000
- * entries, until the indices wrap around */
- for(i=0; i<66; i++) {
+ * entries, until the indices wrap around.
+ */
+ for(i = 0; i < 66; i++) {
/* Insert 1000 entries. The index into the obj array will alternate up
* and down by 1000 so the previous set of insertions is preserved and
- * can be deleted. */
+ * can be deleted.
+ */
for(j=1000*((~i&1)); j<1000*((~i&1)+1); j++) {
H5Eclear2(H5E_DEFAULT);
status = H5HG_insert(f, sizeof(j), &j, &obj[j]);
@@ -506,7 +508,7 @@ test_ooo_indices(hid_t fapl)
/* Check that the index is as expected */
if(obj[j].idx != ((1000 * i) + j - (1000 * ((~i & 1)))) % ((1u << 16) - 1) + 1)
GHEAP_REPEATED_ERR(" Unexpected global heap index");
- } /* end for */
+ }
/* Remove the previous 1000 entries */
if(i>0)
@@ -515,20 +517,21 @@ test_ooo_indices(hid_t fapl)
status = H5HG_remove(f, &obj[j]);
if (status<0)
GHEAP_REPEATED_ERR(" Unable to remove object from global heap");
- } /* end for */
- } /* end for */
+ }
+ }
/* The indices should have "wrapped around" on the last iteration */
HDassert(obj[534].idx == 65535);
HDassert(obj[535].idx == 1);
/* Reopen the file */
- if (H5Fclose(file)<0) goto error;
+ if (H5Fclose(file) < 0)
+ goto error;
if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
goto error;
if(NULL == (f = (H5F_t *)H5I_object(file))) {
H5_FAILED();
- puts(" Unable to open file");
+ HDputs(" Unable to open file");
goto error;
} /* end if */
@@ -538,14 +541,15 @@ test_ooo_indices(hid_t fapl)
goto error;
if(i != j) {
H5_FAILED();
- puts(" Incorrect read value");
+ HDputs(" Incorrect read value");
goto error;
- } /* end if */
- } /* end for */
-
- if (H5Fclose(file)<0) goto error;
- if (nerrors) goto error;
+ }
+ }
+ if(H5Fclose(file) < 0)
+ goto error;
+ if(nerrors)
+ goto error;
HDfree(obj);
obj = NULL;
@@ -554,69 +558,67 @@ test_ooo_indices(hid_t fapl)
error:
H5E_BEGIN_TRY {
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
if(obj)
HDfree(obj);
return MAX(1, nerrors);
} /* end test_ooo_indices */
-
+
/*-------------------------------------------------------------------------
- * Function: main
- *
- * Purpose: Tests global heap.
+ * Function: main
*
- * Return: Success: zero
- *
- * Failure: non-zero
- *
- * Programmer: Robb Matzke
- * Tuesday, March 31, 1998
+ * Purpose: Tests global heap.
*
- * Modifications:
+ * Return: EXIT_SUCCESS/EXIT_FAILURE
*
*-------------------------------------------------------------------------
*/
int
main (void)
{
- int nerrors=0;
- hid_t fapl;
+ int nerrors = 0;
+ hid_t fapl_id = H5I_INVALID_HID;
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
h5_reset();
- fapl = h5_fileaccess();
+ if ((fapl_id = h5_fileaccess()) < 0)
+ goto error;
/* Push API context */
if(H5CX_push() < 0) FAIL_STACK_ERROR
api_ctx_pushed = TRUE;
- nerrors += test_1(fapl);
- nerrors += test_2(fapl);
- nerrors += test_3(fapl);
- nerrors += test_4(fapl);
- nerrors += test_ooo_indices(fapl);
+ nerrors += test_1(fapl_id);
+ nerrors += test_2(fapl_id);
+ nerrors += test_3(fapl_id);
+ nerrors += test_4(fapl_id);
+ nerrors += test_ooo_indices(fapl_id);
/* Verify symbol table messages are cached */
- nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
+ nerrors += (h5_verify_cached_stabs(FILENAME, fapl_id) < 0 ? 1 : 0);
if (nerrors)
goto error;
- puts("All global heap tests passed.");
+
+ HDputs("All global heap tests passed.");
/* Pop API context */
if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR
api_ctx_pushed = FALSE;
- h5_cleanup(FILENAME, fapl);
- return 0;
+ h5_cleanup(FILENAME, fapl_id);
+ HDexit(EXIT_SUCCESS);
error:
- puts("*** TESTS FAILED ***");
+ H5E_BEGIN_TRY {
+ H5Pclose(fapl_id);
+ } H5E_END_TRY;
if(api_ctx_pushed) H5CX_pop();
- return 1;
-}
+ HDputs("*** TESTS FAILED ***");
+ HDexit(EXIT_FAILURE);
+} /* end main() */
diff --git a/test/h5test.c b/test/h5test.c
index 687f594..fb5b83d 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -1633,15 +1633,11 @@ error:
*
* Purpose: Callback function for h5_verify_cached_stabs.
*
- * Return: Success: 0
- *
- * Failure: -1
+ * Return: SUCCEED/FAIL
*
* Programmer: Neil Fortner
* Tuesday, April 12, 2011
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1649,9 +1645,9 @@ h5_verify_cached_stabs_cb(hid_t oid, const char H5_ATTR_UNUSED *name,
const H5O_info_t *oinfo, void H5_ATTR_UNUSED *udata)
{
if(oinfo->type == H5O_TYPE_GROUP)
- return(H5G__verify_cached_stabs_test(oid));
+ return H5G__verify_cached_stabs_test(oid);
else
- return(0);
+ return SUCCEED;
} /* end h5_verify_cached_stabs_cb() */
diff --git a/test/istore.c b/test/istore.c
index b5bac2c..1d57a2a 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -216,7 +216,7 @@ test_create(hid_t f, const char *prefix)
/* Create chunked dataset of this dimensionality */
HDsnprintf(name, sizeof name, "%s_%02u", prefix, u);
- if ((dataset=new_object(f, name, (int)u, dims, my_chunk_dims)) < 0)
+ if((dataset = new_object(f, name, (int)u, dims, my_chunk_dims)) < 0)
return FAIL;
/* Close dataset created */
diff --git a/test/lheap.c b/test/lheap.c
index 4f09b6e..d309fb0 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -41,9 +41,7 @@ const char *FILENAME[] = {
* heap, close the file, open the file, read data out of the
* local heap, close the file.
*
- * Return: Success: zero
- *
- * Failure: non-zero
+ * Return: EXIT_SUCCESS/EXIT_FAILURE
*
* Programmer: Robb Matzke
* Tuesday, November 24, 1998
@@ -95,7 +93,7 @@ main(void)
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
}
- if (NULL == (heap = H5HL_protect(f, heap_addr, H5AC__NO_FLAGS_SET))) {
+ if(NULL == (heap = H5HL_protect(f, heap_addr, H5AC__NO_FLAGS_SET))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -147,7 +145,7 @@ main(void)
if(j > 4)
buf[j] = '\0';
- if (NULL == (heap = H5HL_protect(f, heap_addr, H5AC__READ_ONLY_FLAG))) {
+ if(NULL == (heap = H5HL_protect(f, heap_addr, H5AC__READ_ONLY_FLAG))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -211,7 +209,7 @@ main(void)
HDputs("All local heap tests passed.");
h5_cleanup(FILENAME, fapl);
- return 0;
+ return EXIT_SUCCESS;
error:
HDputs("*** TESTS FAILED ***");
@@ -221,6 +219,6 @@ main(void)
if(api_ctx_pushed) H5CX_pop();
- return 1;
+ return EXIT_FAILURE;
}
diff --git a/test/mf.c b/test/mf.c
index 04b7c0b..eefd2a1 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -903,7 +903,7 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR
/* Retrieve the file's maxaddr */
- if(H5F_get_maxaddr_test(file, &maxaddr) < 0)
+ if(H5F__get_maxaddr_test(file, &maxaddr) < 0)
FAIL_STACK_ERROR
/* Allocate some temporary address space */
@@ -3702,7 +3702,7 @@ error:
* Alignment = 1024 or 4096
*
* Test 1:
- * Turn off using meta data aggregator
+ * Turn off using metadata aggregator
* Allocate a block of 30 which should be from file allocation
* Result:
* The return address should be aligned
@@ -3715,13 +3715,13 @@ error:
* A fragment [1054, 994] or [4126, 4066] is freed to free-space
* EOA is 2098 or 8242
* Test 2:
- * Turn off using meta data aggregator
+ * Turn off using metadata aggregator
* Allocate a block which should be from file allocation
* The return address should be aligned
* H5MF_try_shrink() the block with aligned address should succeed
*
* Test 3:
- * Turn off using meta data aggregator
+ * Turn off using metadata aggregator
* Allocate a block which should be from file allocation
* The return address should be aligned
* H5MF_try_extend() the block with aligned address should succeed
@@ -5917,17 +5917,17 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
PASSED()
} /* end if */
else {
- SKIPPED();
- puts(" Current VFD doesn't support mis-aligned fragments");
+ SKIPPED();
+ HDputs(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
- return(0);
+ return 0;
error:
H5E_BEGIN_TRY {
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
- return(1);
+ return 1;
} /* test_mf_align_alloc6() */
/*
@@ -7027,7 +7027,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
* assertion failures on the first file space alloc / dealloc.
*/
if(f->shared->first_alloc_dealloc){
- if(SUCCEED!=H5MF_tidy_self_referential_fsm_hack(f))
+ if(SUCCEED != H5MF_tidy_self_referential_fsm_hack(f))
FAIL_STACK_ERROR
ran_H5MF_tidy_self_referential_fsm_hack = TRUE;
}
@@ -7614,7 +7614,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
hid_t fcpl = -1; /* File creation property list */
hid_t fapl_new = -1; /* File access property list ID */
H5F_t *f = NULL; /* Internal file object pointer */
- haddr_t addr2, addr3; /* Addresses for small meta data blocks */
+ haddr_t addr2, addr3; /* Addresses for small metadata blocks */
haddr_t saddr1; /* Addresses for small raw data blocks */
haddr_t gaddr1; /* Addresses for large data blocks */
hbool_t split = FALSE, multi = FALSE;
@@ -7661,7 +7661,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
if(NULL == (f = (H5F_t *)H5I_object(fid)))
TEST_ERROR
- /* Allocate 3 small meta data blocks: addr1, addr2, addr3 */
+ /* Allocate 3 small metadata blocks: addr1, addr2, addr3 */
H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE30);
addr2 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE1034);
addr3 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE50);
@@ -7673,7 +7673,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
H5MF__alloc_to_fs_type(f, H5FD_MEM_OHDR, TBLOCK_SIZE1034, (H5F_mem_page_t *)&fs_type);
- /* Verify that the freed block with addr2 is found from the small meta data manager */
+ /* Verify that the freed block with addr2 is found from the small metadata manager */
if(H5MF__find_sect(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE1034, f->shared->fs_man[fs_type], &found_addr) < 0)
TEST_ERROR
if(found_addr != addr2)
@@ -7735,7 +7735,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
if(!H5F_addr_defined(f->shared->fs_addr[fs_type]))
TEST_ERROR
- /* Verify that the small meta data manager is there */
+ /* Verify that the small metadata manager is there */
H5MF__alloc_to_fs_type(f, H5FD_MEM_OHDR, f->shared->fs_page_size - 1, (H5F_mem_page_t *)&fs_type);
if(!H5F_addr_defined(f->shared->fs_addr[fs_type]))
TEST_ERROR
@@ -7746,16 +7746,16 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
* assertion failures on the first file space alloc / dealloc.
*/
if(f->shared->first_alloc_dealloc){
- if(SUCCEED!=H5MF_tidy_self_referential_fsm_hack(f))
+ if(SUCCEED != H5MF_tidy_self_referential_fsm_hack(f))
FAIL_STACK_ERROR
}
- /* Set up to use the small meta data manager */
+ /* Set up to use the small metadata manager */
if(!(f->shared->fs_man[fs_type]))
if(H5MF__open_fstype(f, fs_type) < 0)
TEST_ERROR
- /* Verify that the freed block with addr2 is found from the small meta data manager */
+ /* Verify that the freed block with addr2 is found from the small metadata manager */
if(H5MF__find_sect(f, H5FD_MEM_OHDR, (hsize_t)(f->shared->fs_page_size-(addr3+TBLOCK_SIZE50)), f->shared->fs_man[fs_type], &found_addr) < 0)
TEST_ERROR
@@ -7838,7 +7838,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
hid_t fid = -1; /* File ID */
hid_t fcpl = -1; /* File creation property list */
H5F_t *f = NULL; /* Internal file object pointer */
- haddr_t addr1; /* Address for small meta data block */
+ haddr_t addr1; /* Address for small metadata block */
haddr_t saddr1; /* Address for small raw data block */
haddr_t gaddr1; /* Address for large data block */
hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */
@@ -7872,14 +7872,14 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
if(NULL == (f = (H5F_t *)H5I_object(fid)))
FAIL_STACK_ERROR
- /* Allocate a small meta data block with addr1 */
+ /* Allocate a small metadata block with addr1 */
addr1 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE50);
/* Try to shrink the block with addr1 */
if((status = H5MF_try_shrink(f, H5FD_MEM_OHDR, addr1, (hsize_t)TBLOCK_SIZE50)) < 0)
FAIL_STACK_ERROR
- /* Couldn't shrink due to the section (remaining space in the page) is in the small meta data free-space manager */
+ /* Couldn't shrink due to the section (remaining space in the page) is in the small metadata free-space manager */
if(status == TRUE) TEST_ERROR
/* Allocate a small raw data block with saddr1 */
@@ -7961,7 +7961,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
hid_t fid = -1; /* File ID */
hid_t fcpl = -1; /* File creation property list */
H5F_t *f = NULL; /* Internal file object pointer */
- haddr_t addr1, addr2, addr3; /* Addresses for small meta data blocks */
+ haddr_t addr1, addr2, addr3; /* Addresses for small metadata blocks */
haddr_t saddr1; /* Address for small raw data block */
hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */
htri_t was_extended; /* Whether the block can be extended or not */
@@ -7993,7 +7993,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
if(NULL == (f = (H5F_t *)H5I_object(fid)))
FAIL_STACK_ERROR
- /* Allocate a small meta data block with addr1 */
+ /* Allocate a small metadata block with addr1 */
addr1 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE98);
/* Try extending the block with addr1 at EOF not crossing page boundary */
@@ -8001,7 +8001,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
/* Should succeed */
if(was_extended != TRUE) TEST_ERROR
- /* Allocate 2 small meta data blocks with addr2 and addr3--will be on another meta data page */
+ /* Allocate 2 small metadata blocks with addr2 and addr3--will be on another metadata page */
addr2 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE100);
addr3 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE150);
@@ -8028,7 +8028,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
/* Free the block with addr1 */
H5MF_xfree(f, H5FD_MEM_OHDR, addr1, (hsize_t)TBLOCK_SIZE3248);
- /* Allocate a new meta data block with addr1 */
+ /* Allocate a new metadata block with addr1 */
/* There is a page end threshold of size H5F_FILE_SPACE_PGEND_META_THRES at the end of the block */
/* The block is right next to the threshold */
addr1 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE3286);
@@ -8409,7 +8409,7 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
hid_t fcpl = -1; /* File creation property list */
H5F_t *f = NULL; /* Internal file object pointer */
haddr_t addr2, addr3, addr4, addr5; /* Addresses for blocks */
- haddr_t addr9, addr10, addr11; /* Address for small meta data blocks */
+ haddr_t addr9, addr10, addr11; /* Address for small metadata blocks */
haddr_t saddr1, saddr2; /* Addresses for small raw data blocks */
H5FS_stat_t fs_stat; /* Information for free-space manager */
char filename[FILENAME_LEN]; /* Filename to use */
@@ -8445,7 +8445,7 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
if(NULL == (f = (H5F_t *)H5I_object(fid)))
FAIL_STACK_ERROR
- /* Allocate 2 small meta data blocks: addr1, addr2 */
+ /* Allocate 2 small metadata blocks: addr1, addr2 */
H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE30);
addr2 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE50);
@@ -8464,13 +8464,13 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
if(saddr2 != (saddr1 + TBLOCK_SIZE30))
TEST_ERROR
- /* Allocate a small meta data block with addr3--there is no free-space section big enough to fulfill the request */
+ /* Allocate a small metadata block with addr3--there is no free-space section big enough to fulfill the request */
addr3 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE4020);
/* Should be on the third page and page aligned */
if(addr3 % TBLOCK_SIZE4096)
TEST_ERROR
- /* Allocate a small meta data block with addr4--there is a free-space section big enough to fulfill the request */
+ /* Allocate a small metadata block with addr4--there is a free-space section big enough to fulfill the request */
addr4 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE80);
/* Should not be page aligned */
if(!(addr4 % TBLOCK_SIZE4096))
@@ -8479,7 +8479,7 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
if(addr4 != (addr2 + TBLOCK_SIZE50))
TEST_ERROR
- /* Allocate a small meta data block with addr5--there is a free-space section big enough to fulfill the request */
+ /* Allocate a small metadata block with addr5--there is a free-space section big enough to fulfill the request */
addr5 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE40);
/* Should not be page aligned */
if(!(addr5 % TBLOCK_SIZE4096))
@@ -8489,16 +8489,16 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
if(addr5 != (addr3 + TBLOCK_SIZE4020))
TEST_ERROR
- /* Allocate a small meta data block with addr6--taking up the remaining space in the first page */
+ /* Allocate a small metadata block with addr6--taking up the remaining space in the first page */
if(family)
H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE3080);
else
H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE3088);
- /* Allocate a small meta data block with addr7--taking up the remaining space in the third page */
+ /* Allocate a small metadata block with addr7--taking up the remaining space in the third page */
H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE36);
- /* Allocate 2 small meta data blocks: addr8, addr9--there is no free-space to fulfill the request */
+ /* Allocate 2 small metadata blocks: addr8, addr9--there is no free-space to fulfill the request */
H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE50);
addr9 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE80);
@@ -8514,13 +8514,13 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
if(fs_stat.tot_space != TBLOCK_SIZE4096)
TEST_ERROR
- /* Allocate a small meta data block with addr10--there is a free-space section big enough to fulfill the request */
+ /* Allocate a small metadata block with addr10--there is a free-space section big enough to fulfill the request */
addr10 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE3900);
/* The block should be next to the block with addr9 */
if(addr10 != (addr9 + TBLOCK_SIZE80))
TEST_ERROR
- /* Allocate a small meta data block with addr11 */
+ /* Allocate a small metadata block with addr11 */
/* The current free-space section is unable to fulfill the request; obtain a page from the large manager */
addr11 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE80);
/* The address of the block should be the same the freed block with saddr1 */
@@ -8575,7 +8575,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
hid_t fcpl2 = -1; /* File creation property list ID */
hid_t fapl_new = -1; /* File access property list ID */
H5F_t *f = NULL; /* Internal file object pointer */
- haddr_t addr1, addr2; /* Addresses for small meta data blocks */
+ haddr_t addr1, addr2; /* Addresses for small metadata blocks */
haddr_t saddr1, saddr2; /* Addresses for small raw data blocks */
haddr_t gaddr1, gaddr2; /* Addresses for blocks */
char filename[FILENAME_LEN]; /* Filename to use */
@@ -8729,7 +8729,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
/* Disable small data block mechanism */
if(H5Pset_small_data_block_size(fapl_new, (hsize_t)0) < 0)
TEST_ERROR
- /* Disable meta data block mechanism */
+ /* Disable metadata block mechanism */
if(H5Pset_meta_block_size(fapl_new, (hsize_t)0) < 0)
TEST_ERROR
@@ -8741,7 +8741,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
if(NULL == (f = (H5F_t *)H5I_object(fid)))
TEST_ERROR
- /* Allocate 2 small meta data blocks */
+ /* Allocate 2 small metadata blocks */
addr1 = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30);
addr2 = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE50);
diff --git a/test/objcopy.c b/test/objcopy.c
index 18de027..9aa2265 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -21,7 +21,6 @@
#include "testhdf5.h"
#include "H5srcdir.h"
-#include "H5Bprivate.h"
#include "H5Iprivate.h"
#include "H5Pprivate.h"
diff --git a/test/ohdr.c b/test/ohdr.c
index 669b1e0..ffede25 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -15,24 +15,24 @@
* Tuesday, November 24, 1998
*/
#include "h5test.h"
-#include "H5Iprivate.h"
+
+#include "H5CXprivate.h" /* API Contexts */
+#include "H5Iprivate.h" /* Identifiers */
/*
* This file needs to access private datatypes from the H5O package.
* This file also needs to access the object header testing code.
*/
-#define H5O_FRIEND /*suppress error about including H5Opkg */
+#define H5O_FRIEND /* suppress error about including H5Opkg */
#define H5O_TESTING
#include "H5Opkg.h"
/*
* This file needs to access private datatypes from the H5G package.
*/
-#define H5G_FRIEND /*suppress error about including H5Gpkg */
+#define H5G_FRIEND /* suppress error about including H5Gpkg */
#include "H5Gpkg.h"
-#include "H5CXprivate.h" /* API Contexts */
-
const char *FILENAME[] = {
"ohdr",
NULL
@@ -119,7 +119,7 @@ test_cont(char *filename, hid_t fapl)
FAIL_STACK_ERROR
if(H5AC_flush(f) < 0)
FAIL_STACK_ERROR
- if(H5O_expunge_chunks_test(&oh_locA) < 0)
+ if(H5O__expunge_chunks_test(&oh_locA) < 0)
FAIL_STACK_ERROR
if(H5O_get_hdr_info(&oh_locA, &hdr_info) < 0)
@@ -220,7 +220,7 @@ test_ohdr_cache(char *filename, hid_t fapl)
/* Query object header information */
rc = 0;
- if(H5O_get_rc(&oh_loc, &rc) < 0)
+ if(H5O__get_rc_test(&oh_loc, &rc) < 0)
FAIL_STACK_ERROR
if(0 != rc)
TEST_ERROR
@@ -261,7 +261,7 @@ test_ohdr_cache(char *filename, hid_t fapl)
* a non-invasive way -QAK)
*/
rc = 0;
- if(H5O_get_rc(&oh_loc, &rc) < 0)
+ if(H5O__get_rc_test(&oh_loc, &rc) < 0)
FAIL_STACK_ERROR
if(0 != rc)
TEST_ERROR
@@ -567,7 +567,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
FAIL_STACK_ERROR
/* Check that the "unknown" message was _NOT_ marked */
- if(H5O_check_msg_marked_test(did, FALSE) < 0)
+ if(H5O__check_msg_marked_test(did, FALSE) < 0)
FAIL_STACK_ERROR
/* Close the dataset */
@@ -647,7 +647,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
FAIL_STACK_ERROR
/* Check that the "unknown" message was marked */
- if(H5O_check_msg_marked_test(did, TRUE) < 0)
+ if(H5O__check_msg_marked_test(did, TRUE) < 0)
FAIL_STACK_ERROR
/* Close the dataset */
@@ -769,9 +769,9 @@ version_string(H5F_libver_t libver)
/* Return the formed version bound string */
return str;
-} /* end of version_string */
-
+} /* end version_string() */
+
/*-------------------------------------------------------------------------
* Function: main
*
@@ -780,13 +780,9 @@ version_string(H5F_libver_t libver)
* Return: Success: 0
* Failure: 1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, November 24, 1998
*
- * Modification:
- * - Added loop of combinations of low/high library format bounds
- * (BMR, Feb 2018)
- *
*-------------------------------------------------------------------------
*/
int
diff --git a/test/page_buffer.c b/test/page_buffer.c
index 3c61ab0..79f110c 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -21,6 +21,10 @@
#include "h5test.h"
+#include "H5CXprivate.h" /* API Contexts */
+#include "H5Iprivate.h"
+#include "H5PBprivate.h"
+
/*
* This file needs to access private information from the H5F package.
*/
@@ -31,12 +35,8 @@
#define H5F_TESTING
#include "H5Fpkg.h"
-#include "H5CXprivate.h" /* API Contexts */
-#include "H5Iprivate.h"
-#include "H5PBprivate.h"
-
-#define FILENAME_LEN 1024
+#define FILENAME_LEN 1024
#define NUM_DSETS 5
#define NX 100
#define NY 50
diff --git a/test/swmr.c b/test/swmr.c
index b7e54e7..8f50123 100644
--- a/test/swmr.c
+++ b/test/swmr.c
@@ -3015,7 +3015,7 @@ test_start_swmr_write_stress_ohdr(hid_t in_fapl)
/* Retrieve the chunk # for the dataspace message */
chunk_num = UINT_MAX;
- if(H5O_msg_get_chunkno_test(did, H5O_SDSPACE_ID, &chunk_num) < 0)
+ if(H5O__msg_get_chunkno_test(did, H5O_SDSPACE_ID, &chunk_num) < 0)
FAIL_STACK_ERROR;
/* Should be in chunk #0 for now */
if(0 != chunk_num)
@@ -3072,7 +3072,7 @@ test_start_swmr_write_stress_ohdr(hid_t in_fapl)
/* Retrieve the chunk # for the dataspace message */
chunk_num = UINT_MAX;
- if(H5O_msg_get_chunkno_test(did, H5O_SDSPACE_ID, &chunk_num) < 0)
+ if(H5O__msg_get_chunkno_test(did, H5O_SDSPACE_ID, &chunk_num) < 0)
FAIL_STACK_ERROR;
/* Should be in chunk #0 for now */
if(1 != chunk_num)
diff --git a/test/swmr_generator.c b/test/swmr_generator.c
index 1c2ec04..23620fb 100644
--- a/test/swmr_generator.c
+++ b/test/swmr_generator.c
@@ -230,12 +230,12 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write,
unsigned chunk_num; /* Object header chunk # for dataspace message */
/* Move the dataspace message to a new object header chunk */
- if(H5O_msg_move_to_new_chunk_test(dsid, H5O_SDSPACE_ID) < 0)
+ if(H5O__msg_move_to_new_chunk_test(dsid, H5O_SDSPACE_ID) < 0)
return -1;
/* Retrieve the chunk # for the dataspace message */
chunk_num = UINT_MAX;
- if(H5O_msg_get_chunkno_test(dsid, H5O_SDSPACE_ID, &chunk_num) < 0)
+ if(H5O__msg_get_chunkno_test(dsid, H5O_SDSPACE_ID, &chunk_num) < 0)
return -1;
/* Should not be in chunk #0 for now */
if(0 == chunk_num)
diff --git a/test/tarray.c b/test/tarray.c
index 99f7bf8..d8ededf 100644
--- a/test/tarray.c
+++ b/test/tarray.c
@@ -26,8 +26,8 @@
#define TESTFILE "tarrold.h5"
/* 1-D array datatype */
-#define ARRAY1_RANK 1
-#define ARRAY1_DIM1 4
+#define ARRAY1_RANK 1
+#define ARRAY1_DIM1 4
/* 3-D array datatype */
#define ARRAY2_RANK 3
@@ -65,7 +65,7 @@ typedef struct
void *test_array_alloc_custom(size_t size, void *info);
void test_array_free_custom(void *mem, void *info);
-
+
/*-------------------------------------------------------------------------
* Function: test_array_atomic_1d
*
@@ -189,7 +189,7 @@ test_array_atomic_1d(void)
CHECK(ret, FAIL, "H5Fclose");
} /* end test_array_atomic_1d() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array_funcs
*
@@ -252,7 +252,7 @@ test_array_funcs(void)
CHECK(ret, FAIL, "H5Tclose");
} /* end test_array_funcs() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array_atomic_3d
*
@@ -381,7 +381,7 @@ test_array_atomic_3d(void)
} /* end test_array_atomic_3d() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array_array_atomic
*
@@ -540,7 +540,7 @@ test_array_array_atomic(void)
CHECK(ret, FAIL, "H5Fclose");
} /* end test_array_array_atomic() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array_compound_atomic
*
@@ -747,7 +747,7 @@ test_array_compound_atomic(void)
CHECK(ret, FAIL, "H5Fclose");
} /* end test_array_compound_atomic() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array_compound_array
*
@@ -1006,7 +1006,7 @@ test_array_compound_array(void)
** allocated.
**
****************************************************************/
-
+
/*-------------------------------------------------------------------------
* Function: test_array_alloc_custom
*
@@ -1045,7 +1045,7 @@ test_array_alloc_custom(size_t size, void *info)
return ret_value;
} /* end test_array_alloc_custom() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array_free_custom
*
@@ -1081,7 +1081,7 @@ test_array_free_custom(void *_mem, void *info)
return;
} /* end test_array_free_custom() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array_vlen_atomic
*
@@ -1296,7 +1296,7 @@ test_array_vlen_atomic(void)
} /* end test_array_vlen_atomic() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array_vlen_array
*
@@ -1341,7 +1341,7 @@ test_array_vlen_array(void)
for(k=0; k<(i+j+1); k++)
for(l=0; l<ARRAY1_DIM1; l++)
((unsigned int *)wdata[i][j].p)[k*ARRAY1_DIM1+l] = (unsigned int)(i*1000+j*100+k*10+l);
- } /* end for */
+ }
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -1551,7 +1551,7 @@ test_array_vlen_array(void)
} /* end test_array_vlen_array() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array_bkg
*
@@ -1580,9 +1580,9 @@ test_array_bkg(void)
unsigned ndims[3] = {1,1,1};
typedef struct {
- int a[ALEN];
- float b[ALEN];
- double c[ALEN];
+ int a[ALEN];
+ float b[ALEN];
+ double c[ALEN];
} CmpField;
CmpField cf[LENGTH];
@@ -1855,7 +1855,7 @@ test_array_bkg(void)
HDfree(dtsinfo);
} /* end test_array_bkg() */
-
+
/*-------------------------------------------------------------------------
* Function: test_compat
*
@@ -2150,7 +2150,7 @@ test_compat(void)
} /* end test_compat() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array
*
@@ -2183,7 +2183,7 @@ test_array(void)
} /* end test_array() */
-
+
/*-------------------------------------------------------------------------
* Function: cleanup_array
*
diff --git a/test/tattr.c b/test/tattr.c
index 4358d4c..3a7cf2c 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -158,7 +158,7 @@ static herr_t attr_op1(hid_t loc_id, const char *name, const H5A_info_t *ainfo,
void *op_data);
-
+
/****************************************************************
**
** test_attr_basic_write(): Test basic H5A (attribute) code.
@@ -398,7 +398,7 @@ test_attr_basic_write(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_basic_write() */
-
+
/****************************************************************
**
** test_attr_basic_read(): Test basic H5A (attribute) code.
@@ -489,7 +489,7 @@ test_attr_basic_read(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_basic_read() */
-
+
/****************************************************************
**
** test_attr_flush(): Test H5A (attribute) code for performing
@@ -556,7 +556,7 @@ test_attr_flush(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_flush() */
-
+
/****************************************************************
**
** test_attr_plist(): Test Attribute Creation Property Lists
@@ -669,7 +669,7 @@ test_attr_plist(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_plist() */
-
+
/****************************************************************
**
** test_attr_compound_write(): Test H5A (attribute) code.
@@ -758,7 +758,7 @@ test_attr_compound_write(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_compound_write() */
-
+
/****************************************************************
**
** test_attr_compound_read(): Test basic H5A (attribute) code.
@@ -908,7 +908,7 @@ test_attr_compound_read(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_compound_read() */
-
+
/****************************************************************
**
** test_attr_scalar_write(): Test scalar H5A (attribute) writing code.
@@ -974,7 +974,7 @@ test_attr_scalar_write(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_scalar_write() */
-
+
/****************************************************************
**
** test_attr_scalar_read(): Test scalar H5A (attribute) reading code.
@@ -1045,7 +1045,7 @@ test_attr_scalar_read(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_scalar_read() */
-
+
/****************************************************************
**
** test_attr_mult_write(): Test basic H5A (attribute) code.
@@ -1166,7 +1166,7 @@ test_attr_mult_write(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_mult_write() */
-
+
/****************************************************************
**
** test_attr_mult_read(): Test basic H5A (attribute) code.
@@ -1388,7 +1388,7 @@ test_attr_mult_read(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_mult_read() */
-
+
/****************************************************************
**
** attr_op1(): Attribute operator
@@ -1428,7 +1428,7 @@ attr_op1(hid_t H5_ATTR_UNUSED loc_id, const char *name, const H5A_info_t H5_ATTR
return(ret);
} /* end attr_op1() */
-
+
/****************************************************************
**
** test_attr_iterate(): Test H5A (attribute) iterator code.
@@ -1500,7 +1500,7 @@ test_attr_iterate(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_iterate() */
-
+
/****************************************************************
**
** test_attr_delete(): Test H5A (attribute) code for deleting objects.
@@ -1620,7 +1620,7 @@ test_attr_delete(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_delete() */
-
+
/****************************************************************
**
** test_attr_dtype_shared(): Test H5A (attribute) code for using
@@ -1658,7 +1658,6 @@ test_attr_dtype_shared(hid_t fapl)
if(empty_filesize < 0)
TestErrPrintf("Line %d: file size wrong!\n", __LINE__);
-
/* Re-open file */
file_id = H5Fopen(FILENAME, H5F_ACC_RDWR, fapl);
CHECK(file_id, FAIL, "H5Fopen");
@@ -1797,7 +1796,7 @@ test_attr_dtype_shared(hid_t fapl)
VERIFY(filesize, empty_filesize, "h5_get_file_size");
} /* test_attr_dtype_shared() */
-
+
/****************************************************************
**
** test_attr_duplicate_ids(): Test operations with more than
@@ -2042,7 +2041,7 @@ test_attr_duplicate_ids(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_duplicate_ids() */
-
+
/****************************************************************
**
** test_attr_dense_verify(): Test basic H5A (attribute) code.
@@ -2112,7 +2111,7 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
return(-1);
} /* test_attr_dense_verify() */
-
+
/****************************************************************
**
** test_attr_dense_create(): Test basic H5A (attribute) code.
@@ -2177,8 +2176,8 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pclose");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Add attributes, until just before converting to dense storage */
for(u = 0; u < max_compact; u++) {
@@ -2197,8 +2196,8 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
} /* end for */
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Add one more attribute, to push into "dense" storage */
/* Create attribute */
@@ -2207,8 +2206,8 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -2243,7 +2242,7 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
VERIFY(filesize, empty_filesize, "h5_get_file_size");
} /* test_attr_dense_create() */
-
+
/****************************************************************
**
** test_attr_dense_open(): Test basic H5A (attribute) code.
@@ -2312,8 +2311,8 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pclose");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Add attributes, until just before converting to dense storage */
for(u = 0; u < max_compact; u++) {
@@ -2336,8 +2335,8 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
} /* end for */
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Add one more attribute, to push into "dense" storage */
/* Create attribute */
@@ -2346,8 +2345,8 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -2382,7 +2381,7 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
VERIFY(filesize, empty_filesize, "h5_get_file_size");
} /* test_attr_dense_open() */
-
+
/****************************************************************
**
** test_attr_dense_delete(): Test basic H5A (attribute) code.
@@ -2452,8 +2451,8 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pclose");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Add attributes, until well into dense storage */
for(u = 0; u < (max_compact * 2); u++) {
@@ -2477,8 +2476,8 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
} /* end for */
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Close dataspace */
ret = H5Sclose(sid);
@@ -2514,8 +2513,8 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
} /* end for */
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Delete one more attribute, which should cause reversion to compact storage */
sprintf(attrname, "attr %02u", u);
@@ -2523,8 +2522,8 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Verify attributes still left */
ret = test_attr_dense_verify(dataset, (u - 1));
@@ -2536,8 +2535,8 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Verify attributes still left */
ret = test_attr_dense_verify(dataset, (u - 2));
@@ -2560,7 +2559,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
VERIFY(filesize, empty_filesize, "h5_get_file_size");
} /* test_attr_dense_delete() */
-
+
/****************************************************************
**
** test_attr_dense_rename(): Test basic H5A (attribute) code.
@@ -2627,8 +2626,8 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pclose");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Add attributes, until well into dense storage */
for(u = 0; u < (max_compact * 2); u++) {
@@ -2659,8 +2658,8 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
} /* end for */
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Close dataspace */
ret = H5Sclose(sid);
@@ -2719,7 +2718,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
VERIFY(filesize, empty_filesize, "h5_get_file_size");
} /* test_attr_dense_rename() */
-
+
/****************************************************************
**
** test_attr_dense_unlink(): Test basic H5A (attribute) code.
@@ -2786,8 +2785,8 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pclose");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Add attributes, until well into dense storage */
for(u = 0; u < (max_compact * 2); u++) {
@@ -2811,8 +2810,8 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
} /* end for */
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Close dataspace */
ret = H5Sclose(sid);
@@ -2836,9 +2835,9 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Ldelete");
/* Check on dataset's attribute storage status */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_ATTR_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 0, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_ATTR_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 0, "H5F__get_sohm_mesg_count_test");
/* Close file */
ret = H5Fclose(fid);
@@ -2849,7 +2848,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
VERIFY(filesize, empty_filesize, "h5_get_file_size");
} /* test_attr_dense_unlink() */
-
+
/****************************************************************
**
** test_attr_dense_limits(): Test basic H5A (attribute) code.
@@ -2923,8 +2922,8 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Add first attribute, which should be immediately in dense storage */
@@ -2944,8 +2943,8 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Add second attribute, to allow deletions to be checked easily */
@@ -2965,8 +2964,8 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Delete second attribute, attributes should still be stored densely */
@@ -2976,8 +2975,8 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Delete first attribute, attributes should not be stored densely */
@@ -2989,8 +2988,8 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Close dataspace */
@@ -3014,7 +3013,7 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
VERIFY(filesize, empty_filesize, "h5_get_file_size");
} /* test_attr_dense_limits() */
-
+
/****************************************************************
**
** test_attr_dense_dup_ids(): Test operations with multiple ID
@@ -3081,8 +3080,8 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pclose");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Add attributes, until just before converting to dense storage */
for(u = 0; u < max_compact; u++) {
@@ -3101,8 +3100,8 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
} /* end for */
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Add one more attribute, to push into "dense" storage */
/* Create dataspace for attribute */
@@ -3115,8 +3114,8 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Open the attribute just created and get a second ID */
attr2 = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -3150,8 +3149,8 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Open first attribute for the dataset */
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -3203,8 +3202,8 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Open first attribute for the dataset */
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -3264,8 +3263,8 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Open first attribute for the dataset */
attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)4,
@@ -3320,8 +3319,8 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Open attribute of the dataset for the first time */
attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)2,
@@ -3336,8 +3335,8 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
}
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Open attribute for the second time */
attr2 = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)2,
@@ -3387,8 +3386,8 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Open attribute of the dataset for the first time */
attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)3,
@@ -3412,8 +3411,8 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
}
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Open attribute for the second time */
attr2 = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)3,
@@ -3486,8 +3485,8 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Check on group's attribute storage status */
- is_dense = H5O_is_attr_dense_test(gid1);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(gid1);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Open the hard link just created */
gid2 = H5Gopen2(fid, GROUP2_NAME, H5P_DEFAULT);
@@ -3537,7 +3536,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_dense_dup_ids() */
-
+
/****************************************************************
**
** test_attr_big(): Test basic H5A (attribute) code.
@@ -3620,10 +3619,10 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
- is_empty = H5O_is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(dataset);
+ VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Add first "small" attribute, which should be in compact storage */
@@ -3639,10 +3638,10 @@ test_attr_big(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Check on dataset's attribute storage status */
- is_empty = H5O_is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Add second "small" attribute, which should stay in compact storage */
@@ -3658,10 +3657,10 @@ test_attr_big(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Check on dataset's attribute storage status */
- is_empty = H5O_is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Add first "big" attribute, which should push storage into dense form */
@@ -3682,10 +3681,10 @@ test_attr_big(hid_t fcpl, hid_t fapl)
* message heap instead of forcing the attribute storage into the dense
* form - QAK)
*/
- is_empty = H5O_is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
/* Add second "big" attribute, which should leave storage in dense form */
@@ -3705,10 +3704,10 @@ test_attr_big(hid_t fcpl, hid_t fapl)
* message heap instead of forcing the attribute storage into the dense
* form - QAK)
*/
- is_empty = H5O_is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
/* Delete second "small" attribute, attributes should still be stored densely */
@@ -3720,10 +3719,10 @@ test_attr_big(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
- is_empty = H5O_is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
/* Delete second "big" attribute, attributes should still be stored densely */
@@ -3735,10 +3734,10 @@ test_attr_big(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
- is_empty = H5O_is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
/* Delete first "big" attribute, attributes should _not_ be stored densely */
@@ -3750,10 +3749,10 @@ test_attr_big(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
- is_empty = H5O_is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Delete first "small" attribute, should be no attributes now */
@@ -3765,8 +3764,8 @@ test_attr_big(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
- is_empty = H5O_is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test");
+ is_empty = H5O__is_attr_empty_test(dataset);
+ VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
} /* end if */
else {
/* Shouldn't be able to create "big" attributes with older version of format */
@@ -3777,10 +3776,10 @@ test_attr_big(hid_t fcpl, hid_t fapl)
* message heap instead of forcing the attribute storage into the dense
* form - QAK)
*/
- is_empty = H5O_is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
} /* end else */
@@ -3807,7 +3806,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
VERIFY(filesize, empty_filesize, "h5_get_file_size");
} /* test_attr_big() */
-
+
/****************************************************************
**
** test_attr_null_space(): Test basic H5A (attribute) code.
@@ -4025,7 +4024,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
VERIFY(filesize, empty_filesize, "h5_get_file_size");
} /* test_attr_null_space() */
-
+
/****************************************************************
**
** test_attr_deprec(): Test basic H5A (attribute) code.
@@ -4068,7 +4067,6 @@ test_attr_deprec(hid_t fcpl, hid_t fapl)
ret = H5Aclose(attr);
CHECK(ret, FAIL, "H5Aclose");
-
/* Close dataspaces */
ret = H5Sclose(sid);
@@ -4134,7 +4132,7 @@ test_attr_deprec(hid_t fcpl, hid_t fapl)
#endif /* H5_NO_DEPRECATED_SYMBOLS */
} /* test_attr_deprec() */
-
+
/****************************************************************
**
** test_attr_many(): Test basic H5A (attribute) code.
@@ -4263,7 +4261,7 @@ test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
} /* test_attr_many() */
-
+
/****************************************************************
**
** test_attr_corder_create_empty(): Test basic H5A (attribute) code.
@@ -4325,10 +4323,10 @@ test_attr_corder_create_basic(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
/* Check on dataset's attribute storage status */
- is_empty = H5O_is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(dataset);
+ VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -4352,10 +4350,10 @@ test_attr_corder_create_basic(hid_t fcpl, hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Check on dataset's attribute storage status */
- is_empty = H5O_is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(dataset);
+ VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Retrieve dataset creation property list for group */
dcpl = H5Dget_create_plist(dataset);
@@ -4379,7 +4377,7 @@ test_attr_corder_create_basic(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_corder_create_basic() */
-
+
/****************************************************************
**
** test_attr_corder_create_compact(): Test basic H5A (attribute) code.
@@ -4456,10 +4454,10 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
} /* end switch */
/* Check on dataset's attribute storage status */
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Create several attributes, but keep storage in compact form */
for(u = 0; u < max_compact; u++) {
@@ -4477,13 +4475,13 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, (u + 1), "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, (u + 1), "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
} /* end for */
} /* end for */
@@ -4540,13 +4538,13 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
} /* end switch */
/* Check on dataset's attribute storage status */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, max_compact, "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Loop through attributes, checking their creation order values */
/* (the name index is used, but the creation order value is in the same order) */
@@ -4577,7 +4575,7 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_corder_create_compact() */
-
+
/****************************************************************
**
** test_attr_corder_create_dense(): Test basic H5A (attribute) code.
@@ -4656,10 +4654,10 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
} /* end switch */
/* Check on dataset's attribute storage status */
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Create several attributes, but keep storage in compact form */
for(u = 0; u < max_compact; u++) {
@@ -4677,13 +4675,13 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, (u + 1), "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, (u + 1), "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
} /* end for */
/* Create another attribute, to push into dense storage */
@@ -4700,18 +4698,18 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, (max_compact + 1), "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
- ret = H5O_attr_dense_info_test(my_dataset, &name_count, &corder_count);
- CHECK(ret, FAIL, "H5O_attr_dense_info_test");
- VERIFY(name_count, corder_count, "H5O_attr_dense_info_test");
+ ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
+ CHECK(ret, FAIL, "H5O__attr_dense_info_test");
+ VERIFY(name_count, corder_count, "H5O__attr_dense_info_test");
} /* end for */
/* Close Datasets */
@@ -4767,13 +4765,13 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
} /* end switch */
/* Check on dataset's attribute storage status */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, (max_compact + 1), "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Loop through attributes, checking their creation order values */
/* (the name index is used, but the creation order value is in the same order) */
@@ -4804,7 +4802,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_corder_create_dense() */
-
+
/****************************************************************
**
** test_attr_corder_create_reopen(): Test basic H5A (attribute) code.
@@ -4912,7 +4910,7 @@ test_attr_corder_create_reopen(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
} /* test_attr_corder_create_reopen() */
-
+
/****************************************************************
**
** test_attr_corder_transition(): Test basic H5A (attribute) code.
@@ -4995,10 +4993,10 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end switch */
/* Check on dataset's attribute storage status */
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
} /* end for */
/* Close Datasets */
@@ -5065,13 +5063,13 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, (u + 1), "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, (u + 1), "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
} /* end for */
/* Create another attribute, to push into dense storage */
@@ -5088,18 +5086,18 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, (max_compact + 1), "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
- ret = H5O_attr_dense_info_test(my_dataset, &name_count, &corder_count);
- CHECK(ret, FAIL, "H5O_attr_dense_info_test");
- VERIFY(name_count, corder_count, "H5O_attr_dense_info_test");
+ ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
+ CHECK(ret, FAIL, "H5O__attr_dense_info_test");
+ VERIFY(name_count, corder_count, "H5O__attr_dense_info_test");
/* Delete several attributes from object, until attribute storage resumes compact form */
for(u = max_compact; u >= min_dense; u--) {
@@ -5108,18 +5106,18 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete");
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, u, "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, u, "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
- ret = H5O_attr_dense_info_test(my_dataset, &name_count, &corder_count);
- CHECK(ret, FAIL, "H5O_attr_dense_info_test");
- VERIFY(name_count, corder_count, "H5O_attr_dense_info_test");
+ ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
+ CHECK(ret, FAIL, "H5O__attr_dense_info_test");
+ VERIFY(name_count, corder_count, "H5O__attr_dense_info_test");
} /* end for */
/* Delete another attribute, to push attribute storage into compact form */
@@ -5128,13 +5126,13 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete");
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, (min_dense - 1), "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, (min_dense - 1), "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Re-add attributes to get back into dense form */
for(u = (min_dense - 1); u < (max_compact + 1); u++) {
@@ -5153,18 +5151,18 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end for */
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, (max_compact + 1), "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
- ret = H5O_attr_dense_info_test(my_dataset, &name_count, &corder_count);
- CHECK(ret, FAIL, "H5O_attr_dense_info_test");
- VERIFY(name_count, corder_count, "H5O_attr_dense_info_test");
+ ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
+ CHECK(ret, FAIL, "H5O__attr_dense_info_test");
+ VERIFY(name_count, corder_count, "H5O__attr_dense_info_test");
} /* end for */
/* Close Datasets */
@@ -5212,18 +5210,18 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end switch */
/* Check on dataset's attribute storage status */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, (max_compact + 1), "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
- ret = H5O_attr_dense_info_test(my_dataset, &name_count, &corder_count);
- CHECK(ret, FAIL, "H5O_attr_dense_info_test");
- VERIFY(name_count, corder_count, "H5O_attr_dense_info_test");
+ ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
+ CHECK(ret, FAIL, "H5O__attr_dense_info_test");
+ VERIFY(name_count, corder_count, "H5O__attr_dense_info_test");
/* Delete several attributes from object, until attribute storage resumes compact form */
for(u = max_compact; u >= min_dense; u--) {
@@ -5232,18 +5230,18 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete");
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, u, "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, u, "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
- ret = H5O_attr_dense_info_test(my_dataset, &name_count, &corder_count);
- CHECK(ret, FAIL, "H5O_attr_dense_info_test");
- VERIFY(name_count, corder_count, "H5O_attr_dense_info_test");
+ ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
+ CHECK(ret, FAIL, "H5O__attr_dense_info_test");
+ VERIFY(name_count, corder_count, "H5O__attr_dense_info_test");
} /* end for */
/* Delete another attribute, to push attribute storage into compact form */
@@ -5252,13 +5250,13 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete");
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, (min_dense - 1), "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, (min_dense - 1), "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Re-add attributes to get back into dense form */
for(u = (min_dense - 1); u < (max_compact + 1); u++) {
@@ -5277,18 +5275,18 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end for */
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, (max_compact + 1), "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
- ret = H5O_attr_dense_info_test(my_dataset, &name_count, &corder_count);
- CHECK(ret, FAIL, "H5O_attr_dense_info_test");
- VERIFY(name_count, corder_count, "H5O_attr_dense_info_test");
+ ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
+ CHECK(ret, FAIL, "H5O__attr_dense_info_test");
+ VERIFY(name_count, corder_count, "H5O__attr_dense_info_test");
/* Delete all attributes */
for(u = max_compact; u > 0; u--) {
@@ -5318,7 +5316,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
} /* test_attr_corder_transition() */
-
+
/****************************************************************
**
** test_attr_corder_delete(): Test basic H5A (attribute) code.
@@ -5425,10 +5423,10 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
} /* end switch */
/* Check on dataset's attribute storage status */
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Create attributes, until attribute storage is in dense form */
for(u = 0; u < max_compact * 2; u++) {
@@ -5447,18 +5445,18 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
} /* end for */
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, (max_compact * 2), "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
- ret = H5O_attr_dense_info_test(my_dataset, &name_count, &corder_count);
- CHECK(ret, FAIL, "H5O_attr_dense_info_test");
- VERIFY(name_count, corder_count, "H5O_attr_dense_info_test");
+ ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
+ CHECK(ret, FAIL, "H5O__attr_dense_info_test");
+ VERIFY(name_count, corder_count, "H5O__attr_dense_info_test");
} /* end for */
/* Close Datasets */
@@ -5519,7 +5517,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
} /* test_attr_corder_delete() */
-
+
/*-------------------------------------------------------------------------
* Function: attr_info_by_idx_check
*
@@ -5666,7 +5664,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n,
return(-1);
} /* end attr_info_by_idx_check() */
-
+
/****************************************************************
**
** test_attr_info_by_idx(): Test basic H5A (attribute) code.
@@ -5755,10 +5753,10 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end switch */
/* Check on dataset's attribute storage status */
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Check for query on non-existant attribute */
ret = H5Aget_info_by_idx(my_dataset, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, &ainfo, H5P_DEFAULT);
@@ -5787,13 +5785,13 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end for */
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, max_compact, "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Check for out of bound offset queries */
ret = H5Aget_info_by_idx(my_dataset, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, &ainfo, H5P_DEFAULT);
@@ -5819,8 +5817,8 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Verify state of object */
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
/* Verify information for new attribute */
ret = attr_info_by_idx_check(my_dataset, attrname, (hsize_t)u, use_index);
@@ -5828,21 +5826,21 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end for */
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, (max_compact * 2), "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
if(new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
- ret = H5O_attr_dense_info_test(my_dataset, &name_count, &corder_count);
- CHECK(ret, FAIL, "H5O_attr_dense_info_test");
+ ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
+ CHECK(ret, FAIL, "H5O__attr_dense_info_test");
if(use_index)
- VERIFY(name_count, corder_count, "H5O_attr_dense_info_test");
- VERIFY(name_count, (max_compact * 2), "H5O_attr_dense_info_test");
+ VERIFY(name_count, corder_count, "H5O__attr_dense_info_test");
+ VERIFY(name_count, (max_compact * 2), "H5O__attr_dense_info_test");
} /* end if */
/* Check for out of bound offset queries */
@@ -5876,7 +5874,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
} /* test_attr_info_by_idx() */
-
+
/****************************************************************
**
** test_attr_delete_by_idx(): Test basic H5A (attribute) code.
@@ -5995,10 +5993,10 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end switch */
/* Check on dataset's attribute storage status */
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Check for deleting non-existant attribute */
ret = H5Adelete_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0, H5P_DEFAULT);
@@ -6025,13 +6023,13 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end for */
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, max_compact, "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Check for out of bound deletions */
ret = H5Adelete_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u, H5P_DEFAULT);
@@ -6091,8 +6089,8 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete_by_idx");
/* Verify state of attribute storage (empty) */
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
} /* end for */
/* Work on all the datasets */
@@ -6131,8 +6129,8 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if(u >= max_compact) {
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
} /* end if */
/* Verify information for new attribute */
@@ -6141,21 +6139,21 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end for */
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, (max_compact * 2), "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
if(new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
- ret = H5O_attr_dense_info_test(my_dataset, &name_count, &corder_count);
- CHECK(ret, FAIL, "H5O_attr_dense_info_test");
+ ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
+ CHECK(ret, FAIL, "H5O__attr_dense_info_test");
if(use_index)
- VERIFY(name_count, corder_count, "H5O_attr_dense_info_test");
- VERIFY(name_count, (max_compact * 2), "H5O_attr_dense_info_test");
+ VERIFY(name_count, corder_count, "H5O__attr_dense_info_test");
+ VERIFY(name_count, (max_compact * 2), "H5O__attr_dense_info_test");
} /* end if */
/* Check for out of bound deletion */
@@ -6216,8 +6214,8 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete_by_idx");
/* Verify state of attribute storage (empty) */
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
/* Check for deletion on empty attribute storage again */
ret = H5Adelete_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0, H5P_DEFAULT);
@@ -6264,8 +6262,8 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if(u >= max_compact) {
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
} /* end if */
/* Verify information for new attribute */
@@ -6376,8 +6374,8 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete_by_idx");
/* Verify state of attribute storage (empty) */
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
/* Check for deletion on empty attribute storage again */
ret = H5Adelete_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0, H5P_DEFAULT);
@@ -6408,7 +6406,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
} /* test_attr_delete_by_idx() */
-
+
/****************************************************************
**
** attr_iterate2_cb(): Revised attribute operator
@@ -6482,7 +6480,7 @@ HDfprintf(stderr, "op_data->curr = %Hd\n", op_data->curr);
} /* end attr_iterate2_cb() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
-
+
/****************************************************************
**
** attr_iterate1_cb(): Attribute operator
@@ -6495,7 +6493,7 @@ attr_iterate1_cb(hid_t loc_id, const char *attr_name, void *_op_data)
} /* end attr_iterate1_cb() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
+
/*-------------------------------------------------------------------------
* Function: attr_iterate2_fail_cb
*
@@ -6517,7 +6515,7 @@ attr_iterate2_fail_cb(hid_t H5_ATTR_UNUSED group_id, const char H5_ATTR_UNUSED *
return(H5_ITER_ERROR);
} /* end attr_iterate2_fail_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: attr_iterate_check
*
@@ -6817,7 +6815,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id,
return(-1);
} /* end attr_iterate_check() */
-
+
/****************************************************************
**
** test_attr_iterate2(): Test basic H5A (attribute) code.
@@ -6947,10 +6945,10 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end switch */
/* Check on dataset's attribute storage status */
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Check for iterating over object with no attributes (should be OK) */
ret = H5Aiterate2(my_dataset, idx_type, order, NULL, attr_iterate2_cb, NULL);
@@ -6983,13 +6981,13 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end for */
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, max_compact, "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Check for out of bound iteration */
idx = u;
@@ -7049,8 +7047,8 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if(u >= max_compact) {
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
} /* end if */
/* Verify information for new attribute */
@@ -7059,21 +7057,21 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end for */
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, (max_compact * 2), "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
if(new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
- ret = H5O_attr_dense_info_test(my_dataset, &name_count, &corder_count);
- CHECK(ret, FAIL, "H5O_attr_dense_info_test");
+ ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
+ CHECK(ret, FAIL, "H5O__attr_dense_info_test");
if(use_index)
- VERIFY(name_count, corder_count, "H5O_attr_dense_info_test");
- VERIFY(name_count, (max_compact * 2), "H5O_attr_dense_info_test");
+ VERIFY(name_count, corder_count, "H5O__attr_dense_info_test");
+ VERIFY(name_count, (max_compact * 2), "H5O__attr_dense_info_test");
} /* end if */
/* Check for out of bound iteration */
@@ -7121,7 +7119,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
HDfree(visited);
} /* test_attr_iterate2() */
-
+
/*-------------------------------------------------------------------------
* Function: attr_open_by_idx_check
*
@@ -7181,7 +7179,7 @@ attr_open_by_idx_check(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
return(-1);
} /* end attr_open_by_idx_check() */
-
+
/****************************************************************
**
** test_attr_open_by_idx(): Test basic H5A (attribute) code.
@@ -7299,10 +7297,10 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end switch */
/* Check on dataset's attribute storage status */
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Check for opening an attribute on an object with no attributes */
ret_id = H5Aopen_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0, H5P_DEFAULT, H5P_DEFAULT);
@@ -7329,13 +7327,13 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end for */
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, max_compact, "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Check for out of bound opening an attribute on an object */
ret_id = H5Aopen_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u, H5P_DEFAULT, H5P_DEFAULT);
@@ -7383,8 +7381,8 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if(u >= max_compact) {
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
} /* end if */
/* Verify information for new attribute */
@@ -7393,21 +7391,21 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end for */
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, (max_compact * 2), "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
if(new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
- ret = H5O_attr_dense_info_test(my_dataset, &name_count, &corder_count);
- CHECK(ret, FAIL, "H5O_attr_dense_info_test");
+ ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
+ CHECK(ret, FAIL, "H5O__attr_dense_info_test");
if(use_index)
- VERIFY(name_count, corder_count, "H5O_attr_dense_info_test");
- VERIFY(name_count, (max_compact * 2), "H5O_attr_dense_info_test");
+ VERIFY(name_count, corder_count, "H5O__attr_dense_info_test");
+ VERIFY(name_count, (max_compact * 2), "H5O__attr_dense_info_test");
} /* end if */
/* Check for out of bound opening an attribute on an object */
@@ -7443,7 +7441,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
} /* test_attr_open_by_idx() */
-
+
/*-------------------------------------------------------------------------
* Function: attr_open_check
*
@@ -7529,7 +7527,7 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id,
return(-1);
} /* end attr_open_check() */
-
+
/****************************************************************
**
** test_attr_open_by_name(): Test basic H5A (attribute) code.
@@ -7621,10 +7619,10 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end switch */
/* Check on dataset's attribute storage status */
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Check for opening a non-existant attribute on an object with no attributes */
ret_id = H5Aopen(my_dataset, "foo", H5P_DEFAULT);
@@ -7657,13 +7655,13 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end for */
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, max_compact, "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Check for opening a non-existant attribute on an object with compact attribute storage */
ret_id = H5Aopen(my_dataset, "foo", H5P_DEFAULT);
@@ -7720,8 +7718,8 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if(u >= max_compact) {
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
} /* end if */
/* Verify information for new attribute */
@@ -7730,21 +7728,21 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end for */
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, (max_compact * 2), "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
if(new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
- ret = H5O_attr_dense_info_test(my_dataset, &name_count, &corder_count);
- CHECK(ret, FAIL, "H5O_attr_dense_info_test");
+ ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
+ CHECK(ret, FAIL, "H5O__attr_dense_info_test");
if(use_index)
- VERIFY(name_count, corder_count, "H5O_attr_dense_info_test");
- VERIFY(name_count, (max_compact * 2), "H5O_attr_dense_info_test");
+ VERIFY(name_count, corder_count, "H5O__attr_dense_info_test");
+ VERIFY(name_count, (max_compact * 2), "H5O__attr_dense_info_test");
} /* end if */
/* Check for opening a non-existant attribute on an object with dense attribute storage */
@@ -7784,7 +7782,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
} /* test_attr_open_by_name() */
-
+
/****************************************************************
**
** test_attr_create_by_name(): Test basic H5A (attribute) code.
@@ -7875,10 +7873,10 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end switch */
/* Check on dataset's attribute storage status */
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Create attributes, up to limit of compact form */
for(u = 0; u < max_compact; u++) {
@@ -7901,13 +7899,13 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end for */
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, max_compact, "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Test opening attributes stored compactly */
ret = attr_open_check(fid, dsetname, my_dataset, u);
@@ -7954,8 +7952,8 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if(u >= max_compact) {
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
} /* end if */
/* Verify information for new attribute */
@@ -7964,21 +7962,21 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end for */
/* Verify state of object */
- ret = H5O_num_attrs_test(my_dataset, &nattrs);
- CHECK(ret, FAIL, "H5O_num_attrs_test");
- VERIFY(nattrs, (max_compact * 2), "H5O_num_attrs_test");
- is_empty = H5O_is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
- is_dense = H5O_is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O_is_attr_dense_test");
+ ret = H5O__num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O__num_attrs_test");
+ VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
+ is_empty = H5O__is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ is_dense = H5O__is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
if(new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
- ret = H5O_attr_dense_info_test(my_dataset, &name_count, &corder_count);
- CHECK(ret, FAIL, "H5O_attr_dense_info_test");
+ ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
+ CHECK(ret, FAIL, "H5O__attr_dense_info_test");
if(use_index)
- VERIFY(name_count, corder_count, "H5O_attr_dense_info_test");
- VERIFY(name_count, (max_compact * 2), "H5O_attr_dense_info_test");
+ VERIFY(name_count, corder_count, "H5O__attr_dense_info_test");
+ VERIFY(name_count, (max_compact * 2), "H5O__attr_dense_info_test");
} /* end if */
/* Test opening attributes stored compactly */
@@ -8132,14 +8130,14 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Check on dataset's message storage status */
if(test_shared != 0) {
/* Datasets' datatypes can be shared */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 1, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 1, "H5F__get_sohm_mesg_count_test");
/* Datasets' dataspace can be shared */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 1, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 1, "H5F__get_sohm_mesg_count_test");
} /* end if */
/* Retrieve limits for compact/dense attribute storage */
@@ -8151,10 +8149,10 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pclose");
/* Check on datasets' attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
- is_dense = H5O_is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset2);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Add attributes to each dataset, until after converting to dense storage */
for(u = 0; u < max_compact * 2; u++) {
@@ -8206,11 +8204,11 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
+ is_dense = H5O__is_attr_dense_test(dataset);
if(u < max_compact)
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Alternate between creating "small" & "big" attributes */
@@ -8258,11 +8256,11 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset2);
+ is_dense = H5O__is_attr_dense_test(dataset2);
if(u < max_compact)
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
} /* end for */
/* Close attribute's datatype */
@@ -8279,15 +8277,15 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
if(test_shared != 0) {
if(test_shared == 1) {
/* Check on datatype storage status */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 2, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 2, "H5F__get_sohm_mesg_count_test");
} /* end if */
/* Check on dataspace storage status */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 2, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 2, "H5F__get_sohm_mesg_count_test");
} /* end if */
/* Unlink datasets with attributes */
@@ -8303,20 +8301,20 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
} /* end if */
/* Check on attribute storage status */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_ATTR_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 0, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_ATTR_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 0, "H5F__get_sohm_mesg_count_test");
if(test_shared != 0) {
/* Check on datatype storage status */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 0, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 0, "H5F__get_sohm_mesg_count_test");
/* Check on dataspace storage status */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 0, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 0, "H5F__get_sohm_mesg_count_test");
} /* end if */
/* Close file */
@@ -8463,14 +8461,14 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Check on dataset's message storage status */
if(test_shared != 0) {
/* Datasets' datatypes can be shared */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 1, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 1, "H5F__get_sohm_mesg_count_test");
/* Datasets' dataspace can be shared */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 1, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 1, "H5F__get_sohm_mesg_count_test");
} /* end if */
/* Retrieve limits for compact/dense attribute storage */
@@ -8482,10 +8480,10 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pclose");
/* Check on datasets' attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
- is_dense = H5O_is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset2);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Add attributes to each dataset, until after converting to dense storage */
for(u = 0; u < max_compact * 2; u++) {
@@ -8537,11 +8535,11 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
+ is_dense = H5O__is_attr_dense_test(dataset);
if(u < max_compact)
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Alternate between creating "small" & "big" attributes */
@@ -8589,11 +8587,11 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset2);
+ is_dense = H5O__is_attr_dense_test(dataset2);
if(u < max_compact)
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Create new attribute name */
@@ -8726,15 +8724,15 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if(test_shared != 0) {
if(test_shared == 1) {
/* Check on datatype storage status */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 2, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 2, "H5F__get_sohm_mesg_count_test");
} /* end if */
/* Check on dataspace storage status */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 2, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 2, "H5F__get_sohm_mesg_count_test");
} /* end if */
/* Unlink datasets with attributes */
@@ -8750,20 +8748,20 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
} /* end if */
/* Check on attribute storage status */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_ATTR_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 0, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_ATTR_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 0, "H5F__get_sohm_mesg_count_test");
if(test_shared != 0) {
/* Check on datatype storage status */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 0, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 0, "H5F__get_sohm_mesg_count_test");
/* Check on dataspace storage status */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 0, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 0, "H5F__get_sohm_mesg_count_test");
} /* end if */
/* Close file */
@@ -8909,14 +8907,14 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check on dataset's message storage status */
if(test_shared != 0) {
/* Datasets' datatypes can be shared */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 1, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 1, "H5F__get_sohm_mesg_count_test");
/* Datasets' dataspace can be shared */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 1, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 1, "H5F__get_sohm_mesg_count_test");
} /* end if */
/* Retrieve limits for compact/dense attribute storage */
@@ -8928,10 +8926,10 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pclose");
/* Check on datasets' attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
- is_dense = H5O_is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset2);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Add attributes to each dataset, until after converting to dense storage */
for(u = 0; u < max_compact * 2; u++) {
@@ -8983,11 +8981,11 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
+ is_dense = H5O__is_attr_dense_test(dataset);
if(u < max_compact)
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Alternate between creating "small" & "big" attributes */
@@ -9027,7 +9025,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
CHECK(ret, FAIL, "H5A__get_shared_rc_test");
- VERIFY(shared_refcount, 2, "H5A_get_shared_rc_test");
+ VERIFY(shared_refcount, 2, "H5A__get_shared_rc_test");
} /* end else */
/* Close attribute */
@@ -9035,11 +9033,11 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset2);
+ is_dense = H5O__is_attr_dense_test(dataset2);
if(u < max_compact)
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
} /* end for */
@@ -9095,15 +9093,15 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
if(test_shared != 0) {
if(test_shared == 1) {
/* Check on datatype storage status */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 2, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 2, "H5F__get_sohm_mesg_count_test");
} /* end if */
/* Check on dataspace storage status */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 2, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 2, "H5F__get_sohm_mesg_count_test");
} /* end if */
/* Unlink datasets with attributes */
@@ -9119,20 +9117,20 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
} /* end if */
/* Check on attribute storage status */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_ATTR_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 0, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_ATTR_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 0, "H5F__get_sohm_mesg_count_test");
if(test_shared != 0) {
/* Check on datatype storage status */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 0, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 0, "H5F__get_sohm_mesg_count_test");
/* Check on dataspace storage status */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 0, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 0, "H5F__get_sohm_mesg_count_test");
} /* end if */
/* Close file */
@@ -9278,14 +9276,14 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check on dataset's message storage status */
if(test_shared != 0) {
/* Datasets' datatypes can be shared */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 1, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 1, "H5F__get_sohm_mesg_count_test");
/* Datasets' dataspace can be shared */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 1, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 1, "H5F__get_sohm_mesg_count_test");
} /* end if */
/* Retrieve limits for compact/dense attribute storage */
@@ -9297,10 +9295,10 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pclose");
/* Check on datasets' attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
- is_dense = H5O_is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset2);
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
/* Add attributes to each dataset, until after converting to dense storage */
for(u = 0; u < max_compact * 2; u++) {
@@ -9352,11 +9350,11 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
+ is_dense = H5O__is_attr_dense_test(dataset);
if(u < max_compact)
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Alternate between creating "small" & "big" attributes */
@@ -9404,11 +9402,11 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Check on dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset2);
+ is_dense = H5O__is_attr_dense_test(dataset2);
if(u < max_compact)
- VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+ VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
} /* end for */
@@ -9426,8 +9424,8 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check on first dataset's attribute storage status */
- is_dense = H5O_is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
+ is_dense = H5O__is_attr_dense_test(dataset);
+ VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
/* Check ref count on attributes of first dataset */
for(u = 0; u < max_compact * 2; u++) {
@@ -9474,20 +9472,20 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
} /* end if */
/* Check on attribute storage status */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_ATTR_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 0, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_ATTR_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 0, "H5F__get_sohm_mesg_count_test");
if(test_shared != 0) {
/* Check on datatype storage status */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 0, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_DTYPE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 0, "H5F__get_sohm_mesg_count_test");
/* Check on dataspace storage status */
- ret = H5F_get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(mesg_count, 0, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(fid, H5O_SDSPACE_ID, &mesg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(mesg_count, 0, "H5F__get_sohm_mesg_count_test");
} /* end if */
/* Close file */
@@ -10958,7 +10956,7 @@ test_attr(void)
CHECK(ret, FAIL, "H5Pclose");
} /* test_attr() */
-
+
/*-------------------------------------------------------------------------
* Function: cleanup_attr
*
diff --git a/test/testfiles/err_compat_1 b/test/testfiles/err_compat_1
index 8190665..e8ea044 100644
--- a/test/testfiles/err_compat_1
+++ b/test/testfiles/err_compat_1
@@ -1,5 +1,5 @@
Testing error API H5Eset/get_auto Testing error API based on data I/O All error API tests passed.
- This program tests the Error API compatible with HDF5 version (number). There're supposed to be some error messages
+ This program tests the Error API compatible with HDF5 version (number). There are supposed to be some error messages
********* Print error stack in HDF5 default way *********
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#000: (file name) line (number) in main(): Error test failed
diff --git a/test/testframe.c b/test/testframe.c
index 21f9ea3..335118c 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -146,10 +146,10 @@ void TestInit(const char *ProgName, void (*private_usage)(void), int (*private_p
* Record the program name and private routines if provided.
*/
TestProgName = ProgName;
- if (NULL != private_usage)
- TestPrivateUsage = private_usage;
- if (NULL != private_parser)
- TestPrivateParser = private_parser;
+ if(NULL != private_usage)
+ TestPrivateUsage = private_usage;
+ if(NULL != private_parser)
+ TestPrivateParser = private_parser;
}
diff --git a/test/testhdf5.c b/test/testhdf5.c
index 713cccf..e136086 100644
--- a/test/testhdf5.c
+++ b/test/testhdf5.c
@@ -90,8 +90,8 @@ main(int argc, char *argv[])
/* Exit failure if errors encountered; else exit success. */
/* No need to print anything since PerformTests() already does. */
if (GetTestNumErrs() > 0)
- exit(EXIT_FAILURE);
+ HDexit(EXIT_FAILURE);
else
- exit(EXIT_SUCCESS);
+ HDexit(EXIT_SUCCESS);
} /* end main() */
diff --git a/test/tfile.c b/test/tfile.c
index d3134f8..0db4c1b 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -22,7 +22,6 @@
#include "testhdf5.h"
#include "H5srcdir.h"
-#include "H5Bprivate.h"
#include "H5Iprivate.h"
#include "H5Pprivate.h"
@@ -896,15 +895,15 @@ test_file_close(void)
CHECK(ret, FAIL, "H5Pget_fclose_degree");
switch(fc_degree) {
- case H5F_CLOSE_STRONG:
+ case H5F_CLOSE_STRONG:
/* Close first open */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
/* Close second open */
ret = H5Fclose(fid2);
CHECK(ret, FAIL, "H5Fclose");
- break;
- case H5F_CLOSE_SEMI:
+ break;
+ case H5F_CLOSE_SEMI:
/* Close first open */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -919,8 +918,8 @@ test_file_close(void)
/* Close second open */
ret = H5Fclose(fid2);
CHECK(ret, FAIL, "H5Fclose");
- break;
- case H5F_CLOSE_WEAK:
+ break;
+ case H5F_CLOSE_WEAK:
/* Close first open */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -935,7 +934,7 @@ test_file_close(void)
CHECK(ret, FAIL, "H5Gclose");
ret = H5Gclose(group_id3);
CHECK(ret, FAIL, "H5Gclose");
- break;
+ break;
case H5F_CLOSE_DEFAULT:
default:
CHECK(fc_degree, H5F_CLOSE_DEFAULT, "H5Pget_fclose_degree");
@@ -957,7 +956,7 @@ test_file_close(void)
****************************************************************/
static void
create_objects(hid_t fid1, hid_t fid2, hid_t *ret_did, hid_t *ret_gid1,
- hid_t *ret_gid2, hid_t *ret_gid3)
+ hid_t *ret_gid2, hid_t *ret_gid3)
{
ssize_t oid_count;
herr_t ret;
@@ -1109,9 +1108,10 @@ test_get_obj_ids(void)
oid_list = (hid_t *)HDcalloc((size_t)oid_list_size, sizeof(hid_t));
CHECK_PTR(oid_list, "HDcalloc");
- /* Call the public function H5F_get_obj_ids to use H5F_get_objects. User reported having problem here.
+ /* Call the public function H5F_get_obj_ids to use H5F__get_objects. User reported having problem here.
* that the returned size (ret_count) from H5Fget_obj_ids is one greater than the size passed in
- * (oid_list_size) */
+ * (oid_list_size).
+ */
ret_count = H5Fget_obj_ids(fid, H5F_OBJ_ALL, (size_t)oid_list_size, oid_list);
CHECK(ret_count, FAIL, "H5Fget_obj_ids");
VERIFY(ret_count, oid_list_size, "H5Fget_obj_count");
@@ -2670,8 +2670,8 @@ test_cached_stab_info(void)
CHECK(file_id, FAIL, "H5Fopen");
/* Verify the cached symbol table information */
- ret = H5F_check_cached_stab_test(file_id);
- CHECK(ret, FAIL, "H5F_check_cached_stab_test");
+ ret = H5F__check_cached_stab_test(file_id);
+ CHECK(ret, FAIL, "H5F__check_cached_stab_test");
/* Close file */
ret = H5Fclose(file_id);
@@ -3941,14 +3941,6 @@ error:
** This routine checks the free space available in a file as
** returned by the public routine H5Fget_freespace().
**
-** Modifications:
-** Vailin Choi; July 2012
-** Remove datasets in reverse order so that all file spaces are shrunk.
-** (A change due to H5FD_FLMAP_DICHOTOMY.)
-**
-** Vailin Choi; Dec 2012
-** Add changes due to paged aggregation via new format:
-** the amount of freespace is different.
**
*****************************************************************/
static void
@@ -5360,7 +5352,8 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr)
} else /* Should fail */
VERIFY(ok, FALSE, "H5Fcreate");
- } else { /* Should succeed */
+ }
+ else { /* Should succeed */
VERIFY(ok, TRUE, "H5Fcreate");
VERIFY(low, f->shared->low_bound, "HDF5_superblock_ver_bounds");
@@ -7341,7 +7334,7 @@ test_file(void)
#endif /* H5_NO_DEPRECATED_SYMBOLS */
} /* test_file() */
-
+
/*-------------------------------------------------------------------------
* Function: cleanup_file
*
diff --git a/test/tgenprop.c b/test/tgenprop.c
index 5031846..151913c 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -1774,8 +1774,8 @@ test_genprop_path(void)
CHECK_I(ret, "H5Pregister2");
/* Get full path for first class */
- path=H5P_get_class_path_test(cid1);
- CHECK_PTR(path, "H5P_get_class_path_test");
+ path = H5P__get_class_path_test(cid1);
+ CHECK_PTR(path, "H5P__get_class_path_test");
if(HDstrcmp(path,CLASS1_PATH)!=0)
TestErrPrintf("Class names don't match!, path=%s, CLASS1_PATH=%s\n",path,CLASS1_PATH);
H5free_memory(path);
@@ -1789,14 +1789,14 @@ test_genprop_path(void)
CHECK_I(ret, "H5Pregister2");
/* Get full path for second class */
- path=H5P_get_class_path_test(cid2);
- CHECK_PTR(path, "H5P_get_class_path_test");
+ path = H5P__get_class_path_test(cid2);
+ CHECK_PTR(path, "H5P__get_class_path_test");
if(HDstrcmp(path,CLASS2_PATH)!=0)
TestErrPrintf("Class names don't match!, path=%s, CLASS2_PATH=%s\n",path,CLASS2_PATH);
/* Open a copy of the class with the path name */
- cid3 = H5P_open_class_path_test(path);
- CHECK_I(cid3, "H5Popen_class_path");
+ cid3 = H5P__open_class_path_test(path);
+ CHECK_I(cid3, "H5P__open_class_path_test");
/* Check that the classes are equal */
ret = H5Pequal(cid2,cid3);
diff --git a/test/th5s.c b/test/th5s.c
index 0619571..14f5de9 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -22,7 +22,6 @@
#include "testhdf5.h"
#include "H5srcdir.h"
-#include "H5Bprivate.h"
#include "H5Iprivate.h"
#include "H5Pprivate.h"
diff --git a/test/tmisc.c b/test/tmisc.c
index 22e1aad..47c0606 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -2713,9 +2713,6 @@ test_misc15(void)
fapl = H5Fget_access_plist(file);
CHECK(fapl, FAIL, "H5Fget_access_plist");
- ret = H5Pclose(fapl);
- CHECK(ret, FAIL, "H5Pclose");
-
ret = H5Fclose(file);
CHECK(ret, FAIL, "H5Fclose");
@@ -2723,6 +2720,9 @@ test_misc15(void)
ret = H5Fis_hdf5(MISC15_FILE);
CHECK(ret, FAIL, "H5Fis_hdf5");
+ ret = H5Pclose(fapl);
+ CHECK(ret, FAIL, "H5Pclose");
+
file = H5Fopen(MISC15_FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(file, FAIL, "H5Fopen");
@@ -4721,6 +4721,7 @@ test_misc25a(void)
CHECK(ret, FAIL, "H5Fclose");
} /* end test_misc25a() */
+
/****************************************************************
**
** test_misc25b(): Exercise null object header message merge bug
@@ -4756,7 +4757,7 @@ test_misc25b(void)
CHECK(ret, FAIL, "H5Fclose");
} /* end test_misc25b() */
-
+
/****************************************************************
**
** test_misc25c(): Exercise another null object header message merge bug.
@@ -4890,7 +4891,7 @@ test_misc25c(void)
CHECK(ret, FAIL, "H5Fclose");
} /* end test_misc25c() */
-
+
/****************************************************************
**
** test_misc26(): Regression test: ensure that copying filter
@@ -4976,7 +4977,7 @@ test_misc26(void)
CHECK_I(ret, "H5Pclose");
}
-
+
/****************************************************************
**
** test_misc27(): Ensure that objects with incorrect # of object
@@ -5021,7 +5022,7 @@ test_misc27(void)
CHECK(ret, FAIL, "H5Fclose");
} /* end test_misc27() */
-
+
/****************************************************************
**
** test_misc28(): Ensure that the dataset chunk cache will hold
@@ -5198,7 +5199,7 @@ test_misc28(void)
CHECK_I(ret, "H5Pclose");
} /* end test_misc28() */
-
+
/****************************************************************
**
** test_misc29(): Ensure that speculative metadata reads don't
@@ -5247,7 +5248,7 @@ test_misc30_get_info(hid_t loc_id)
return H5Literate(loc_id, H5_INDEX_NAME, H5_ITER_INC, NULL, test_misc30_get_info_cb, NULL);
}
-
+
/****************************************************************
**
** test_misc30(): Exercise local heap code that loads prefix
@@ -5312,7 +5313,7 @@ test_misc30(void)
VERIFY(file_size[0], file_size[1], "test_misc30");
} /* end test_misc30() */
-
+
/****************************************************************
**
** test_misc31(): Test reentering library through deprecated
@@ -5410,7 +5411,7 @@ test_misc31(void)
#endif /* H5_NO_DEPRECATED_SYMBOLS */
} /* end test_misc31() */
-
+
/****************************************************************
*
* test_misc32(): Simple test of filter memory allocation
@@ -5584,7 +5585,7 @@ test_misc34(void)
} /* end test_misc34() */
-
+
/****************************************************************
**
** test_misc(): Main misc. test routine.
@@ -5637,7 +5638,7 @@ test_misc(void)
} /* test_misc() */
-
+
/*-------------------------------------------------------------------------
* Function: cleanup_misc
*
@@ -5647,9 +5648,6 @@ test_misc(void)
*
* Programmer: Albert Cheng
* July 2, 1998
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void
diff --git a/test/tsohm.c b/test/tsohm.c
index d00a03a..718b12f 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -3862,9 +3862,9 @@ test_sohm_external_dtype(void)
CHECK_I(file1, "H5Fcreate");
/* Check on datatype storage status. It should be zero now. */
- ret = H5F_get_sohm_mesg_count_test(file1, H5O_DTYPE_ID, &dmsg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(dmsg_count, 0, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(file1, H5O_DTYPE_ID, &dmsg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(dmsg_count, 0, "H5F__get_sohm_mesg_count_test");
/* Create data set */
dataset1 = H5Dcreate2(file1, "dataset_1", s1_tid, space, H5P_DEFAULT, H5P_DEFAULT,
@@ -3872,9 +3872,9 @@ test_sohm_external_dtype(void)
CHECK_I(dataset1, "H5Dcreate2");
/* Check on datatype storage status. It should be 1 now. */
- ret = H5F_get_sohm_mesg_count_test(file1, H5O_DTYPE_ID, &dmsg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(dmsg_count, 1, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(file1, H5O_DTYPE_ID, &dmsg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(dmsg_count, 1, "H5F__get_sohm_mesg_count_test");
/* Retieve the dataset's datatype */
dset1_tid = H5Dget_type(dataset1);
@@ -3900,9 +3900,9 @@ test_sohm_external_dtype(void)
CHECK_I(file2, "H5Fcreate");
/* Check on datatype storage status. It should be zero now. */
- ret = H5F_get_sohm_mesg_count_test(file2, H5O_DTYPE_ID, &dmsg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(dmsg_count, 0, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(file2, H5O_DTYPE_ID, &dmsg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(dmsg_count, 0, "H5F__get_sohm_mesg_count_test");
/* Create a data set using the datatype of the dataset in the first file. */
dataset2 = H5Dcreate2(file2, "dataset_2", dset1_tid, space, H5P_DEFAULT, H5P_DEFAULT,
@@ -3910,9 +3910,9 @@ test_sohm_external_dtype(void)
CHECK_I(dataset2, "H5Dcreate2");
/* Check on datatype storage status. It should be 1 now. */
- ret = H5F_get_sohm_mesg_count_test(file2, H5O_DTYPE_ID, &dmsg_count);
- CHECK(ret, FAIL, "H5F_get_sohm_mesg_count_test");
- VERIFY(dmsg_count, 1, "H5F_get_sohm_mesg_count_test");
+ ret = H5F__get_sohm_mesg_count_test(file2, H5O_DTYPE_ID, &dmsg_count);
+ CHECK(ret, FAIL, "H5F__get_sohm_mesg_count_test");
+ VERIFY(dmsg_count, 1, "H5F__get_sohm_mesg_count_test");
/* Write the data to the dataset2 */
ret = H5Dwrite(dataset2, s1_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig);
diff --git a/test/tunicode.c b/test/tunicode.c
index e0e1f24..5a60036 100644
--- a/test/tunicode.c
+++ b/test/tunicode.c
@@ -163,7 +163,7 @@ void test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Fill the buffer with two copies of the UTF-8 string, each with a
* terminating NULL. It will look like "abcdefg\0abcdefg\0". */
- strncpy(buf, new_string, big_len);
+ HDstrncpy(buf, new_string, big_len);
HDstrncpy(&buf[big_len], new_string, big_len);
ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT);
diff --git a/test/tvltypes.c b/test/tvltypes.c
index 91ef0c2..8824066 100644
--- a/test/tvltypes.c
+++ b/test/tvltypes.c
@@ -1348,7 +1348,7 @@ test_vltypes_compound_vlstr(void)
} /* end if */
for(t1=(s2 *)(wdata[i].v.p), t2=(s2 *)(rdata[i].v.p), j=0; j<rdata[i].v.len; j++, t1++, t2++) {
- if( HDstrcmp(t1->string, t2->string) ) {
+ if(HDstrcmp(t1->string, t2->string)) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n",t1->string, t2->string);
continue;
} /* end if */
@@ -1406,7 +1406,7 @@ test_vltypes_compound_vlstr(void)
} /* end if */
for(t1=(s2 *)(wdata2[i].v.p), t2=(s2 *)(rdata2[i].v.p), j=0; j<rdata2[i].v.len; j++, t1++, t2++) {
- if( HDstrcmp(t1->string, t2->string) ) {
+ if(HDstrcmp(t1->string, t2->string)) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n",t1->string, t2->string);
continue;
} /* end if */
diff --git a/test/unregister.c b/test/unregister.c
index dbf6293..ff116cf 100644
--- a/test/unregister.c
+++ b/test/unregister.c
@@ -16,6 +16,7 @@
* Purpose: Tests H5Zunregister function
*/
#include "h5test.h"
+
#include "H5CXprivate.h" /* API Contexts */
const char *FILENAME[] = {
@@ -24,8 +25,8 @@ const char *FILENAME[] = {
NULL
};
-#define GROUP_NAME "group"
-#define DSET_NAME "dataset"
+#define GROUP_NAME "test_group"
+#define DSET_NAME "test_dataset"
#define FILENAME_BUF_SIZE 1024
#define DSET_DIM1 100
#define DSET_DIM2 200
@@ -35,39 +36,34 @@ const char *FILENAME[] = {
#define H5Z_FILTER_DUMMY 312
-static size_t filter_dummy(unsigned int flags, size_t cd_nelmts,
+static size_t do_nothing(unsigned int flags, size_t cd_nelmts,
const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
/* Dummy filter for test_unregister_filters only */
const H5Z_class2_t H5Z_DUMMY[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_DUMMY, /* Filter id number */
- 1, 1, /* Encoding and decoding enabled */
- "dummy", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- filter_dummy, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_DUMMY, /* Filter ID number */
+ 1, 1, /* Encoding and decoding enabled */
+ "dummy", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ do_nothing, /* The actual filter function */
}};
/*-------------------------------------------------------------------------
- * Function: filter_dummy
+ * Function: do_nothing
*
- * Purpose: A dummy compression method that doesn't do anything. This
- * filter is only for test_unregister_filters. Please don't
+ * Purpose: A dummy compression method that doesn't do anything. This
+ * filter is only for test_unregister_filters. Please don't
* use it for other tests because it may mess up this test.
*
- * Return: Success: Data chunk size
- *
- * Failure: 0
- *
- * Programmer: Raymond Lu
- * April 24, 2013
+ * Return: Data chunk size
*
*-------------------------------------------------------------------------
*/
static size_t
-filter_dummy(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts,
+do_nothing(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts,
const unsigned int H5_ATTR_UNUSED *cd_values, size_t nbytes,
size_t H5_ATTR_UNUSED *buf_size, void H5_ATTR_UNUSED **buf)
{
@@ -75,194 +71,233 @@ filter_dummy(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts,
}
/*-------------------------------------------------------------------------
- * Function: test_unregister_filters
- *
- * Purpose: Tests unregistering filter before closing the file
+ * Function: test_unregister_filters
*
- * Return: Success: 0
- * Failure: -1
+ * Purpose: Tests unregistering filter before closing the file
*
- * Programmer: Raymond Lu
- * 11 April 2013
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
static herr_t
-test_unregister_filters(hid_t my_fapl)
+test_unregister_filters(hid_t fapl_id)
{
- hid_t file1, file2;
- hid_t dc;
- hid_t gcpl, gid, group;
- hid_t dataset, space;
- int i, j, n;
- char gname[256];
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t dcpl_id = H5I_INVALID_HID;
+ hid_t gcpl_id = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t gid_loop = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ int i, j, n;
+ char group_name[32];
char filename[FILENAME_BUF_SIZE];
- const hsize_t chunk_size[2] = {FILTER_CHUNK_DIM1, FILTER_CHUNK_DIM2}; /* Chunk dimensions */
- hsize_t dims[2];
- int points[DSET_DIM1][DSET_DIM2];
+ const hsize_t chunk_dims[2] = {FILTER_CHUNK_DIM1, FILTER_CHUNK_DIM2}; /* Chunk dimensions */
+ hsize_t dims[2];
+ int data[DSET_DIM1][DSET_DIM2];
herr_t ret;
TESTING("Unregistering filter");
/* Create first file */
- h5_fixname(FILENAME[0], my_fapl, filename, sizeof filename);
- if((file1 = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, my_fapl)) < 0) goto error;
+ h5_fixname(FILENAME[0], fapl_id, filename, sizeof(filename));
+ if((fid1 = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
+ goto error;
/* Create second file */
- h5_fixname(FILENAME[1], my_fapl, filename, sizeof filename);
- if((file2 = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, my_fapl)) < 0) goto error;
+ h5_fixname(FILENAME[1], fapl_id, filename, sizeof(filename));
+ if((fid2 = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
+ goto error;
/* Register DUMMY filter */
- if(H5Zregister(H5Z_DUMMY) < 0) goto error;
-
- if(H5Zfilter_avail(H5Z_FILTER_DUMMY)!=TRUE) goto error;
+ if (H5Zregister(H5Z_DUMMY) < 0)
+ goto error;
+ if (H5Zfilter_avail(H5Z_FILTER_DUMMY) != TRUE)
+ goto error;
+
+ /*******************
+ * PART 1 - GROUPS *
+ *******************/
- if((gcpl = H5Pcreate(H5P_GROUP_CREATE)) < 0) goto error;
-
/* Use DUMMY filter for creating groups */
- if(H5Pset_filter (gcpl, H5Z_FILTER_DUMMY, H5Z_FLAG_MANDATORY, (size_t)0, NULL) < 0) goto error;
+ if((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
+ goto error;
+ if(H5Pset_filter(gcpl_id, H5Z_FILTER_DUMMY, H5Z_FLAG_MANDATORY, (size_t)0, NULL) < 0)
+ goto error;
/* Create a group using this filter */
- if((gid = H5Gcreate2(file1, GROUP_NAME, H5P_DEFAULT, gcpl, H5P_DEFAULT)) < 0) goto error;
+ if((gid = H5Gcreate2(fid1, GROUP_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
+ goto error;
/* Create multiple groups under the main group */
- for (i=0; i < GROUP_ITERATION; i++) {
- sprintf(gname, "group_%d", i);
- if((group = H5Gcreate2(gid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
- if(H5Gclose(group) < 0) goto error;
+ for(i = 0; i < GROUP_ITERATION; i++) {
+ HDsprintf(group_name, "group_%d", i);
+ if((gid_loop = H5Gcreate2(gid, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
+ if(H5Gclose(gid_loop) < 0)
+ goto error;
}
- if(H5Fflush(file1, H5F_SCOPE_GLOBAL) < 0) goto error;
+ /* Flush the file containing the groups */
+ if(H5Fflush(fid1, H5F_SCOPE_GLOBAL) < 0)
+ goto error;
/* Unregister the filter before closing the group. It should fail */
H5E_BEGIN_TRY {
ret = H5Zunregister(H5Z_FILTER_DUMMY);
} H5E_END_TRY;
- if(ret>=0) {
+ if(ret >= 0) {
H5_FAILED();
- printf(" Line %d: Should not be able to unregister filter\n", __LINE__);
+ HDprintf(" Line %d: Should not be able to unregister filter\n", __LINE__);
goto error;
- } /* end if */
+ }
/* Close the group */
- if(H5Gclose(gid) < 0) goto error;
+ if(H5Gclose(gid) < 0)
+ goto error;
/* Clean up objects used for this test */
- if(H5Pclose (gcpl) < 0) goto error;
+ if(H5Pclose (gcpl_id) < 0)
+ goto error;
- if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
- if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
+ /*********************
+ * PART 2 - DATASETS *
+ *********************/
- if(H5Pset_filter(dc, H5Z_FILTER_DUMMY, 0, (size_t)0, NULL) < 0) goto error;
+ /* Use DUMMY filter for creating datasets */
+ if((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto error;
+ if(H5Pset_chunk(dcpl_id, 2, chunk_dims) < 0)
+ goto error;
+ if(H5Pset_filter(dcpl_id, H5Z_FILTER_DUMMY, 0, (size_t)0, NULL) < 0)
+ goto error;
- /* Initialize the dataset */
+ /* Initialize the data for writing */
for(i = n = 0; i < DSET_DIM1; i++)
for(j = 0; j < DSET_DIM2; j++)
- points[i][j] = n++;
+ data[i][j] = n++;
- /* Create the data space */
+ /* Create the dataspace */
dims[0] = DSET_DIM1;
dims[1] = DSET_DIM2;
- if((space = H5Screate_simple(2, dims, NULL)) < 0) goto error;
+ if((sid = H5Screate_simple(2, dims, NULL)) < 0)
+ goto error;
/* Create a dataset in the first file */
- if((dataset = H5Dcreate2(file1, DSET_NAME, H5T_NATIVE_INT, space,
- H5P_DEFAULT, dc, H5P_DEFAULT)) < 0) goto error;
+ if((did = H5Dcreate2(fid1, DSET_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0)
+ goto error;
/* Write the data to the dataset */
- if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points) < 0)
+ if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
goto error;
/* Unregister the filter before closing the dataset. It should fail */
H5E_BEGIN_TRY {
ret = H5Zunregister(H5Z_FILTER_DUMMY);
} H5E_END_TRY;
- if(ret>=0) {
+ if(ret >= 0) {
H5_FAILED();
- printf(" Line %d: Should not be able to unregister filter\n", __LINE__);
+ HDprintf(" Line %d: Should not be able to unregister filter\n", __LINE__);
goto error;
- } /* end if */
+ }
- if(H5Dclose(dataset) < 0) goto error;
+ /* Close the dataset */
+ if(H5Dclose(did) < 0)
+ goto error;
/* Create a dataset in the second file */
- if((dataset = H5Dcreate2(file2, DSET_NAME, H5T_NATIVE_INT, space,
- H5P_DEFAULT, dc, H5P_DEFAULT)) < 0) goto error;
+ if((did = H5Dcreate2(fid2, DSET_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0)
+ goto error;
/* Write the data to the dataset */
- if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points) < 0)
+ if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
goto error;
- if(H5Dclose(dataset) < 0) goto error;
+ /* Close the dataset in the second file */
+ if(H5Dclose(did) < 0)
+ goto error;
/* Unregister the filter after closing all objects but before closing files.
- * It should flush all files. */
- if(H5Zunregister(H5Z_FILTER_DUMMY) < 0) goto error;
+ * It should flush all files.
+ */
+ if(H5Zunregister(H5Z_FILTER_DUMMY) < 0)
+ goto error;
/* Clean up objects used for this test */
- if(H5Pclose (dc) < 0) goto error;
- if(H5Fclose(file1) < 0) goto error;
- if(H5Fclose(file2) < 0) goto error;
+ if(H5Pclose(dcpl_id) < 0)
+ goto error;
+ if(H5Fclose(fid1) < 0)
+ goto error;
+ if(H5Fclose(fid2) < 0)
+ goto error;
PASSED();
- return 0;
+ return SUCCEED;
error:
- return -1;
+ H5E_BEGIN_TRY {
+ H5Fclose(fid1);
+ H5Fclose(fid2);
+ H5Pclose(dcpl_id);
+ H5Pclose(gcpl_id);
+ H5Gclose(gid);
+ H5Gclose(gid_loop);
+ H5Dclose(did);
+ H5Sclose(sid);
+ } H5E_END_TRY;
+
+ return FAIL;
}
/*-------------------------------------------------------------------------
- * Function: main
- *
- * Purpose: Tests unregistering filter with H5Zunregister
+ * Function: main
*
- * Return: Success: exit(EXIT_SUCCESS)
+ * Purpose: Tests unregistering filter with H5Zunregister
*
- * Failure: exit(EXIT_FAILURE)
- *
- * Programmer: Raymond Lu
- * 11 April 2013
+ * Return: EXIT_SUCCESS/EXIT_FAILURE
*
*-------------------------------------------------------------------------
*/
int
main(void)
{
- hid_t fapl;
- int nerrors = 0;
+ hid_t fapl_id = H5I_INVALID_HID;
+ int nerrors = 0;
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
/* Testing setup */
h5_reset();
- fapl = h5_fileaccess();
+ fapl_id = h5_fileaccess();
/* Push API context */
if(H5CX_push() < 0) FAIL_STACK_ERROR
api_ctx_pushed = TRUE;
/* Test unregistering filter in its own file */
- nerrors += (test_unregister_filters(fapl) < 0 ? 1 : 0);
+ nerrors += (test_unregister_filters(fapl_id) < 0 ? 1 : 0);
- if(nerrors)
+ h5_cleanup(FILENAME, fapl_id);
+
+ if (nerrors)
goto error;
- printf("All filter unregistration tests passed.\n");
+ HDprintf("All filter unregistration tests passed.\n");
/* Pop API context */
if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR
api_ctx_pushed = FALSE;
- h5_cleanup(FILENAME, fapl);
- return 0;
+ HDexit(EXIT_SUCCESS);
error:
nerrors = MAX(1, nerrors);
- printf("***** %d FILTER UNREGISTRATION TEST%s FAILED! *****\n",
+ HDprintf("***** %d FILTER UNREGISTRATION TEST%s FAILED! *****\n",
nerrors, 1 == nerrors ? "" : "S");
if(api_ctx_pushed) H5CX_pop();
- return 1;
-}
+ HDexit(EXIT_FAILURE);
+} /* end main() */
diff --git a/test/vfd.c b/test/vfd.c
index dfc5047..19223ea 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -1118,8 +1118,7 @@ error:
* Purpose: Private function for test_multi() to tests wrong ways of
* reopening multi file.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Thursday, May 19, 2005
@@ -1129,7 +1128,7 @@ error:
static herr_t
test_multi_opens(char *fname)
{
- hid_t file=-1;
+ hid_t fid = H5I_INVALID_HID;
char super_name[1024]; /*name string "%%s-s.h5"*/
char sf_name[1024]; /*name string "multi_file-s.h5"*/
@@ -1138,11 +1137,11 @@ test_multi_opens(char *fname)
HDsnprintf(sf_name, sizeof(sf_name), super_name, fname);
H5E_BEGIN_TRY {
- file = H5Fopen(sf_name, H5F_ACC_RDWR, H5P_DEFAULT);
+ fid = H5Fopen(sf_name, H5F_ACC_RDWR, H5P_DEFAULT);
} H5E_END_TRY;
- return(file >= 0 ? -1 : 0);
-}
+ return(fid >= 0 ? FAIL : SUCCEED);
+} /* end test_multi_opens() */
/*-------------------------------------------------------------------------
@@ -1150,8 +1149,7 @@ test_multi_opens(char *fname)
*
* Purpose: Tests the file handle interface for MUTLI driver
*
- * Return: Success: 0
- * Failure: -1
+ * Return: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Tuesday, Sept 24, 2002
@@ -1365,7 +1363,7 @@ test_multi(void)
PASSED();
- return 0;
+ return SUCCEED;
error:
H5E_BEGIN_TRY {
@@ -1374,9 +1372,10 @@ error:
H5Pclose(fapl);
H5Pclose(fapl2);
H5Fclose(file);
+ H5Aclose(attr);
} H5E_END_TRY;
- return -1;
-}
+ return FAIL;
+} /* end test_multi() */
/*-------------------------------------------------------------------------