diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-05-23 20:47:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-23 20:47:24 (GMT) |
commit | 68abd201b2aa56cbc5c7bfee99bcb8d9612eb73a (patch) | |
tree | b57fb9902cbcd2fb9abcdaa7321ec1420060067f /test/accum_swmr_reader.c | |
parent | ee919605677bd89ac7a541b137f048a5596b2899 (diff) | |
download | hdf5-68abd201b2aa56cbc5c7bfee99bcb8d9612eb73a.zip hdf5-68abd201b2aa56cbc5c7bfee99bcb8d9612eb73a.tar.gz hdf5-68abd201b2aa56cbc5c7bfee99bcb8d9612eb73a.tar.bz2 |
Fix missing/misplaced h5_reset calls (#3001)
Fixes failures when running tests after building with thread-safety
w/ code stacks on.
Fixes #2990
Diffstat (limited to 'test/accum_swmr_reader.c')
-rw-r--r-- | test/accum_swmr_reader.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/accum_swmr_reader.c b/test/accum_swmr_reader.c index 1269c5a..b667b07 100644 --- a/test/accum_swmr_reader.c +++ b/test/accum_swmr_reader.c @@ -35,17 +35,14 @@ const char *FILENAME[] = {"accum", "accum_swmr_big", NULL}; * * Return: Success: EXIT_SUCCESS * Failure: EXIT_FAILURE - * - * Programmer: Vailin Choi; June 2013 - * *------------------------------------------------------------------------- */ int main(void) { - hid_t fid = -1; /* File ID */ - hid_t fapl = -1; /* file access property list ID */ - H5F_t *f = NULL; /* File pointer */ + hid_t fid = H5I_INVALID_HID; /* File ID */ + hid_t fapl = H5I_INVALID_HID; /* 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 */ @@ -53,6 +50,9 @@ main(void) char *driver = NULL; /* VFD string (from env variable) */ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ + /* Testing setup */ + h5_reset(); + /* Skip this test if SWMR I/O is not supported for the VFD specified * by the environment variable. */ |