summaryrefslogtreecommitdiffstats
path: root/test/efc.c
diff options
context:
space:
mode:
authorhdftest <hdftest@hdfgroup.org>2018-06-16 22:47:39 (GMT)
committerhdftest <hdftest@hdfgroup.org>2018-06-16 22:47:39 (GMT)
commit67d6f8d405b16c99590f112f429a352157be3554 (patch)
tree63b704912ac2dd93fcbd8214050ec8b59c63707f /test/efc.c
parentafe28b7607204a2e9e753bb663d09454057d8196 (diff)
parent87829e06189cd9b29583b5ca8065b52b1f4cd523 (diff)
downloadhdf5-67d6f8d405b16c99590f112f429a352157be3554.zip
hdf5-67d6f8d405b16c99590f112f429a352157be3554.tar.gz
hdf5-67d6f8d405b16c99590f112f429a352157be3554.tar.bz2
Merging in latest from upstream (HDFFV/hdf5:refs/heads/hdf5_1_10)
* commit '87829e06189cd9b29583b5ca8065b52b1f4cd523': (30 commits) HDFFV-10405: Using h5fget_obj_count_f with a file id of H5F_OBJ_ALL_F does not work properly HDFFV-10405: Using h5fget_obj_count_f with a file id of H5F_OBJ_ALL_F does not work properly HDFFV-10405: Using h5fget_obj_count_f with a file id of H5F_OBJ_ALL_F does not work properly Cleaned up H5Fmount/unmount code. Normalization with vol_integration branch. Add fortran MPI to test and example Add mpi include folders for fortran C objects Normalization with the vol_integration branch. Fixed MANIFEST Fix usage of compression lib in shared tests Fix jni function call version Fix the error found after earlier checkin. H5O_info fixes for java and examples Added a RELASE.txt entry for HDFFV-10505. Changed 'deprecated' to indicate 'no longer supported' in the --enable-debug/production configure flags. (1) Made the change according to the pull request feedback. (2) Removed the performance test form test/th5o.c: will decide on what needs to be done to show speedup via HDFFV-10463. Normalize with vol_integration. Removed unused H5MF functions and updated FUNC_ENTER macros and naming in H5MFsection.c. Restored some unused #defines to the deprecated section of H5Dpublic.h. Changes made based on feedback from pull request #1039. ...
Diffstat (limited to 'test/efc.c')
-rw-r--r--test/efc.c42
1 files changed, 24 insertions, 18 deletions
diff --git a/test/efc.c b/test/efc.c
index d40d4a2..5a946bb 100644
--- a/test/efc.c
+++ b/test/efc.c
@@ -36,8 +36,8 @@ static char filename[6][1024];
/* Global property lists - just copies of the defaults (necessary to use
* internal functions */
-hid_t fcpl_id = -1;
-hid_t fapl_id = -1;
+hid_t fcpl_id = H5I_INVALID_HID;
+hid_t fapl_id = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
@@ -68,8 +68,9 @@ test_single(void)
TESTING("single EFC");
- /* Set EFC size to 3. Do this instead of H5F_efc_create() so we can pass
- * a file pointer to H5F__efc_open containing the EFC. */
+ /* Set EFC size to 3. Do this instead of H5F__efc_create() so we can pass
+ * a file pointer to H5F__efc_open containing the EFC.
+ */
if(H5Pset_elink_file_cache_size(fapl_id, 3) < 0)
TEST_ERROR
@@ -84,8 +85,9 @@ test_single(void)
/* Test 1: Open file 1 through EFC, close, then open normally, verify ref
- * count = 2, release EFC, verify ref count = 1. Verifies a file can be
- * held open by the EFC. */
+ * count = 2, release EFC, verify ref count = 1. Verifies a file can be
+ * held open by the EFC.
+ */
if(NULL == (f1 = H5F__efc_open(f0, filename[1],
H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
@@ -502,17 +504,19 @@ test_graph_nocycle(void)
TESTING("graph of EFCs without cycles");
- /* Set EFC size to 8. Do this instead of H5F_efc_create() so we can pass
- * a file pointer to H5F__efc_open containing the EFC. Set to a high number
- * because we don't test the EFC becoming too large in this test. */
+ /* Set EFC size to 8. Do this instead of H5F__efc_create() so we can pass
+ * a file pointer to H5F__efc_open containing the EFC. Set to a high number
+ * because we don't test the EFC becoming too large in this test.
+ */
if(H5Pset_elink_file_cache_size(fapl_id, 8) < 0)
TEST_ERROR
- /* Test 1: Simple 3 file chain. Open file 1 through file 0, then open file
- * 2 through file 1. Release file 0's EFC and verify that file 2 gets its
- * ref count reduced (implying file 1 was closed). Do the same with the
- * opening order reversed. */
+ /* Test 1: Simple 3 file chain. Open file 1 through file 0, then open file
+ * 2 through file 1. Release file 0's EFC and verify that file 2 gets its
+ * ref count reduced (implying file 1 was closed). Do the same with the
+ * opening order reversed.
+ */
if(NULL == (f0 = H5F_open(filename[0],
H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
@@ -847,15 +851,17 @@ test_graph_cycle(void)
TESTING("graph of EFCs with cycles");
- /* Set EFC size to 8. Do this instead of H5F_efc_create() so we can pass
- * a file pointer to H5F__efc_open containing the EFC. Set to a high number
- * because we don't test the EFC becoming too large in this test. */
+ /* Set EFC size to 8. Do this instead of H5F__efc_create() so we can pass
+ * a file pointer to H5F__efc_open containing the EFC. Set to a high number
+ * because we don't test the EFC becoming too large in this test.
+ */
if(H5Pset_elink_file_cache_size(fapl_id, 8) < 0)
TEST_ERROR
- /* Test 1: File caches itself. Verify that closing the file causes it to be
- * actually closed, and there is no other unexpected behavior. */
+ /* Test 1: File caches itself. Verify that closing the file causes it to be
+ * actually closed, and there is no other unexpected behavior.
+ */
if(NULL == (f0 = H5F_open(filename[0],
H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR