Skip to content

Commit

Permalink
Test zlib with subfiling.
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoklee committed Oct 17, 2023
1 parent 1b62827 commit d688641
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions testpar/t_subfiling_vfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1461,13 +1461,19 @@ test_subfiling_write_many_read_one(void)
hsize_t start[1];
hsize_t count[1];
hsize_t dset_dims[1];
size_t target_size;
hid_t file_id = H5I_INVALID_HID;
hid_t fapl_id = H5I_INVALID_HID;
hid_t dset_id = H5I_INVALID_HID;
hid_t dxpl_id = H5I_INVALID_HID;
hid_t fspace_id = H5I_INVALID_HID;
void *buf = NULL;
#ifdef H5_HAVE_FILTER_DEFLATE
hsize_t chunk_dims[1];
#endif
size_t target_size;
hid_t file_id = H5I_INVALID_HID;
hid_t fapl_id = H5I_INVALID_HID;
hid_t dset_id = H5I_INVALID_HID;
hid_t dxpl_id = H5I_INVALID_HID;
hid_t fspace_id = H5I_INVALID_HID;
#ifdef H5_HAVE_FILTER_DEFLATE
hid_t plist_id = H5I_INVALID_HID;
#endif
void *buf = NULL;

curr_nerrors = nerrors;

Expand Down Expand Up @@ -1513,6 +1519,13 @@ test_subfiling_write_many_read_one(void)
fspace_id = H5Screate_simple(1, dset_dims, NULL);
VRFY((fspace_id >= 0), "H5Screate_simple succeeded");

#ifdef H5_HAVE_FILTER_DEFLATE
plist_id = H5Pcreate(H5P_DATASET_CREATE);
VRFY((plist_id >= 0), "H5Pcreate() succeeded");
chunk_dims[0] = dset_dims[0] / 2;
VRFY((H5Pset_chunk(plist_id, 1, chunk_dims) >= 0), "H5Pset_chunk succeeded");
VRFY((H5Pset_deflate(plist_id, 9) >= 0), "H5Pset_deflate succeeded");
#endif
dset_id = H5Dcreate2(file_id, "DSET", SUBF_HDF5_TYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset creation succeeded");

Expand All @@ -1533,7 +1546,9 @@ test_subfiling_write_many_read_one(void)

free(buf);
buf = NULL;

#ifdef H5_HAVE_FILTER_DEFLATE
VRFY((H5Pclose(plist_id) >= 0), "H5Pclose() succeeded");
#endif
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");

Expand Down

0 comments on commit d688641

Please sign in to comment.