summaryrefslogtreecommitdiffstats
path: root/test/vfd_swmr_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/vfd_swmr_common.c')
-rw-r--r--test/vfd_swmr_common.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/test/vfd_swmr_common.c b/test/vfd_swmr_common.c
index 931b49b..e1d1ccc 100644
--- a/test/vfd_swmr_common.c
+++ b/test/vfd_swmr_common.c
@@ -326,15 +326,14 @@ await_signal(hid_t fid)
#endif /* H5_HAVE_WIN32_API */
-/* Revised support routines that can be used for all VFD SWMR integration tests
- * NOTE: For tests that call this common routine, md_file_path needs to be set
- * regardless of whether maintain_metadata_file is true or false.
+/*
+ * Revised support routines that can be used for all VFD SWMR integration tests
*/
void
-init_vfd_swmr_config(H5F_vfd_swmr_config_t *config, uint32_t tick_len, uint32_t max_lag, hbool_t writer,
- hbool_t maintain_metadata_file, hbool_t generate_updater_files, hbool_t flush_raw_data,
- uint32_t md_pages_reserved, const char *md_file_fmtstr, const char *updater_file_path,
- ...)
+init_vfd_swmr_config(H5F_vfd_swmr_config_t *config, uint32_t tick_len, uint32_t max_lag,
+ hbool_t presume_posix_semantics, hbool_t writer, hbool_t maintain_metadata_file,
+ hbool_t generate_updater_files, hbool_t flush_raw_data, uint32_t md_pages_reserved,
+ const char *md_file_path, const char *md_file_fmtstr, const char *updater_file_path, ...)
{
va_list ap;
@@ -345,17 +344,28 @@ init_vfd_swmr_config(H5F_vfd_swmr_config_t *config, uint32_t tick_len, uint32_t
config->tick_len = tick_len;
config->max_lag = max_lag;
+ config->presume_posix_semantics = presume_posix_semantics;
config->writer = writer;
config->maintain_metadata_file = maintain_metadata_file;
config->generate_updater_files = generate_updater_files;
config->flush_raw_data = flush_raw_data;
config->md_pages_reserved = md_pages_reserved;
- HDva_start(ap, updater_file_path);
+ if(md_file_path == NULL)
+ config->md_file_path[0] = '\0';
+ else
+ HDstrcpy(config->md_file_path, md_file_path);
- evsnprintf(config->md_file_path, sizeof(config->md_file_path), md_file_fmtstr, ap);
+ if(md_file_fmtstr == NULL)
+ config->md_file_name[0] = '\0';
- HDva_end(ap);
+ else {
+ HDva_start(ap, updater_file_path);
+
+ evsnprintf(config->md_file_name, sizeof(config->md_file_path), md_file_fmtstr, ap);
+
+ HDva_end(ap);
+ }
if (config->generate_updater_files && updater_file_path != NULL)
HDstrcpy(config->updater_file_path, updater_file_path);