summaryrefslogtreecommitdiffstats
path: root/test/tfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/tfile.c')
-rw-r--r--test/tfile.c128
1 files changed, 64 insertions, 64 deletions
diff --git a/test/tfile.c b/test/tfile.c
index 303d8de..566a285 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -142,14 +142,14 @@
#define FILE8 "tfile8.h5" /* Test file */
/* Files created under 1.6 branch and 1.8 branch--used in test_filespace_compatible() */
-const char *OLD_FILENAME[] = {
+static const char *OLD_FILENAME[] = {
"filespace_1_6.h5", /* 1.6 HDF5 file */
"filespace_1_8.h5" /* 1.8 HDF5 file */
};
/* Files created in 1.10.0 release --used in test_filespace_1.10.0_compatible() */
/* These files are copied from release 1.10.0 tools/h5format_convert/testfiles */
-const char *OLD_1_10_0_FILENAME[] = {
+static const char *OLD_1_10_0_FILENAME[] = {
"h5fc_ext1_i.h5", /* 0 */
"h5fc_ext1_f.h5", /* 1 */
"h5fc_ext2_if.h5", /* 2 */
@@ -159,7 +159,7 @@ const char *OLD_1_10_0_FILENAME[] = {
};
/* Files used in test_filespace_round_compatible() */
-const char *FSPACE_FILENAMES[] = {
+static const char *FSPACE_FILENAMES[] = {
"fsm_aggr_nopersist.h5", /* H5F_FILE_SPACE_AGGR, not persisting free-space */
"fsm_aggr_persist.h5", /* H5F_FILE_SPACE_AGGR, persisting free-space */
"paged_nopersist.h5", /* H5F_FILE_SPACE_PAGE, not persisting free-space */
@@ -168,7 +168,7 @@ const char *FSPACE_FILENAMES[] = {
"none.h5" /* H5F_FILE_SPACE_NONE */
};
-const char *FILESPACE_NAME[] = {"tfilespace", NULL};
+static const char *FILESPACE_NAME[] = {"tfilespace", NULL};
/* Declarations for test_libver_bounds_copy(): */
/* SRC_FILE: source file created under 1.8 branch with latest format */
@@ -342,43 +342,43 @@ test_file_create(void)
{
ret = H5Pset_userblock(tmpl1, BAD_USERBLOCK_SIZE1);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_userblock");
H5E_BEGIN_TRY
{
ret = H5Pset_userblock(tmpl1, BAD_USERBLOCK_SIZE2);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_userblock");
H5E_BEGIN_TRY
{
ret = H5Pset_userblock(tmpl1, BAD_USERBLOCK_SIZE3);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_userblock");
H5E_BEGIN_TRY
{
ret = H5Pset_userblock(tmpl1, BAD_USERBLOCK_SIZE4);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_userblock");
H5E_BEGIN_TRY
{
ret = H5Pset_userblock(tmpl1, BAD_USERBLOCK_SIZE5);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_userblock");
H5E_BEGIN_TRY
{
ret = H5Pset_userblock(tmpl1, BAD_USERBLOCK_SIZE6);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_userblock");
H5E_BEGIN_TRY
{
ret = H5Pset_userblock(tmpl1, BAD_USERBLOCK_SIZE7);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_userblock");
/* Set the new file-creation parameters */
@@ -669,7 +669,7 @@ test_file_reopen(void)
/* Create a dataset in the file */
sid = H5Screate_simple(1, &dims, &dims);
- CHECK_I(sid, "H5Screate_simple")
+ CHECK_I(sid, "H5Screate_simple");
did = H5Dcreate2(fid, REOPEN_DSET, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK_I(did, "H5Dcreate2");
@@ -1401,7 +1401,7 @@ test_get_file_id(void)
{
fid2 = H5Iget_file_id(plist);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(fid2, FAIL, "H5Iget_file_id");
/* Close objects */
@@ -1607,7 +1607,7 @@ test_file_perm(void)
{
dset = H5Dcreate2(filero, F2_DSET, H5T_NATIVE_INT, dspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(dset, FAIL, "H5Dcreate2");
if (dset != FAIL) {
ret = H5Dclose(dset);
@@ -1666,7 +1666,7 @@ test_file_perm2(void)
{
group = H5Gcreate2(filero, "MY_GROUP", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(group, FAIL, "H5Gcreate2");
/* Create a dataset with the read-only file handle (should fail) */
@@ -1674,7 +1674,7 @@ test_file_perm2(void)
{
dset = H5Dcreate2(filero, F2_DSET, H5T_NATIVE_INT, dspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(dset, FAIL, "H5Dcreate2");
/* Create an attribute with the read-only file handle (should fail) */
@@ -1682,7 +1682,7 @@ test_file_perm2(void)
{
attr = H5Acreate2(filero, "MY_ATTR", H5T_NATIVE_INT, dspace, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(attr, FAIL, "H5Acreate2");
type = H5Tcopy(H5T_NATIVE_SHORT);
@@ -1693,7 +1693,7 @@ test_file_perm2(void)
{
ret = H5Tcommit2(filero, "MY_DTYPE", type, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Tcommit2");
ret = H5Tclose(type);
@@ -2045,7 +2045,7 @@ test_file_delete(hid_t fapl_id)
{
is_hdf5 = H5Fis_accessible(filename, fapl_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(is_hdf5, FAIL, "H5Fis_accessible");
/* Just in case deletion fails - silent on errors */
@@ -2076,7 +2076,7 @@ test_file_delete(hid_t fapl_id)
{
is_hdf5 = H5Fis_accessible(filename, fapl_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
CHECK(is_hdf5, TRUE, "H5Fis_accessible");
/* Try to delete it (should fail) */
@@ -2084,7 +2084,7 @@ test_file_delete(hid_t fapl_id)
{
ret = H5Fdelete(filename, fapl_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Fdelete");
/* Delete the file */
@@ -2130,7 +2130,7 @@ test_file_open_dot(void)
{
did = H5Dcreate2(fid, ".", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(did, FAIL, "H5Dcreate2");
/* Create a dataset with no name using the group ID */
@@ -2138,7 +2138,7 @@ test_file_open_dot(void)
{
did = H5Dcreate2(gid, ".", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(did, FAIL, "H5Dcreate2");
/* Open a dataset with no name using the file ID */
@@ -2146,7 +2146,7 @@ test_file_open_dot(void)
{
did = H5Dopen2(fid, ".", H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(did, FAIL, "H5Dopen2");
/* Open a dataset with no name using the group ID */
@@ -2154,7 +2154,7 @@ test_file_open_dot(void)
{
did = H5Dopen2(gid, ".", H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(did, FAIL, "H5Dopen2");
/* Make a copy of a datatype to use for creating a named datatype */
@@ -2166,7 +2166,7 @@ test_file_open_dot(void)
{
ret = H5Tcommit2(fid, ".", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Tcommit2");
/* Create a named datatype with no name using the group ID */
@@ -2174,7 +2174,7 @@ test_file_open_dot(void)
{
ret = H5Tcommit2(gid, ".", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Tcommit2");
/* Open a named datatype with no name using the file ID */
@@ -2182,7 +2182,7 @@ test_file_open_dot(void)
{
tid2 = H5Topen2(fid, ".", H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tid2, FAIL, "H5Topen2");
/* Open a named datatype with no name using the group ID */
@@ -2190,7 +2190,7 @@ test_file_open_dot(void)
{
tid2 = H5Topen2(gid, ".", H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tid2, FAIL, "H5Topen2");
/* Create a group with no name using the file ID */
@@ -2198,7 +2198,7 @@ test_file_open_dot(void)
{
gid2 = H5Gcreate2(fid, ".", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(gid2, FAIL, "H5Gcreate2");
/* Create a group with no name using the group ID */
@@ -2206,7 +2206,7 @@ test_file_open_dot(void)
{
gid2 = H5Gcreate2(gid, ".", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(gid2, FAIL, "H5Gcreate2");
/* Open a group with no name using the file ID (should open the root group) */
@@ -2389,7 +2389,7 @@ test_file_getname(void)
{
name_len = H5Fget_name(space_id, name, (size_t)TESTA_NAME_BUF_SIZE);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(name_len, FAIL, "H5Fget_name");
/* Create a new dataset */
@@ -3511,7 +3511,7 @@ test_userblock_alignment(const char *env_h5_drvr)
{
fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, fcpl, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(fid, FAIL, "H5Fcreate");
/* Release property lists */
@@ -3544,7 +3544,7 @@ test_userblock_alignment(const char *env_h5_drvr)
{
fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, fcpl, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(fid, FAIL, "H5Fcreate");
/* Release property lists */
@@ -3722,7 +3722,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
{
fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, fcpl, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(fid, FAIL, "H5Fcreate");
/* Release property lists */
@@ -3800,7 +3800,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
{
fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, fcpl, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(fid, FAIL, "H5Fcreate");
/* Release property lists */
@@ -3840,7 +3840,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
{
fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, fcpl, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(fid, FAIL, "H5Fcreate");
/* Release property lists */
@@ -3918,7 +3918,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
{
fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, fcpl, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(fid, FAIL, "H5Fcreate");
/* Release property lists */
@@ -4111,7 +4111,7 @@ test_filespace_info(const char *env_h5_drvr)
{
ret = H5Pset_file_space_page_size(fcpl, 0);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_file_space_page_size");
/* Setting to 511: should fail */
@@ -4119,7 +4119,7 @@ test_filespace_info(const char *env_h5_drvr)
{
ret = H5Pset_file_space_page_size(fcpl, 511);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_file_space_page_size");
/* Setting to 1GB+1: should fail */
@@ -4127,7 +4127,7 @@ test_filespace_info(const char *env_h5_drvr)
{
ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE1G + 1);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_file_space_page_size");
/* Setting to 512: should succeed */
@@ -5530,7 +5530,7 @@ test_libver_bounds_open(void)
{
file = H5Fopen(VERBFNAME, H5F_ACC_RDONLY, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(file, FAIL, "Attempted to open latest file with earliest version");
/* Attempt to open latest file with (v18, v18), should fail */
@@ -5539,7 +5539,7 @@ test_libver_bounds_open(void)
{
file = H5Fopen(VERBFNAME, H5F_ACC_RDONLY, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(file, FAIL, "Attempted to open latest file with v18 bounds");
/* Opening VERBFNAME in these combination should succeed.
@@ -5731,7 +5731,7 @@ test_libver_bounds_low_high(const char *env_h5_drvr)
/* Set the low/high version bounds */
ret = H5Pset_libver_bounds(fapl, low, high);
}
- H5E_END_TRY;
+ H5E_END_TRY
/* Should fail: invalid combinations */
if (high == H5F_LIBVER_EARLIEST) {
@@ -5946,7 +5946,7 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n
{
fid = H5Fcreate(FILE8, H5F_ACC_TRUNC | (is_swmr ? H5F_ACC_SWMR_WRITE : 0), fcpl, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
/* Get the internal file pointer if the create succeeds */
if (fid >= 0) {
@@ -6113,7 +6113,7 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
{
fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, fcpl, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
/* Retrieve the low/high bounds */
ret = H5Pget_libver_bounds(fapl, &low, &high);
@@ -6147,7 +6147,7 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
{
ret = H5Pset_libver_bounds(new_fapl, low, high);
}
- H5E_END_TRY;
+ H5E_END_TRY
/* Invalid combinations */
if (ret < 0)
@@ -6158,7 +6158,7 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
{
fid = H5Fopen(FILE8, H5F_ACC_RDWR | (is_swmr ? H5F_ACC_SWMR_WRITE : 0), new_fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (non_def_fsm && high < H5F_LIBVER_V110) {
VERIFY(fid, H5I_INVALID_HID, "H5Fopen");
@@ -6330,7 +6330,7 @@ test_libver_bounds_obj(hid_t fapl)
{
ret = H5Pset_libver_bounds(new_fapl, low, high);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (ret < 0) /* Invalid combinations */
continue;
@@ -6340,7 +6340,7 @@ test_libver_bounds_obj(hid_t fapl)
{
fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (fid >= 0) { /* The file open succeeds */
@@ -6496,7 +6496,7 @@ test_libver_bounds_dataset(hid_t fapl)
{
did = H5Dcreate2(fid, DSETB, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (did >= 0) {
@@ -6548,7 +6548,7 @@ test_libver_bounds_dataset(hid_t fapl)
{
ret = H5Pset_libver_bounds(new_fapl, low, high);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (ret < 0) /* Invalid low/high combinations */
continue;
@@ -6558,7 +6558,7 @@ test_libver_bounds_dataset(hid_t fapl)
{
fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (fid >= 0) { /* The file open succeeds */
@@ -6777,7 +6777,7 @@ test_libver_bounds_dataspace(hid_t fapl)
{
ret = H5Pset_libver_bounds(new_fapl, low, high);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (ret < 0) /* Invalid low/high combinations */
continue;
@@ -6787,7 +6787,7 @@ test_libver_bounds_dataspace(hid_t fapl)
{
fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (fid >= 0) { /* The file open succeeds */
@@ -7113,7 +7113,7 @@ test_libver_bounds_datatype_check(hid_t fapl, hid_t tid)
{
ret = H5Pset_libver_bounds(new_fapl, low, high);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (ret < 0) /* Invalid low/high combinations */
continue;
@@ -7123,7 +7123,7 @@ test_libver_bounds_datatype_check(hid_t fapl, hid_t tid)
{
fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (fid >= 0) { /* The file open succeeds */
@@ -7441,7 +7441,7 @@ test_libver_bounds_attributes(hid_t fapl)
{
ret = H5Pset_libver_bounds(new_fapl, low, high);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (ret < 0) /* Invalid low/high combinations */
continue;
@@ -7451,7 +7451,7 @@ test_libver_bounds_attributes(hid_t fapl)
{
fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (fid >= 0) { /* The file open succeeds */
@@ -7608,7 +7608,7 @@ test_libver_macros2(void)
{
grp = H5Gopen(file, "Group");
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(grp, FAIL, "H5Gopen");
#endif
@@ -7847,7 +7847,7 @@ test_min_dset_ohdr(void)
{
ret = H5Fset_dset_no_attrs_hint(-1, TRUE);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Fset_dset_no_attrs_hint");
/* trying to get with invalid file ID */
@@ -7855,7 +7855,7 @@ test_min_dset_ohdr(void)
{
ret = H5Fget_dset_no_attrs_hint(-1, &minimize);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Fget_dset_no_attrs_hint");
/* trying to get with invalid pointer */
@@ -7863,7 +7863,7 @@ test_min_dset_ohdr(void)
{
ret = H5Fget_dset_no_attrs_hint(file_id, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Fget_dset_no_attrs_hint");
/************/
@@ -8226,5 +8226,5 @@ cleanup_file(void)
H5Fdelete(FILE7, H5P_DEFAULT);
H5Fdelete(DST_FILE, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
}