summaryrefslogtreecommitdiffstats
path: root/test/accum.c
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2021-03-10 21:26:16 (GMT)
committerGitHub <noreply@github.com>2021-03-10 21:26:16 (GMT)
commitc6a2cc29f3623af0ab9cc7a80922d7ef6502e7a8 (patch)
tree425593eb1c158c872edb465433078e4e67092c87 /test/accum.c
parent93526f1e76148c56818fd3deca5c13d9c9dad2c5 (diff)
downloadhdf5-c6a2cc29f3623af0ab9cc7a80922d7ef6502e7a8.zip
hdf5-c6a2cc29f3623af0ab9cc7a80922d7ef6502e7a8.tar.gz
hdf5-c6a2cc29f3623af0ab9cc7a80922d7ef6502e7a8.tar.bz2
Hdf5 merge issue 435 (#460)
* Snapshot version 1.12 release 1-3. Update version to 1.12.1-4. * First cut of the H5 public API documentation. (#80) * First cut of the H5 public API documentation. * Added H5Z "bonus track." * Applied Quincey's patch. * Added the missing patches from Quincey's original patch. * H5PL (complete) and basic H5VL API documentation. * Added H5I API docs. * Added H5L API docs. * First installment from Elena's H5T batch. * Second installment of Elena's H5T batch. * Final installment of Elena's H5T batch. * Full set of current H5F documentation. (#105) * First cut of the H5 public API documentation. * Added H5Z "bonus track." * Applied Quincey's patch. * Added the missing patches from Quincey's original patch. * H5PL (complete) and basic H5VL API documentation. * Added H5I API docs. * Added H5L API docs. * First installment from Elena's H5T batch. * Second installment of Elena's H5T batch. * Final installment of Elena's H5T batch. * Migrated documentation for SWMR functions. * Catching up on MDC functions. * Integrated the H5F MDC function documentation. * Added MDC and parallel H5F functions. * Slightly updated main page. * Added doxygen/dox/H5AC_cache_config_t.dox to MANIFEST. * Doxygen - added (mostly) beginner functions (#112) * Doxygen - added (mostly) beginner functions * Removed duplicate H5Pset_szip function * Add src/H5module.h to MANIFEST. * close #195. (#196) * Update HDF5PluginMacros.cmake * Update HDF5PluginMacros.cmake * Avoid aligned access for references by decoding into temporary buffer and then copying the result into the actual buffer. Update test to be more thorough with using compound datatype fields everywhere. (#206) * Modify temporary rpath for testing in java example scripts. (#230) * Fix undefined left shifting of negative numbers (#338) Undefined Bahavior Sanitizer errored here about left shifting negative numbers. * Fixes various warnings noticed on Windows (#425) * Fixes various warnings noticed on Windows - Adds a prototype for our implementation of vasprintf - Return type of H5_get_utf16_str() is now non-const - Fixes possible uninitialized return type in Wremove_utf8 - Better isolation of fork() code in accum.c:test_swmr_write_big() - Better isolation of non-zlib code in dsets.c:test_filter_delete() - Removed unused variable in trefer.c:test_reference_cmpnd_obj() * Fixes clang-format issues * Fixed clang-tidy readability-misleading-indentation warnings (#427) * Fixed clang-tidy readability-misleading-indentation warnings * Reformatted src/H5Zscaleoffset.c with clang v10.0.1. Co-authored-by: Larry Knox <lrknox@hdfgroup.org> * Fixed clang-tidy readability-redundant-control-flow warnings (#428) * Fixed clang-tidy readability-redundant-control-flow warnings Just removed useless trailing return statements. * Removed blank lines from h5diffgentest.c with clang-format v10.0.1. Co-authored-by: Larry Knox <lrknox@hdfgroup.org> * Removed bad function pointer casts (#434) * Removed bad function pointer casts In one case fixed the actual function signature to be correct. * Reformat source with clang v10.0.1. Co-authored-by: Larry Knox <lrknox@hdfgroup.org> * fix block coordinate printing example (#437) Co-authored-by: Gerd Heber <gheber@hdfgroup.org> Co-authored-by: bljhdf <58825073+bljhdf@users.noreply.github.com> Co-authored-by: H. Joe Lee <hyoklee@hdfgroup.org> Co-authored-by: Quincey Koziol <quincey@koziol.cc> Co-authored-by: Sean McBride <sean@rogue-research.com> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Mike Smith <grimbough@gmail.com>
Diffstat (limited to 'test/accum.c')
-rw-r--r--test/accum.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/test/accum.c b/test/accum.c
index 1f09fe0..fd97576 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -2092,6 +2092,7 @@ error:
unsigned
test_swmr_write_big(hbool_t newest_format)
{
+#if defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID) && defined(H5_HAVE_UNISTD_H)
hid_t fid = -1; /* File ID */
hid_t fapl = -1; /* File access property list */
H5F_t * rf = NULL; /* File pointer */
@@ -2099,26 +2100,16 @@ test_swmr_write_big(hbool_t newest_format)
uint8_t *wbuf2 = NULL, *rbuf = NULL; /* Buffers for reading & writing */
uint8_t wbuf[1024]; /* Buffer for reading & writing */
unsigned u; /* Local index variable */
-#ifdef H5_HAVE_UNISTD_H
- pid_t pid; /* Process ID */
-#endif /* H5_HAVE_UNISTD_H */
- int status; /* Status returned from child process */
- char * driver = NULL; /* VFD string (from env variable) */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ pid_t pid; /* Process ID */
+ int status; /* Status returned from child process */
+ char * driver = NULL; /* VFD string (from env variable) */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
if (newest_format)
TESTING("SWMR write of large metadata: with latest format")
else
TESTING("SWMR write of large metadata: with non-latest-format")
-#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID))
-
- SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
- return 0;
-
-#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */
-
/* Skip this test if SWMR I/O is not supported for the VFD specified
* by the environment variable.
*/
@@ -2296,7 +2287,11 @@ error:
return 1;
-#endif
+#else
+ SKIPPED();
+ HDputs(" Test skipped due to fork, waitpid, or pid_t not defined.");
+ return 0;
+#endif /* defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID) && defined(H5_HAVE_UNISTD_H) */
} /* end test_swmr_write_big() */