summaryrefslogtreecommitdiffstats
path: root/testpar/t_file.c
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2023-08-08 20:33:00 (GMT)
committerGitHub <noreply@github.com>2023-08-08 20:33:00 (GMT)
commit5da94865761e9298ca6062b50f525f3a5ba713ef (patch)
tree7906f52d1dffa2a4601c551495421c4284b33401 /testpar/t_file.c
parentf43d301f633b5e2cd9cde160ddb2c13578f9231f (diff)
downloadhdf5-5da94865761e9298ca6062b50f525f3a5ba713ef.zip
hdf5-5da94865761e9298ca6062b50f525f3a5ba713ef.tar.gz
hdf5-5da94865761e9298ca6062b50f525f3a5ba713ef.tar.bz2
Work around a testphdf5 failure on Cray MPICH machines (#3361) (#3362)
Diffstat (limited to 'testpar/t_file.c')
-rw-r--r--testpar/t_file.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/testpar/t_file.c b/testpar/t_file.c
index 3264ad5..314a60c 100644
--- a/testpar/t_file.c
+++ b/testpar/t_file.c
@@ -986,6 +986,15 @@ test_delete(void)
ret = H5Fdelete(filename, fapl_id);
VRFY((SUCCEED == ret), "H5Fdelete");
+ /*
+ * Work around a Cray MPICH bug that causes
+ * H5Fis_accessible to re-create the just-deleted
+ * file as a 0-byte file with strange Unix
+ * permissions, causing the routine to return
+ * false here instead of FAIL.
+ */
+ H5Pset_fapl_mpio(fapl_id, comm, info);
+
/* Verify that the file is NO LONGER an HDF5 file */
/* This should fail since there is no file */
H5E_BEGIN_TRY
@@ -993,13 +1002,7 @@ test_delete(void)
is_accessible = H5Fis_accessible(filename, fapl_id);
}
H5E_END_TRY
-
- if (FALSE == is_accessible) {
- VRFY((FALSE == is_accessible), "H5Fis_accessible returned FALSE");
- }
- if (FAIL == is_accessible) {
- VRFY((FAIL == is_accessible), "H5Fis_accessible failed");
- }
+ VRFY((FAIL == is_accessible), "H5Fis_accessible failed as expected");
/* Release file-access plist */
ret = H5Pclose(fapl_id);