summaryrefslogtreecommitdiffstats
path: root/test/th5s.c
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-04-03 18:08:39 (GMT)
committerGitHub <noreply@github.com>2023-04-03 18:08:39 (GMT)
commitf105dcc20a8400e4016fb8b5c572f9c27d65d957 (patch)
tree1de92826c3165f9772067794374e6fc5b65606c2 /test/th5s.c
parent1c1af33a126e66640c2c2f100f743bd8b8fc07da (diff)
downloadhdf5-f105dcc20a8400e4016fb8b5c572f9c27d65d957.zip
hdf5-f105dcc20a8400e4016fb8b5c572f9c27d65d957.tar.gz
hdf5-f105dcc20a8400e4016fb8b5c572f9c27d65d957.tar.bz2
Synchronize HDF5 tests with VOL tests (#2628)
Diffstat (limited to 'test/th5s.c')
-rw-r--r--test/th5s.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/test/th5s.c b/test/th5s.c
index 77116a6..25ab290 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -214,14 +214,22 @@ test_h5s_basic(void)
/* Verify that incorrect dimensions don't work */
dims1[0] = H5S_UNLIMITED;
- sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL);
+ H5E_BEGIN_TRY
+ {
+ sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL);
+ }
+ H5E_END_TRY;
VERIFY(sid1, FAIL, "H5Screate_simple");
dims1[0] = H5S_UNLIMITED;
sid1 = H5Screate(H5S_SIMPLE);
CHECK(sid1, FAIL, "H5Screate");
- ret = H5Sset_extent_simple(sid1, SPACE1_RANK, dims1, NULL);
+ H5E_BEGIN_TRY
+ {
+ ret = H5Sset_extent_simple(sid1, SPACE1_RANK, dims1, NULL);
+ }
+ H5E_END_TRY;
VERIFY(ret, FAIL, "H5Sset_extent_simple");
ret = H5Sclose(sid1);
@@ -1626,7 +1634,7 @@ test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, uint32_t expected_version,
/* Allocate the buffer for encoding */
buf = (char *)HDmalloc(buf_size);
- CHECK_PTR(buf, "H5Dmalloc");
+ CHECK_PTR(buf, "HDmalloc");
/* Encode according to the setting in in_fapl */
ret = H5Sencode2(in_sid, buf, &buf_size, in_fapl);
@@ -3506,9 +3514,13 @@ test_h5s(void)
void
cleanup_h5s(void)
{
- HDremove(DATAFILE);
- HDremove(NULLFILE);
- HDremove(BASICFILE);
- HDremove(ZEROFILE);
- HDremove(VERBFNAME);
+ H5E_BEGIN_TRY
+ {
+ H5Fdelete(DATAFILE, H5P_DEFAULT);
+ H5Fdelete(NULLFILE, H5P_DEFAULT);
+ H5Fdelete(BASICFILE, H5P_DEFAULT);
+ H5Fdelete(ZEROFILE, H5P_DEFAULT);
+ H5Fdelete(VERBFNAME, H5P_DEFAULT);
+ }
+ H5E_END_TRY;
}