summaryrefslogtreecommitdiffstats
path: root/test/vfd_swmr_check_compat.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-05-28 19:04:18 (GMT)
committerGitHub <noreply@github.com>2021-05-28 19:04:18 (GMT)
commit62868dabe1010a7b73a37fc7020ab19ced7571a7 (patch)
tree82343779ab037bf4b98fb2d275902458b5834b32 /test/vfd_swmr_check_compat.c
parentf86004dbde46d4aff365cc7d0a5c503ff60d3416 (diff)
downloadhdf5-62868dabe1010a7b73a37fc7020ab19ced7571a7.zip
hdf5-62868dabe1010a7b73a37fc7020ab19ced7571a7.tar.gz
hdf5-62868dabe1010a7b73a37fc7020ab19ced7571a7.tar.bz2
Parallel updates and fixes for VFD SWMR (#705)
* Brings CMake updates from develop * Brings reduction in pedantic casts from develop * Purges UFAIL from the library (#637) * Committing clang-format changes * Purges UFAIL from the library * H5HL_insert change requested in PR Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Removes gratuitous (double)x.yF casts (#632) * Committing clang-format changes * Removes gratuitous (double)x.yF casts * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Committing clang-format changes * Cleans up a const warning left over from previous constification (#633) * Committing clang-format changes * Adds consts to a few global variables * Cleans up a const warning left over from previous constification Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Formatted source * Bring over some VOL registration changes * VOL cleanup * H5VL_request_status_t substitutions * H5F.c cleanup * Minor API tweaks from develop * Moves H5G package init/teardown to H5Gint.c * H5G cleanup * H5M cleanup * H5SM cleanup * H5T cleanup * H5R cleanup * H5Lpublic.h cleanup * H5L cleanup * H5O cleanup * H5A, H5CS, and H5AC cleanup * Moved H5A init/teardown code to H5Aint.c * Moves H5D I/O functions to H5D.c * H5D cleanup * Misc minor cleanup * H5P close cleanup * H5Tpublic.h cleanup * Fixes err_compat test * H5PLpublic.h cleanup * Updates H5Ppublic.h * H5Fpublic.h updates * H5A.c cleanup * Brings over H5Aexists and related changes * Brings CMake shell testing changes from develop * Close callback changes * H5R and H5Tcommit normalization * err_compat test works now * H5O tweaks * Updates VOL registration code * Brings over H5VL_create_object * H5Tconv.c reformatting * H5T.c tweaks * Brings datatype and reference updates from develop * Brings VOL plugin loading changes from develop * Brings event sets from develop * Brings async functions over * Tools changes * Brings over many tools changes from develop * Brings VOL flags from develop * Fixes h5dump double/float tests * Updates h5repack tests * Brings h5diff test changes from develop * Last h5dump changes * Brings test changes from develop * Committing clang-format changes * Tidied h5_testing() * Brings chunk iteration code + misc from develop * Updates vds test * Enables external link parallel test * Brings updated property lists from develop * H5G changes from develop * H5MF cleanup * Brings vfd_swmr test back into CMake * Updates threadsafe test * Updates plist test * Brings recent changes from develop * Require a C++11 compiler to build the C++ wrappers (#693) * Committing clang-format changes * Requires a C++11 compiler to build the C++ wrappers Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Fix H5FD_mpio_Debug="rw" can report MPI_count instead of bytes (#699) * Removes pre-C99 build and header cruft (#700) * Assumes ANSI C headers exist * Assumes stdbool.h, stdint.h, and inttypes.h are present * Assumes the C++ compiler can handle stdint.h * Removes all work-arounds for missing functionality, especially stdbool.h Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Updates release documents * Brings parallel changes from develop * Adds a VFD/parallel check program for the VFD SWMR shell test * Updates MANIFEST * Disable building VFD SWMR acceptance tests on CMake * Removes err.h from genall5.c Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'test/vfd_swmr_check_compat.c')
-rw-r--r--test/vfd_swmr_check_compat.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/test/vfd_swmr_check_compat.c b/test/vfd_swmr_check_compat.c
new file mode 100644
index 0000000..dec88c5
--- /dev/null
+++ b/test/vfd_swmr_check_compat.c
@@ -0,0 +1,62 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/* Purpose: This is a small program that checks if the HDF5_DRIVER
+ * environment variable is set to a value that supports VFD SWMR.
+ *
+ * Also checks to see if this is a parallel build, as VFD SWMR
+ * and parallel HDF5 are fundamentally incompatible due to the
+ * page buffer changes.
+ *
+ * It is intended for use in shell scripts.
+ */
+
+#include "h5test.h"
+
+/* This file needs to access the file driver testing code */
+#define H5FD_FRIEND /*suppress error about including H5FDpkg */
+#define H5FD_TESTING
+#include "H5FDpkg.h" /* File drivers */
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: Inspects the HDF5_DRIVER environment variable, which
+ * determines the VFD that the test harness will use with
+ * the majority of the tests.
+ *
+ * Return: VFD supports SWMR: EXIT_SUCCESS
+ *
+ * VFD does not support SWMR
+ * or failure: EXIT_FAILURE
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(void)
+{
+#ifdef H5_HAVE_PARALLEL
+ return EXIT_FAILURE;
+#else
+ char *driver = NULL;
+
+ driver = HDgetenv("HDF5_DRIVER");
+
+ /* Currently using SWMR support as a proxy for VFD SWMR support */
+ if (H5FD__supports_swmr_test(driver))
+ return EXIT_SUCCESS;
+ else
+ return EXIT_FAILURE;
+#endif
+
+} /* end main() */