Change default file format to 1.8 (#5949)

Change default file format to 1.8 across various tests and examples, updating file creation and access logic accordingly.

Behavior:
Default file format version changed to 1.8 in H5Pfapl.c.
Updated file creation and access to use 1.8 format in h5ex_g_compact.c and test_file_image.c.
Set earliest file format in multiple test files including cache_tagging.c, dtypes.c, and links.c.
Tests:
Modified expected output in tools/test/misc/expected/*.ls files to reflect new file format locations.
Adjusted test logic in test_file_image.c and cache_tagging.c to accommodate format changes.
Misc:
Added comments and TODOs for future format testing in test_file_image.c.
Minor variable renaming for clarity in test_file_image.c.
This commit is contained in:
Neil Fortner
2025-10-30 15:26:12 -05:00
committed by GitHub
parent 42588aeba7
commit 5e03b3a315
32 changed files with 371 additions and 124 deletions
+14 -7
View File
@@ -28,10 +28,17 @@ main(void)
H5G_info_t ginfo;
hsize_t size;
/*
* Set file access property list to use the earliest file format.
* This will force the library to create original format groups.
*/
fapl = H5Pcreate(H5P_FILE_ACCESS);
status = H5Pset_libver_bounds(fapl, H5F_LIBVER_EARLIEST, H5F_LIBVER_LATEST);
/*
* Create file 1. This file will use original format groups.
*/
file = H5Fcreate(FILENAME1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
file = H5Fcreate(FILENAME1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
group = H5Gcreate(file, GROUP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/*
@@ -72,16 +79,16 @@ main(void)
status = H5Fclose(file);
/*
* Set file access property list to allow the latest file format.
* This will allow the library to create new compact format groups.
* Now use the default file access property list to allow the latest file
* format. This will allow the library to create new compact format groups.
* Since HDF5 2.0, the default is to use the 1.8 file format as the low
* bound, which includes compact groups.
*/
fapl = H5Pcreate(H5P_FILE_ACCESS);
status = H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
/*
* Create file 2 using the new file access property list.
* Create file 2 using the default access property list.
*/
file = H5Fcreate(FILENAME2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
file = H5Fcreate(FILENAME2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
group = H5Gcreate(file, GROUP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/*