summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2023-08-05 22:54:32 (GMT)
committerGitHub <noreply@github.com>2023-08-05 22:54:32 (GMT)
commit8ceb226bae916152510387da6f7f9710903882a8 (patch)
tree7742c6f4e824261e6b12cbd7e9e2cadecd128bfc /testpar
parent524a71ef6779f2789ea50df4eb930b3cbc71c61b (diff)
downloadhdf5-8ceb226bae916152510387da6f7f9710903882a8.zip
hdf5-8ceb226bae916152510387da6f7f9710903882a8.tar.gz
hdf5-8ceb226bae916152510387da6f7f9710903882a8.tar.bz2
Merge 1 14 post0804 (#3359)
* Fix for the bug exposed from running test/set_extent.c when selection I/O is enabled. (#3319) This is a fix from Neil. The test/set_extent.c is modified to test for selection I/O enabled. * test(parallel): verify FALSE case (#3356)
Diffstat (limited to 'testpar')
-rw-r--r--testpar/t_file.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/testpar/t_file.c b/testpar/t_file.c
index b743936..3264ad5 100644
--- a/testpar/t_file.c
+++ b/testpar/t_file.c
@@ -950,13 +950,13 @@ test_file_properties(void)
void
test_delete(void)
{
- hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
- hid_t fapl_id = H5I_INVALID_HID; /* File access plist */
- const char *filename = NULL;
- MPI_Comm comm = MPI_COMM_WORLD;
- MPI_Info info = MPI_INFO_NULL;
- htri_t is_hdf5 = FAIL; /* Whether a file is an HDF5 file */
- herr_t ret; /* Generic return value */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
+ hid_t fapl_id = H5I_INVALID_HID; /* File access plist */
+ const char *filename = NULL;
+ MPI_Comm comm = MPI_COMM_WORLD;
+ MPI_Info info = MPI_INFO_NULL;
+ htri_t is_accessible = FAIL; /* Whether a file is accessible */
+ herr_t ret; /* Generic return value */
filename = (const char *)GetTestParameters();
@@ -979,8 +979,8 @@ test_delete(void)
VRFY((SUCCEED == ret), "H5Fclose");
/* Verify that the file is an HDF5 file */
- is_hdf5 = H5Fis_accessible(filename, fapl_id);
- VRFY((TRUE == is_hdf5), "H5Fis_accessible");
+ is_accessible = H5Fis_accessible(filename, fapl_id);
+ VRFY((TRUE == is_accessible), "H5Fis_accessible");
/* Delete the file */
ret = H5Fdelete(filename, fapl_id);
@@ -990,10 +990,16 @@ test_delete(void)
/* This should fail since there is no file */
H5E_BEGIN_TRY
{
- is_hdf5 = H5Fis_accessible(filename, fapl_id);
+ is_accessible = H5Fis_accessible(filename, fapl_id);
}
H5E_END_TRY
- VRFY((is_hdf5 != SUCCEED), "H5Fis_accessible");
+
+ if (FALSE == is_accessible) {
+ VRFY((FALSE == is_accessible), "H5Fis_accessible returned FALSE");
+ }
+ if (FAIL == is_accessible) {
+ VRFY((FAIL == is_accessible), "H5Fis_accessible failed");
+ }
/* Release file-access plist */
ret = H5Pclose(fapl_id);