summaryrefslogtreecommitdiffstats
path: root/test/accum_swmr_reader.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2019-01-06 05:06:45 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2019-01-06 05:06:45 (GMT)
commit92300f954fec70b3018182defab6933bf6f4bc88 (patch)
treee06729c237cfe05c5ef6dcaaf4091d395b076012 /test/accum_swmr_reader.c
parent0e34f0feaaeb6d2286f87f695f25fae45c070a42 (diff)
downloadhdf5-92300f954fec70b3018182defab6933bf6f4bc88.zip
hdf5-92300f954fec70b3018182defab6933bf6f4bc88.tar.gz
hdf5-92300f954fec70b3018182defab6933bf6f4bc88.tar.bz2
Corrected comment in src/H5VLint.c, fixed pass-through info size in
src/H5VLpassthru.c, switched to stashing VOL connector ID & info in API context (in src/H5CX.c, src/H5CXprivate.h, src/H5F.c, src/H5Fint.c, and src/H5Fefc.c), patched up all sorts of issues in the tests, to make them work with 'check-vfd' (and 'check-vol' again).
Diffstat (limited to 'test/accum_swmr_reader.c')
-rw-r--r--test/accum_swmr_reader.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/test/accum_swmr_reader.c b/test/accum_swmr_reader.c
index 16e0ddc..ac48a13 100644
--- a/test/accum_swmr_reader.c
+++ b/test/accum_swmr_reader.c
@@ -23,7 +23,12 @@
#include "H5VLprivate.h" /* Virtual Object Layer */
/* Filename: this is the same as the define in accum.c used by test_swmr_write_big() */
-#define SWMR_FILENAME "accum_swmr_big.h5"
+const char *FILENAME[] = {
+ "accum",
+ "accum_swmr_big",
+ NULL
+};
+
/*-------------------------------------------------------------------------
@@ -47,6 +52,7 @@ main(void)
hid_t fid = -1; /* File ID */
hid_t fapl = -1; /* file access property list ID */
H5F_t *f = NULL; /* File pointer */
+ char filename[1024];
unsigned u; /* Local index variable */
uint8_t rbuf[1024]; /* Buffer for reading */
uint8_t buf[1024]; /* Buffer for holding the expected data */
@@ -68,10 +74,11 @@ main(void)
if((fapl = h5_fileaccess()) < 0)
FAIL_STACK_ERROR
+ h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
/* Open the file with SWMR_READ */
- if((fid = H5Fopen(SWMR_FILENAME, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- FAIL_STACK_ERROR
+ if((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
+ FAIL_STACK_ERROR
/* Push API context */
if(H5CX_push() < 0) FAIL_STACK_ERROR
@@ -79,21 +86,21 @@ main(void)
/* Get H5F_t * to internal file structure */
if(NULL == (f = (H5F_t *)H5VL_object(fid)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* Should read in [1024, 2024] with buf data */
if(H5F_block_read(f, H5FD_MEM_DEFAULT, (haddr_t)1024, (size_t)1024, rbuf) < 0)
- FAIL_STACK_ERROR;
+ FAIL_STACK_ERROR;
/* Verify the data read is correct */
if(HDmemcmp(buf, rbuf, (size_t)1024) != 0)
- TEST_ERROR;
+ TEST_ERROR;
/* CLose the file */
if(H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR;
+ FAIL_STACK_ERROR;
if(H5Fclose(fid) < 0)
- FAIL_STACK_ERROR;
+ FAIL_STACK_ERROR;
/* Pop API context */
if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR