summaryrefslogtreecommitdiffstats
path: root/test/tfile.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2021-05-05 22:07:40 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2021-05-05 22:07:40 (GMT)
commit8d4873173fe95ffd8a274c9d9a6c1e8b5e017957 (patch)
tree10a135eaa95a0dfd54925af438504179c439de17 /test/tfile.c
parent54c202e4ec4bc9c7e45543cea5b51868a091b3e9 (diff)
downloadhdf5-8d4873173fe95ffd8a274c9d9a6c1e8b5e017957.zip
hdf5-8d4873173fe95ffd8a274c9d9a6c1e8b5e017957.tar.gz
hdf5-8d4873173fe95ffd8a274c9d9a6c1e8b5e017957.tar.bz2
Brings native H5Fdelete implementation from develop
Diffstat (limited to 'test/tfile.c')
-rw-r--r--test/tfile.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/test/tfile.c b/test/tfile.c
index e22e730..19263e8 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -1923,10 +1923,6 @@ test_file_delete(hid_t fapl_id)
/* HDF5 FILE */
/*************/
- /* This is just a placeholder until the native VOL connector supports
- * H5Fdelete().
- */
-
/* Get fapl-dependent filename */
h5_fixname(FILE_DELETE, fapl_id, filename, sizeof(filename));
@@ -1942,19 +1938,20 @@ test_file_delete(hid_t fapl_id)
is_hdf5 = H5Fis_accessible(filename, fapl_id);
VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
- /* Attempt to delete the file - should fail */
+ /* Delete the file */
+ ret = H5Fdelete(filename, fapl_id);
+ VERIFY(ret, SUCCEED, "H5Fdelete");
+
+ /* Verify that the file is NO LONGER an HDF5 file */
+ /* This should fail since there is no file */
H5E_BEGIN_TRY
{
- ret = H5Fdelete(filename, fapl_id);
+ is_hdf5 = H5Fis_accessible(filename, fapl_id);
}
H5E_END_TRY;
- VERIFY(ret, FAIL, "H5Fdelete");
-
- /* Verify that the file still exists */
- is_hdf5 = H5Fis_accessible(filename, fapl_id);
- VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
+ VERIFY(is_hdf5, FAIL, "H5Fis_accessible");
- /* Actually delete the test file */
+ /* Just in case deletion fails - silent on errors */
h5_delete_test_file(FILE_DELETE, fapl_id);
/*****************/