diff options
author | David Young <dyoung@hdfgroup.org> | 2020-07-21 16:13:05 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-07-21 16:13:05 (GMT) |
commit | 78bd491aadaf867c4b4c0eabab0e7db82df7d922 (patch) | |
tree | 0d589cf4b75e58ef142ca21a3cf76c2e339024dc /test/vfd_swmr_common.c | |
parent | a9fefff6203de210093ad23da89cd77c7f61db0f (diff) | |
download | hdf5-78bd491aadaf867c4b4c0eabab0e7db82df7d922.zip hdf5-78bd491aadaf867c4b4c0eabab0e7db82df7d922.tar.gz hdf5-78bd491aadaf867c4b4c0eabab0e7db82df7d922.tar.bz2 |
Add to the "bigset" writer a `-M` command-line option that enables the use of
multiple files with virtual datasets.
Add to vfd_swmr_create_fapl() printf(3)-like arguments for setting the shadow
filename. Update all callers.
Diffstat (limited to 'test/vfd_swmr_common.c')
-rw-r--r-- | test/vfd_swmr_common.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/vfd_swmr_common.c b/test/vfd_swmr_common.c index 7b1b550..e4f4889 100644 --- a/test/vfd_swmr_common.c +++ b/test/vfd_swmr_common.c @@ -150,6 +150,8 @@ await_signal(hid_t fid) if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) errx(EXIT_FAILURE, "%s: H5Fflush failed", __func__); + dbgf(1, "waiting for signal\n"); + for (;;) { const int rc = sigtimedwait(&sleepset, NULL, &tick); @@ -177,10 +179,12 @@ await_signal(hid_t fid) } hid_t -vfd_swmr_create_fapl(bool writer, bool only_meta_pages, bool use_vfd_swmr) +vfd_swmr_create_fapl(bool writer, bool only_meta_pages, bool use_vfd_swmr, + const char *mdfile_fmtstr, ...) { H5F_vfd_swmr_config_t config; hid_t fapl; + va_list ap; /* Create file access property list */ if((fapl = h5_fileaccess()) < 0) { @@ -211,7 +215,10 @@ vfd_swmr_create_fapl(bool writer, bool only_meta_pages, bool use_vfd_swmr) config.max_lag = 7; config.writer = writer; config.md_pages_reserved = 128; - HDstrcpy(config.md_file_path, "./my_md_file"); + va_start(ap, mdfile_fmtstr); + evsnprintf(config.md_file_path, sizeof(config.md_file_path), + mdfile_fmtstr, ap); + va_end(ap); /* Enable VFD SWMR configuration */ if(use_vfd_swmr && H5Pset_vfd_swmr_config(fapl, &config) < 0) { |