summaryrefslogtreecommitdiffstats
path: root/test/vfd_swmr_attrdset_writer.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-06-17 21:19:24 (GMT)
committerGitHub <noreply@github.com>2021-06-17 21:19:24 (GMT)
commita00ad2b657b7918d4b11edee893f6701cf50e351 (patch)
tree345a6fa6c006bb564ffe53074acbd90f7611441b /test/vfd_swmr_attrdset_writer.c
parenta7f729581b1955479255f59337481d30ff17295f (diff)
downloadhdf5-a00ad2b657b7918d4b11edee893f6701cf50e351.zip
hdf5-a00ad2b657b7918d4b11edee893f6701cf50e351.tar.gz
hdf5-a00ad2b657b7918d4b11edee893f6701cf50e351.tar.bz2
VFD SWMR: Normalization with develop (#765)
* 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 * Partial cleanup of H5Cpkg.h * Fixes printf specifiers in H5Cdbg.c * Java and fortran cmake changes (#694) * OESS-98 convert plugin option to FetchContent, add tests * Fixes for pkcfg files because of plugin option * OESS-98 fix tools test for plugins * Keep doxygen comments under 100 chars long - format hint * Whitespace * HDFFV-11144 - Reclassify CMake messages * HDFFV-11099/11100 added help text * Reworked switch statement to compare string instead * Fix typo * Update CDash mode * Correct name of threadsafe * Correct option name * Undo accidental commit * Note LLVM 10 to 11 format default changes * Update format plugin * Undo clang-format version 11 changes * One more correction * Update supported platforms * Revert whitespace changes * Correct whitespace * Changes from PR#3 * HDFFV-11213 added option to control gcc10 warnings diagnostics * HDFFV-11212 Use the new references correctly in JNI utility and tests * format source * Fix typo * Add new test file * HDFFV-11212 - update test and remove unused arg * Minor non-space formatting changes * Use H5I_INVALID_ID instead of "-1" * source formatting * add missing testfile, update jni function * Undo commit of debug code * remove mislocated file * Fix h5repack test for handling of fapls and id close * Update h5diff test files usage text * HDFFV-11212 add new ref tests for JNI export dataset * src format update * Remove blank line typo * src format typo * long double requires %Lg * Another long double foramt specifer S.B. %Lg * issue with t128bit test * Windows issue with h5dump and type. * Fix review issues * refactor function nesting and fix error checks * format fixes * Remove untested functions and javadoc quiet comments * Restore TRY block. * Change string append errors to memory exception * revert to H5_JNI_FATAL_ERROR - support functions need work * Add assertion error for h5util functions * remove duplicate function * format fix * Revert HD function error handling * Update copyright comments * GH #386 java folder copyright corrections * Whitespace * GH #359 implement and fix tools 1.6 API usage * remove excessive comments * Flip inits to correct ifdef section * rework ifdef to be simpler * format issue * Reformat ifdef inits * remove static attribute * format compliance * Update names * Revert because logic relies on float not being int * Changes noticed from creating merge of #412 * Double underscore change * Correct compiler version variable used * Remove header guard underscores * Whitespace cleanup * Split format source and commit changes on repo push * remove pre-split setting * Change windows TS to use older VS. * correct window os name * HDFFV-11212 JNI export util and Javadoc * Suggested review changes * Another change found * Committing clang-format changes * HDFFV-11113 long double in tools * HDFFV-11113 add note * Disable long double tests for now * HDFFV-11228 remove arbitrary CMake warning groups. * Make each flag a string * Some Javadoc warning fixes * Updated javadoc fixes * # WARNING: head commit changed in the meantime HDFFV-11229 Fix long double usage in tools and java Changed h5dump and h5ls to just print 128-bit for long double type. Added test and file for dataset and attributes with all three float types. * Committing clang-format changes * HDFFV-11229 Add release note * HDFFV-11229 windows testfile needed * fix typo * Remove non supported message text * HDFFV-11229 - change ldouble test to check both native and general * HDFFV-11229 add second file compare * HDFFV-11229 fix reference file * HDFFV-11229 autotools check two refs * HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output * Committing clang-format changes * Update release note * Update attribute type of ref file * Change source of ninja for macs * try port instead of brew * Recommended is to use brew. * Undo non long double changes * remove unneeded file * Fix perl and doxygen CMake code * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument * Add stamp files to BYPRODUCTS * Only one copy of file exists * Fix custom cmmand depends targets * Fix fortran custom command DEPENDS * Add LD_LIBRARY_PATH to tests * Add custom target for DEPENDS * Add h5detect conditionaly to generated target DEPENDS * Correct DEPENDS targets * Parallel builds need the mpi compiler for pkgconfig scripts. * install only if MPI build * Fortran target depends * Remove incorrect source attribute * doxygen adjustments * doxygen build updates * Correct version * Correct function version - function has been merged to 1.12 * Correct version string for map functions * Cleanup warnings for tools debug builds * TRILAB-227 - fix indexing for h5diff selections * Correct location of pos to index function call * TRILAB-227 Enable test * Quote subset args * Use MATCHES because of AppleClang * if blocks needed for build modes * Update list of DT platforms * VS2019 correctly displays float values * revert VS2019 change * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * Java reference functions updated enabled fortran in cmake gcc action yaml file java reference test changed to correctly test refs jni reference functions that create ids changed to use jni id logging * Correct BYPRODUCTS argument * Correct more genereated files BYPRODUCTS * BYPRODUCTS must have unique locations * Fix typo Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Removes alternative function enter/leave macro scheme (#678) * Committing clang-format changes * Converted BEGIN_FUNC, etc. macros to FUNC_ENTER * Rips out the BEGIN_FUNC, etc. macros * Removes 'end if', etc. comments from H5HL package * Committing clang-format changes * Fixes an H5EA iterate issue * Fixes an issue in the H5FA iterator code * Further cleanup in bin/trace after macro removal * Iterator changes in H5EA and H5FA Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Split H5L.c internal code to H5Lint.c (#691) * Committing clang-format changes * Splits internal parts of H5L.c to H5Lint.c Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Clean up type size checks in configure.ac (#702) * Committing clang-format changes * C++ warning and build fixes (#707) * Committing clang-format changes * C++ build and warning updates * Fixes all warnings on C++ (with gcc 9.3) * Updates CMake and Autotools C++ builds * Undo warning clobber Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Removes some DEC Alpha cruft from H5detect and H5private.h (#708) * Cleans up hsize_t and haddr_t size guessing (#709) * Cleans up definitions of haddr_t and hsize_t + cruft removal * Formatted source * Updates PGI C/C++ configurations (#715) * Updates PGI C/C++ configurations Tweaks some settings and configures pgc++ to use C++11 * Updated copyright information * Adds an Intel C++ configuration file (#716) * Adds an Intel C++ configuration file * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Updates bin/trace script to correctly wrap H5TRACE macros near clang-format column limit (#719) * Removes clang-format comments from H5O.c call * Fixes bin/trace to correctly wrap lines near the clang-format limit * Removed unused variable from bin/trace * Fixes issue with ccmake that prevents building Fortran (#723) ccmake runs iteratively, and the check_fortran_source_runs macros were clobbering a single output file that did not get updated on further configure iterations * Updates CMake size_t and ssize_t checks for MacOS * Moved a little boilerplate over from develop * Fixes some warnings * Committing clang-format changes * Moves gcc warning macros from H5public.h to H5private.h (#724) * Moves gcc warning suppression macros out of H5public.h * Update RELEASE.txt * Formatted source * Adds __STDC_FORMAT_MACROS before including inttypes.h w/ C++ (#726) * Adds __STDC_FORMAT_MACROS before including inttypes.h w/ C++ Allows C++ library to be built on older versions of gcc. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Moves H5PacketTable default ctor inside source file (#731) * Brings (most) H5Xdevelop.h headers from develop * Trivial H5F and H5O changes during normalization * Renames buf_ptr back to page_buf to better align with develop * Removed H5HGtrap.c * Brings changes from develop * Normalization (mainly cache) with develop * Fix Direct VFD Testing in CMake (#742) * Fixes C++ warnings when passing hsize_t values to printf in test code (#745) * Organize and align compiler flags (#741) * OESS-98 convert plugin option to FetchContent, add tests * Fixes for pkcfg files because of plugin option * OESS-98 fix tools test for plugins * Keep doxygen comments under 100 chars long - format hint * Whitespace * HDFFV-11144 - Reclassify CMake messages * HDFFV-11099/11100 added help text * Reworked switch statement to compare string instead * Fix typo * Update CDash mode * Correct name of threadsafe * Correct option name * Undo accidental commit * Note LLVM 10 to 11 format default changes * Update format plugin * Undo clang-format version 11 changes * One more correction * Update supported platforms * Revert whitespace changes * Correct whitespace * Changes from PR#3 * HDFFV-11213 added option to control gcc10 warnings diagnostics * HDFFV-11212 Use the new references correctly in JNI utility and tests * format source * Fix typo * Add new test file * HDFFV-11212 - update test and remove unused arg * Minor non-space formatting changes * Use H5I_INVALID_ID instead of "-1" * source formatting * add missing testfile, update jni function * Undo commit of debug code * remove mislocated file * Fix h5repack test for handling of fapls and id close * Update h5diff test files usage text * HDFFV-11212 add new ref tests for JNI export dataset * src format update * Remove blank line typo * src format typo * long double requires %Lg * Another long double foramt specifer S.B. %Lg * issue with t128bit test * Windows issue with h5dump and type. * Fix review issues * refactor function nesting and fix error checks * format fixes * Remove untested functions and javadoc quiet comments * Restore TRY block. * Change string append errors to memory exception * revert to H5_JNI_FATAL_ERROR - support functions need work * Add assertion error for h5util functions * remove duplicate function * format fix * Revert HD function error handling * Update copyright comments * GH #386 java folder copyright corrections * Whitespace * GH #359 implement and fix tools 1.6 API usage * remove excessive comments * Flip inits to correct ifdef section * rework ifdef to be simpler * format issue * Reformat ifdef inits * remove static attribute * format compliance * Update names * Revert because logic relies on float not being int * Changes noticed from creating merge of #412 * Double underscore change * Correct compiler version variable used * Remove header guard underscores * Whitespace cleanup * Split format source and commit changes on repo push * remove pre-split setting * Change windows TS to use older VS. * correct window os name * HDFFV-11212 JNI export util and Javadoc * Suggested review changes * Another change found * Committing clang-format changes * HDFFV-11113 long double in tools * HDFFV-11113 add note * Disable long double tests for now * HDFFV-11228 remove arbitrary CMake warning groups. * Make each flag a string * Some Javadoc warning fixes * Updated javadoc fixes * # WARNING: head commit changed in the meantime HDFFV-11229 Fix long double usage in tools and java Changed h5dump and h5ls to just print 128-bit for long double type. Added test and file for dataset and attributes with all three float types. * Committing clang-format changes * HDFFV-11229 Add release note * HDFFV-11229 windows testfile needed * fix typo * Remove non supported message text * HDFFV-11229 - change ldouble test to check both native and general * HDFFV-11229 add second file compare * HDFFV-11229 fix reference file * HDFFV-11229 autotools check two refs * HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output * Committing clang-format changes * Update release note * Update attribute type of ref file * Change source of ninja for macs * try port instead of brew * Recommended is to use brew. * Undo non long double changes * remove unneeded file * Fix perl and doxygen CMake code * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument * Add stamp files to BYPRODUCTS * Only one copy of file exists * Fix custom cmmand depends targets * Fix fortran custom command DEPENDS * Add LD_LIBRARY_PATH to tests * Add custom target for DEPENDS * Add h5detect conditionaly to generated target DEPENDS * Correct DEPENDS targets * Parallel builds need the mpi compiler for pkgconfig scripts. * install only if MPI build * Fortran target depends * Remove incorrect source attribute * doxygen adjustments * doxygen build updates * Correct version * Correct function version - function has been merged to 1.12 * Correct version string for map functions * Cleanup warnings for tools debug builds * TRILAB-227 - fix indexing for h5diff selections * Correct location of pos to index function call * TRILAB-227 Enable test * Quote subset args * Use MATCHES because of AppleClang * if blocks needed for build modes * Update list of DT platforms * VS2019 correctly displays float values * revert VS2019 change * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * Java reference functions updated enabled fortran in cmake gcc action yaml file java reference test changed to correctly test refs jni reference functions that create ids changed to use jni id logging * Correct BYPRODUCTS argument * Correct more genereated files BYPRODUCTS * BYPRODUCTS must have unique locations * Fix typo * Fix fortran configure checks * Rework H5_PAC_C_MAX_REAL_PRECISION setting logic * Add note about fortran configure change * Adds a quick for for some egregious chunk_info badness (#722) * Fixes issue with ccmake that prevents building Fortran (#723) ccmake runs iteratively, and the check_fortran_source_runs macros were clobbering a single output file that did not get updated on further configure iterations * Fix conflicts with merge * Move MAX_PRECISION back to HDF5UseFortran.cmake * Use STREQUAL to test macro argument * Move C language test to ConfigureChecks from HDF5UseFortran * MAX_PRECISION defines must be defined * Organize flags and align autotools and cmake * Fix comment in no-error-general warnings files. Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> * Committing clang-format changes * Cache code tidying * Constification of cache code * Renaming of static calls in cache * Fixes H5C mess made by git during merge * Committing clang-format changes * Fixes a printf format issue w/ parallel * Revert "Committing clang-format changes" This reverts commit 1265fe87fec6589f029cf3b1de6d586c90168654. * Turns off clang formatter in H5C while syncing with develop * Adds a lot of HD prefixes and cleans up err.h usage * Committing clang-format changes * Brings cache skip list optimization from develop * Brings recent changes from develop Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'test/vfd_swmr_attrdset_writer.c')
-rw-r--r--test/vfd_swmr_attrdset_writer.c366
1 files changed, 183 insertions, 183 deletions
diff --git a/test/vfd_swmr_attrdset_writer.c b/test/vfd_swmr_attrdset_writer.c
index dea5841..3336e88 100644
--- a/test/vfd_swmr_attrdset_writer.c
+++ b/test/vfd_swmr_attrdset_writer.c
@@ -185,33 +185,33 @@ static const hid_t badhid = H5I_INVALID_HID;
static void
usage(const char *progname)
{
- fprintf(stderr,
- "usage: %s -a nattrs [-p] [-g] [-k] [-v] [-m]\n"
- " [-d dattrs] [-u nticks] [-c csteps] [-S] [-N]\n"
- "\n"
- "-p: create a dataset with compact layout\n"
- "-g: create a dataset with contiguous layout\n"
- "-k: create datasets with chunked layout for the 5 indexing types\n"
- "-m: modify attributes to all datasets after addition\n"
- "-v: add variable length attribute to datasets\n"
- " (default is H5T_NATIVE_UINT32)\n"
- "-a nattrs: add `nattrs` attributes to all datasets\n"
- "-d dattrs: delete `dattrs` attributes to all datasets after addition\n"
- "-u nticks: `nticks` ticks for the reader to wait before verification\n"
- " (default is 4)\n"
- "-c csteps: `csteps` steps communication interval between reader and writer\n"
- " (default is 1)\n"
- "-S: do not use VFD SWMR\n"
- "-N: do not use named pipes for test synchronization\n"
- "-b: write data in big-endian byte order if no -v option\n"
- " (default is H5T_NATIVE_UINT32)\n\n"
- "Note:\n"
- "1. Require to specify at least -p, -g or -k option\n"
- "2. -c <csteps> option cannot exceed -a <nattrs> option\n"
- "3. -d <dattrs> option cannot exceed -a <nattrs> option\n"
- "\n",
- progname);
- exit(EXIT_FAILURE);
+ HDfprintf(stderr,
+ "usage: %s -a nattrs [-p] [-g] [-k] [-v] [-m]\n"
+ " [-d dattrs] [-u nticks] [-c csteps] [-S] [-N]\n"
+ "\n"
+ "-p: create a dataset with compact layout\n"
+ "-g: create a dataset with contiguous layout\n"
+ "-k: create datasets with chunked layout for the 5 indexing types\n"
+ "-m: modify attributes to all datasets after addition\n"
+ "-v: add variable length attribute to datasets\n"
+ " (default is H5T_NATIVE_UINT32)\n"
+ "-a nattrs: add `nattrs` attributes to all datasets\n"
+ "-d dattrs: delete `dattrs` attributes to all datasets after addition\n"
+ "-u nticks: `nticks` ticks for the reader to wait before verification\n"
+ " (default is 4)\n"
+ "-c csteps: `csteps` steps communication interval between reader and writer\n"
+ " (default is 1)\n"
+ "-S: do not use VFD SWMR\n"
+ "-N: do not use named pipes for test synchronization\n"
+ "-b: write data in big-endian byte order if no -v option\n"
+ " (default is H5T_NATIVE_UINT32)\n\n"
+ "Note:\n"
+ "1. Require to specify at least -p, -g or -k option\n"
+ "2. -c <csteps> option cannot exceed -a <nattrs> option\n"
+ "3. -d <dattrs> option cannot exceed -a <nattrs> option\n"
+ "\n",
+ progname);
+ HDexit(EXIT_FAILURE);
} /* usage() */
/*
@@ -269,17 +269,17 @@ state_init(state_t *s, int argc, char **argv)
case 'u':
case 'c':
errno = 0;
- tmp = strtoul(optarg, &end, 0);
+ tmp = HDstrtoul(optarg, &end, 0);
if (end == optarg || *end != '\0') {
- printf("couldn't parse `-%c` argument `%s`\n", ch, optarg);
+ HDprintf("couldn't parse `-%c` argument `%s`\n", ch, optarg);
TEST_ERROR;
}
else if (errno != 0) {
- printf("couldn't parse `-%c` argument `%s`\n", ch, optarg);
+ HDprintf("couldn't parse `-%c` argument `%s`\n", ch, optarg);
TEST_ERROR;
}
else if (tmp > UINT_MAX) {
- printf("`-%c` argument `%lu` too large\n", ch, tmp);
+ HDprintf("`-%c` argument `%lu` too large\n", ch, tmp);
TEST_ERROR;
}
@@ -304,33 +304,33 @@ state_init(state_t *s, int argc, char **argv)
/* Require to specify at least -p, -g or -k option */
if (!s->compact && !s->contig && !s->chunked) {
- printf("Require to specify at least -p, -g or -k option\n");
+ HDprintf("Require to specify at least -p, -g or -k option\n");
usage(s->progname);
goto error;
}
/* -c <csteps> cannot be zero */
if (!s->csteps) {
- printf("communication interval cannot be zero\n");
+ HDprintf("communication interval cannot be zero\n");
TEST_ERROR;
}
/* -c <csteps> and -a <nattrs> options */
if (s->asteps && s->csteps > s->asteps) {
- printf("communication interval is out of bounds\n");
+ HDprintf("communication interval is out of bounds\n");
TEST_ERROR;
}
/* -d and -a */
if (s->dattrs > s->asteps) {
- printf("# of attributes to be deleted exceeds # of attributes created\n");
+ HDprintf("# of attributes to be deleted exceeds # of attributes created\n");
TEST_ERROR;
}
/* Dataspace for attributes added to datasets */
/* Dataspace for compact and contiguous datasets */
if ((s->one_by_one_sid = H5Screate_simple(1, &dims, &dims)) < 0) {
- printf("H5Screate_simple failed\n");
+ HDprintf("H5Screate_simple failed\n");
TEST_ERROR;
}
@@ -374,63 +374,63 @@ create_dsets(const state_t *s, dsets_state_t *ds)
wdata.b[1] = 3;
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
- printf("H5Pcreate failed\n");
+ HDprintf("H5Pcreate failed\n");
TEST_ERROR;
}
if (H5Pset_layout(dcpl, H5D_COMPACT) < 0) {
- printf("H5Pset_layout failed\n");
+ HDprintf("H5Pset_layout failed\n");
TEST_ERROR;
}
/* Create compound datatype */
if ((cmpd_tid = H5Tcreate(H5T_COMPOUND, sizeof(cmpd))) < 0) {
- printf("H5Tcreate failed\n");
+ HDprintf("H5Tcreate failed\n");
TEST_ERROR;
}
/* Create the array for the second element in the compound type */
if ((array_tid = H5Tarray_create2(H5T_NATIVE_INT, 1, &dims)) < 0) {
- printf("H5Tarray_create2 failed\n");
+ HDprintf("H5Tarray_create2 failed\n");
TEST_ERROR;
}
/* First element in the compound type */
if (H5Tinsert(cmpd_tid, "a", HOFFSET(cmpd, a), H5T_NATIVE_INT) < 0) {
- printf("H5Tinsert failed\n");
+ HDprintf("H5Tinsert failed\n");
TEST_ERROR;
}
/* Second element in the compound type */
if (H5Tinsert(cmpd_tid, "b", HOFFSET(cmpd, b), array_tid) < 0) {
- printf("H5Tinsert failed\n");
+ HDprintf("H5Tinsert failed\n");
TEST_ERROR;
}
/* Create the compact dataset with compound datatype */
if ((ds->compact_did = H5Dcreate2(s->file, DSET_COMPACT_NAME, cmpd_tid, s->one_by_one_sid,
H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) {
- printf("H5Dcreate2 compact dataset failed\n");
+ HDprintf("H5Dcreate2 compact dataset failed\n");
TEST_ERROR;
}
/* Write data to the dataset */
if (H5Dwrite(ds->compact_did, cmpd_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &wdata) < 0) {
- printf("H5Dwrite to compact dataset failed\n");
+ HDprintf("H5Dwrite to compact dataset failed\n");
TEST_ERROR;
}
/* In order to trigger continuation block if -p is used alone by itself */
if ((tmp_did = H5Dcreate2(s->file, "JUNK_IGNORE", cmpd_tid, s->one_by_one_sid, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- printf("H5Dcreate2 failed\n");
+ HDprintf("H5Dcreate2 failed\n");
TEST_ERROR;
}
if (H5Dclose(tmp_did) < 0) {
- printf("H5Dclose failed\n");
+ HDprintf("H5Dclose failed\n");
TEST_ERROR;
}
if (H5Pclose(dcpl) < 0) {
- printf("H5Pclose failed\n");
+ HDprintf("H5Pclose failed\n");
TEST_ERROR;
}
}
@@ -442,61 +442,61 @@ create_dsets(const state_t *s, dsets_state_t *ds)
unsigned def_min_dense = 0;
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
- printf("H5Pcreate failed\n");
+ HDprintf("H5Pcreate failed\n");
TEST_ERROR;
}
if (H5Pset_layout(dcpl, H5D_CONTIGUOUS) < 0) {
- printf("H5Pset_layout failed\n");
+ HDprintf("H5Pset_layout failed\n");
TEST_ERROR;
}
if (H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0) {
- printf("H5Pset_alloc_time failed\n");
+ HDprintf("H5Pset_alloc_time failed\n");
TEST_ERROR;
}
if (H5Pget_attr_phase_change(dcpl, &def_max_compact, &def_min_dense) < 0) {
- printf("H5Pget_attr_phase_change failed\n");
+ HDprintf("H5Pget_attr_phase_change failed\n");
TEST_ERROR;
}
if (H5Pset_attr_phase_change(dcpl, def_max_compact + 2, def_min_dense + 2) < 0) {
- printf("H5Pset_attr_phase_change failed\n");
+ HDprintf("H5Pset_attr_phase_change failed\n");
TEST_ERROR;
}
/* Create the named datatype */
if ((dtid = H5Tcopy(H5T_NATIVE_INT)) < 0) {
- printf("H5Tcopy failed\n");
+ HDprintf("H5Tcopy failed\n");
TEST_ERROR;
}
if (H5Tcommit2(s->file, "named_dtype", dtid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) {
- printf("H5Tcommit2 failed\n");
+ HDprintf("H5Tcommit2 failed\n");
TEST_ERROR;
}
/* Create the contiguous dataset with the named datatype */
if ((ds->contig_did = H5Dcreate2(s->file, DSET_CONTIG_NAME, dtid, s->one_by_one_sid, H5P_DEFAULT,
dcpl, H5P_DEFAULT)) < 0) {
- printf("H5Dcreate2 contiguous dataset failed\n");
+ HDprintf("H5Dcreate2 contiguous dataset failed\n");
TEST_ERROR;
}
/* Write to the dataset */
if (H5Dwrite(ds->contig_did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &wdata1) < 0) {
- printf("H5Dwrite to contiguous dataset failed\n");
+ HDprintf("H5Dwrite to contiguous dataset failed\n");
TEST_ERROR;
}
if (H5Pclose(dcpl) < 0) {
- printf("H5Pclose failed\n");
+ HDprintf("H5Pclose failed\n");
TEST_ERROR;
}
if (H5Tclose(dtid) < 0) {
- printf("H5Tclose failed\n");
+ HDprintf("H5Tclose failed\n");
TEST_ERROR;
}
}
@@ -525,27 +525,27 @@ create_dsets(const state_t *s, dsets_state_t *ds)
/* Create variable length datatype */
if ((vl_tid = H5Tcopy(H5T_C_S1)) < 0) {
- printf("H5Tcopy failed\n");
+ HDprintf("H5Tcopy failed\n");
TEST_ERROR;
}
if (H5Tset_size(vl_tid, H5T_VARIABLE) < 0) {
- printf("H5Tset_size failed\n");
+ HDprintf("H5Tset_size failed\n");
TEST_ERROR;
}
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
- printf("H5Pcreate failed\n");
+ HDprintf("H5Pcreate failed\n");
TEST_ERROR;
}
if (H5Pset_layout(dcpl, H5D_CHUNKED) < 0) {
- printf("H5Pset_layout failed\n");
+ HDprintf("H5Pset_layout failed\n");
TEST_ERROR;
}
if (H5Pset_chunk(dcpl, 1, dims1) < 0) {
- printf("H5Pset_chunk failed\n");
+ HDprintf("H5Pset_chunk failed\n");
TEST_ERROR;
}
@@ -553,18 +553,18 @@ create_dsets(const state_t *s, dsets_state_t *ds)
/* Chunked, dims=max_dims=chunk_dims */
if ((sid = H5Screate_simple(1, dims1, dims1)) < 0) {
- printf("H5Screate_simple failed\n");
+ HDprintf("H5Screate_simple failed\n");
TEST_ERROR;
}
if ((ds->single_did =
H5Dcreate2(s->file, DSET_SINGLE_NAME, vl_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) {
- printf("H5Dcreate2 chunked dataset: single index failed\n");
+ HDprintf("H5Dcreate2 chunked dataset: single index failed\n");
TEST_ERROR;
}
if (H5Dwrite(ds->single_did, vl_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &vdata) < 0) {
- printf("H5Dwrite to chunked dataset: single index failed\n");
+ HDprintf("H5Dwrite to chunked dataset: single index failed\n");
TEST_ERROR;
}
@@ -572,33 +572,33 @@ create_dsets(const state_t *s, dsets_state_t *ds)
/* Chunked, dims=max_dims, early allocation */
if (H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0) {
- printf("H5Pset_alloc_time\n");
+ HDprintf("H5Pset_alloc_time\n");
TEST_ERROR;
}
if (H5Pset_chunk(dcpl, 1, chunk_dims1) < 0) {
- printf("H5Pset_chunk failed\n");
+ HDprintf("H5Pset_chunk failed\n");
TEST_ERROR;
}
if ((ds->implicit_did =
H5Dcreate2(s->file, DSET_IMPLICIT_NAME, vl_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) {
- printf("H5Dcreate2 chunked dataset: implicit index failed\n");
+ HDprintf("H5Dcreate2 chunked dataset: implicit index failed\n");
TEST_ERROR;
}
if (H5Dwrite(ds->implicit_did, vl_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &vdata) < 0) {
- printf("H5Dwrite to chunked dataset: implicit index failed\n");
+ HDprintf("H5Dwrite to chunked dataset: implicit index failed\n");
TEST_ERROR;
}
if (H5Pclose(dcpl) < 0) {
- printf("H5Pclose failed\n");
+ HDprintf("H5Pclose failed\n");
TEST_ERROR;
}
if (H5Sclose(sid) < 0) {
- printf("H5Sclose failed\n");
+ HDprintf("H5Sclose failed\n");
TEST_ERROR;
}
@@ -606,38 +606,38 @@ create_dsets(const state_t *s, dsets_state_t *ds)
/* Chunked, fixed max_dims */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
- printf("H5Pcreate failed\n");
+ HDprintf("H5Pcreate failed\n");
TEST_ERROR;
}
if (H5Pset_chunk(dcpl, 1, chunk_dims1) < 0) {
- printf("H5Pset_chunk failed\n");
+ HDprintf("H5Pset_chunk failed\n");
TEST_ERROR;
}
if ((sid = H5Screate_simple(1, dims1, max_dims1)) < 0) {
- printf("H5Screate_simple failed\n");
+ HDprintf("H5Screate_simple failed\n");
TEST_ERROR;
}
if ((ds->fa_did = H5Dcreate2(s->file, DSET_FA_NAME, vl_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) <
0) {
- printf("H5Dcreaet2 chunked dataset: fa index failed\n");
+ HDprintf("H5Dcreaet2 chunked dataset: fa index failed\n");
TEST_ERROR;
}
if (H5Dwrite(ds->fa_did, vl_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &vdata) < 0) {
- printf("H5Dwrite to chunked dataset: fa index failed\n");
+ HDprintf("H5Dwrite to chunked dataset: fa index failed\n");
TEST_ERROR;
}
if (H5Pclose(dcpl) < 0) {
- printf("H5Pclose failed\n");
+ HDprintf("H5Pclose failed\n");
TEST_ERROR;
}
if (H5Sclose(sid) < 0) {
- printf("H5Sclose failed\n");
+ HDprintf("H5Sclose failed\n");
TEST_ERROR;
}
@@ -645,28 +645,28 @@ create_dsets(const state_t *s, dsets_state_t *ds)
/* Chunked, 1 unlimited max_dims */
if ((sid = H5Screate_simple(2, dims2, max_dims2)) < 0) {
- printf("H5Screate_simple failed\n");
+ HDprintf("H5Screate_simple failed\n");
TEST_ERROR;
}
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
- printf("H5Pcreate failed\n");
+ HDprintf("H5Pcreate failed\n");
TEST_ERROR;
}
if (H5Pset_chunk(dcpl, 2, chunk_dims2) < 0) {
- printf("H5Pset_chunk failed\n");
+ HDprintf("H5Pset_chunk failed\n");
TEST_ERROR;
}
if ((ds->ea_did = H5Dcreate2(s->file, DSET_EA_NAME, vl_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) <
0) {
- printf("H5Dcreate2 chunked dataset: ea index failed\n");
+ HDprintf("H5Dcreate2 chunked dataset: ea index failed\n");
TEST_ERROR;
}
if (H5Dwrite(ds->ea_did, vl_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &vdata2) < 0) {
- printf("H5Dwrite to chunked dataset: ea index failed\n");
+ HDprintf("H5Dwrite to chunked dataset: ea index failed\n");
TEST_ERROR;
}
@@ -675,33 +675,33 @@ create_dsets(const state_t *s, dsets_state_t *ds)
max_dims2[0] = H5S_UNLIMITED;
if ((sid = H5Screate_simple(2, dims2, max_dims2)) < 0) {
- printf("H5Screate_simple failed\n");
+ HDprintf("H5Screate_simple failed\n");
TEST_ERROR;
}
if ((ds->bt2_did = H5Dcreate2(s->file, DSET_BT2_NAME, vl_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) <
0) {
- printf("H5Dcreate2 chunked dataset: bt2 index failed\n");
+ HDprintf("H5Dcreate2 chunked dataset: bt2 index failed\n");
TEST_ERROR;
}
if (H5Dwrite(ds->bt2_did, vl_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &vdata2) < 0) {
- printf("H5Dwrite to chunked dataset: bt2 index failed\n");
+ HDprintf("H5Dwrite to chunked dataset: bt2 index failed\n");
TEST_ERROR;
}
if (H5Pclose(dcpl) < 0) {
- printf("H5Pclose failed\n");
+ HDprintf("H5Pclose failed\n");
TEST_ERROR;
}
if (H5Sclose(sid) < 0) {
- printf("H5Sclose failed\n");
+ HDprintf("H5Sclose failed\n");
TEST_ERROR;
}
if (H5Tclose(vl_tid) < 0) {
- printf("H5Tclose failed\n");
+ HDprintf("H5Tclose failed\n");
TEST_ERROR;
}
}
@@ -743,7 +743,7 @@ open_dsets(const state_t *s, dsets_state_t *ds)
if (s->compact) {
if (!open_dset_real(s->file, &ds->compact_did, DSET_COMPACT_NAME, &ds->p_max_compact,
&ds->p_min_dense)) {
- printf("open_dset_real() for compact dataset failed\n");
+ HDprintf("open_dset_real() for compact dataset failed\n");
TEST_ERROR;
}
}
@@ -751,7 +751,7 @@ open_dsets(const state_t *s, dsets_state_t *ds)
if (s->contig) {
if (!open_dset_real(s->file, &ds->contig_did, DSET_CONTIG_NAME, &ds->g_max_compact,
&ds->g_min_dense)) {
- printf("open_dset_real() for contiguous dataset failed\n");
+ HDprintf("open_dset_real() for contiguous dataset failed\n");
TEST_ERROR;
}
}
@@ -759,26 +759,26 @@ open_dsets(const state_t *s, dsets_state_t *ds)
if (s->chunked) {
if (!open_dset_real(s->file, &ds->single_did, DSET_SINGLE_NAME, &ds->single_max_compact,
&ds->single_min_dense)) {
- printf("open_dset_real() for chunked dataset: single failed\n");
+ HDprintf("open_dset_real() for chunked dataset: single failed\n");
TEST_ERROR;
}
if (!open_dset_real(s->file, &ds->implicit_did, DSET_IMPLICIT_NAME, &ds->implicit_max_compact,
&ds->implicit_min_dense)) {
- printf("open_dset_real() for chunked dataset: implicit failed\n");
+ HDprintf("open_dset_real() for chunked dataset: implicit failed\n");
TEST_ERROR;
}
if (!open_dset_real(s->file, &ds->fa_did, DSET_FA_NAME, &ds->fa_max_compact, &ds->fa_min_dense)) {
- printf("open_dset_real() for chunked dataset: fa failed\n");
+ HDprintf("open_dset_real() for chunked dataset: fa failed\n");
TEST_ERROR;
}
if (!open_dset_real(s->file, &ds->ea_did, DSET_FA_NAME, &ds->ea_max_compact, &ds->ea_min_dense)) {
- printf("open_dset_real() for chunked dataset: ea failed\n");
+ HDprintf("open_dset_real() for chunked dataset: ea failed\n");
TEST_ERROR;
}
if (!open_dset_real(s->file, &ds->bt2_did, DSET_BT2_NAME, &ds->bt2_max_compact, &ds->bt2_min_dense)) {
- printf("open_dset_real() for chunked dataset: bt2 failed\n");
+ HDprintf("open_dset_real() for chunked dataset: bt2 failed\n");
TEST_ERROR;
}
}
@@ -800,22 +800,22 @@ open_dset_real(hid_t fid, hid_t *did, const char *name, unsigned *max_compact, u
hid_t dcpl = badhid;
if ((*did = H5Dopen2(fid, name, H5P_DEFAULT)) < 0) {
- printf("H5Dopen dataset failed\n");
+ HDprintf("H5Dopen dataset failed\n");
TEST_ERROR;
}
if ((dcpl = H5Dget_create_plist(*did)) < 0) {
- printf("H5Dget_create_plist failed\n");
+ HDprintf("H5Dget_create_plist failed\n");
TEST_ERROR;
}
if (H5Pget_attr_phase_change(dcpl, max_compact, min_dense) < 0) {
- printf("H5Dget_attr_phase_change failed\n");
+ HDprintf("H5Dget_attr_phase_change failed\n");
TEST_ERROR;
}
if (H5Pclose(dcpl) < 0) {
- printf("H5Pclose failed\n");
+ HDprintf("H5Pclose failed\n");
TEST_ERROR;
}
@@ -839,37 +839,37 @@ static bool
close_dsets(const dsets_state_t *ds)
{
if (ds->compact_did != badhid && H5Dclose(ds->compact_did) < 0) {
- printf("H5Dclose compact dataset failed\n");
+ HDprintf("H5Dclose compact dataset failed\n");
TEST_ERROR;
}
if (ds->contig_did != badhid && H5Dclose(ds->contig_did) < 0) {
- printf("H5Dclose contig dataset failed\n");
+ HDprintf("H5Dclose contig dataset failed\n");
TEST_ERROR;
}
if (ds->single_did != badhid && H5Dclose(ds->single_did) < 0) {
- printf("H5Dclose chunked dataset: single index failed\n");
+ HDprintf("H5Dclose chunked dataset: single index failed\n");
TEST_ERROR;
}
if (ds->implicit_did != badhid && H5Dclose(ds->implicit_did) < 0) {
- printf("H5Dclose chunked dataset: implicit index failed\n");
+ HDprintf("H5Dclose chunked dataset: implicit index failed\n");
TEST_ERROR;
}
if (ds->fa_did >= 0 && H5Dclose(ds->fa_did) < 0) {
- printf("H5Dclose chunked dataset: fa index failed\n");
+ HDprintf("H5Dclose chunked dataset: fa index failed\n");
TEST_ERROR;
}
if (ds->ea_did >= 0 && H5Dclose(ds->ea_did) < 0) {
- printf("H5Dclose chunked dataset: ea index failed\n");
+ HDprintf("H5Dclose chunked dataset: ea index failed\n");
TEST_ERROR;
}
if (ds->bt2_did >= 0 && H5Dclose(ds->bt2_did) < 0) {
- printf("H5Dclose chunked dataset: bt2 index failed\n");
+ HDprintf("H5Dclose chunked dataset: bt2 index failed\n");
TEST_ERROR;
}
@@ -1007,17 +1007,17 @@ add_attr(const state_t *s, hid_t did, unsigned int which)
if (s->vl_attr) {
if ((vl_tid = H5Tcopy(H5T_C_S1)) < 0) {
- printf("H5Tcopy failed\n");
+ HDprintf("H5Tcopy failed\n");
TEST_ERROR;
}
if (H5Tset_size(vl_tid, H5T_VARIABLE) < 0) {
- printf("H5Tset_size failed\n");
+ HDprintf("H5Tset_size failed\n");
TEST_ERROR;
}
if ((val = HDmalloc(sizeof("9999999999"))) == NULL) {
- printf("H5Dmalloc failed\n");
+ HDprintf("H5Dmalloc failed\n");
TEST_ERROR;
}
@@ -1030,24 +1030,24 @@ add_attr(const state_t *s, hid_t did, unsigned int which)
/* Attach the attribute to the dataset */
if ((aid = H5Acreate2(did, name, tid, s->one_by_one_sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- printf("H5Acreate2 failed\n");
+ HDprintf("H5Acreate2 failed\n");
TEST_ERROR;
}
/* Write to the attribure */
if (H5Awrite(aid, tid, s->vl_attr ? &val : (const void *)&which) < 0) {
- printf("H5Awrite failed\n");
+ HDprintf("H5Awrite failed\n");
TEST_ERROR;
}
/* Close the attribute */
if (H5Aclose(aid) < 0) {
- printf("H5Aclose failed\n");
+ HDprintf("H5Aclose failed\n");
TEST_ERROR;
}
if (vl_tid >= 0 && H5Tclose(vl_tid) < 0) {
- printf("H5Tclose failed\n");
+ HDprintf("H5Tclose failed\n");
TEST_ERROR;
}
@@ -1088,17 +1088,17 @@ modify_attr(const state_t *s, hid_t did, unsigned int which)
if (s->vl_attr) {
if ((vl_tid = H5Tcopy(H5T_C_S1)) < 0) {
- printf("H5Tcopy failed\n");
+ HDprintf("H5Tcopy failed\n");
TEST_ERROR;
}
if (H5Tset_size(vl_tid, H5T_VARIABLE) < 0) {
- printf("H5Tset_size failed\n");
+ HDprintf("H5Tset_size failed\n");
TEST_ERROR;
}
if ((val = HDmalloc(sizeof("9999999999"))) == NULL) {
- printf("HDmalloc failed\n");
+ HDprintf("HDmalloc failed\n");
TEST_ERROR;
}
@@ -1113,24 +1113,24 @@ modify_attr(const state_t *s, hid_t did, unsigned int which)
/* Open the attribute to the dataset */
if ((aid = H5Aopen(did, name, H5P_DEFAULT)) < 0) {
- printf("H5Aopen failed\n");
+ HDprintf("H5Aopen failed\n");
TEST_ERROR;
}
/* Write to the attribure */
if (H5Awrite(aid, tid, s->vl_attr ? &val : (const void *)&tmp_val) < 0) {
- printf("H5Awrite failed\n");
+ HDprintf("H5Awrite failed\n");
TEST_ERROR;
}
/* Close the attribute */
if (H5Aclose(aid) < 0) {
- printf("H5Aclose failed\n");
+ HDprintf("H5Aclose failed\n");
TEST_ERROR;
}
if (vl_tid >= 0 && H5Tclose(vl_tid) < 0) {
- printf("H5Tclose failed\n");
+ HDprintf("H5Tclose failed\n");
TEST_ERROR;
}
@@ -1164,7 +1164,7 @@ delete_attr(hid_t did, unsigned int which)
/* Delete the attribute to the dataset */
if (H5Adelete(did, name) < 0) {
- printf("H5Adelete failed\n");
+ HDprintf("H5Adelete failed\n");
TEST_ERROR;
}
@@ -1326,12 +1326,12 @@ verify_add_or_modify_attr(unsigned action, hid_t did, char *attr_name, unsigned
HDassert(action == ADD_ATTR || action == MODIFY_ATTR);
if ((aid = H5Aopen(did, attr_name, H5P_DEFAULT)) < 0) {
- printf("H5Aopen failed\n");
+ HDprintf("H5Aopen failed\n");
TEST_ERROR;
}
if ((atid = H5Aget_type(aid)) < 0) {
- printf("H5Aget_type failed\n");
+ HDprintf("H5Aget_type failed\n");
TEST_ERROR;
}
@@ -1342,23 +1342,23 @@ verify_add_or_modify_attr(unsigned action, hid_t did, char *attr_name, unsigned
HDsprintf(vl_which, "%u %c", which, 'M');
if ((read_vl_which = HDmalloc(sizeof("9999999999"))) == NULL) {
- printf("HDmalloc failed\n");
+ HDprintf("HDmalloc failed\n");
TEST_ERROR;
}
}
if (H5Aread(aid, atid, is_vl ? (void *)&read_vl_which : (void *)&read_which) < 0) {
- printf("H5Aread failed\n");
+ HDprintf("H5Aread failed\n");
TEST_ERROR;
}
if (H5Aclose(aid) < 0) {
- printf("H5Aclose failed\n");
+ HDprintf("H5Aclose failed\n");
TEST_ERROR;
}
if (H5Tclose(atid) < 0) {
- printf("H5Tclose failed\n");
+ HDprintf("H5Tclose failed\n");
TEST_ERROR;
}
@@ -1398,7 +1398,7 @@ verify_delete_attr(hid_t did, char *attr_name)
int ret;
if ((ret = H5Aexists(did, attr_name)) < 0) {
- printf("H5Aexists failed\n");
+ HDprintf("H5Aexists failed\n");
TEST_ERROR;
}
else if (!ret) /* attribute does not exist */
@@ -1478,7 +1478,7 @@ verify_storage_cont_real(hid_t did, unsigned int which, unsigned cut_point)
/* Get the object information */
if (H5Oget_native_info(did, &ninfo, H5O_NATIVE_INFO_HDR | H5O_NATIVE_INFO_META_SIZE) < 0) {
- printf("H5Oget_native_info failed\n");
+ HDprintf("H5Oget_native_info failed\n");
TEST_ERROR;
}
@@ -1524,36 +1524,36 @@ np_init(np_state_t *np, bool writer)
/* If the named pipes are present at the start of the test, remove them */
if (HDaccess(np->fifo_writer_to_reader, F_OK) == 0)
if (HDremove(np->fifo_writer_to_reader) != 0) {
- printf("HDremove fifo_writer_to_reader failed\n");
+ HDprintf("HDremove fifo_writer_to_reader failed\n");
TEST_ERROR;
}
if (HDaccess(np->fifo_reader_to_writer, F_OK) == 0)
if (HDremove(np->fifo_reader_to_writer) != 0) {
- printf("HDremove fifo_reader_to_writer failed\n");
+ HDprintf("HDremove fifo_reader_to_writer failed\n");
TEST_ERROR;
}
/* Writer creates two named pipes(FIFO) */
if (HDmkfifo(np->fifo_writer_to_reader, 0600) < 0) {
- printf("HDmkfifo fifo_writer_to_reader failed\n");
+ HDprintf("HDmkfifo fifo_writer_to_reader failed\n");
TEST_ERROR;
}
if (HDmkfifo(np->fifo_reader_to_writer, 0600) < 0) {
- printf("HDmkfifo fifo_reader_to_writer failed\n");
+ HDprintf("HDmkfifo fifo_reader_to_writer failed\n");
TEST_ERROR;
}
}
/* Both the writer and reader open the pipes */
if ((np->fd_writer_to_reader = HDopen(np->fifo_writer_to_reader, O_RDWR)) < 0) {
- printf("HDopen fifo_writer_to_reader failed\n");
+ HDprintf("HDopen fifo_writer_to_reader failed\n");
TEST_ERROR;
}
if ((np->fd_reader_to_writer = HDopen(np->fifo_reader_to_writer, O_RDWR)) < 0) {
- printf("HDopen fifo_reader_to_writer failed\n");
+ HDprintf("HDopen fifo_reader_to_writer failed\n");
TEST_ERROR;
}
@@ -1572,24 +1572,24 @@ np_close(np_state_t *np, bool writer)
{
/* Both the writer and reader close the named pipes */
if (HDclose(np->fd_writer_to_reader) < 0) {
- printf("HDclose fd_writer_to_reader failed\n");
+ HDprintf("HDclose fd_writer_to_reader failed\n");
TEST_ERROR;
}
if (HDclose(np->fd_reader_to_writer) < 0) {
- printf("HDclose fd_reader_to_writer failed\n");
+ HDprintf("HDclose fd_reader_to_writer failed\n");
TEST_ERROR;
}
/* Reader finishes last and deletes the named pipes */
if (!writer) {
if (HDremove(np->fifo_writer_to_reader) != 0) {
- printf("HDremove fifo_writer_to_reader failed\n");
+ HDprintf("HDremove fifo_writer_to_reader failed\n");
TEST_ERROR;
}
if (HDremove(np->fifo_reader_to_writer) != 0) {
- printf("HDremove fifo_reader_to_writer failed\n");
+ HDprintf("HDremove fifo_reader_to_writer failed\n");
TEST_ERROR;
}
}
@@ -1609,7 +1609,7 @@ np_writer(bool result, unsigned step, const state_t *s, np_state_t *np, H5F_vfd_
/* The action fails */
if (!result) {
- printf("attribute action failed\n");
+ HDprintf("attribute action failed\n");
H5_FAILED();
AT();
@@ -1627,7 +1627,7 @@ np_writer(bool result, unsigned step, const state_t *s, np_state_t *np, H5F_vfd_
/* Bump up the value of notify to tell the reader to start reading */
np->notify++;
if (HDwrite(np->fd_writer_to_reader, &np->notify, sizeof(int)) < 0) {
- printf("HDwrite failed\n");
+ HDprintf("HDwrite failed\n");
TEST_ERROR;
}
@@ -1644,7 +1644,7 @@ np_writer(bool result, unsigned step, const state_t *s, np_state_t *np, H5F_vfd_
/* Handshake between writer and reader */
if (!np_confirm_verify_notify(np->fd_reader_to_writer, step, s, np)) {
- printf("np_confirm_verify_notify() verify/notify not in sync failed\n");
+ HDprintf("np_confirm_verify_notify() verify/notify not in sync failed\n");
TEST_ERROR;
}
}
@@ -1665,7 +1665,7 @@ np_reader(bool result, unsigned step, const state_t *s, np_state_t *np)
{
/* The verification fails */
if (!result) {
- printf("verify action failed\n");
+ HDprintf("verify action failed\n");
H5_FAILED();
AT();
@@ -1682,7 +1682,7 @@ np_reader(bool result, unsigned step, const state_t *s, np_state_t *np)
/* Send back the same notify value for acknowledgement:
* --inform the writer to move to the next step */
if (HDwrite(np->fd_reader_to_writer, &np->notify, sizeof(int)) < 0) {
- printf("HDwrite failed\n");
+ HDprintf("HDwrite failed\n");
TEST_ERROR;
}
}
@@ -1704,17 +1704,17 @@ np_confirm_verify_notify(int fd, unsigned step, const state_t *s, np_state_t *np
if (step % s->csteps == 0) {
np->verify++;
if (HDread(fd, &np->notify, sizeof(int)) < 0) {
- printf("HDread failed\n");
+ HDprintf("HDread failed\n");
TEST_ERROR;
}
if (np->notify == -1) {
- printf("reader/writer failed to verify\n");
+ HDprintf("reader/writer failed to verify\n");
TEST_ERROR;
}
if (np->notify != np->verify) {
- printf("received message %d, expecting %d\n", np->notify, np->verify);
+ HDprintf("received message %d, expecting %d\n", np->notify, np->verify);
TEST_ERROR;
}
}
@@ -1734,7 +1734,7 @@ np_reader_no_verification(const state_t *s, np_state_t *np, H5F_vfd_swmr_config_
{
if (s->use_np) {
if (!np_confirm_verify_notify(np->fd_writer_to_reader, 0, s, np)) {
- printf("np_confirm_verify_notify() verify/notify not in sync failed\n");
+ HDprintf("np_confirm_verify_notify() verify/notify not in sync failed\n");
TEST_ERROR;
}
}
@@ -1746,7 +1746,7 @@ np_reader_no_verification(const state_t *s, np_state_t *np, H5F_vfd_swmr_config_
/* Send back the same notify value for acknowledgement:
* --inform the writer to move to the next step */
if (HDwrite(np->fd_reader_to_writer, &np->notify, sizeof(int)) < 0) {
- printf("HDwrite failed\n");
+ HDprintf("HDwrite failed\n");
TEST_ERROR;
}
}
@@ -1773,18 +1773,18 @@ main(int argc, char **argv)
bool result;
if (!state_init(&s, argc, argv)) {
- printf("state_init() failed\n");
+ HDprintf("state_init() failed\n");
TEST_ERROR;
}
- personality = strstr(s.progname, "vfd_swmr_attrdset_");
+ personality = HDstrstr(s.progname, "vfd_swmr_attrdset_");
- if (personality != NULL && strcmp(personality, "vfd_swmr_attrdset_writer") == 0)
+ if (personality != NULL && HDstrcmp(personality, "vfd_swmr_attrdset_writer") == 0)
writer = true;
- else if (personality != NULL && strcmp(personality, "vfd_swmr_attrdset_reader") == 0)
+ else if (personality != NULL && HDstrcmp(personality, "vfd_swmr_attrdset_reader") == 0)
writer = false;
else {
- printf("unknown personality, expected vfd_swmr_attrdset_{reader,writer}\n");
+ HDprintf("unknown personality, expected vfd_swmr_attrdset_{reader,writer}\n");
TEST_ERROR;
}
@@ -1793,45 +1793,45 @@ main(int argc, char **argv)
/* use_latest_format, use_vfd_swmr, only_meta_page, config */
if ((fapl = vfd_swmr_create_fapl(true, s.use_vfd_swmr, true, &config)) < 0) {
- printf("vfd_swmr_create_fapl() failed\n");
+ HDprintf("vfd_swmr_create_fapl() failed\n");
TEST_ERROR;
}
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) {
- printf("H5Pcreate failed\n");
+ HDprintf("H5Pcreate failed\n");
TEST_ERROR;
}
if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, 1) < 0) {
- printf("H5Pset_file_space_strategy failed\n");
+ HDprintf("H5Pset_file_space_strategy failed\n");
TEST_ERROR;
}
if (writer) {
if ((s.file = H5Fcreate(s.filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) {
- printf("H5Fcreate failed\n");
+ HDprintf("H5Fcreate failed\n");
TEST_ERROR;
}
if (!create_dsets(&s, &ds)) {
- printf("create_dsets() failed\n");
+ HDprintf("create_dsets() failed\n");
TEST_ERROR;
}
}
else {
if ((s.file = H5Fopen(s.filename, H5F_ACC_RDONLY, fapl)) < 0) {
- printf("H5Fopen failed\n");
+ HDprintf("H5Fopen failed\n");
TEST_ERROR;
}
if (!open_dsets(&s, &ds)) {
- printf("open_dsets() failed\n");
+ HDprintf("open_dsets() failed\n");
TEST_ERROR;
}
}
/* Initiailze named pipes */
if (s.use_np && !np_init(&np, writer)) {
- printf("np_init() failed\n");
+ HDprintf("np_init() failed\n");
TEST_ERROR;
}
@@ -1842,7 +1842,7 @@ main(int argc, char **argv)
result = attr_dsets_action(ADD_ATTR, &s, &ds, step);
if (s.use_np && !np_writer(result, step, &s, &np, &config)) {
- printf("np_writer() for addition failed\n");
+ HDprintf("np_writer() for addition failed\n");
TEST_ERROR;
}
}
@@ -1851,7 +1851,7 @@ main(int argc, char **argv)
/* Need to sync up writer/reader before moving onto the next phase */
if (s.use_np && !np_writer(true, 0, &s, &np, &config)) {
- printf("np_writer() for modification failed\n");
+ HDprintf("np_writer() for modification failed\n");
TEST_ERROR;
}
@@ -1862,7 +1862,7 @@ main(int argc, char **argv)
result = attr_dsets_action(MODIFY_ATTR, &s, &ds, step);
if (s.use_np && !np_writer(result, step, &s, &np, &config)) {
- printf("np_writer() for modification failed\n");
+ HDprintf("np_writer() for modification failed\n");
TEST_ERROR;
}
}
@@ -1872,7 +1872,7 @@ main(int argc, char **argv)
/* Need to sync up writer/reader before moving onto the next phase */
if (s.use_np && !np_writer(true, 0, &s, &np, &config)) {
- printf("np_writer() for deletion failed\n");
+ HDprintf("np_writer() for deletion failed\n");
TEST_ERROR;
}
@@ -1883,7 +1883,7 @@ main(int argc, char **argv)
result = attr_dsets_action(DELETE_ATTR, &s, &ds, step);
if (s.use_np && !np_writer(result, step, &s, &np, &config)) {
- printf("np_writer() for deletion failed\n");
+ HDprintf("np_writer() for deletion failed\n");
TEST_ERROR;
}
}
@@ -1896,7 +1896,7 @@ main(int argc, char **argv)
dbgf(2, "Verifying...attribute %d\n", step);
if (s.use_np && !np_confirm_verify_notify(np.fd_writer_to_reader, step, &s, &np)) {
- printf("np_confirm_verify_notify() verify/notify not in sync failed\n");
+ HDprintf("np_confirm_verify_notify() verify/notify not in sync failed\n");
TEST_ERROR;
}
@@ -1906,7 +1906,7 @@ main(int argc, char **argv)
result = verify_attr_dsets_action(ADD_ATTR, &s, &ds, step);
if (s.use_np && !np_reader(result, step, &s, &np)) {
- printf("np_reader() for verifying addition failed\n");
+ HDprintf("np_reader() for verifying addition failed\n");
TEST_ERROR;
}
}
@@ -1914,7 +1914,7 @@ main(int argc, char **argv)
if (s.mod_attr) {
/* Need to sync up writer/reader before moving onto the next phase */
if (!np_reader_no_verification(&s, &np, &config)) {
- printf("np_reader_no_verification() for verifying modification failed\n");
+ HDprintf("np_reader_no_verification() for verifying modification failed\n");
TEST_ERROR;
}
@@ -1923,7 +1923,7 @@ main(int argc, char **argv)
dbgf(2, "Verifying...modify attribute %d\n", step);
if (s.use_np && !np_confirm_verify_notify(np.fd_writer_to_reader, step, &s, &np)) {
- printf("np_confirm_verify_notify() verify/notify not in sync failed\n");
+ HDprintf("np_confirm_verify_notify() verify/notify not in sync failed\n");
TEST_ERROR;
}
@@ -1933,7 +1933,7 @@ main(int argc, char **argv)
result = verify_attr_dsets_action(MODIFY_ATTR, &s, &ds, step);
if (s.use_np && !np_reader(result, step, &s, &np)) {
- printf("np_reader() for verifying modification failed\n");
+ HDprintf("np_reader() for verifying modification failed\n");
TEST_ERROR;
}
}
@@ -1943,7 +1943,7 @@ main(int argc, char **argv)
/* Need to sync up writer/reader before moving onto the next phase */
if (!np_reader_no_verification(&s, &np, &config)) {
- printf("np_reader_no_verification() for verifying modification failed\n");
+ HDprintf("np_reader_no_verification() for verifying modification failed\n");
TEST_ERROR;
}
@@ -1952,7 +1952,7 @@ main(int argc, char **argv)
dbgf(2, "Verifying...delete attribute %d\n", step);
if (s.use_np && !np_confirm_verify_notify(np.fd_writer_to_reader, step, &s, &np)) {
- printf("np_confirm_verify_notify() verify/notify not in sync failed\n");
+ HDprintf("np_confirm_verify_notify() verify/notify not in sync failed\n");
TEST_ERROR;
}
@@ -1962,7 +1962,7 @@ main(int argc, char **argv)
result = verify_attr_dsets_action(DELETE_ATTR, &s, &ds, step);
if (s.use_np && !np_reader(result, step, &s, &np)) {
- printf("np_reader() for verifying deletion failed\n");
+ HDprintf("np_reader() for verifying deletion failed\n");
TEST_ERROR;
}
}
@@ -1970,32 +1970,32 @@ main(int argc, char **argv)
}
if (!close_dsets(&ds)) {
- printf("close_dsets() failed\n");
+ HDprintf("close_dsets() failed\n");
TEST_ERROR;
}
if (H5Pclose(fapl) < 0) {
- printf("H5Pclose failed\n");
+ HDprintf("H5Pclose failed\n");
TEST_ERROR;
}
if (H5Pclose(fcpl) < 0) {
- printf("H5Pclose failed\n");
+ HDprintf("H5Pclose failed\n");
TEST_ERROR;
}
if (H5Fclose(s.file) < 0) {
- printf("H5Fclose failed\n");
+ HDprintf("H5Fclose failed\n");
TEST_ERROR;
}
if (H5Sclose(s.one_by_one_sid) < 0) {
- printf("H5Sclose failed\n");
+ HDprintf("H5Sclose failed\n");
TEST_ERROR;
}
if (s.use_np && !np_close(&np, writer)) {
- printf("np_close() failed\n");
+ HDprintf("np_close() failed\n");
TEST_ERROR;
}