Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix file names in tfile.c #3743

Merged
merged 2 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 mdset.h5 compact_dataset.h5 dataset.h5 d
splitter*.h5 splitter.log mirror_rw mirror_ro event_set_[0-9].h5 \
cmpd_dtransform.h5 single_latest.h5 source_file.h5 stdio_file.h5 \
tfile_is_accessible.h5 tfile_is_accessible_non_hdf5.h5 tverbounds_dtype.h5 \
virtual_file1.h5
virtual_file1.h5 tfile_double_open.h5 tfile_incr_filesize.h5

# Sources for testhdf5 executable
testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \
Expand Down
21 changes: 17 additions & 4 deletions test/tfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,15 @@
#define NGROUPS 2
#define NDSETS 4

/* Declaration for test_incr_filesize() */
/* Declaration for libver bounds tests */
#define FILE8 "tfile8.h5" /* Test file */

/* Declaration for test_file_double_file_dataset_open() */
#define FILE_DOUBLE_OPEN "tfile_double_open"

/* Declaration for test_incr_filesize() */
#define FILE_INCR_FILESIZE "tfile_incr_filesize"

/* Files created under 1.6 branch and 1.8 branch--used in test_filespace_compatible() */
static const char *OLD_FILENAME[] = {
"filespace_1_6.h5", /* 1.6 HDF5 file */
Expand Down Expand Up @@ -2623,8 +2629,8 @@ test_file_double_file_dataset_open(bool new_format)
if (new_format) {
ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
CHECK(ret, FAIL, "H5Pset_libver_bounds");
} /* end if */
h5_fixname(FILE1, fapl, filename, sizeof filename);
}
h5_fixname(FILE_DOUBLE_OPEN, fapl, filename, sizeof filename);

/* Create the test file */
fid1 = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
Expand Down Expand Up @@ -2934,6 +2940,9 @@ test_file_double_file_dataset_open(bool new_format)
ret = H5Tclose(tid1);
CHECK(ret, FAIL, "H5Tclose");

/* Delete the test file */
h5_delete_test_file(filename, fapl);

/* Close FAPL */
ret = H5Pclose(fapl);
CHECK(ret, FAIL, "H5Pclose");
Expand Down Expand Up @@ -7650,7 +7659,7 @@ test_incr_filesize(void)
MESSAGE(5, ("Testing H5Fincrement_filesize() and H5Fget_eoa())\n"));

fapl = h5_fileaccess();
h5_fixname(FILE8, fapl, filename, sizeof filename);
h5_fixname(FILE_INCR_FILESIZE, fapl, filename, sizeof filename);

/* Get the VFD feature flags */
driver_id = H5Pget_driver(fapl);
Expand Down Expand Up @@ -7735,6 +7744,9 @@ test_incr_filesize(void)
/* Verify the filesize is the previous stored_eoa + 512 */
VERIFY(filesize, stored_eoa + 512, "file size");

/* Delete the test file */
h5_delete_test_file(FILE_INCR_FILESIZE, fapl);

/* Close the file access property list */
ret = H5Pclose(fapl);
CHECK(ret, FAIL, "H5Pclose");
Expand Down Expand Up @@ -8225,6 +8237,7 @@ cleanup_file(void)
H5Fdelete(FILE5, H5P_DEFAULT);
H5Fdelete(FILE6, H5P_DEFAULT);
H5Fdelete(FILE7, H5P_DEFAULT);
H5Fdelete(FILE8, H5P_DEFAULT);
H5Fdelete(DST_FILE, H5P_DEFAULT);
}
H5E_END_TRY
Expand Down