diff options
author | vchoi <vchoi@jelly.ad.hdfgroup.org> | 2022-04-21 18:56:59 (GMT) |
---|---|---|
committer | vchoi <vchoi@jelly.ad.hdfgroup.org> | 2022-04-21 18:56:59 (GMT) |
commit | 3e990fed8edb25df58d79097f7cef9b908ef5a0d (patch) | |
tree | 62a45e418e2a5aebfc3004115b00aff63a248c7a /test | |
parent | ff8f512871b72e80c6d602d1539ae70072e18abb (diff) | |
download | hdf5-3e990fed8edb25df58d79097f7cef9b908ef5a0d.zip hdf5-3e990fed8edb25df58d79097f7cef9b908ef5a0d.tar.gz hdf5-3e990fed8edb25df58d79097f7cef9b908ef5a0d.tar.bz2 |
Modifications to:
A) Allow automatic generation of metadata file names for VDS support
B) Allow VFD SWMR reader to open an existing HDF5 file either before
the VFD SWMR writer has opened it or after it has closed.
C) Remove the usage of H5P_FILE_ACCESS_ANY_VFD.
D) Add H5FD_FEAT_SUPPORTS_VFD_SWMR feature flag.
E) Do not map H5FD_MEM_GHEAP to H5FD_MEM_DRAW when vfd swmr IS enabled;
map H5FD_MEM_GHEAP to H5FD_MEM_DRAW when vfd swmr is NOT enabled.
For details regarding #A and #B above, see version 9 of the RFC.
Diffstat (limited to 'test')
-rw-r--r-- | test/page_buffer.c | 4 | ||||
-rw-r--r-- | test/test_vfd_swmr.sh.in | 6 | ||||
-rw-r--r-- | test/vfd_swmr.c | 293 | ||||
-rw-r--r-- | test/vfd_swmr_addrem_writer.c | 7 | ||||
-rw-r--r-- | test/vfd_swmr_attrdset_writer.c | 182 | ||||
-rw-r--r-- | test/vfd_swmr_bigset_writer.c | 26 | ||||
-rw-r--r-- | test/vfd_swmr_common.c | 30 | ||||
-rw-r--r-- | test/vfd_swmr_common.h | 9 | ||||
-rw-r--r-- | test/vfd_swmr_dsetchks_writer.c | 9 | ||||
-rw-r--r-- | test/vfd_swmr_dsetops_writer.c | 7 | ||||
-rw-r--r-- | test/vfd_swmr_generator.c | 7 | ||||
-rw-r--r-- | test/vfd_swmr_gfail_writer.c | 9 | ||||
-rw-r--r-- | test/vfd_swmr_gperf_writer.c | 9 | ||||
-rw-r--r-- | test/vfd_swmr_group_writer.c | 9 | ||||
-rw-r--r-- | test/vfd_swmr_indep_rw_writer.c | 18 | ||||
-rw-r--r-- | test/vfd_swmr_reader.c | 7 | ||||
-rw-r--r-- | test/vfd_swmr_remove_reader.c | 7 | ||||
-rw-r--r-- | test/vfd_swmr_remove_writer.c | 7 | ||||
-rw-r--r-- | test/vfd_swmr_sparse_reader.c | 7 | ||||
-rw-r--r-- | test/vfd_swmr_sparse_writer.c | 7 | ||||
-rw-r--r-- | test/vfd_swmr_vlstr_reader.c | 7 | ||||
-rw-r--r-- | test/vfd_swmr_vlstr_writer.c | 8 | ||||
-rw-r--r-- | test/vfd_swmr_writer.c | 7 | ||||
-rw-r--r-- | test/vfd_swmr_zoo_writer.c | 7 |
24 files changed, 387 insertions, 302 deletions
diff --git a/test/page_buffer.c b/test/page_buffer.c index c3555aa..9e45809 100644 --- a/test/page_buffer.c +++ b/test/page_buffer.c @@ -115,7 +115,9 @@ swmr_fapl_augment(hid_t fapl, const char *filename, uint32_t max_lag) HDfprintf(stderr, "H5_basename() failed\n"); return -1; } - HDsnprintf(config.md_file_path, sizeof(config.md_file_path), "%s/%s.shadow", dname, bname); + HDsnprintf(config.md_file_path, sizeof(config.md_file_path), "%s", dname); + HDsnprintf(config.md_file_name, sizeof(config.md_file_name), "%s.shadow", bname); + HDfree(dname); HDfree(bname); diff --git a/test/test_vfd_swmr.sh.in b/test/test_vfd_swmr.sh.in index 08d2706..4548775 100644 --- a/test/test_vfd_swmr.sh.in +++ b/test/test_vfd_swmr.sh.in @@ -1095,6 +1095,9 @@ for options in "-d 1" "-d 1 -F" "-d 2 -l 16" "-d 2 -F -l 16" "-d 1 -t" "-d 1 -t if [ ${do_many_small:-no} = no ]; then continue fi + + rm vfd_swmr_bigset*.h5 2> /dev/null + # # Test many small datasets of two or three dimensions. # @@ -1188,6 +1191,9 @@ for options in "-d 1" "-d 1 -F" "-d 2 -l 10" "-d 2 -F -l 10" "-d 1 -t -l 10" "-d if [ ${do_few_big:-no} = no ]; then continue fi + + rm vfd_swmr_bigset*.h5 2> /dev/null + echo launch vfd_swmr_bigset_writer few big, options $options ......may take some time...... # Launch the auxiliary process for testing NFS if the --enable-aux-process option is enabled for configuration. diff --git a/test/vfd_swmr.c b/test/vfd_swmr.c index e7eb3da..f53b453 100644 --- a/test/vfd_swmr.c +++ b/test/vfd_swmr.c @@ -16,8 +16,12 @@ * * Tests the VFD SWMR Feature. * + * Note: Relevant tests in this file are modified to reflect the + * changes to the fapl for VDS. See latest RFC. + * *************************************************************/ +#include "H5queue.h" #include "h5test.h" #include "vfd_swmr_common.h" @@ -103,11 +107,8 @@ static unsigned test_updater_generate_md_checksums(hbool_t file_create); * --tick_len: should be >= 0 * --max_lag: should be >= 3 * --md_pages_reserved: should be >= 2 - * --md_file_path: should contain the metadata file path (POSIX) * --at least one of maintain_metadata_file and generate_updater_files * must be true - * --if both the writer and maintain_metadata_file fields are true, - * then md_file_path field shouldn't be empty * --if both the writer and generate_updater_files fields are true, * then updater_file_path field shouldn't be empty * B) Verify that info set in the fapl is retrieved correctly. @@ -182,16 +183,8 @@ test_fapl(void) /* Set valid md_pages_reserved */ my_config->md_pages_reserved = 2; - /* Should fail: empty md_file_path */ - H5E_BEGIN_TRY - { - ret = H5Pset_vfd_swmr_config(fapl, my_config); - } - H5E_END_TRY; - if (ret >= 0) - TEST_ERROR; - my_config->writer = TRUE; + /* Should fail: at least one of maintain_metadata_file and generate_updater_files must be true */ H5E_BEGIN_TRY { @@ -203,16 +196,8 @@ test_fapl(void) my_config->writer = TRUE; my_config->maintain_metadata_file = TRUE; - /* Should fail: empty md_file_path */ - H5E_BEGIN_TRY - { - ret = H5Pset_vfd_swmr_config(fapl, my_config); - } - H5E_END_TRY; - if (ret >= 0) - TEST_ERROR; - my_config->generate_updater_files = TRUE; + /* Should fail: empty updater_file_path */ H5E_BEGIN_TRY { @@ -222,8 +207,8 @@ test_fapl(void) if (ret >= 0) TEST_ERROR; - /* Set md_file_path */ - HDstrcpy(my_config->md_file_path, MD_FILENAME); + /* Set md_file_name */ + HDstrcpy(my_config->md_file_name, MD_FILENAME); my_config->generate_updater_files = FALSE; /* Should succeed in setting the configuration info */ @@ -244,7 +229,9 @@ test_fapl(void) TEST_ERROR; if (my_config->generate_updater_files) TEST_ERROR; - if (HDstrcmp(my_config->md_file_path, MD_FILENAME) != 0) + + /* Check md_file_name instead of md_file_path */ + if (HDstrcmp(my_config->md_file_name, MD_FILENAME) != 0) TEST_ERROR; my_config->generate_updater_files = TRUE; @@ -269,7 +256,9 @@ test_fapl(void) TEST_ERROR; if (!my_config->maintain_metadata_file) TEST_ERROR; - if (HDstrcmp(my_config->md_file_path, MD_FILENAME) != 0) + + /* Check md_file_name instead of md_file_path */ + if (HDstrcmp(my_config->md_file_name, MD_FILENAME) != 0) TEST_ERROR; /* Close the file access property list */ @@ -348,9 +337,10 @@ test_file_fapl(void) * Configured as VFD SWMR reader + no page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config1, 4, 7, FALSE, TRUE, FALSE, TRUE, 2, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config1, 4, 7, FALSE, FALSE, TRUE, FALSE, TRUE, 2, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl1 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 0, config1); @@ -373,9 +363,10 @@ test_file_fapl(void) * Configured as VFD SWMR writer + no page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config1, 4, 7, TRUE, TRUE, TRUE, TRUE, 2, MD_FILENAME, UD_FILENAME); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config1, 4, 7, FALSE, TRUE, TRUE, TRUE, TRUE, 2, NULL, MD_FILENAME, UD_FILENAME); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl1 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 0, config1); @@ -413,9 +404,10 @@ test_file_fapl(void) * Configured as VFD SWMR writer + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config1, 4, 7, TRUE, TRUE, FALSE, TRUE, 2, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config1, 4, 7, FALSE, TRUE, TRUE, FALSE, TRUE, 2, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl1 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config1); @@ -485,9 +477,10 @@ test_file_fapl(void) * Set up different VFD SWMR configuration + page_buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config2, 4, 10, TRUE, TRUE, FALSE, TRUE, 2, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config2, 4, 10, FALSE, TRUE, TRUE, FALSE, TRUE, 2, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl2 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config2); @@ -525,9 +518,10 @@ test_file_fapl(void) * Set up as VFD SWMR writer in config1 but different from config2 */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config1, 3, 8, TRUE, TRUE, FALSE, TRUE, 3, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config1, 3, 8, FALSE, TRUE, TRUE, FALSE, TRUE, 3, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl1 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config1); @@ -553,7 +547,10 @@ test_file_fapl(void) * Set up as VFD SWMR reader in config1 which is same as config2 */ - init_vfd_swmr_config(config1, 4, 10, TRUE, TRUE, FALSE, TRUE, 2, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config1, 4, 10, FALSE, TRUE, TRUE, FALSE, TRUE, 2, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl1 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config1); @@ -691,9 +688,10 @@ test_file_end_tick(void) * Configured file 1 as VFD SWMR writer + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config1, 10, 15, TRUE, TRUE, FALSE, TRUE, 2, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config1, 10, 15, FALSE, TRUE, TRUE, FALSE, TRUE, 2, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl1 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config1); @@ -705,9 +703,10 @@ test_file_end_tick(void) * Configured file 2 as VFD SWMR writer + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config2, 5, 6, TRUE, TRUE, FALSE, TRUE, 2, MD_FILENAME2, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config2, 5, 6, FALSE, TRUE, TRUE, FALSE, TRUE, 2, NULL, MD_FILENAME2, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl2 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config2); @@ -719,9 +718,10 @@ test_file_end_tick(void) * Configured file 3 as VFD SWMR writer + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config3, 3, 6, TRUE, TRUE, FALSE, TRUE, 2, MD_FILENAME3, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config3, 3, 6, FALSE, TRUE, TRUE, FALSE, TRUE, 2, NULL, MD_FILENAME3, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl3 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config3); @@ -896,9 +896,10 @@ test_writer_create_open_flush(void) * Set up the VFD SWMR configuration + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(my_config, 1, 3, TRUE, TRUE, FALSE, TRUE, 2, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(my_config, 1, 3, FALSE, TRUE, TRUE, FALSE, TRUE, 2, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, my_config); @@ -1017,9 +1018,10 @@ test_writer_md(void) if ((my_config = HDmalloc(sizeof(H5F_vfd_swmr_config_t))) == NULL) FAIL_STACK_ERROR; - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(my_config, 1, 3, TRUE, TRUE, FALSE, TRUE, 256, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(my_config, 1, 3, FALSE, TRUE, TRUE, FALSE, TRUE, 256, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, FS_PAGE_SIZE, my_config); @@ -1327,9 +1329,10 @@ test_reader_md_concur(void) * Set up the VFD SWMR configuration + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config_writer, 1, 3, TRUE, TRUE, FALSE, TRUE, 256, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config_writer, 1, 3, FALSE, TRUE, TRUE, FALSE, TRUE, 256, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl_writer = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, FS_PAGE_SIZE, config_writer); @@ -1403,9 +1406,10 @@ test_reader_md_concur(void) * Set up the VFD SWMR configuration as reader + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config_reader, 1, 3, FALSE, TRUE, FALSE, TRUE, 256, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config_reader, 1, 3, FALSE, FALSE, TRUE, FALSE, TRUE, 256, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl_reader = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, FS_PAGE_SIZE, config_reader); @@ -2010,9 +2014,10 @@ test_multiple_file_opens_concur(void) /* Set the VFD SWMR configuration in fapl_writer + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config_writer, 1, 3, TRUE, TRUE, FALSE, TRUE, 256, MD_FILENAME2, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config_writer, 1, 3, FALSE, TRUE, TRUE, FALSE, TRUE, 256, NULL, MD_FILENAME2, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl_writer = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, FS_PAGE_SIZE, config_writer); @@ -2077,9 +2082,10 @@ test_multiple_file_opens_concur(void) if ((config1 = HDmalloc(sizeof(*config1))) == NULL) FAIL_STACK_ERROR; - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config1, 7, 10, TRUE, TRUE, FALSE, TRUE, 256, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config1, 7, 10, FALSE, TRUE, TRUE, FALSE, TRUE, 256, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl1 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, FS_PAGE_SIZE, config1); @@ -2120,9 +2126,10 @@ test_multiple_file_opens_concur(void) if ((config2 = HDmalloc(sizeof(*config2))) == NULL) FAIL_STACK_ERROR; - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config2, 1, 3, FALSE, TRUE, FALSE, TRUE, 256, MD_FILENAME2, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config2, 1, 3, FALSE, FALSE, TRUE, FALSE, TRUE, 256, NULL, MD_FILENAME2, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl2 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, FS_PAGE_SIZE, config2); @@ -2259,9 +2266,10 @@ test_disable_enable_eot_concur(void) * Set up the VFD SWMR configuration + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config_writer, 1, 3, TRUE, TRUE, FALSE, TRUE, 256, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config_writer, 1, 3, FALSE, TRUE, TRUE, FALSE, TRUE, 256, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl_writer = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, FS_PAGE_SIZE, config_writer); @@ -2339,9 +2347,10 @@ test_disable_enable_eot_concur(void) * Set up the VFD SWMR configuration as reader + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config_reader, 1, 3, FALSE, TRUE, FALSE, TRUE, 256, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config_reader, 1, 3, FALSE, FALSE, TRUE, FALSE, TRUE, 256, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl_reader = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, FS_PAGE_SIZE, config_reader); @@ -2549,9 +2558,10 @@ test_file_end_tick_concur(void) * Set up the VFD SWMR configuration + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config_writer, 1, 3, TRUE, TRUE, FALSE, TRUE, 256, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config_writer, 1, 3, FALSE, TRUE, TRUE, FALSE, TRUE, 256, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl_writer = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, FS_PAGE_SIZE, config_writer); @@ -2625,9 +2635,10 @@ test_file_end_tick_concur(void) if ((config_reader = HDmalloc(sizeof(*config_reader))) == NULL) HDexit(EXIT_FAILURE); - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config_reader, 1, 3, FALSE, TRUE, FALSE, TRUE, 256, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config_reader, 1, 3, FALSE, FALSE, TRUE, FALSE, TRUE, 256, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl_reader = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, FS_PAGE_SIZE, config_reader); @@ -2822,18 +2833,20 @@ test_multiple_file_opens(void) * Configured as VFD SWMR writer + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config1, 4, 6, TRUE, TRUE, FALSE, TRUE, 2, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config1, 4, 6, FALSE, TRUE, TRUE, FALSE, TRUE, 2, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl1 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config1); if (fapl1 == H5I_INVALID_HID) FAIL_STACK_ERROR; - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config2, 4, 6, TRUE, TRUE, FALSE, TRUE, 2, MD_FILENAME2, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config2, 4, 6, FALSE, TRUE, TRUE, FALSE, TRUE, 2, NULL, MD_FILENAME2, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl2 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config2); @@ -3033,9 +3046,10 @@ test_same_file_opens(void) * Set the VFD SWMR configuration in fapl1 + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config1, 4, 10, TRUE, TRUE, FALSE, TRUE, 2, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config1, 4, 10, FALSE, TRUE, TRUE, FALSE, TRUE, 2, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl1 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config1); @@ -3061,9 +3075,10 @@ test_same_file_opens(void) * Set the VFD SWMR configuration in fapl2 + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config2, 3, 8, FALSE, TRUE, FALSE, TRUE, 3, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config2, 3, 8, FALSE, FALSE, TRUE, FALSE, TRUE, 3, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl2 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config2); @@ -3116,9 +3131,10 @@ test_same_file_opens(void) * Set up as VFD SWMR reader + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config1, 4, 10, FALSE, TRUE, FALSE, TRUE, 2, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config1, 4, 10, FALSE, FALSE, TRUE, FALSE, TRUE, 2, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl1 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config1); @@ -3153,9 +3169,10 @@ test_same_file_opens(void) * Set up as VFD SWMR writer + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config1, 4, 10, TRUE, TRUE, FALSE, TRUE, 2, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config1, 4, 10, FALSE, TRUE, TRUE, FALSE, TRUE, 2, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl1 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config1); @@ -3209,9 +3226,10 @@ test_same_file_opens(void) * Set up as VFD SWMR writer + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config1, 4, 10, TRUE, TRUE, FALSE, TRUE, 2, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config1, 4, 10, FALSE, TRUE, TRUE, FALSE, TRUE, 2, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl1 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config1); @@ -3418,9 +3436,10 @@ test_enable_disable_eot(void) * Configured first file as VFD SWMR writer + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config1, 4, 6, TRUE, TRUE, FALSE, TRUE, 2, MD_FILENAME, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config1, 4, 6, FALSE, TRUE, TRUE, FALSE, TRUE, 2, NULL, MD_FILENAME, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl1 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config1); @@ -3432,9 +3451,10 @@ test_enable_disable_eot(void) * Configured second file as VFD SWMR writer + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config2, 4, 6, TRUE, TRUE, FALSE, TRUE, 2, MD_FILENAME2, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config2, 4, 6, FALSE, TRUE, TRUE, FALSE, TRUE, 2, NULL, MD_FILENAME2, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl2 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config2); @@ -3446,9 +3466,10 @@ test_enable_disable_eot(void) * Configured third file as VFD SWMR writer + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config3, 4, 6, TRUE, TRUE, FALSE, TRUE, 2, MD_FILENAME3, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config3, 4, 6, FALSE, TRUE, TRUE, FALSE, TRUE, 2, NULL, MD_FILENAME3, NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl3 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config3); @@ -3700,6 +3721,7 @@ error: static unsigned test_updater_flags(void) { + char filename[FILE_NAME_LEN]; /* Filename to use */ hid_t fid = H5I_INVALID_HID; /* File ID */ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */ @@ -3731,9 +3753,10 @@ test_updater_flags(void) * Configured as VFD SWMR writer + page buffering + generate updater files */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config, 4, 7, TRUE, TRUE, TRUE, TRUE, 2, MD_FILENAME, UD_FILENAME); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config, 4, 7, FALSE, TRUE, TRUE, TRUE, TRUE, 2, NULL, MD_FILENAME, UD_FILENAME); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config); @@ -3741,12 +3764,16 @@ test_updater_flags(void) if (fapl == H5I_INVALID_HID) TEST_ERROR; + /* FILENAME */ + h5_fixname("vfd_swmr_file", fapl, filename, sizeof(filename)); + if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, 4096)) < 0) { HDprintf("vfd_swmr_create_fcpl() failed"); FAIL_STACK_ERROR; } - if ((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl)) < 0) + + if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) TEST_ERROR; /* Get the file's file access property list */ @@ -3769,7 +3796,7 @@ test_updater_flags(void) TEST_ERROR; /* Check updater file size */ - if (HDstat(namebuf, &sb) == 0 && sb.st_size != H5F_UD_HEADER_SIZE) + if (HDstat(namebuf, &sb) == 0 && sb.st_size < H5F_UD_HEADER_SIZE) TEST_ERROR; /* Closing */ @@ -3880,9 +3907,10 @@ test_updater_flags_same_file_opens(void) * Set the VFD SWMR configuration in fapl1 + page buffering */ - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config1, 4, 10, TRUE, TRUE, TRUE, TRUE, 2, MD_FILENAME, UD_FILENAME); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config1, 4, 10, FALSE, TRUE, TRUE, TRUE, TRUE, 2, NULL, MD_FILENAME, UD_FILENAME); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl1 = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, 4096, config1); @@ -4253,6 +4281,8 @@ test_updater_generate_md_checksums(hbool_t file_create) hid_t fapl = H5I_INVALID_HID; /* File access property list ID */ H5F_vfd_swmr_config_t config; /* Configuration for VFD SWMR */ H5F_generate_md_ck_cb_t cb_info; /* Callback */ + H5F_t * f = NULL; /* Internal file object pointer */ + char *md_file_path_name; if (file_create) { TESTING("VFD SWMR updater generate checksums for metadata file with H5Fcreate"); @@ -4261,9 +4291,10 @@ test_updater_generate_md_checksums(hbool_t file_create) TESTING("VFD SWMR updater generate checksums for metadata file with H5Fopen"); } - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(&config, 4, 7, TRUE, TRUE, TRUE, TRUE, 2, MD_FILE, UD_FILE); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(&config, 4, 7, FALSE, TRUE, TRUE, TRUE, TRUE, 2, NULL, MD_FILE, UD_FILE); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl = vfd_swmr_create_fapl(TRUE, TRUE, FALSE, 4096, &config); @@ -4298,6 +4329,14 @@ test_updater_generate_md_checksums(hbool_t file_create) FAIL_STACK_ERROR; } + /* Get a pointer to the internal file object */ + if (NULL == (f = (H5F_t *)H5VL_object(fid))) + TEST_ERROR + + /* Get the full metadata file pathname */ + md_file_path_name = HDstrdup(f->shared->md_file_path_name); + + /* Close the file */ if (H5Fclose(fid) < 0) FAIL_STACK_ERROR; @@ -4308,11 +4347,11 @@ test_updater_generate_md_checksums(hbool_t file_create) FAIL_STACK_ERROR; /* Verify contents of checksum file and updater files */ - if (verify_ud_chk(config.md_file_path, config.updater_file_path) < 0) + if (verify_ud_chk(md_file_path_name, config.updater_file_path) < 0) TEST_ERROR; /* It's important to clean up the checksum and updater files. */ - clean_chk_ud_files(config.md_file_path, config.updater_file_path); + clean_chk_ud_files(md_file_path_name, config.updater_file_path); PASSED(); @@ -4328,7 +4367,7 @@ error: H5E_END_TRY; /* It's important to clean up the chechsum and updater files. */ - clean_chk_ud_files(config.md_file_path, config.updater_file_path); + clean_chk_ud_files(md_file_path_name, config.updater_file_path); return 1; diff --git a/test/vfd_swmr_addrem_writer.c b/test/vfd_swmr_addrem_writer.c index 0cd1713..ea395f6 100644 --- a/test/vfd_swmr_addrem_writer.c +++ b/test/vfd_swmr_addrem_writer.c @@ -94,9 +94,10 @@ open_skeleton(const char *filename, unsigned verbose) if ((config = HDcalloc(1, sizeof(*config))) == NULL) goto error; - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config, 4, 5, TRUE, TRUE, FALSE, TRUE, 128, "rw-shadow", NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config, 4, 5, FALSE, TRUE, TRUE, FALSE, TRUE, 128, NULL, "rw-shadow", NULL); /* 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) diff --git a/test/vfd_swmr_attrdset_writer.c b/test/vfd_swmr_attrdset_writer.c index 37c4c72..4b3dbc0 100644 --- a/test/vfd_swmr_attrdset_writer.c +++ b/test/vfd_swmr_attrdset_writer.c @@ -130,40 +130,40 @@ typedef struct { .fd_reader_to_writer = -1, .notify = 0, .verify = 0 \ } -static herr_t state_init(state_t *s, int argc, const char *const *argv); +static hbool_t state_init(state_t *s, int argc, const char *const *argv); -static herr_t np_init(np_state_t *np, hbool_t writer); -static herr_t np_close(np_state_t *np, hbool_t writer); -static herr_t np_writer(hbool_t result, unsigned step, const state_t *s, np_state_t *np, +static hbool_t np_init(np_state_t *np, hbool_t writer); +static hbool_t np_close(np_state_t *np, hbool_t writer); +static hbool_t np_writer(hbool_t result, unsigned step, const state_t *s, np_state_t *np, H5F_vfd_swmr_config_t *config); -static herr_t np_reader(hbool_t result, unsigned step, const state_t *s, np_state_t *np); -static herr_t np_confirm_verify_notify(int fd, unsigned step, const state_t *s, np_state_t *np); -static herr_t np_reader_no_verification(const state_t *s, np_state_t *np, H5F_vfd_swmr_config_t *config); +static hbool_t np_reader(hbool_t result, unsigned step, const state_t *s, np_state_t *np); +static hbool_t np_confirm_verify_notify(int fd, unsigned step, const state_t *s, np_state_t *np); +static hbool_t np_reader_no_verification(const state_t *s, np_state_t *np, H5F_vfd_swmr_config_t *config); -static herr_t create_dsets(const state_t *s, dsets_state_t *ds); -static herr_t open_dsets(const state_t *s, dsets_state_t *ds); -static herr_t open_dset_real(hid_t fid, hid_t *did, const char *name, unsigned *max_compact, +static hbool_t create_dsets(const state_t *s, dsets_state_t *ds); +static hbool_t open_dsets(const state_t *s, dsets_state_t *ds); +static hbool_t open_dset_real(hid_t fid, hid_t *did, const char *name, unsigned *max_compact, unsigned *min_dense); -static herr_t close_dsets(const dsets_state_t *ds); +static hbool_t close_dsets(const dsets_state_t *ds); -static herr_t perform_dsets_operations(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_config_t *config, +static hbool_t perform_dsets_operations(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_config_t *config, np_state_t *np); -static herr_t attr_dsets_action(unsigned action, const state_t *s, const dsets_state_t *ds, unsigned which); -static herr_t attr_action(unsigned action, const state_t *s, hid_t did, unsigned which); -static herr_t add_attr(const state_t *s, hid_t did, unsigned int which); -static herr_t modify_attr(const state_t *s, hid_t did, unsigned int which); -static herr_t delete_attr(hid_t did, unsigned int which); +static hbool_t attr_dsets_action(unsigned action, const state_t *s, const dsets_state_t *ds, unsigned which); +static hbool_t attr_action(unsigned action, const state_t *s, hid_t did, unsigned which); +static hbool_t add_attr(const state_t *s, hid_t did, unsigned int which); +static hbool_t modify_attr(const state_t *s, hid_t did, unsigned int which); +static hbool_t delete_attr(hid_t did, unsigned int which); -static herr_t verify_dsets_operations(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_config_t *config, +static hbool_t verify_dsets_operations(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_config_t *config, np_state_t *np); -static herr_t verify_attr_dsets_action(unsigned action, const state_t *s, const dsets_state_t *ds, +static hbool_t verify_attr_dsets_action(unsigned action, const state_t *s, const dsets_state_t *ds, unsigned which); -static herr_t verify_attr_action(unsigned action, hid_t did, unsigned which); -static herr_t verify_add_or_modify_attr(unsigned action, hid_t did, char *attr_name, unsigned int which); -static herr_t verify_delete_attr(hid_t did, char *attr_name); -static herr_t verify_storage_cont(unsigned action, hid_t did, unsigned int which, unsigned max_compact, +static hbool_t verify_attr_action(unsigned action, hid_t did, unsigned which); +static hbool_t verify_add_or_modify_attr(unsigned action, hid_t did, char *attr_name, unsigned int which); +static hbool_t verify_delete_attr(hid_t did, char *attr_name); +static hbool_t verify_storage_cont(unsigned action, hid_t did, unsigned int which, unsigned max_compact, unsigned min_dense, unsigned asteps); -static herr_t verify_storage_cont_real(hid_t did, unsigned int which, unsigned cut_point); +static hbool_t verify_storage_cont_real(hid_t did, unsigned int which, unsigned cut_point); /* Names for datasets */ #define DSET_COMPACT_NAME "compact_dset" @@ -215,7 +215,7 @@ usage(const char *progname) /* * Initialize option info in state_t */ -static herr_t +static hbool_t state_init(state_t *s, int argc, const char *const *argv) { unsigned long tmp; @@ -347,20 +347,20 @@ state_init(state_t *s, int argc, const char *const *argv) /* The test file name */ esnprintf(s->filename, sizeof(s->filename), "vfd_swmr_attrdset.h5"); - return SUCCEED; + return true; error: if (tfile) HDfree(tfile); - return FAIL; + return false; } /* state_init() */ /* * Create the datasets as specified on the command line. */ -static herr_t +static hbool_t create_dsets(const state_t *s, dsets_state_t *ds) { hid_t dcpl = H5I_INVALID_HID; @@ -719,7 +719,7 @@ create_dsets(const state_t *s, dsets_state_t *ds) } } - return SUCCEED; + return true; error: H5E_BEGIN_TRY @@ -741,14 +741,14 @@ error: } H5E_END_TRY; - return FAIL; + return false; } /* create_dsets() */ /* * Open the datasets as specified. */ -static herr_t +static hbool_t open_dsets(const state_t *s, dsets_state_t *ds) { *ds = DSETS_INITIALIZER; @@ -796,10 +796,10 @@ open_dsets(const state_t *s, dsets_state_t *ds) } } - return SUCCEED; + return true; error: - return FAIL; + return false; } /* open_dsets() */ @@ -807,7 +807,7 @@ error: * Do the real work of opening the dataset. * Retrieve the max_compact and min_dense values for the dataset. */ -static herr_t +static hbool_t open_dset_real(hid_t fid, hid_t *did, const char *name, unsigned *max_compact, unsigned *min_dense) { hid_t dcpl = H5I_INVALID_HID; @@ -832,7 +832,7 @@ open_dset_real(hid_t fid, hid_t *did, const char *name, unsigned *max_compact, u TEST_ERROR; } - return SUCCEED; + return true; error: H5E_BEGIN_TRY @@ -842,13 +842,13 @@ error: } H5E_END_TRY; - return FAIL; + return false; } /* open_dset_real() */ /* * Close all the datasets as specified. */ -static herr_t +static hbool_t close_dsets(const dsets_state_t *ds) { if (ds->compact_did != H5I_INVALID_HID && H5Dclose(ds->compact_did) < 0) { @@ -886,7 +886,7 @@ close_dsets(const dsets_state_t *ds) TEST_ERROR; } - return SUCCEED; + return true; error: H5E_BEGIN_TRY @@ -901,7 +901,7 @@ error: } H5E_END_TRY; - return FAIL; + return false; } /* close_dsets() */ /* @@ -914,7 +914,7 @@ error: * MODIFY_ATTR : -m option * DELETE_ATTR : -d <dattrs> option */ -static herr_t +static hbool_t perform_dsets_operations(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_config_t *config, np_state_t *np) { unsigned step; @@ -974,10 +974,10 @@ perform_dsets_operations(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_config_t *c } } - return SUCCEED; + return true; error: - return FAIL; + return false; } /* perform_dsets_operations() */ @@ -987,7 +987,7 @@ error: * -g: contiguous dataset * -k: 5 chunked datasets with 5 indexing types */ -static herr_t +static hbool_t attr_dsets_action(unsigned action, const state_t *s, const dsets_state_t *ds, unsigned which) { int nerrors = 0; @@ -1035,7 +1035,7 @@ attr_dsets_action(unsigned action, const state_t *s, const dsets_state_t *ds, un } if (nerrors) - ret = FALSE; + ret = false; return (ret); @@ -1047,7 +1047,7 @@ attr_dsets_action(unsigned action, const state_t *s, const dsets_state_t *ds, un * MODIFY_ATTR : modify `which` attribute * DELETE_ATTR : delete `which` attribute */ -static herr_t +static hbool_t attr_action(unsigned action, const state_t *s, hid_t did, unsigned which) { hbool_t ret; @@ -1080,7 +1080,7 @@ attr_action(unsigned action, const state_t *s, hid_t did, unsigned which) * H5T_NATIVE_UINT32 (-b) or * H5T_NATIVE_UINT32 (default) */ -static herr_t +static hbool_t add_attr(const state_t *s, hid_t did, unsigned int which) { hid_t aid = H5I_INVALID_HID; @@ -1140,7 +1140,7 @@ add_attr(const state_t *s, hid_t did, unsigned int which) if (val) HDfree(val); - return SUCCEED; + return true; error: H5E_BEGIN_TRY @@ -1153,14 +1153,14 @@ error: if (val) HDfree(val); - return FAIL; + return false; } /* add_attr() */ /* * Modify the attribute data. */ -static herr_t +static hbool_t modify_attr(const state_t *s, hid_t did, unsigned int which) { hid_t aid = H5I_INVALID_HID; @@ -1224,7 +1224,7 @@ modify_attr(const state_t *s, hid_t did, unsigned int which) if (val) HDfree(val); - return SUCCEED; + return true; error: H5E_BEGIN_TRY { @@ -1236,13 +1236,13 @@ error: if (val) HDfree(val); - return FAIL; + return false; } /* modify_attr() */ /* * Delete the attribute */ -static herr_t +static hbool_t delete_attr(hid_t did, unsigned int which) { char name[sizeof("attr-9999999999")]; @@ -1255,10 +1255,10 @@ delete_attr(hid_t did, unsigned int which) TEST_ERROR; } - return SUCCEED; + return true; error: - return FAIL; + return false; } /* delete_attr() */ @@ -1276,7 +1276,7 @@ error: * --[-c <csteps>] is 1 * --not applicable for -m option */ -static herr_t +static hbool_t verify_dsets_operations(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_config_t *config, np_state_t *np) { unsigned step; @@ -1360,11 +1360,11 @@ verify_dsets_operations(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_config_t *co } } - return SUCCEED; + return true; error: - return FAIL; + return false; } /* verify_dsets_operations() */ /* @@ -1373,7 +1373,7 @@ error: * -g: contiguous dataset * -k: 5 chunked datasets with 5 indexing types */ -static herr_t +static hbool_t verify_attr_dsets_action(unsigned action, const state_t *s, const dsets_state_t *ds, unsigned which) { int nerrors = 0; @@ -1465,7 +1465,7 @@ verify_attr_dsets_action(unsigned action, const state_t *s, const dsets_state_t /* * Verify the attribute action on the specified dataset. */ -static herr_t +static hbool_t verify_attr_action(unsigned action, hid_t did, unsigned which) { char name[sizeof("attr-9999999999")]; @@ -1496,7 +1496,7 @@ verify_attr_action(unsigned action, hid_t did, unsigned which) /* * Verify the attribute is added or modified */ -static herr_t +static hbool_t verify_add_or_modify_attr(unsigned action, hid_t did, char *attr_name, unsigned int which) { unsigned int read_which; @@ -1575,14 +1575,14 @@ error: if (is_vl) H5free_memory(read_vl_which); - return FAIL; + return false; } /* verify_add_or_modify_attr() */ /* * Verify the attribute does not exist. */ -static herr_t +static hbool_t verify_delete_attr(hid_t did, char *attr_name) { int ret; @@ -1592,14 +1592,14 @@ verify_delete_attr(hid_t did, char *attr_name) TEST_ERROR; } else if (!ret) /* attribute does not exist */ - ret = TRUE; + ret = true; else /* attribute exist */ - ret = FALSE; + ret = false; return ret; error: - return FAIL; + return false; } /* verify_delete_attr() */ @@ -1617,11 +1617,11 @@ error: * --`which` is at min_dense: dense storage, no continuation block * --`which` is at (min_dense - 1): compact storage, continuation block exists */ -static herr_t +static hbool_t verify_storage_cont(unsigned action, hid_t did, unsigned int which, unsigned max_compact, unsigned min_dense, unsigned asteps) { - hbool_t ret = TRUE; + hbool_t ret = true; HDassert(action == ADD_ATTR || action == DELETE_ATTR); @@ -1660,7 +1660,7 @@ verify_storage_cont(unsigned action, hid_t did, unsigned int which, unsigned max /* * Verify the storage condition at the specific checkpoint */ -static herr_t +static hbool_t verify_storage_cont_real(hid_t did, unsigned int which, unsigned cut_point) { H5O_native_info_t ninfo; @@ -1687,7 +1687,7 @@ verify_storage_cont_real(hid_t did, unsigned int which, unsigned cut_point) } error: - return FAIL; + return false; } /* verify_storage_cont_real() */ @@ -1698,7 +1698,7 @@ error: /* * Initialize the named pipes for test synchronization. */ -static herr_t +static hbool_t np_init(np_state_t *np, hbool_t writer) { *np = NP_INITIALIZER; @@ -1746,17 +1746,17 @@ np_init(np_state_t *np, hbool_t writer) TEST_ERROR; } - return SUCCEED; + return true; error: - return FAIL; + return false; } /* np_init() */ /* * Close the named pipes. */ -static herr_t +static hbool_t np_close(np_state_t *np, hbool_t writer) { /* Both the writer and reader close the named pipes */ @@ -1782,16 +1782,16 @@ np_close(np_state_t *np, hbool_t writer) TEST_ERROR; } } - return SUCCEED; + return true; error: - return FAIL; + return false; } /* np_close() */ /* * Writer synchronization depending on the result from the attribute action performed. */ -static herr_t +static hbool_t np_writer(hbool_t result, unsigned step, const state_t *s, np_state_t *np, H5F_vfd_swmr_config_t *config) { unsigned int i; @@ -1841,10 +1841,10 @@ np_writer(hbool_t result, unsigned step, const state_t *s, np_state_t *np, H5F_v } } } - return SUCCEED; + return true; error: - return FAIL; + return false; } /* np_writer() */ @@ -1852,7 +1852,7 @@ error: * * Reader synchronization depending on the result from the verification. */ -static herr_t +static hbool_t np_reader(hbool_t result, unsigned step, const state_t *s, np_state_t *np) { /* The verification fails */ @@ -1882,10 +1882,10 @@ np_reader(hbool_t result, unsigned step, const state_t *s, np_state_t *np) } } } - return SUCCEED; + return true; error: - return FAIL; + return false; } /* np_reader() */ @@ -1893,7 +1893,7 @@ error: * Handshake between writer and reader: * Confirm `verify` is same as `notify`. */ -static herr_t +static hbool_t np_confirm_verify_notify(int fd, unsigned step, const state_t *s, np_state_t *np) { if (step % s->csteps == 0) { @@ -1914,17 +1914,17 @@ np_confirm_verify_notify(int fd, unsigned step, const state_t *s, np_state_t *np } } - return SUCCEED; + return true; error: - return FAIL; + return false; } /* confirm_verify_notify() */ /* * Synchronization done by the reader before moving onto the * next verification phase. */ -static herr_t +static hbool_t np_reader_no_verification(const state_t *s, np_state_t *np, H5F_vfd_swmr_config_t *config) { if (s->use_np) { @@ -1946,10 +1946,10 @@ np_reader_no_verification(const state_t *s, np_state_t *np, H5F_vfd_swmr_config_ } } - return SUCCEED; + return true; error: - return FAIL; + return false; } /* np_reader_no_verification() */ @@ -1981,10 +1981,10 @@ main(int argc, char **argv) TEST_ERROR; } - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path - */ - init_vfd_swmr_config(&config, 4, 7, writer, TRUE, FALSE, TRUE, 128, "./attrdset-shadow", NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(&config, 4, 7, FALSE, writer, TRUE, FALSE, TRUE, 128, "./", "attrdset-shadow", NULL); /* 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) { diff --git a/test/vfd_swmr_bigset_writer.c b/test/vfd_swmr_bigset_writer.c index 71bd730..b647dd6 100644 --- a/test/vfd_swmr_bigset_writer.c +++ b/test/vfd_swmr_bigset_writer.c @@ -2580,22 +2580,32 @@ main(int argc, char **argv) continue; } - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + #ifdef H5_HAVE_AUX_PROCESS + /* If using the auxiliary process, the writer creates the updater files. * The reader uses the metadata file generated by the auxiliary process. */ if (s.writer) { - init_vfd_swmr_config(&config, s.tick_len, s.max_lag, s.writer, FALSE, TRUE, s.flush_raw_data, 128, - "./bigset-shadow-%zu", "bigset_updater", i); + init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, s.writer, FALSE, TRUE, s.flush_raw_data, 128, + "./", "bigset-shadow-%zu", "bigset_updater", i); } else { - init_vfd_swmr_config(&config, s.tick_len, s.max_lag, s.writer, TRUE, FALSE, s.flush_raw_data, 128, - "./mdfile", NULL); + init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, s.writer, TRUE, FALSE, s.flush_raw_data, 128, + "./", "mdfile", NULL); } #else - init_vfd_swmr_config(&config, s.tick_len, s.max_lag, s.writer, TRUE, FALSE, s.flush_raw_data, 128, - "./bigset-shadow-%zu", NULL, i); + + if(s.vds == vds_multi || s.vds == vds_single) { + init_vfd_swmr_config(&config, s.tick_len, s.max_lag, TRUE, s.writer, TRUE, FALSE, s.flush_raw_data, 128, + "", "", NULL); + } else { + init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, s.writer, TRUE, FALSE, s.flush_raw_data, 128, + "./", "bigset-shadow-%zu", NULL, i); + } + #endif /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ 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); diff --git a/test/vfd_swmr_common.h b/test/vfd_swmr_common.h index 4fd45b4..0453d91 100644 --- a/test/vfd_swmr_common.h +++ b/test/vfd_swmr_common.h @@ -74,10 +74,11 @@ H5TEST_DLL hid_t vfd_swmr_create_fapl(bool use_latest_format, bool use_vfd_swmr, 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 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, ...) H5_ATTR_FORMAT(printf, 9, 11); + 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, ...) H5_ATTR_FORMAT(printf, 11, 13); H5TEST_DLL void init_vfd_swmr_log(H5F_vfd_swmr_config_t *config, const char *log_file_fmtstr, ...) H5_ATTR_FORMAT(printf, 2, 3); diff --git a/test/vfd_swmr_dsetchks_writer.c b/test/vfd_swmr_dsetchks_writer.c index caaad1b..0acacce 100644 --- a/test/vfd_swmr_dsetchks_writer.c +++ b/test/vfd_swmr_dsetchks_writer.c @@ -2308,10 +2308,11 @@ main(int argc, char **argv) TEST_ERROR; } - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(&config, 4, 7, writer, TRUE, FALSE, s.flush_raw_data, 128, "./dsetchks-shadow", - NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(&config, 4, 7, FALSE, writer, TRUE, FALSE, s.flush_raw_data, 128, + "./", "dsetchks-shadow", NULL); /* 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) { diff --git a/test/vfd_swmr_dsetops_writer.c b/test/vfd_swmr_dsetops_writer.c index 8ef0962..bce1d08 100644 --- a/test/vfd_swmr_dsetops_writer.c +++ b/test/vfd_swmr_dsetops_writer.c @@ -2228,9 +2228,10 @@ main(int argc, char **argv) TEST_ERROR; } - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(&config, 4, 7, writer, TRUE, FALSE, s.flush_raw_data, 128, "./dsetops-shadow", NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(&config, 4, 7, FALSE, writer, TRUE, FALSE, s.flush_raw_data, 128, "./", "dsetops-shadow", NULL); /* 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) { diff --git a/test/vfd_swmr_generator.c b/test/vfd_swmr_generator.c index a78abbc..e002b4d 100644 --- a/test/vfd_swmr_generator.c +++ b/test/vfd_swmr_generator.c @@ -125,9 +125,10 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t vfd_swmr_write, int if ((config = HDcalloc(1, sizeof(*config))) == NULL) return -1; - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config, 4, 10, vfd_swmr_write, TRUE, FALSE, TRUE, 128, "generator-shadow", NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config, 4, 10, FALSE, vfd_swmr_write, TRUE, FALSE, TRUE, 128, NULL, "generator-shadow", NULL); } /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ diff --git a/test/vfd_swmr_gfail_writer.c b/test/vfd_swmr_gfail_writer.c index 27d6c31..fc3bcb0 100644 --- a/test/vfd_swmr_gfail_writer.c +++ b/test/vfd_swmr_gfail_writer.c @@ -544,10 +544,11 @@ main(int argc, char **argv) TEST_ERROR; } - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(&config, s.tick_len, s.max_lag, writer, TRUE, FALSE, TRUE, 128, "./group-shadow", - NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, writer, TRUE, FALSE, TRUE, 128, + "./", "group-shadow", NULL); /* If old-style option is chosen, use the earliest file format(H5F_LIBVER_EARLIEST) * as the second parameter of H5Pset_libver_bound() that is called by diff --git a/test/vfd_swmr_gperf_writer.c b/test/vfd_swmr_gperf_writer.c index 66fd22f..a1f3ff1 100644 --- a/test/vfd_swmr_gperf_writer.c +++ b/test/vfd_swmr_gperf_writer.c @@ -2804,10 +2804,11 @@ main(int argc, char **argv) return EXIT_SUCCESS; } - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(&config, s.tick_len, s.max_lag, writer, TRUE, FALSE, FALSE, 128, "./group-shadow", - NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, writer, TRUE, FALSE, FALSE, 128, + "./", "group-shadow", NULL); /* If the log flag is on, create the log file log-test under the current directory. */ if (s.glog == true) diff --git a/test/vfd_swmr_group_writer.c b/test/vfd_swmr_group_writer.c index 53c9cec..50e0535 100644 --- a/test/vfd_swmr_group_writer.c +++ b/test/vfd_swmr_group_writer.c @@ -5003,10 +5003,11 @@ main(int argc, char **argv) TEST_ERROR; } - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(&config, s.tick_len, s.max_lag, writer, TRUE, FALSE, TRUE, 128, "./group-shadow", - NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, writer, TRUE, FALSE, TRUE, 128, + "./", "group-shadow", NULL); /* If old-style option is chosen, use the earliest file format(H5F_LIBVER_EARLIEST) * as the second parameter of H5Pset_libver_bound() that is called by diff --git a/test/vfd_swmr_indep_rw_writer.c b/test/vfd_swmr_indep_rw_writer.c index fae4d82..97bb9b1 100644 --- a/test/vfd_swmr_indep_rw_writer.c +++ b/test/vfd_swmr_indep_rw_writer.c @@ -359,14 +359,16 @@ error: * for the VFD SMWR independence of the reader/writer test. */ static hbool_t -indep_init_vfd_swmr_config_plist(state_t *s, hbool_t writer, const char *mdf_path) +indep_init_vfd_swmr_config_plist(state_t *s, hbool_t writer, const char *mdf_name) { H5F_vfd_swmr_config_t config; - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(&config, s->tick_len, s->max_lag, writer, TRUE, FALSE, TRUE, 128, mdf_path, NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(&config, s->tick_len, s->max_lag, FALSE, writer, TRUE, FALSE, TRUE, 128, + "./", mdf_name, NULL); /* Pass the use_vfd_swmr, only_meta_page, page buffer size, config to vfd_swmr_create_fapl().*/ if ((s->fapl = vfd_swmr_create_fapl(TRUE, s->use_vfd_swmr, TRUE, s->pbs, &config)) < 0) { @@ -645,7 +647,7 @@ main(int argc, char **argv) if (s.first_proc) { writer = TRUE; - if (FALSE == indep_init_vfd_swmr_config_plist(&s, writer, "./file1-shadow")) { + if (FALSE == indep_init_vfd_swmr_config_plist(&s, writer, "file1-shadow")) { HDfprintf(stderr, "Writer: Cannot initialize file property lists for file %s\n", s.filename[0]); TEST_ERROR; } @@ -678,7 +680,7 @@ main(int argc, char **argv) } writer = FALSE; - if (FALSE == indep_init_vfd_swmr_config_plist(&s, writer, "./file2-shadow")) { + if (FALSE == indep_init_vfd_swmr_config_plist(&s, writer, "file2-shadow")) { HDfprintf(stderr, "Reader: Cannot initialize file property lists for file %s\n", s.filename[1]); TEST_ERROR; } @@ -715,7 +717,7 @@ main(int argc, char **argv) * then writes a dataset in the second file for the first process to read. */ writer = FALSE; - if (FALSE == indep_init_vfd_swmr_config_plist(&s, writer, "./file1-shadow")) { + if (FALSE == indep_init_vfd_swmr_config_plist(&s, writer, "file1-shadow")) { HDfprintf(stderr, "Reader: Cannot initialize file property lists for file %s\n", s.filename[0]); TEST_ERROR; } @@ -737,7 +739,7 @@ main(int argc, char **argv) } writer = TRUE; - if (FALSE == indep_init_vfd_swmr_config_plist(&s, writer, "./file2-shadow")) { + if (FALSE == indep_init_vfd_swmr_config_plist(&s, writer, "file2-shadow")) { HDfprintf(stderr, "writer: Cannot initialize file property lists for file %s\n", s.filename[1]); TEST_ERROR; } diff --git a/test/vfd_swmr_reader.c b/test/vfd_swmr_reader.c index 153048c..2e918b0 100644 --- a/test/vfd_swmr_reader.c +++ b/test/vfd_swmr_reader.c @@ -319,9 +319,10 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned goto error; } - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config, 4, 5, FALSE, TRUE, FALSE, TRUE, 128, "rw-shadow", NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config, 4, 5, FALSE, FALSE, TRUE, FALSE, TRUE, 128, NULL, "rw-shadow", NULL); /* 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) { diff --git a/test/vfd_swmr_remove_reader.c b/test/vfd_swmr_remove_reader.c index 9c684f5..9b73adc 100644 --- a/test/vfd_swmr_remove_reader.c +++ b/test/vfd_swmr_remove_reader.c @@ -303,9 +303,10 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, uns if ((config = HDcalloc(1, sizeof(*config))) == NULL) goto error; - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config, 4, 5, FALSE, TRUE, FALSE, TRUE, 128, "rw-shadow", NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config, 4, 5, FALSE, FALSE, TRUE, FALSE, TRUE, 128, NULL, "rw-shadow", NULL); /* 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) { diff --git a/test/vfd_swmr_remove_writer.c b/test/vfd_swmr_remove_writer.c index 1e40a18..72209f8 100644 --- a/test/vfd_swmr_remove_writer.c +++ b/test/vfd_swmr_remove_writer.c @@ -86,9 +86,10 @@ open_skeleton(const char *filename, unsigned verbose, unsigned old H5_ATTR_UNUSE if ((config = (H5F_vfd_swmr_config_t *)HDcalloc(1, sizeof(H5F_vfd_swmr_config_t))) == NULL) goto error; - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config, 4, 5, TRUE, TRUE, FALSE, TRUE, 128, "rw-shadow", NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config, 4, 5, FALSE, TRUE, TRUE, FALSE, TRUE, 128, NULL, "rw-shadow", NULL); /* 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) diff --git a/test/vfd_swmr_sparse_reader.c b/test/vfd_swmr_sparse_reader.c index 1d9557c..2f7856c 100644 --- a/test/vfd_swmr_sparse_reader.c +++ b/test/vfd_swmr_sparse_reader.c @@ -207,9 +207,10 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords, uns if ((config = HDcalloc(1, sizeof(H5F_vfd_swmr_config_t))) == NULL) goto error; - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config, 4, 5, FALSE, TRUE, FALSE, TRUE, 128, "rw-shadow", NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config, 4, 5, FALSE, FALSE, TRUE, FALSE, TRUE, 128, NULL, "rw-shadow", NULL); /* 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) { diff --git a/test/vfd_swmr_sparse_writer.c b/test/vfd_swmr_sparse_writer.c index 0d521b7..a233bb3 100644 --- a/test/vfd_swmr_sparse_writer.c +++ b/test/vfd_swmr_sparse_writer.c @@ -86,9 +86,10 @@ open_skeleton(const char *filename, unsigned verbose) if ((config = (H5F_vfd_swmr_config_t *)HDcalloc(1, sizeof(H5F_vfd_swmr_config_t))) == NULL) goto error; - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config, 4, 5, TRUE, TRUE, FALSE, TRUE, 128, "rw-shadow", NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config, 4, 5, FALSE, TRUE, TRUE, FALSE, TRUE, 128, NULL, "rw-shadow", NULL); /* 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) diff --git a/test/vfd_swmr_vlstr_reader.c b/test/vfd_swmr_vlstr_reader.c index cbcc6c0..406f13b 100644 --- a/test/vfd_swmr_vlstr_reader.c +++ b/test/vfd_swmr_vlstr_reader.c @@ -115,9 +115,10 @@ main(int argc, char **argv) if (argc > 0) errx(EXIT_FAILURE, "unexpected command-line arguments"); - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(&config, 4, 7, FALSE, TRUE, FALSE, TRUE, 128, "./vlstr-shadow", NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(&config, 4, 7, FALSE, false, TRUE, FALSE, TRUE, 128, "./", "vlstr-shadow", NULL); /* 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); diff --git a/test/vfd_swmr_vlstr_writer.c b/test/vfd_swmr_vlstr_writer.c index 682e86a..6a747a2 100644 --- a/test/vfd_swmr_vlstr_writer.c +++ b/test/vfd_swmr_vlstr_writer.c @@ -152,10 +152,10 @@ main(int argc, char **argv) if (argc > 0) errx(EXIT_FAILURE, "unexpected command-line arguments"); - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path - */ - init_vfd_swmr_config(&config, 4, 7, TRUE, TRUE, FALSE, TRUE, 128, "./vlstr-shadow", NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(&config, 4, 7, FALSE, true, TRUE, FALSE, TRUE, 128, "./", "vlstr-shadow", NULL); /* 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); diff --git a/test/vfd_swmr_writer.c b/test/vfd_swmr_writer.c index eeceb49..ba9938f 100644 --- a/test/vfd_swmr_writer.c +++ b/test/vfd_swmr_writer.c @@ -87,9 +87,10 @@ open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file, unsigne if ((config = (H5F_vfd_swmr_config_t *)HDcalloc(1, sizeof(H5F_vfd_swmr_config_t))) == NULL) return -1; - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(config, 4, 5, TRUE, TRUE, FALSE, TRUE, 128, "rw-shadow", NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(config, 4, 5, FALSE, TRUE, TRUE, FALSE, TRUE, 128, NULL, "rw-shadow", NULL); /* 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) diff --git a/test/vfd_swmr_zoo_writer.c b/test/vfd_swmr_zoo_writer.c index 32726f7..a040fca 100644 --- a/test/vfd_swmr_zoo_writer.c +++ b/test/vfd_swmr_zoo_writer.c @@ -475,9 +475,10 @@ main(int argc, char **argv) parse_command_line_options(argc, argv); - /* config, tick_len, max_lag, writer, maintain_metadata_file, generate_updater_files, - * flush_raw_data, md_pages_reserved, md_file_path, updater_file_path */ - init_vfd_swmr_config(&vfd_swmr_config, TICK_LEN, 7, writer, TRUE, FALSE, TRUE, 128, "./zoo-shadow", NULL); + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ + init_vfd_swmr_config(&vfd_swmr_config, TICK_LEN, 7, FALSE, writer, TRUE, FALSE, TRUE, 128, "./", "zoo-shadow", NULL); /* ? 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, page_buf_size, config */ |