summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-06-06 13:44:33 (GMT)
committerGitHub <noreply@github.com>2023-06-06 13:44:33 (GMT)
commit4c57a5b06417e823eef153ae306a6ce06bd907ee (patch)
treedc0784d24d72b44e4b25797bec8f000496c9886f /test
parentb5b1f4c7dfcc4a40af7c6c8ab1c89e49054f33c6 (diff)
downloadhdf5-4c57a5b06417e823eef153ae306a6ce06bd907ee.zip
hdf5-4c57a5b06417e823eef153ae306a6ce06bd907ee.tar.gz
hdf5-4c57a5b06417e823eef153ae306a6ce06bd907ee.tar.bz2
Bring key changesets from develop (#3052)
* Bump GitHub action macOS version to 13 (#2999, #3009) * Bump GitHub action gcc/g++/gfortran version to 12 (#3015) * Bump Autoconf version to 2.71 (#2944) * Fix missing h5_reset() calls in accum test (#3001) * Only run ttsafe in GitHub thread-safe actions (#2777) * Fix Java debug asserts on Windows (#3012) * Fix long double dt_arith bug on macOS (#3038)
Diffstat (limited to 'test')
-rw-r--r--test/accum_swmr_reader.c12
-rw-r--r--test/swmr.c22
2 files changed, 17 insertions, 17 deletions
diff --git a/test/accum_swmr_reader.c b/test/accum_swmr_reader.c
index aca9db4..a7898c4 100644
--- a/test/accum_swmr_reader.c
+++ b/test/accum_swmr_reader.c
@@ -34,17 +34,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 */
@@ -52,6 +49,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.
*/
diff --git a/test/swmr.c b/test/swmr.c
index acac2ae..bbd55f0 100644
--- a/test/swmr.c
+++ b/test/swmr.c
@@ -7728,12 +7728,15 @@ error:
int
main(void)
{
- int nerrors = 0; /* The # of errors */
- hid_t fapl = -1; /* File access property list ID */
- char *driver = NULL; /* VFD string (from env variable) */
- char *lock_env_var = NULL; /* file locking env var pointer */
- hbool_t use_file_locking; /* read from env var */
- hbool_t file_locking_enabled = FALSE; /* Checks if the file system supports locks */
+ int nerrors = 0; /* The # of errors */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ char *driver = NULL; /* VFD string (from env variable) */
+ char *lock_env_var = NULL; /* file locking env var pointer */
+ hbool_t use_file_locking; /* read from env var */
+ hbool_t file_locking_enabled = FALSE; /* Checks if the file system supports locks */
+
+ /* Testing setup */
+ h5_reset();
/* Skip this test if SWMR I/O is not supported for the VFD specified
* by the environment variable.
@@ -7742,7 +7745,7 @@ main(void)
if (!H5FD__supports_swmr_test(driver)) {
HDprintf("This VFD does not support SWMR I/O\n");
return EXIT_SUCCESS;
- } /* end if */
+ }
/* Check the environment variable that determines if we care
* about file locking. File locking should be used unless explicitly
@@ -7761,9 +7764,6 @@ main(void)
return EXIT_FAILURE;
}
- /* Set up */
- h5_reset();
-
/* Get file access property list */
fapl = h5_fileaccess();
@@ -7822,7 +7822,7 @@ main(void)
*/
nerrors += test_file_lock_swmr_same(fapl);
nerrors += test_file_lock_swmr_concur(fapl);
- } /* end if */
+ }
/* Tests SWMR VFD compatibility flag.
* Only needs to run when the VFD is the default (sec2).