summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvchoi <vchoi@jelly.ad.hdfgroup.org>2021-07-13 22:36:48 (GMT)
committervchoi <vchoi@jelly.ad.hdfgroup.org>2021-07-13 22:36:48 (GMT)
commit3d5c597c49a69af72bb8c58e0f4cc0636a8e1ece (patch)
treebc5bbfe1a7cc3ec609661ca616ed0cafad68ddd2
parentfd014862f795dfdf5b50e4f63d34929625536cfe (diff)
downloadhdf5-3d5c597c49a69af72bb8c58e0f4cc0636a8e1ece.zip
hdf5-3d5c597c49a69af72bb8c58e0f4cc0636a8e1ece.tar.gz
hdf5-3d5c597c49a69af72bb8c58e0f4cc0636a8e1ece.tar.bz2
Modifications to common routines used by VFD SWMR tests:
(1) Add a parameter page_buf_size to the common routine vfd_swmr_create_fapl(). (2) Add a new common routine vfd_swmr_create_fcpl() to set the file space strategy and file space page size. VFD SWMR tests are modified accordingly to call the above routines.
-rw-r--r--test/vfd_swmr_addrem_writer.c4
-rw-r--r--test/vfd_swmr_attrdset_writer.c14
-rw-r--r--test/vfd_swmr_bigset_writer.c11
-rw-r--r--test/vfd_swmr_common.c27
-rw-r--r--test/vfd_swmr_common.h4
-rw-r--r--test/vfd_swmr_dsetchks_writer.c15
-rw-r--r--test/vfd_swmr_dsetops_writer.c14
-rw-r--r--test/vfd_swmr_generator.c12
-rw-r--r--test/vfd_swmr_group_writer.c14
-rw-r--r--test/vfd_swmr_reader.c4
-rw-r--r--test/vfd_swmr_remove_reader.c4
-rw-r--r--test/vfd_swmr_remove_writer.c4
-rw-r--r--test/vfd_swmr_sparse_reader.c4
-rw-r--r--test/vfd_swmr_sparse_writer.c4
-rw-r--r--test/vfd_swmr_vlstr_reader.c4
-rw-r--r--test/vfd_swmr_vlstr_writer.c13
-rw-r--r--test/vfd_swmr_writer.c4
-rw-r--r--test/vfd_swmr_zoo_writer.c14
18 files changed, 81 insertions, 89 deletions
diff --git a/test/vfd_swmr_addrem_writer.c b/test/vfd_swmr_addrem_writer.c
index e1e4cca..7f13cec 100644
--- a/test/vfd_swmr_addrem_writer.c
+++ b/test/vfd_swmr_addrem_writer.c
@@ -97,8 +97,8 @@ open_skeleton(const char *filename, unsigned verbose)
/* config, tick_len, max_lag, writer, flush_raw_data, md_pages_reserved, md_file_path */
init_vfd_swmr_config(config, 4, 5, TRUE, FALSE, 128, "./rw-shadow");
- /* use_latest_format, use_vfd_swmr, only_meta_page, config */
- if ((fapl = vfd_swmr_create_fapl(TRUE, TRUE, FALSE, config)) < 0)
+ /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
+ if ((fapl = vfd_swmr_create_fapl(TRUE, TRUE, FALSE, 4096, config)) < 0)
goto error;
/* Open the file */
diff --git a/test/vfd_swmr_attrdset_writer.c b/test/vfd_swmr_attrdset_writer.c
index 48dfe9d..27a23e6 100644
--- a/test/vfd_swmr_attrdset_writer.c
+++ b/test/vfd_swmr_attrdset_writer.c
@@ -1794,19 +1794,15 @@ main(int argc, char **argv)
/* config, tick_len, max_lag, writer, flush_raw_data, md_pages_reserved, md_file_path */
init_vfd_swmr_config(&config, 4, 7, writer, FALSE, 128, "./attrdset-shadow");
- /* use_latest_format, use_vfd_swmr, only_meta_page, config */
- if ((fapl = vfd_swmr_create_fapl(true, s.use_vfd_swmr, true, &config)) < 0) {
+ /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
+ if ((fapl = vfd_swmr_create_fapl(true, s.use_vfd_swmr, true, 4096, &config)) < 0) {
HDprintf("vfd_swmr_create_fapl() failed\n");
TEST_ERROR;
}
- if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) {
- HDprintf("H5Pcreate failed\n");
- TEST_ERROR;
- }
-
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, 1) < 0) {
- HDprintf("H5Pset_file_space_strategy failed\n");
+ /* Set fs_strategy (file space strategy) and fs_page_size (file space page size) */
+ if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, 4096)) < 0) {
+ HDprintf("vfd_swmr_create_fcpl() failed");
TEST_ERROR;
}
diff --git a/test/vfd_swmr_bigset_writer.c b/test/vfd_swmr_bigset_writer.c
index 614a499..e6fd0a8 100644
--- a/test/vfd_swmr_bigset_writer.c
+++ b/test/vfd_swmr_bigset_writer.c
@@ -1080,13 +1080,10 @@ main(int argc, char **argv)
if ((mat = newmat(s.rows, s.cols)) == NULL)
err(EXIT_FAILURE, "%s: could not allocate matrix", __func__);
- if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
+ /* Set fs_strategy (file space strategy) and fs_page_size (file space page size) */
+ if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, 4096)) < 0)
errx(EXIT_FAILURE, "H5Pcreate");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, 1);
- if (ret < 0)
- errx(EXIT_FAILURE, "H5Pset_file_space_strategy");
-
for (i = 0; i < NELMTS(s.file); i++) {
hid_t fapl;
H5F_vfd_swmr_config_t config;
@@ -1099,8 +1096,8 @@ main(int argc, char **argv)
/* config, tick_len, max_lag, writer, flush_raw_data, md_pages_reserved, md_file_path */
init_vfd_swmr_config(&config, 4, 7, s.writer, FALSE, 128, "./bigset-shadow-%zu", i);
- /* use_latest_format, use_vfd_swmr, only_meta_page, config */
- fapl = vfd_swmr_create_fapl(true, s.use_vfd_swmr, true, &config);
+ /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
+ fapl = vfd_swmr_create_fapl(true, s.use_vfd_swmr, true, 4096, &config);
if (fapl < 0)
errx(EXIT_FAILURE, "vfd_swmr_create_fapl");
diff --git a/test/vfd_swmr_common.c b/test/vfd_swmr_common.c
index d04b564..5cae76a 100644
--- a/test/vfd_swmr_common.c
+++ b/test/vfd_swmr_common.c
@@ -374,12 +374,13 @@ init_vfd_swmr_config(H5F_vfd_swmr_config_t *config, uint32_t tick_len, uint32_t
*/
/* Set up the file-access property list:
* --configure for latest format or not
+ * --configure the page buffer size to page_buf_size
* --configure page buffering with only_meta_pages or not
* --configure for VFD SWMR or not
*/
hid_t
vfd_swmr_create_fapl(bool use_latest_format, bool use_vfd_swmr, bool only_meta_pages,
- H5F_vfd_swmr_config_t *config)
+ size_t page_buf_size,H5F_vfd_swmr_config_t *config)
{
hid_t fapl = H5I_INVALID_HID;
@@ -397,7 +398,7 @@ vfd_swmr_create_fapl(bool use_latest_format, bool use_vfd_swmr, bool only_meta_p
}
/* Enable page buffering */
- if (H5Pset_page_buffer_size(fapl, 4096, only_meta_pages ? 100 : 0, 0) < 0)
+ if (H5Pset_page_buffer_size(fapl, page_buf_size, only_meta_pages ? 100 : 0, 0) < 0)
return H5I_INVALID_HID;
/*
@@ -411,6 +412,28 @@ vfd_swmr_create_fapl(bool use_latest_format, bool use_vfd_swmr, bool only_meta_p
} /* vfd_swmr_create_fapl() */
+/* Create the file creation property list:
+ * --Set the file space strategy to fs_strategy
+ * --Set the file space page size to fs_page_size
+ */
+hid_t
+vfd_swmr_create_fcpl(H5F_fspace_strategy_t fs_strategy, hsize_t fs_page_size)
+{
+ hid_t fcpl = H5I_INVALID_HID;
+
+ if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
+ return H5I_INVALID_HID;
+
+ if (H5Pset_file_space_strategy(fcpl, fs_strategy, false, 1) < 0)
+ return H5I_INVALID_HID;
+
+ if (H5Pset_file_space_page_size(fcpl, fs_page_size) < 0)
+ return H5I_INVALID_HID;
+
+ return fcpl;
+
+} /* vfd_swmr_create_fcpl() */
+
/* Fetch a variable from the environment and parse it for unsigned long
* content. Return 0 if the variable is not present, -1 if it is present
* but it does not parse and compare less than `limit`, 1 if it's present,
diff --git a/test/vfd_swmr_common.h b/test/vfd_swmr_common.h
index fee0725..b2fbbbd 100644
--- a/test/vfd_swmr_common.h
+++ b/test/vfd_swmr_common.h
@@ -71,12 +71,14 @@ H5TEST_DLL void await_signal(hid_t);
#endif /* H5_HAVE_WIN32_API */
H5TEST_DLL hid_t vfd_swmr_create_fapl(bool use_latest_format, bool use_vfd_swmr, bool only_meta_pages,
- H5F_vfd_swmr_config_t *config);
+ size_t page_buf_size, H5F_vfd_swmr_config_t *config);
H5TEST_DLL void init_vfd_swmr_config(H5F_vfd_swmr_config_t *config, uint32_t tick_len, uint32_t max_lag,
hbool_t writer, hbool_t flush_raw_data, uint32_t md_pages_reserved,
const char *md_file_fmtstr, ...) H5_ATTR_FORMAT(printf, 7, 8);
+H5TEST_DLL hid_t vfd_swmr_create_fcpl(H5F_fspace_strategy_t fs_strategy, hsize_t fs_page_size);
+
H5TEST_DLL void dbgf(int, const char *, ...) H5_ATTR_FORMAT(printf, 2, 3);
H5TEST_DLL void evsnprintf(char *, size_t, const char *, va_list);
H5TEST_DLL void esnprintf(char *, size_t, const char *, ...) H5_ATTR_FORMAT(printf, 3, 4);
diff --git a/test/vfd_swmr_dsetchks_writer.c b/test/vfd_swmr_dsetchks_writer.c
index 25066d8..7daf567 100644
--- a/test/vfd_swmr_dsetchks_writer.c
+++ b/test/vfd_swmr_dsetchks_writer.c
@@ -1620,7 +1620,6 @@ verify_dsets_chunks(unsigned action, const state_t *s, const dsets_state_t *ds,
hsize_t stride[2] = {0, 0};
hsize_t count[2] = {0, 0};
hsize_t block[2] = {0, 0};
- unsigned int *vbuf = NULL;
HDassert(s->implicit_index || s->fa_index || s->ea_index || s->bt2_index);
@@ -2153,19 +2152,15 @@ main(int argc, char **argv)
/* config, tick_len, max_lag, writer, flush_raw_data, md_pages_reserved, md_file_path */
init_vfd_swmr_config(&config, 4, 7, writer, FALSE, 128, "./dsetchks-shadow");
- /* use_latest_format, use_vfd_swmr, only_meta_page, config */
- if ((fapl = vfd_swmr_create_fapl(true, s.use_vfd_swmr, true, &config)) < 0) {
+ /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
+ if ((fapl = vfd_swmr_create_fapl(true, s.use_vfd_swmr, true, 4096, &config)) < 0) {
printf("vfd_swmr_create_fapl() failed\n");
TEST_ERROR;
}
- if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) {
- printf("H5Pcreate failed\n");
- TEST_ERROR;
- }
-
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, 1) < 0) {
- printf("H5Pset_file_space_strategy failed\n");
+ /* Set fs_strategy (file space strategy) and fs_page_size (file space page size) */
+ if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, 4096)) < 0) {
+ HDprintf("vfd_swmr_create_fcpl() failed");
TEST_ERROR;
}
diff --git a/test/vfd_swmr_dsetops_writer.c b/test/vfd_swmr_dsetops_writer.c
index 66d0410..26f8977 100644
--- a/test/vfd_swmr_dsetops_writer.c
+++ b/test/vfd_swmr_dsetops_writer.c
@@ -1676,19 +1676,15 @@ main(int argc, char **argv)
/* config, tick_len, max_lag, writer, flush_raw_data, md_pages_reserved, md_file_path */
init_vfd_swmr_config(&config, 4, 7, writer, FALSE, 128, "./dsetops-shadow");
- /* use_latest_format, use_vfd_swmr, only_meta_page, config */
- if ((fapl = vfd_swmr_create_fapl(true, s.use_vfd_swmr, true, &config)) < 0) {
+ /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
+ if ((fapl = vfd_swmr_create_fapl(true, s.use_vfd_swmr, true, 4096, &config)) < 0) {
HDprintf("vfd_swmr_create_fapl() failed\n");
TEST_ERROR;
}
- if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) {
- HDprintf("H5Pcreate failed\n");
- TEST_ERROR;
- }
-
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, 1) < 0) {
- HDprintf("H5Pset_file_space_strategy failed\n");
+ /* Set fs_strategy (file space strategy) and fs_page_size (file space page size) */
+ if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, 4096)) < 0) {
+ HDprintf("vfd_swmr_create_fcpl() failed");
TEST_ERROR;
}
diff --git a/test/vfd_swmr_generator.c b/test/vfd_swmr_generator.c
index de3ad3d..4b87072 100644
--- a/test/vfd_swmr_generator.c
+++ b/test/vfd_swmr_generator.c
@@ -112,10 +112,6 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t vfd_swmr_write, int
if (!HDstrcmp(index_type, "b2"))
max_dims[0] = H5S_UNLIMITED;
- /* Create file creation property list */
- if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- return -1;
-
/* Emit informational message */
if (verbose)
HDfprintf(stderr, "Creating file\n");
@@ -133,12 +129,12 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t vfd_swmr_write, int
init_vfd_swmr_config(config, 4, 10, vfd_swmr_write, FALSE, 128, "generator-shadow");
}
- /* use_latest_format, use_vfd_swmr, only_meta_page, config */
- if ((fapl = vfd_swmr_create_fapl(TRUE, vfd_swmr_write, FALSE, config)) < 0)
+ /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
+ if ((fapl = vfd_swmr_create_fapl(TRUE, vfd_swmr_write, FALSE, 4096, config)) < 0)
return -1;
- /* Set file space strategy to paged aggregation in fcpl */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, 1) < 0)
+ /* Set fs_strategy (file space strategy) and fs_page_size (file space page size) */
+ if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, 4096)) < 0)
return -1;
/* Create the file with VFD SWMR write configured */
diff --git a/test/vfd_swmr_group_writer.c b/test/vfd_swmr_group_writer.c
index b43a3a5..f491353 100644
--- a/test/vfd_swmr_group_writer.c
+++ b/test/vfd_swmr_group_writer.c
@@ -4991,19 +4991,15 @@ main(int argc, char **argv)
* as the second parameter of H5Pset_libver_bound() that is called by
* vfd_swmr_create_fapl. Otherwise, the latest file format(H5F_LIBVER_LATEST)
* should be used as the second parameter of H5Pset_libver_bound().
- * Also pass the use_vfd_swmr, only_meta_page, config to vfd_swmr_create_fapl().*/
- if ((fapl = vfd_swmr_create_fapl(!s.old_style_grp, s.use_vfd_swmr, true, &config)) < 0) {
+ * Also pass the use_vfd_swmr, only_meta_page, page_buf_size, config to vfd_swmr_create_fapl().*/
+ if ((fapl = vfd_swmr_create_fapl(!s.old_style_grp, s.use_vfd_swmr, true, 4096, &config)) < 0) {
HDprintf("vfd_swmr_create_fapl failed\n");
TEST_ERROR;
}
- if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) {
- HDprintf("H5Pcreate failed\n");
- TEST_ERROR;
- }
-
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, 1) < 0) {
- HDprintf("H5Pset_file_space_strategy failed\n");
+ /* Set fs_strategy (file space strategy) and fs_page_size (file space page size) */
+ if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, 4096)) < 0) {
+ HDprintf("vfd_swmr_create_fcpl() failed");
TEST_ERROR;
}
diff --git a/test/vfd_swmr_reader.c b/test/vfd_swmr_reader.c
index bd29f54..cc4d918 100644
--- a/test/vfd_swmr_reader.c
+++ b/test/vfd_swmr_reader.c
@@ -322,8 +322,8 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned
/* config, tick_len, max_lag, writer, flush_raw_data, md_pages_reserved, md_file_path */
init_vfd_swmr_config(config, 4, 5, FALSE, FALSE, 128, "./rw-shadow");
- /* use_latest_format, use_vfd_swmr, only_meta_page, config */
- if ((fapl = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, config)) < 0) {
+ /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
+ if ((fapl = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config)) < 0) {
HDfprintf(stderr, "%s.%d: vfd_swmr_create_fapl failed\n", __func__, __LINE__);
goto error;
}
diff --git a/test/vfd_swmr_remove_reader.c b/test/vfd_swmr_remove_reader.c
index a54404f..b729ee4 100644
--- a/test/vfd_swmr_remove_reader.c
+++ b/test/vfd_swmr_remove_reader.c
@@ -306,8 +306,8 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, uns
/* config, tick_len, max_lag, writer, flush_raw_data, md_pages_reserved, md_file_path */
init_vfd_swmr_config(config, 4, 5, FALSE, FALSE, 128, "./rw-shadow");
- /* use_latest_format, use_vfd_swmr, only_meta_page, config */
- if ((fapl = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, config)) < 0) {
+ /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
+ if ((fapl = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config)) < 0) {
HDfprintf(stderr, "%s.%d: vfd_swmr_create_fapl failed\n", __func__, __LINE__);
goto error;
}
diff --git a/test/vfd_swmr_remove_writer.c b/test/vfd_swmr_remove_writer.c
index fb1fc69..b8b1303 100644
--- a/test/vfd_swmr_remove_writer.c
+++ b/test/vfd_swmr_remove_writer.c
@@ -89,8 +89,8 @@ open_skeleton(const char *filename, unsigned verbose, unsigned old H5_ATTR_UNUSE
/* config, tick_len, max_lag, writer, flush_raw_data, md_pages_reserved, md_file_path */
init_vfd_swmr_config(config, 4, 5, TRUE, FALSE, 128, "./rw-shadow");
- /* use_latest_format, use_vfd_swmr, only_meta_page, config */
- if ((fapl = vfd_swmr_create_fapl(TRUE, TRUE, FALSE, config)) < 0)
+ /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
+ if ((fapl = vfd_swmr_create_fapl(TRUE, TRUE, FALSE, 4096, config)) < 0)
goto error;
/* Open the file */
diff --git a/test/vfd_swmr_sparse_reader.c b/test/vfd_swmr_sparse_reader.c
index 56cf2df..a39b357 100644
--- a/test/vfd_swmr_sparse_reader.c
+++ b/test/vfd_swmr_sparse_reader.c
@@ -210,8 +210,8 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords, uns
/* config, tick_len, max_lag, writer, flush_raw_data, md_pages_reserved, md_file_path */
init_vfd_swmr_config(config, 4, 5, FALSE, FALSE, 128, "./rw-shadow");
- /* use_latest_format, use_vfd_swmr, only_meta_page, config */
- if ((fapl = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, config)) < 0) {
+ /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
+ if ((fapl = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config)) < 0) {
HDfprintf(stderr, "%s.%d: vfd_swmr_create_fapl failed\n", __func__, __LINE__);
goto error;
}
diff --git a/test/vfd_swmr_sparse_writer.c b/test/vfd_swmr_sparse_writer.c
index c1e15d8..53b6ec9 100644
--- a/test/vfd_swmr_sparse_writer.c
+++ b/test/vfd_swmr_sparse_writer.c
@@ -89,8 +89,8 @@ open_skeleton(const char *filename, unsigned verbose)
/* config, tick_len, max_lag, writer, flush_raw_data, md_pages_reserved, md_file_path */
init_vfd_swmr_config(config, 4, 5, TRUE, FALSE, 128, "./rw-shadow");
- /* use_latest_format, use_vfd_swmr, only_meta_page, config */
- if ((fapl = vfd_swmr_create_fapl(TRUE, TRUE, FALSE, config)) < 0)
+ /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
+ if ((fapl = vfd_swmr_create_fapl(TRUE, TRUE, FALSE, 4096, config)) < 0)
goto error;
/* Open the file */
diff --git a/test/vfd_swmr_vlstr_reader.c b/test/vfd_swmr_vlstr_reader.c
index e65b146..5a112cd 100644
--- a/test/vfd_swmr_vlstr_reader.c
+++ b/test/vfd_swmr_vlstr_reader.c
@@ -118,8 +118,8 @@ main(int argc, char **argv)
/* config, tick_len, max_lag, writer, flush_raw_data, md_pages_reserved, md_file_path */
init_vfd_swmr_config(&config, 4, 7, false, FALSE, 128, "./vlstr-shadow");
- /* use_latest_format, use_vfd_swmr, only_meta_page, config */
- fapl = vfd_swmr_create_fapl(true, use_vfd_swmr, sel == TEST_OOB, &config);
+ /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
+ fapl = vfd_swmr_create_fapl(true, use_vfd_swmr, sel == TEST_OOB, 4096, &config);
if (fapl < 0)
errx(EXIT_FAILURE, "vfd_swmr_create_fapl");
diff --git a/test/vfd_swmr_vlstr_writer.c b/test/vfd_swmr_vlstr_writer.c
index f0b1ea7..f338428 100644
--- a/test/vfd_swmr_vlstr_writer.c
+++ b/test/vfd_swmr_vlstr_writer.c
@@ -187,18 +187,15 @@ main(int argc, char **argv)
/* config, tick_len, max_lag, writer, flush_raw_data, md_pages_reserved, md_file_path */
init_vfd_swmr_config(&config, 4, 7, true, FALSE, 128, "./vlstr-shadow");
- /* use_latest_format, use_vfd_swmr, only_meta_page, config */
- fapl = vfd_swmr_create_fapl(true, use_vfd_swmr, sel == TEST_OOB, &config);
+ /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
+ fapl = vfd_swmr_create_fapl(true, use_vfd_swmr, sel == TEST_OOB, 4096, &config);
if (fapl < 0)
errx(EXIT_FAILURE, "vfd_swmr_create_fapl");
- if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- errx(EXIT_FAILURE, "H5Pcreate");
-
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, 1);
- if (ret < 0)
- errx(EXIT_FAILURE, "H5Pset_file_space_strategy");
+ /* Set fs_strategy (file space strategy) and fs_page_size (file space page size) */
+ if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, 4096)) < 0)
+ errx(EXIT_FAILURE, "vfd_swmr_create_fcpl");
fid = H5Fcreate("vfd_swmr_vlstr.h5", H5F_ACC_TRUNC, fcpl, fapl);
diff --git a/test/vfd_swmr_writer.c b/test/vfd_swmr_writer.c
index 0036bfc..c5b62c8 100644
--- a/test/vfd_swmr_writer.c
+++ b/test/vfd_swmr_writer.c
@@ -91,8 +91,8 @@ open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file, unsigne
/* config, tick_len, max_lag, writer, flush_raw_data, md_pages_reserved, md_file_path */
init_vfd_swmr_config(config, 4, 5, TRUE, FALSE, 128, "./rw-shadow");
- /* use_latest_format, use_vfd_swmr, only_meta_page, config */
- if ((fapl = vfd_swmr_create_fapl(TRUE, TRUE, FALSE, config)) < 0)
+ /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
+ if ((fapl = vfd_swmr_create_fapl(TRUE, TRUE, FALSE, 4096, config)) < 0)
return -1;
if (use_log_vfd) {
diff --git a/test/vfd_swmr_zoo_writer.c b/test/vfd_swmr_zoo_writer.c
index 1cfaec5..74a68b5 100644
--- a/test/vfd_swmr_zoo_writer.c
+++ b/test/vfd_swmr_zoo_writer.c
@@ -477,8 +477,8 @@ main(int argc, char **argv)
init_vfd_swmr_config(&vfd_swmr_config, TICK_LEN, 7, writer, FALSE, 128, "./zoo-shadow");
/* ? turn off use latest format argument via 1st argument? since later on it reset to early format */
- /* use_latest_format, use_vfd_swmr, only_meta_page, config */
- if ((fapl = vfd_swmr_create_fapl(true, use_vfd_swmr, true, &vfd_swmr_config)) < 0) {
+ /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
+ if ((fapl = vfd_swmr_create_fapl(true, use_vfd_swmr, true, 4096, &vfd_swmr_config)) < 0) {
H5_FAILED();
AT();
HDprintf("vfd_swmr_create_fapl");
@@ -499,19 +499,13 @@ main(int argc, char **argv)
goto error;
}
- if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) {
+ if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, 4096)) < 0) {
H5_FAILED();
AT();
- HDprintf("H5Pcreate failed");
+ HDprintf("vfd_swmr_create_fcpl() failed");
goto error;
}
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, 1) < 0) {
- H5_FAILED();
- AT();
- HDprintf("H5Pset_file_space_strategy failed");
- goto error;
- }
if (writer)
fid = H5Fcreate("vfd_swmr_zoo.h5", H5F_ACC_TRUNC, fcpl, fapl);