summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-08-21 14:46:30 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-08-21 14:46:30 (GMT)
commitbcf91a09df826ec3e01ade807a3e9bff70c30703 (patch)
treebb27882157ebcd4ab5f2742718f31f0aca3945af /test
parentcd9c80925e1612cf7a4c996fef99dc8632b8b520 (diff)
downloadhdf5-bcf91a09df826ec3e01ade807a3e9bff70c30703.zip
hdf5-bcf91a09df826ec3e01ade807a3e9bff70c30703.tar.gz
hdf5-bcf91a09df826ec3e01ade807a3e9bff70c30703.tar.bz2
Derive the name of the shadow file from the HDF5 file: drop the .h5, add
.shadow.
Diffstat (limited to 'test')
-rw-r--r--test/page_buffer.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/test/page_buffer.c b/test/page_buffer.c
index 6b6de02..10db2e9 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -127,17 +127,23 @@ swmr_fapl_augment(hid_t fapl, const char *filename, uint32_t max_lag)
, .writer = true
, .md_pages_reserved = 128
};
- const char *dname;
- char *tname;
+ const char *bname, *dname;
+ char *tname[2];
- if ((tname = strdup(filename)) == NULL) {
+ if ((tname[0] = strdup(filename)) == NULL) {
HDfprintf(stderr, "temporary string allocation failed\n");
return -1;
}
- dname = dirname(tname);
+ if ((tname[1] = strdup(filename)) == NULL) {
+ HDfprintf(stderr, "temporary string allocation failed\n");
+ return -1;
+ }
+ dname = dirname(tname[0]);
+ bname = basename(tname[1]);
snprintf(config.md_file_path, sizeof(config.md_file_path),
- "%s/my_md_file", dname);
- free(tname);
+ "%s/%s.shadow", dname, bname);
+ free(tname[0]);
+ free(tname[1]);
/* Enable VFD SWMR configuration */
if(H5Pset_vfd_swmr_config(fapl, &config) < 0) {