summaryrefslogtreecommitdiffstats
path: root/test/vfd_swmr.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-12-18 21:26:40 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-12-18 21:26:40 (GMT)
commit941daa6b0727d65026fae9fbe740bc82fce73e48 (patch)
treec721a4efb537e35fb2f19a992491004b78cb1977 /test/vfd_swmr.c
parent1a55342b3eb0721452032d9d935d20578b5d06b5 (diff)
downloadhdf5-941daa6b0727d65026fae9fbe740bc82fce73e48.zip
hdf5-941daa6b0727d65026fae9fbe740bc82fce73e48.tar.gz
hdf5-941daa6b0727d65026fae9fbe740bc82fce73e48.tar.bz2
In the faked-up shadow-index entries, assign independent page numbers in the
HDF5 file and in the shadow file. I had added assertions that the page numbers were unique, and this caused those assertions to fail. I don't know if I'll keep the assertions, but this is an inexpensive change that makes the test more realistic.
Diffstat (limited to 'test/vfd_swmr.c')
-rw-r--r--test/vfd_swmr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/vfd_swmr.c b/test/vfd_swmr.c
index e4c6930..d88f6ce 100644
--- a/test/vfd_swmr.c
+++ b/test/vfd_swmr.c
@@ -883,8 +883,8 @@ test_writer_md(void)
/* (A) Construct index for updating the metadata file */
for(i = 0; i < num_entries; i++) {
- index[i].hdf5_page_offset = (uint64_t)my_config->md_pages_reserved;
- index[i].md_file_page_offset = 0;
+ index[i].hdf5_page_offset = 3 + 7 * i;
+ index[i].md_file_page_offset = 1 + (num_entries - i) * 5;
index[i].length = (uint32_t)FS_PAGE_SIZE;
index[i].entry_ptr = (void *)&buf[i];
}
@@ -1499,8 +1499,8 @@ test_reader_md_concur(void)
/* Construct index for updating the metadata file */
for(i = 0; i < num_entries; i++) {
- index[i].hdf5_page_offset = (uint64_t)config_writer->md_pages_reserved;
- index[i].md_file_page_offset = 0;
+ index[i].hdf5_page_offset = 3 + 7 * i;
+ index[i].md_file_page_offset = 1 + (num_entries - i) * 5;
index[i].length = (uint32_t)FS_PAGE_SIZE;
index[i].entry_ptr = (void *)&buf[i];
}