summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/links.c10
-rwxr-xr-xtest/objcopy.c9
-rw-r--r--test/tattr.c2
3 files changed, 16 insertions, 5 deletions
diff --git a/test/links.c b/test/links.c
index ca0945c..67301dc 100644
--- a/test/links.c
+++ b/test/links.c
@@ -3390,13 +3390,15 @@ external_link_closing(hid_t fapl, hbool_t new_format)
/* Test move */
if(H5Lmove(fid1, "elink/elink/elink/group1", fid1,
- "elink/elink/elink/group1_moved", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
+ "elink/elink/elink/group1_moved", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
+
/* Open file 4 so we can do some fancy things */
if((fid4 = H5Fopen(filename4, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR
if(H5Lmove(fid1, "elink/elink/elink/type1", fid4,
- "type1_moved", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
+ "type1_moved", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
if(H5Lmove(fid4, "dataset1", fid1,
- "elink/elink/elink/dataset1_moved", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
+ "elink/elink/elink/dataset1_moved", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
+
/* Close file 4 again */
if(H5Fclose(fid4) < 0) TEST_ERROR
@@ -3526,7 +3528,7 @@ error:
H5Fclose(fid1);
} H5E_END_TRY;
return -1;
-}
+} /* external_link_closing() */
/*-------------------------------------------------------------------------
diff --git a/test/objcopy.c b/test/objcopy.c
index c773440..27a29d1 100755
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -32,6 +32,8 @@
#include "H5Spkg.h" /* Dataspaces */
#include "H5Dprivate.h" /* Datasets (for EFL property name) */
+#include "H5Fprivate.h" /* File access */
+#include "H5Iprivate.h" /* IDs */
const char *FILENAME[] = {
@@ -1148,7 +1150,9 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
/* Release raw data buffers */
HDfree(rbuf);
+ rbuf = NULL;
HDfree(rbuf2);
+ rbuf2 = NULL;
/* close the source dataspace */
if(H5Sclose(sid) < 0) TEST_ERROR
@@ -3408,6 +3412,11 @@ test_copy_dataset_attr_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if(H5Fclose(fid_src) < 0) TEST_ERROR
+ /* Check that all file IDs have been closed */
+ if(H5I_nmembers(H5I_FILE) != 0) TEST_ERROR
+ if(H5F_sfile_assert_num(0) != 0) TEST_ERROR
+
+
/* open the source file with read-only */
if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR
diff --git a/test/tattr.c b/test/tattr.c
index 0b47ed8..d50e7d9 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -6988,7 +6988,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Create "big" dataspace for "large" attributes */
big_sid = H5Screate_simple(SPACE1_RANK, big_dims, NULL);
- CHECK(sid, FAIL, "H5Screate_simple");
+ CHECK(big_sid, FAIL, "H5Screate_simple");
/* Loop over type of shared components */
for(test_shared = 0; test_shared < 3; test_shared++) {