summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-10-12 16:32:23 (GMT)
committerGitHub <noreply@github.com>2023-10-12 16:32:23 (GMT)
commitea3f92605761e1ff17d858df303dc375df7efc1c (patch)
tree716311100f8d0f0dc77bca31245878546952aabc /test
parent0feda66ff0dccdf77453b7c881c80be244e0ae12 (diff)
downloadhdf5-ea3f92605761e1ff17d858df303dc375df7efc1c.zip
hdf5-ea3f92605761e1ff17d858df303dc375df7efc1c.tar.gz
hdf5-ea3f92605761e1ff17d858df303dc375df7efc1c.tar.bz2
1.14 sync with develop (#3660)
* Rework tools.cmake and add C flags (#3110) * Fix gh pages so that the doxygen files are uploaded (#3102) * Add workspace path * add debug * Make one job so workspace files are available * Put doxygen docs under docs folder in gh-pages * Fix a misc warning in test/vol.c (#3112) The compiler complains about using integers instead of size_t for some sizes. * Remove H5detect and H5make_libsettings (#3104) Removes H5detect and H5make_libsettings from the build and replaces their functionality with things that don't affect cross-compiling. H5detect --> floating-point types are now detected on library load H5make_libsettings --> Moved functionality to a new H5build_settings.c template file * clang-tidy clang-analyzer-core issues addressed (#3113) src/H5system.c:1293:13: warning: Dereference of null pointer [clang-analyzer-core.NullDereference] src/H5trace.c:4048:17: warning: Passed-by-value struct argument contains uninitialized data (e.g., via the field chain: 'initial.user') [clang-analyzer-core.CallAndMessage] * Add note for issue 3056 (#3117) * Use 1.14 toolchain (#3116) * Remove the checkposix script (#3122) This script was used to ensure that all non-HDF5 calls were prefixed with 'HD'. We are removing this scheme so this script is no longer needed. * Remove unused HD macros (#3120) * Remove unused HD macros The library prefixes most C and POSIX API calls with 'HD'. We are going to start removing these so the code looks like normal C. This PR removes most of the unused HD markup macros. * Replace ntohl/ntohs * Adds an optional version arg to bin/format_source (#3119) * Clean up mirror VFD code in utils dir (#3121) * Remove dead code * Replace mybzero with memset * Replace hbool_t/TRUE/FALSE with bool/true/false * Fix spelling issues flagged by codespell (#3130) * Make autogen.sh output message consistent (#3128) * Add Python for HDF-EOS zoo description (#3129) * Fix function name in comment in ros3 VFD (#3131) * Revert long double checks (#3133) * Revert "Remove long double conversion work-arounds (#3097)" This reverts commit 1e1dac1dac58fa18f6b7788346d1ba7d3315b0f9. * Update comments to reflect newer systems * Add java options to build scripts (#3127) * Add java options to build scripts Previously, cmakehdf5 turned on compiling of the java interface by default due to a value set in cacheinit.cmake. Now, consistent with how Fortran and CPP interfaces are handled, the script overwrites this default value to disable the libraries, fixing #2958. I also implemented the --enable-java/--disable java options for cmakehdf5, and -java for buildhdf5. Allen said these scripts should mention that compilers are to be specified in environment variables, but missing compilers causes errors at the CMake level, and CMake's error messages are already pretty informative (See the one in #2958 about JAVA_COMPILER). * Removed .lnt linter files (#3143) These were last usefully modified in 2004 * Fix path to libhdf5.settings in cmakehdf5 (#3140) * Many clang -Wextra-semi-stmt fixes (#2537) * Adds semicolons to function-like macros * Adds a do..while(0) loop to some macros * Removes semicolons when inappropriate, especially H5E_TRY_BEGIN/END * Remove HD prefix from network calls (#3142) HDsocket(), etc. Only affects the mirror VFD and its test code. * Remove hbool_t/TRUE/FALSE from java (#3145) Replaces with bool/true/false * CMake: (feature) ROS3 and cmake config file. (#3146) - Added a cmake variable to the hdf5-config.cmake file which indicate if the library has been build with or without the read-only S3 functionality. * Define minimal permissions for new GitHub workflows (#3147) * Track s3 i/o when S3COMMS_DEBUG enabled (#3139) * Track s3 i/o when S3COMMS_DEBUG enabled * Fix the snapshots workflow (#3148) * Add upload url as artifact * Change doxygen path and comment log-url upload * zip doxygen files for upload * add workspace var * chore: fix grammar (#3150) * chore: fix grammar * Removes the HD prefix from java C99 calls (#3149) POSIX calls (HDstrndup, etc.) are unchanged * Correct the zip usage (#3153) * Many fixes to various compiler warnings (#3124) * Fixed various -Wmissing-variable-declarations by adding static keyword * In a few cases, renamed the variable suffix from _g to _s. * Fixed some -Wmissing-variable-declarations by using different declaration macros * Fixed various -Wconditional-uninitialized warnings by just initializing variable to zero * Fixed various -Wcomma warnings * Fixed clang -Wstrict-prototypes warnings * Fixed various -Wunused-variable warnings * Updated some casts to fix the only 3 -Wcast-qual warnings * Fixed the only -Wsometimes-uninitialized warning * Create Security Policy (#3152) * Fix #1978 h5vers usage message. (#3162) Update Platforms Tested in RELEASE.txt. * speed-up building HDF5 (#3087) Disables building the tests when building the netCDF, etc. * Remove dead code behind #ifdef OLD_WAY (#3163) * Remove H5F_evict_tagged_metadata() (#3165) The rest of the library just calls H5AC_evict_tagged_metadata() directly. * Add missing space in zip command (#3167) * Fixed check for a VOL's async compatibility (#3164) * cap flag fix in test * added async comp. output * Update Linux workflows (#3173) * Consolidate environment setup * Turn on ros3 VFD in CMake (Linux only) * Add gh-pages doxygen link (#3175) * Fix the doxygen to gh pages and artifact creation (#3176) * Tidy the list of options in main.yml (#3181) * Remove HD/hbool_t from fortran (#3182) * Remove HD/hbool_t from high-level lib (#3183) * Remove HDva_(arg|copy|end|start) (#3184) * Drop HD prefix & hbool_t from H5TS (#3180) * Remove HD from fork/exec*/wait* (#3190) These are not C99 but are hidden behind ifdefs and are highly unlikely to ever have non-POSIX equivalents. * Fix assertion failure when attempting to use IOC VFD directly (#3187) * Rename HDqsort() to qsort() (#3193) * Rename HDqsort() to qsort() * Committing clang-format changes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Rename HDpipe() to pipe() (#3192) Pipe is POSIX but implemented in Microsoft's CRT * Rename HDassert() to assert() (#3191) * Change HDassert to assert * Fix bin/make_err * Rename HD(f)printf() to (f)printf() (#3194) * Add note about HDF5_VOL_CONNECTOR to tools usage (#3159) * Rename HDsystem() to system() (#3197) system() is only used in the iopipe test and the things it calls (which are POSIX-y) are protected by an ifdef. * Remove HD from HDposix_memalign() (#3196) The posix_memalign call is only used in the direct VFD, which can only be built if posix_memalign() is available. * Remove HD from memory allocate/free calls (#3195) * HDcalloc * HDfree * HDmalloc * HDrealloc * chore: fix grammar (#3207) * docs: remove redundancy in Data Transfer section of user guide (#3208) * Remove checks for setsysinfo, which is unused (#3205) * Autotools * CMake * Remove HD from protected POSIX calls (#3203) These calls are non-C99 but protected by ifdefs and have no Windows equivalents: * HDalarm * HDasprintf * HDclock_gettime * HDfcntl * HDgethostname * HDgetrusage * HDsymlink * Rename HDato*() to ato*() (#3201) * Remove some "Programmer" comments (#3209) These are meaningless noise. Removes the "Programmer" lines on comment start lines: /* Programmer: John Smith These complicate my sed script that will rip out the rest of the comments. * Rename HDexit() and related to exit(), etc. (#3202) * HDatexit * HDexit * HD_exit * Remove HD from strto* calls (#3204) * HDstrtod * HDstrtol * HDstrtoll * HDstrtoul * HDstrtoull * HDstrtoumax * Remove HD from C std lib file ops (#3206) * HDfclose * HDferror * HDfeof * HDfflush * HDfopen * HDfread * HDfwrite * Remove programmer/date from comments (#3210) * Removes Programmer: and Date: fields * Fixes a few Modifications: fields leftover from previous work * Remove HD from HDmem* calls (#3211) * Remove HD from HDis* (e.g., isalpha) (#3212) * HDisalnum * HDisalpha * HDiscntrl * HDisdigit * HDisgraph * HDislower * HDisprint * HDispunct * HDisspace * HDisupper * HDisxdigit * Update actions for release option, fix branch for daily build (#3185) * Update actions for release option, fix branch for daily build * Scheduled workflows run on latest commit on the develop * Add snapshots location * docs: improve consistency in verb form (#3076) (#3188) * fix gh action if statements (#3213) * Adjust presets timeout and fix build script VS versions (#3215) * Several ros3vfd logging improvements * Committing clang-format changes * Update COPYING (#3231) Fixed old support URL. * addresses compilation fortran warnings on Frontier (#3236) * Fix doc for H5allocate_memory (#3240) * merge bbrelease to release (#3232) * merge bbrelease to release * Fix pre-req workflow * Replace support.hdfgroup.org URLs for alternative COPYING file (#3228) * Replace support.hdfgroup.org URLs for alternative COPYING file locations in copyright headers with https://www.hdfgroup.org/licenses. Replace support.hdfgroup.org URL for alternative COPYING_LBNL_HDF5 with github URL. Tweak chkcopyright script for change from UICOPYRIGHTSTR to THGCOPYRIGHTSTR. * Replace 1_10 reference with develop branch (#3227) * Switch CI to use release script (#3242) * Subfiling VFD source cleanup (#3241) * Subfiling VFD source cleanup Modularize Subfiling CMake code into separate CMakeLists.txt file Update Mercury util code to latest version and update Copyright Generate mercury_util_config.h header file instead of using pre-generated file Remove unnecessary Mercury functionality Fix minor warning in Subfiling VFD code * Remove Mercury headers from Autotools publicly-distributed header list * install h5fuse.sh in bin dir. (#3244) * Disable h5py until fixed properly without spack (#3243) * ROS3: (feature) Temporary security credentials (#3030) - Implemented support for AWS temporary security credentials. For this kind of credentials also a session/security token should be included in the request by adding the x-amz-security-token header. Co-authored-by: Larry Knox <lrknox@hdfgroup.org> Co-authored-by: Jordan Henderson <jhenderson@hdfgroup.org> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Avoid truncating at null byte when copying to std::string (#3083) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Fix CMake builds when Subfiling VFD isn't enabled (#3250) * Fix CMake builds when Subfiling VFD isn't enabled * Add Subfiling VFD entry to hdf5-config.cmake.in * Fix some warnings in developer builds (#3247) * Fix some warnings in developer builds * Switch approach to Winline flag * Fixed more warnings about extra semicolons (#3249) * Require semi-colon after H5_CHECK_OVERFLOW calls Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Fix warning in H5C__UPDATE_STATS_FOR_DIRTY_PIN macro (#3259) Add braces to H5C__UPDATE_STATS_FOR_DIRTY_PIN macro to fix warning causing Werror Release builds to fail * Update DEFAULT_API_VERSION documentation for CMake (#3255) * Update DEFAULT_API_VERSION documentation for CMake * Fix hint --------- Co-authored-by: Larry Knox <lrknox@hdfgroup.org> * changed the scope of #ifdef DOXYGEN to now include H5D multi-functions (#3254) * Option changed but not all references (#3252) * Option changed but not all references * remove quotes from binary var * Move 1.12.3 release to October (#3263) * Fixed some -Wunused-variable warnings and one Wsometimes-uninitialized warning (#3260) * removed the use of encoded single apostrophe (#3261) * removed the use of encoded single apostrophe, and fix H5Dread_chunk from write to read * updated sanitizer paragraph * fixed brief description for H5Fget_info * ROS3: (fix) Replaced HDfprintf (#3266) - Replaced the HDfprintf() functions by fprintf() to be consistent with other parts of the library. * chore: make VRFY output consistent (#3268) * CMake: (fix) Threads dependency (#3267) - If the HDF5 library has been build with either thread-safety or subfiling VFD feature on it will have an additional dependency on a threading library. This dependency has been added to the hdf-config.cmake.in file. * chore: fix grammar - get hang -> get hung (#3272) * Another round of fixing -Wextra-semi-stmt warnings (#3264) Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * chore: fix typo - persent -> present (#3273) * Remove py-pip from h5py action (#3265) * Update release schedule (#3317) * Move 1.12.3 to November * Add 1.14.3 in October * Update README.md w/ 1.4.3 info (#3318) * Switch parallel compression to use vector I/O (#3245) Updates parallel compression feature to use vector I/O instead of creating and passing down MPI derived types to VFD * Fix incorrect error check in H5Ofill.c for undefined fill values (#3312) * Fix H5Otoken_to_str call in h5dump and other minor cleanup (#3314) * Fix loading plugin fails with missing directory GH issue #3248 (#3315) * Made HGOTO_ERROR a do-while loop (#3308) * Made HGOTO_ERROR a do-while loop * Update files to skip list and ignore_words_list (#3321) * Update files to skip list and ignore_words_list for codespell to not check files generated by autotools. Autotools generate misspellings that can't be fixed in HDF5 code. * Windows runtime items go into the bin folder (#3320) * A couple of documentation items to fix (#3332) * Fix h5repack for variable-length datatyped datasets (#3331) * Fix CVE-2018-11202 (#3330) A malformed file could result in chunk index memory leaks. Under most conditions (i.e., when the --enable-using-memchecker option is NOT used), this would result in a small memory leak and and infinite loop and abort when shutting down the library. The infinite loop would be due to the "free list" package not being able to clear its resources so the library couldn't shut down. When the "using a memory checker" option is used, the free lists are disabled so there is just a memory leak with no abort on library shutdown. The chunk index resources are now correctly cleaned up when reading misparsed files and valgrind confirms no memory leaks. * Fix CVE-2018-13867 (#3336) * Fixes the last of the -Wextra-semi-stmt warnings (#3326) * Fixed extra semi warning by adjusting alternative macro definitions * Find-replace H5E_END_TRY; -> H5E_END_TRY * Made H5Epush_goto a do-while loop, fixed indentation * Made GOTOERROR and ERRMSG do-while loops * Made Hgoto_error and Hgoto_done do-while loops * Made vrfy_cint_type and vrfy_ctype do-while loops * Made TEST_TYPE_CONTIG and others do-while loops * Removed extraneous semi-colons * Committing clang-format changes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Fix a typo in RELEASE.txt * Fix assertion failure in H5D__mpio_collective_filtered_vec_io (#3340) * Make h5dump spacing consistent when printing VLEN datatype (#3351) * Fix for the bug exposed from running test/set_extent.c when selection… (#3319) * Fix for the bug exposed from running test/set_extent.c when selection I/O is enabled. This is a fix from Neil. The test/set_extent.c is modified to test for selection I/O enabled. * Add Fortran ES module to deploy list (#3341) * Add Fortran ES module to deploy list * Change fortran mod file export to use a list of names * test(parallel): verify FALSE case (#3356) * Implementation of the mpio driver with selection I/O. (#3222) * This changes the default selection I/O to on for MPIO. * Work around a testphdf5 failure on Cray MPICH machines (#3361) * set H5_PAC_C_MAX_REAL_PRECISION default to 0 when cross sompiling with (#3364) CMake to fix Fortran build failures. * Add RELEASE.txt notes for recent selection I/O work. (#3374) * Fix possible performance regression introduced with in-place type conversion in 1.14.2 (#3376) * Correct script (#3377) * Correct CI settings (#3384) * Correct CI settings * Correct plugin file name * restore CI tarball name prefix to match bin/release (#3385) * Fix assertion failure during file close on error (#3387) * Fix compile failures with H5C_DO_MEMORY_SANITY_CHECKS enabled (#3388) * Fix valgrind warning about write of uninitialized bytes (#3389) * Fix valgrind warning about write of uninitialized bytes in ScaleOffset filter (#3390) * Update presets, examples uncompress, szip cache (#3391) * Fix serial to parallel chunked dataset file space allocation bug (#3394) * chore: fix typo (#3405) * Fix for CVE-2016-4332 (#3406) This CVE issue was previously listed as fixed (via HDFFV-9950) back in 2016, but with no confirmation test. Now that test files exist for the 2016 Talos CVE issues, we found that CVE-2016-4332 can raise an assert in debug builds. This fix replaces the assert with pointer checks that don't raise errors or asserts. Since the function is in cleanup code, we do our best to close and free things, even when presented with partially- initialized structs. Fixes CVE-2016-4332 and HDFFV-9950 (confirmed via the cve_hdf5 repo) * Fix ph5diff tests for MPIEXEC_MAX_NUMPROCS=1 (#3407) * Enable szip by default in Autotools (#3412) Since libaec is so prevalent and BSD-licensed for both encode and decode, we build the szip filter by default when the szip or aec libraries are found. * Re-enable SZIP default to ON in CMake (#3414) The Autotools were handled in a separate commit * Fix Heap-buffer-overflow WRITE in H5MM_memcpy (#3368) * Add Intel oneAPI actions (#2949) (#2977) * ci: add Intel oneAPI actions (#2949) * ci: fix CMake installation * ci: use absolute paths for libtool installation * ci(oneAPI): update compiler versions and use cron * Add RELEASE.txt entry for compound performance regression fix (#3376) (#3416) * chore: remove gubbins comment (#3420) * Add other types and full type to enum/str/vlen dataformat for structblock[begin/end] (#3353) * Avoid H5Ocopy in h5repack for variable-length string types (#3419) * Skip atomicity tests for OpenMPI major versions < 5 (#3421) * Fix an issue with use of uninitialized memory in trefer_deprec.c test (#3422) * Add parallel examples in doxygen (#3413) * Fix use of uninitialized value in testpar/t_dset.c test (#3423) * Remove extraneous "33" in RELEASE.txt (#3425) * Revise file close assertion failure fix (#3418) * Remove intel oneapi warning (#3426) * Fix for CVE-2018-15671. h5stat -S $POC will result in a crash with segmenetation fault. (#3427) It is because the object in the testfile points back to the root group. When the tool tries to traverse the object, it goes back to the root group and then back again. * chore: match function call and VRFY() output (#3428) * Fix the Fortran extension used in example links (#3430) * Put H5T_CONV_ab macros in do..while loops (#3432) Ever since a recent round of macro cleanup, bin/trace and clang-format have been bickering over what H5Tconv.c should look like and neither produces readable code. This change puts the top-level H5T_CONV_ab macros in do..while loops, adds appropriate semicolons, and adds the missing H5_CLANG_DIAG_ON|OFF and H5_GCC_CLANG_DIAG_ON|OFF macros to the list of statement macros clang-format recognizes. H5Tconv.c is now readable and both bin/trace and clang-format are happy. * Convert some H5MM calls to standard C equivalents (#2382) * H5MM_calloc and malloc are now mapped to stdlib C calls * H5MM_memcpy now maps directly to memcpy in release builds * H5MM_memcpy is still implemented as a separate function that checks for buffer overlap when H5MM_DEBUG is defined (default w/ debug builds) * Switches many library memcpy calls to use H5MM_memcpy * Fixes a possible zero allocation in H5Olayout.c * Add 1.14.4 to the release schedule (#3434) * Output stderr file in CMake testing on failure (#3431) * Add Intel oneAPI badges (#3433) * Add a CVE regression test action (#3445) * * Disable SZIP for Intel oneAPI Action (#3449) * Disable SZIP for Intel oneAPI Action * Disable Fortran and parallel * Update VOL CMake for REST VOL (#3450) * Update VOL CMake for REST VOL * Prevent linking static libs to VOLs * Add an h5py badge to README.md (#3477) * Removed all the ranks printing out testing information (#3457) * Fix Subfiling VFD IOC assignment bug (#3456) * Correct java test dimension (#3482) * Support CMake VOL builds with FetchContent from local directory (#3455) * Update VOL CMake for REST VOL * Prevent linking static libs to VOLs * index on fetch_local: 5c5c3f1505 Prevent linking static libs to VOLs * index on (no branch): 9a36d3e7b1 On fetch_local: WIP:add source dir fetch option for vols * Allow building of VOL from local source * Move LOCAL_DIR option to HDF5_VOL_ALLOW_EXTERNAL * Fix the Fortran include dir in install config files (#3454) * Convert hbool_t --> bool in examples (#3492) * Fix some minor formatting for consistency (#3499) * Create scorecard.yml (#3508) Bring in OSSF Scorecard code scanner as a GitHub action * Convert hbool_t --> bool in testpar (#3495) * hbool_t/TRUE/FALSE --> bool/true/false in tools (#3491) * Convert hbool_t --> bool in test (#3494) * Convert hbool_t --> bool in src (#3496) * hbool_t --> bool in src * Does not remove TRUE/FALSE * Public header files are unchanged * Public API calls are unchanged * TRUE/FALSE --> true/false in src * Add deprecation notice for hbool_t * Added new Fortran API wrappers (#3511) * Added new wrappers for h5get_free_list_sizes_f H5Sselect_intersect_block_f H5Sselect_shape_same_f h5pget_no_selection_io_cause_f h5pget_mpio_no_collective_cause_f H5Lvisit_by_name_f H5Lvisit_f H5Fget_info_f h5dwrite_chunk_f h5dread_chunk_f * added h5pget_file_space_page_size_f, h5pset_file_space_page_size_f, h5pget_file_space_strategy_f, h5pset_file_space_strategy_f, h5info tests * added fortran tests * Update tH5F.F90 * misc. fortran fixes for failing CI dailty tests (#3523) * fixed H5Lvisit* interface * changed integer type for direct write * Consistent initialization of hid_t in the tests (#3521) * Fix windows cpack with debug (#3525) * Add missing row for the ROS3 VFD in table #3415 (#3517) * fixed nvidia compiler issue (#3527) * Identify functions in a subgroup (#3530) * quiet warning on sunspot (gcc 11.2.0) (#3534) * Add API examples doxygen page (#3500) * removed C_INT32_T from Fortran APIs (#3537) * Add NVHPC 23.7 GitHub Actions (#3509) * Add NVHPC 27.3 GitHub Actions * Address @derobins review * Remove HD prefix from math functions (#3538) * Remove HD prefix from HDlog10 calls (#3539) Was missed in a previous commit and causes building subfiling to fail. * fixed arg to C H5Dwrite_chunk (#3541) * Strip HD prefix from string/char C API calls (#3540) * Strip HD prefix from string/char C API calls * HD(f)(put|get)(s|c) * HDstr* * HDv*printf * HD(s)(print|scan)f * HDperror But NOT: * HDstrcase* * HDvasprintf * HDstrtok_r * HDstrndup As those are not C99 and have portability work-around implementations. They will be handled later. * Fix th5_system.c screwup * Convert main.yml CI into callable workflows (#3529) * Fix broken URL. (#3546) * Fix grammar (#3545) * Update oneAPI-C/A badge yml links. (#3564) * Check return values from HDF5 API calls. (#3556) * Adds link to h5fuse.sh in testpar for autotools (#3557) * Make the h5fuse.sh utility available to parallel subfiling tests so h5fuse testing is not skipped. * Some minor formatting and text changes (#3563) * Fix typos and grammar in t_pread. (#3565) * Fix typo (givin->given) in test/testframe.c. (#3567) * Fix ifx unused variable hdferr warning. (#3568) * Correct comments about H5Z_FILTER_NONE (#3572) * Update release script. (#3577) * fixed function declaration (#3579) * Fixed GH-3554 (#3584) Removed the extra condition * Remove h5dwalk.1 man page. (#3589) * Removed the use of -commons linking option on Darwin (#3581) Removed the use of -commons linking option on Darwin as COMMON and EQUIVALENCE is no long used * Fix docs for H5Pset_dxpl_mpio_collective_opt() (#3594) * Fix typo: arange->arrange in src/H5Cmpio.c. (#3597) * Fix docs for H5Acreate2 and H5Acreate_by_name (#3598) * Use HDoff_t with lseek consistently (#3600) lseek on Windows uses __int64 for both the offset and return type instead of off_t like most POSIX systems. This changes ensures we use HDoff_t (which is typdef'd correctly on Windows) w/ lseek. * Replaces HDgetenv with getenv (#3599) * Develop tools move (#3580) Reorganizes the tools files to support the VOL tests * Clean up Subfiling VFD header doxygen formatting (#3601) * Remove `sh` to run bash script. (#3590) * Correct path name of ddl file to be changed (#3607) * Fix potential uninitialized variable (#3602) Moves a union initialization up a bit so it's performed before code that can jump to the cleanup target, where file descriptors could be checked without being initialized. This could only happen in test code and only in an out-of-memory situation. Fixes Coverity 1542254 * Remove unnecessary assignment in test generator (#3603) Fixes what looks like a copy/paste/modify error in the format convert test file generator, where an array element is assigned one value and them immediately overwritten by another value. Fixes Coverity issue 1542285 * Remove useless define TRUE/FALSE statements. (#3604) * Fix typo behaviour and dependes. (#3605) * Fix typos (#3609) * Fixed unused variable in H5CS.c (#3552) (#3612) * Fixed #3552 * Fix grammar (#3614) * Cleanup unused statements (#3553) (#3617) Removed unnecessary assert statements and noise comments. * Fix Intel oneAPI icc warning (#3619) * Fix several spelling/grammar issues (#3621) * Add HPC CDash to README.md (#3623) * Disable static + thread-safe on Windows w/ CMake (#3622) The thread-safety feature on Windows requires a hook in DllMain() and thus is only available when HDF5 is built as a shared library. This was previously a warning, but has now been elevated to a fatal error that cannot be overridden with ALLOW_UNSUPPORTED. Fixes GitHub #3613 * Remove unused member from H5D_shared_t struct. (#3628) * Remove old EXTERNALPROJECT_ADD in favor of FETCH_CONTENT (#3624) * Fix grammar (#3635) * Disambiguate error output messages. (#3634) * Disambiguate error output messages. * Address @brtnfld review. * Fail CMake on Windows when sub-filing VFD is enabled (#3636) * Improve consistency in past tense usage (#3638) * Split out test logic to separate file (#3639) * Drop MPI-2 support (#3643) * Switch IEEE flags for NAG Fortran (#3644) Default is -ieee=stop, which causes problems when the H5T module performs floating-point type introspection. The new mode is -ieee=full * Remove 1.10.11 info from README.md (#3646) * Fixes GH#1027 compilation error (#3654) * Remove 1.10 badge (#3650) * Use real URLs and updated names for plugins (#3651) * synchronize TGZ naming convention/usage * Update parallel compression feature to support multi-dataset I/O (#3591) * Add more tests for selection I/O. (#3528) * Adjust 1.14 files after merging ---------
Diffstat (limited to 'test')
-rw-r--r--test/API/H5_api_async_test.c80
-rw-r--r--test/API/H5_api_attribute_test.c224
-rw-r--r--test/API/H5_api_dataset_test.c138
-rw-r--r--test/API/H5_api_datatype_test.c32
-rw-r--r--test/API/H5_api_file_test.c12
-rw-r--r--test/API/H5_api_group_test.c41
-rw-r--r--test/API/H5_api_link_test.c932
-rw-r--r--test/API/H5_api_misc_test.c46
-rw-r--r--test/API/H5_api_object_test.c84
-rw-r--r--test/API/H5_api_test.c43
-rw-r--r--test/API/H5_api_test_util.c50
-rw-r--r--test/API/H5_api_test_util.h4
-rw-r--r--test/API/driver/CMakeLists.txt4
-rw-r--r--test/API/tarray.c30
-rw-r--r--test/API/tattr.c817
-rw-r--r--test/API/tcoords.c26
-rw-r--r--test/API/testhdf5.c70
-rw-r--r--test/API/testhdf5.h30
-rw-r--r--test/API/tfile.c348
-rw-r--r--test/API/tgenprop.c44
-rw-r--r--test/API/th5o.c28
-rw-r--r--test/API/th5s.c422
-rw-r--r--test/API/tid.c48
-rw-r--r--test/API/titerate.c92
-rw-r--r--test/API/tmisc.c140
-rw-r--r--test/API/trefer.c16
-rw-r--r--test/API/tselect.c777
-rw-r--r--test/API/tunicode.c84
-rw-r--r--test/API/tvlstr.c44
-rw-r--r--test/API/tvltypes.c186
-rw-r--r--test/CMakePassthroughVOLTests.cmake10
-rw-r--r--test/CMakeTests.cmake13
-rw-r--r--test/CMakeVFDTests.cmake10
-rw-r--r--test/accum.c70
-rw-r--r--test/accum_swmr_reader.c12
-rw-r--r--test/app_ref.c8
-rw-r--r--test/atomic_reader.c2
-rw-r--r--test/atomic_writer.c2
-rw-r--r--test/big.c63
-rw-r--r--test/bittests.c72
-rw-r--r--test/btree2.c1088
-rw-r--r--test/cache.c10196
-rw-r--r--test/cache_api.c487
-rw-r--r--test/cache_common.c683
-rw-r--r--test/cache_common.h154
-rw-r--r--test/cache_image.c1657
-rw-r--r--test/cache_logging.c66
-rw-r--r--test/cache_tagging.c442
-rw-r--r--test/chunk_info.c42
-rw-r--r--test/cmpd_dset.c1276
-rw-r--r--test/cmpd_dtransform.c8
-rw-r--r--test/cork.c156
-rw-r--r--test/cross_read.c48
-rw-r--r--test/dangle.c16
-rw-r--r--test/del_many_dense_attrs.c26
-rw-r--r--test/direct_chunk.c119
-rw-r--r--test/dsets.c797
-rw-r--r--test/dt_arith.c286
-rw-r--r--test/dtransform.c48
-rw-r--r--test/dtypes.c390
-rw-r--r--test/earray.c167
-rw-r--r--test/efc.c16
-rw-r--r--test/enc_dec_plist.c74
-rw-r--r--test/enc_dec_plist_cross_platform.c56
-rw-r--r--test/enum.c4
-rw-r--r--test/error_test.c70
-rw-r--r--test/event_set.c20
-rw-r--r--test/evict_on_close.c120
-rw-r--r--test/external.c288
-rw-r--r--test/external_common.c10
-rw-r--r--test/external_common.h2
-rw-r--r--test/external_env.c50
-rw-r--r--test/farray.c126
-rw-r--r--test/fheap.c348
-rw-r--r--test/file_image.c70
-rw-r--r--test/filenotclosed.c20
-rw-r--r--test/fillval.c139
-rw-r--r--test/filter_fail.c28
-rw-r--r--test/filter_plugin.c150
-rw-r--r--test/flush1.c62
-rw-r--r--test/flush2.c90
-rw-r--r--test/flushrefresh.c22
-rw-r--r--test/freespace.c72
-rw-r--r--test/gen_bad_offset.c8
-rw-r--r--test/gen_bad_ohdr.c28
-rw-r--r--test/gen_bogus.c26
-rw-r--r--test/gen_bounds.c58
-rw-r--r--test/gen_cross.c56
-rw-r--r--test/gen_deflate.c2
-rw-r--r--test/gen_file_image.c2
-rw-r--r--test/gen_filespace.c24
-rw-r--r--test/gen_filters.c24
-rw-r--r--test/gen_new_fill.c3
-rw-r--r--test/gen_new_group.c12
-rw-r--r--test/gen_old_group.c4
-rw-r--r--test/gen_plist.c78
-rw-r--r--test/gen_udlinks.c6
-rw-r--r--test/genall5.c1008
-rw-r--r--test/genall5.h16
-rw-r--r--test/getname.c76
-rw-r--r--test/gheap.c58
-rw-r--r--test/h5test.c160
-rw-r--r--test/h5test.h25
-rw-r--r--test/hdfs.c80
-rw-r--r--test/hyperslab.c59
-rw-r--r--test/istore.c34
-rw-r--r--test/lheap.c28
-rw-r--r--test/links.c3004
-rw-r--r--test/links_env.c28
-rw-r--r--test/mdset.c12
-rw-r--r--test/mf.c656
-rw-r--r--test/mirror_vfd.c100
-rw-r--r--test/mount.c327
-rw-r--r--test/mtime.c26
-rw-r--r--test/ntypes.c149
-rw-r--r--test/objcopy.c1677
-rw-r--r--test/objcopy_ref.c215
-rw-r--r--test/ohdr.c228
-rw-r--r--test/onion.c92
-rw-r--r--test/page_buffer.c120
-rw-r--r--test/reserved.c29
-rw-r--r--test/ros3.c183
-rw-r--r--test/s3comms.c160
-rw-r--r--test/select_io_dset.c317
-rw-r--r--test/set_extent.c210
-rw-r--r--test/stab.c244
-rw-r--r--test/swmr.c361
-rw-r--r--test/swmr_common.c4
-rw-r--r--test/swmr_generator.c36
-rw-r--r--test/swmr_reader.c30
-rw-r--r--test/swmr_remove_reader.c2
-rw-r--r--test/swmr_sparse_reader.c2
-rw-r--r--test/swmr_sparse_writer.c6
-rw-r--r--test/swmr_start_write.c26
-rw-r--r--test/swmr_writer.c34
-rw-r--r--test/tarray.c30
-rw-r--r--test/tattr.c869
-rw-r--r--test/tcheck_version.c4
-rw-r--r--test/tcoords.c26
-rw-r--r--test/testfiles/aggr.h5 (renamed from test/aggr.h5)bin2448 -> 2448 bytes
-rw-r--r--test/testfiles/bad_compound.h5 (renamed from test/bad_compound.h5)bin2208 -> 2208 bytes
-rw-r--r--test/testfiles/bad_offset.h5 (renamed from test/bad_offset.h5)bin3312 -> 3312 bytes
-rw-r--r--test/testfiles/be_data.h5 (renamed from test/be_data.h5)bin72368 -> 72368 bytes
-rw-r--r--test/testfiles/be_extlink1.h5 (renamed from test/be_extlink1.h5)bin896 -> 896 bytes
-rw-r--r--test/testfiles/be_extlink2.h5 (renamed from test/be_extlink2.h5)bin2864 -> 2864 bytes
-rw-r--r--test/testfiles/btree_idx_1_6.h5 (renamed from test/btree_idx_1_6.h5)bin6350 -> 6350 bytes
-rw-r--r--test/testfiles/btree_idx_1_8.h5 (renamed from test/btree_idx_1_8.h5)bin5065 -> 5065 bytes
-rw-r--r--test/testfiles/corrupt_stab_msg.h5 (renamed from test/corrupt_stab_msg.h5)bin2928 -> 2928 bytes
-rw-r--r--test/testfiles/cve_2020_10810.h5 (renamed from test/cve_2020_10810.h5)bin1808 -> 1808 bytes
-rwxr-xr-xtest/testfiles/cve_2020_10812.h5bin0 -> 2565 bytes
-rw-r--r--test/testfiles/deflate.h5 (renamed from test/deflate.h5)bin6240 -> 6240 bytes
-rw-r--r--test/testfiles/family_v16-000000.h5 (renamed from test/family_v16-000000.h5)bin5120 -> 5120 bytes
-rw-r--r--test/testfiles/family_v16-000001.h5 (renamed from test/family_v16-000001.h5)bin5120 -> 5120 bytes
-rw-r--r--test/testfiles/family_v16-000002.h5 (renamed from test/family_v16-000002.h5)bin5120 -> 5120 bytes
-rw-r--r--test/testfiles/family_v16-000003.h5 (renamed from test/family_v16-000003.h5)bin4048 -> 4048 bytes
-rw-r--r--test/testfiles/file_image_core_test.h5 (renamed from test/file_image_core_test.h5)bin18528 -> 18528 bytes
-rw-r--r--test/testfiles/filespace_1_6.h5 (renamed from test/filespace_1_6.h5)bin2448 -> 2448 bytes
-rw-r--r--test/testfiles/filespace_1_8.h5 (renamed from test/filespace_1_8.h5)bin2544 -> 2544 bytes
-rw-r--r--test/testfiles/fill18.h5 (renamed from test/fill18.h5)bin3479 -> 3479 bytes
-rw-r--r--test/testfiles/fill_old.h5 (renamed from test/fill_old.h5)bin2560 -> 2560 bytes
-rw-r--r--test/testfiles/filter_error.h5 (renamed from test/filter_error.h5)bin3576 -> 3576 bytes
-rw-r--r--test/testfiles/fsm_aggr_nopersist.h5 (renamed from test/fsm_aggr_nopersist.h5)bin2448 -> 2448 bytes
-rw-r--r--test/testfiles/fsm_aggr_persist.h5 (renamed from test/fsm_aggr_persist.h5)bin2565 -> 2565 bytes
-rw-r--r--test/testfiles/group_old.h5 (renamed from test/group_old.h5)bin1952 -> 1952 bytes
-rw-r--r--test/testfiles/h5fc_ext1_f.h5 (renamed from test/h5fc_ext1_f.h5)bin6760 -> 6760 bytes
-rw-r--r--test/testfiles/h5fc_ext1_i.h5 (renamed from test/h5fc_ext1_i.h5)bin6526 -> 6526 bytes
-rw-r--r--test/testfiles/h5fc_ext2_if.h5 (renamed from test/h5fc_ext2_if.h5)bin6526 -> 6526 bytes
-rw-r--r--test/testfiles/h5fc_ext2_sf.h5 (renamed from test/h5fc_ext2_sf.h5)bin5076 -> 5076 bytes
-rw-r--r--test/testfiles/h5fc_ext3_isf.h5 (renamed from test/h5fc_ext3_isf.h5)bin6679 -> 6679 bytes
-rw-r--r--test/testfiles/h5fc_ext_none.h5 (renamed from test/h5fc_ext_none.h5)bin6474 -> 6474 bytes
-rw-r--r--test/testfiles/le_data.h5 (renamed from test/le_data.h5)bin72368 -> 72368 bytes
-rw-r--r--test/testfiles/le_extlink1.h5 (renamed from test/le_extlink1.h5)bin896 -> 896 bytes
-rw-r--r--test/testfiles/le_extlink2.h5 (renamed from test/le_extlink2.h5)bin2864 -> 2864 bytes
-rw-r--r--test/testfiles/memleak_H5O_dtype_decode_helper_H5Odtype.h5 (renamed from test/memleak_H5O_dtype_decode_helper_H5Odtype.h5)bin82816 -> 82816 bytes
-rw-r--r--test/testfiles/mergemsg.h5 (renamed from test/mergemsg.h5)bin3472 -> 3472 bytes
-rw-r--r--test/testfiles/multi_file_v16-r.h5 (renamed from test/multi_file_v16-r.h5)bin65536 -> 65536 bytes
-rw-r--r--test/testfiles/multi_file_v16-s.h5 (renamed from test/multi_file_v16-s.h5)bin2048 -> 2048 bytes
-rw-r--r--test/testfiles/noencoder.h5 (renamed from test/noencoder.h5)bin8088 -> 8088 bytes
-rw-r--r--test/testfiles/none.h5 (renamed from test/none.h5)bin1808 -> 1808 bytes
-rw-r--r--test/testfiles/paged_nopersist.h5 (renamed from test/paged_nopersist.h5)bin8192 -> 8192 bytes
-rw-r--r--test/testfiles/paged_persist.h5 (renamed from test/paged_persist.h5)bin16384 -> 16384 bytes
-rw-r--r--test/testfiles/specmetaread.h5 (renamed from test/specmetaread.h5)bin1752 -> 1752 bytes
-rw-r--r--test/testfiles/tarrold.h5 (renamed from test/tarrold.h5)bin6032 -> 6032 bytes
-rw-r--r--test/testfiles/tbad_msg_count.h5 (renamed from test/tbad_msg_count.h5)bin1984 -> 1984 bytes
-rw-r--r--test/testfiles/tbogus.h5 (renamed from test/tbogus.h5)bin5056 -> 5056 bytes
-rw-r--r--test/testfiles/test_filters_be.h5 (renamed from test/test_filters_be.h5)bin5720 -> 5720 bytes
-rw-r--r--test/testfiles/test_filters_le.h5 (renamed from test/test_filters_le.h5)bin5720 -> 5720 bytes
-rw-r--r--test/testfiles/th5s.h5 (renamed from test/th5s.h5)bin2049 -> 2049 bytes
-rw-r--r--test/testfiles/tlayouto.h5 (renamed from test/tlayouto.h5)bin1576 -> 1576 bytes
-rw-r--r--test/testfiles/tmtimen.h5 (renamed from test/tmtimen.h5)bin1576 -> 1576 bytes
-rw-r--r--test/testfiles/tmtimeo.h5 (renamed from test/tmtimeo.h5)bin2052 -> 2052 bytes
-rw-r--r--test/testfiles/tnullspace.h5bin0 -> 3624 bytes
-rw-r--r--test/testfiles/tsizeslheap.h5 (renamed from test/tsizeslheap.h5)bin1028 -> 1028 bytes
-rw-r--r--test/testframe.c70
-rw-r--r--test/testhdf5.c2
-rw-r--r--test/testhdf5.h2
-rw-r--r--test/testmeta.c8
-rw-r--r--test/tfile.c474
-rw-r--r--test/tgenprop.c44
-rw-r--r--test/th5_system.c88
-rw-r--r--test/th5o.c50
-rw-r--r--test/th5s.c469
-rw-r--r--test/thread_id.c16
-rw-r--r--test/tid.c52
-rw-r--r--test/timer.c18
-rw-r--r--test/titerate.c102
-rw-r--r--test/tmisc.c227
-rw-r--r--test/trefer.c38
-rw-r--r--test/trefer_deprec.c102
-rw-r--r--test/trefstr.c64
-rw-r--r--test/tselect.c787
-rw-r--r--test/tskiplist.c2
-rw-r--r--test/tsohm.c168
-rw-r--r--test/ttsafe.c16
-rw-r--r--test/tunicode.c86
-rw-r--r--test/tvlstr.c44
-rw-r--r--test/tvltypes.c236
-rw-r--r--test/twriteorder.c4
-rw-r--r--test/unlink.c201
-rw-r--r--test/unregister.c18
-rw-r--r--test/use.h6
-rw-r--r--test/use_append_chunk.c26
-rw-r--r--test/use_append_chunk_mirror.c16
-rw-r--r--test/use_append_mchunks.c22
-rw-r--r--test/use_common.c16
-rw-r--r--test/use_disable_mdc_flushes.c8
-rw-r--r--test/vds.c342
-rw-r--r--test/vds_env.c47
-rw-r--r--test/vds_swmr_gen.c14
-rw-r--r--test/vds_swmr_reader.c10
-rw-r--r--test/vds_swmr_writer.c10
-rw-r--r--test/vfd.c525
-rw-r--r--test/vfd_plugin.c40
-rw-r--r--test/vol.c98
-rw-r--r--test/vol_plugin.c32
235 files changed, 21023 insertions, 19802 deletions
diff --git a/test/API/H5_api_async_test.c b/test/API/H5_api_async_test.c
index 282f04a..7777e10 100644
--- a/test/API/H5_api_async_test.c
+++ b/test/API/H5_api_async_test.c
@@ -62,7 +62,7 @@ test_one_dataset_io(void)
hid_t es_id = H5I_INVALID_HID;
hsize_t dims[2] = {6, 10};
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
int wbuf[6][10];
int rbuf[6][10];
int i, j;
@@ -328,7 +328,7 @@ test_multi_dataset_io(void)
hid_t es_id = H5I_INVALID_HID;
hsize_t dims[2] = {6, 10};
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
char dset_name[32];
int wbuf[5][6][10];
int rbuf[5][6][10];
@@ -582,7 +582,7 @@ test_multi_file_dataset_io(void)
hid_t es_id = H5I_INVALID_HID;
hsize_t dims[2] = {6, 10};
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
char file_name[32];
int wbuf[5][6][10];
int rbuf[5][6][10];
@@ -892,7 +892,7 @@ test_multi_file_grp_dset_io(void)
hid_t es_id = H5I_INVALID_HID;
hsize_t dims[2] = {6, 10};
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
char file_name[32];
int wbuf[5][6][10];
int rbuf[5][6][10];
@@ -1208,7 +1208,7 @@ test_set_extent(void)
hsize_t start[2] = {0, 0};
hsize_t count[2] = {1, 10};
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
htri_t tri_ret;
int wbuf[6][10];
int rbuf[6][10];
@@ -1413,10 +1413,10 @@ test_attribute_exists(void)
hid_t space_id = H5I_INVALID_HID;
hid_t es_id = H5I_INVALID_HID;
hsize_t dims[2] = {6, 10};
- hbool_t exists1;
- hbool_t exists2;
+ bool exists1;
+ bool exists2;
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
TESTING("H5Aexists()");
@@ -1479,9 +1479,9 @@ test_attribute_exists(void)
/* Check if H5Aexists returned the correct values */
if (exists1)
- FAIL_PUTS_ERROR(" H5Aexists returned TRUE for an attribute that should not exist");
+ FAIL_PUTS_ERROR(" H5Aexists returned true for an attribute that should not exist");
if (!exists2)
- FAIL_PUTS_ERROR(" H5Aexists returned FALSE for an attribute that should exist");
+ FAIL_PUTS_ERROR(" H5Aexists returned false for an attribute that should exist");
/* Close */
if (H5Aclose_async(attr_id, es_id) < 0)
@@ -1534,7 +1534,7 @@ test_attribute_io(void)
hid_t es_id = H5I_INVALID_HID;
hsize_t dims[2] = {6, 10};
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
int wbuf[6][10];
int rbuf[6][10];
int i, j;
@@ -1676,7 +1676,7 @@ test_attribute_io_tconv(void)
hid_t es_id = H5I_INVALID_HID;
hsize_t dims[2] = {6, 10};
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
int wbuf[6][10];
int rbuf[6][10];
int i, j;
@@ -1821,7 +1821,7 @@ test_attribute_io_compound(void)
hid_t es_id = H5I_INVALID_HID;
hsize_t dims[2] = {6, 10};
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
tattr_cmpd_t wbuf[6][10];
tattr_cmpd_t rbuf[6][10];
tattr_cmpd_t fbuf[6][10];
@@ -2131,7 +2131,7 @@ test_group(void)
H5G_info_t info2;
H5G_info_t info3;
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
TESTING("group operations");
@@ -2288,19 +2288,19 @@ error:
static int
test_link(void)
{
- hid_t file_id = H5I_INVALID_HID;
- hid_t parent_group_id = H5I_INVALID_HID;
- hid_t group_id = H5I_INVALID_HID;
- hid_t gcpl_id = H5I_INVALID_HID;
- hid_t es_id = H5I_INVALID_HID;
- hbool_t existsh1;
- hbool_t existsh2;
- hbool_t existsh3;
- hbool_t existss1;
- hbool_t existss2;
- hbool_t existss3;
- size_t num_in_progress;
- hbool_t op_failed;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t parent_group_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t gcpl_id = H5I_INVALID_HID;
+ hid_t es_id = H5I_INVALID_HID;
+ bool existsh1;
+ bool existsh2;
+ bool existsh3;
+ bool existss1;
+ bool existss2;
+ bool existss3;
+ size_t num_in_progress;
+ bool op_failed;
TESTING("link operations");
@@ -2431,17 +2431,17 @@ test_link(void)
/* Check if existence returns were correct */
if (!existsh1)
- FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist");
+ FAIL_PUTS_ERROR(" link exists returned false for link that should exist");
if (!existss1)
- FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist");
+ FAIL_PUTS_ERROR(" link exists returned false for link that should exist");
if (!existsh2)
- FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist");
+ FAIL_PUTS_ERROR(" link exists returned false for link that should exist");
if (existss2)
- FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist");
+ FAIL_PUTS_ERROR(" link exists returned true for link that should not exist");
if (existsh3)
- FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist");
+ FAIL_PUTS_ERROR(" link exists returned true for link that should not exist");
if (existsh3)
- FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist");
+ FAIL_PUTS_ERROR(" link exists returned true for link that should not exist");
/* Close */
if (H5Gclose_async(parent_group_id, es_id) < 0)
@@ -2492,7 +2492,7 @@ test_ocopy_orefresh(void)
hid_t es_id = H5I_INVALID_HID;
hsize_t dims[2] = {6, 10};
size_t num_in_progress;
- hbool_t op_failed;
+ bool op_failed;
TESTING("H5Ocopy() and H5Orefresh()");
@@ -2600,11 +2600,11 @@ error:
static int
test_file_reopen(void)
{
- hid_t file_id = H5I_INVALID_HID;
- hid_t reopened_file_id = H5I_INVALID_HID;
- hid_t es_id = H5I_INVALID_HID;
- size_t num_in_progress;
- hbool_t op_failed;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t reopened_file_id = H5I_INVALID_HID;
+ hid_t es_id = H5I_INVALID_HID;
+ size_t num_in_progress;
+ bool op_failed;
TESTING("H5Freopen()");
@@ -2676,7 +2676,7 @@ cleanup_files(void)
H5Fdelete(ASYNC_API_TEST_FILE, H5P_DEFAULT);
for (i = 0; i <= max_printf_file; i++) {
- HDsnprintf(file_name, 64, ASYNC_API_TEST_FILE_PRINTF, i);
+ snprintf(file_name, 64, ASYNC_API_TEST_FILE_PRINTF, i);
H5Fdelete(file_name, H5P_DEFAULT);
} /* end for */
}
diff --git a/test/API/H5_api_attribute_test.c b/test/API/H5_api_attribute_test.c
index 1b3ef96..680ee43 100644
--- a/test/API/H5_api_attribute_test.c
+++ b/test/API/H5_api_attribute_test.c
@@ -138,12 +138,12 @@ test_create_attribute_on_root(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_ON_ROOT_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_ON_ROOT_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
- if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
PASSED();
@@ -296,17 +296,17 @@ test_create_attribute_on_dataset(void)
}
if ((dset_space_id =
- generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATASET_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATASET_DSET_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
if ((attr_space_id =
- generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATASET_ATTR_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATASET_ATTR_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
- if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, ATTRIBUTE_CREATE_ON_DATASET_DSET_NAME, dset_dtype, dset_space_id,
@@ -479,7 +479,7 @@ test_create_attribute_on_datatype(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -492,12 +492,12 @@ test_create_attribute_on_datatype(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATATYPE_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATATYPE_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
- if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
PASSED();
@@ -652,7 +652,7 @@ test_create_attribute_with_null_space(void)
if ((space_id = H5Screate(H5S_NULL)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_NULL_DATASPACE_TEST_ATTR_NAME, attr_dtype, space_id,
@@ -763,7 +763,7 @@ test_create_attribute_with_scalar_space(void)
if ((space_id = H5Screate(H5S_SCALAR)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_SCALAR_DATASPACE_TEST_ATTR_NAME, attr_dtype,
@@ -874,10 +874,10 @@ test_create_attribute_with_space_in_name(void)
}
if ((space_id =
- generate_random_dataspace(ATTRIBUTE_CREATE_WITH_SPACE_IN_NAME_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_CREATE_WITH_SPACE_IN_NAME_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_WITH_SPACE_IN_NAME_ATTR_NAME, attr_dtype, space_id,
@@ -978,10 +978,10 @@ test_create_attribute_invalid_params(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_INVALID_PARAMS_SPACE_RANK, NULL, NULL, TRUE)) <
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_INVALID_PARAMS_SPACE_RANK, NULL, NULL, true)) <
0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
PASSED();
@@ -1436,10 +1436,10 @@ test_open_attribute(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_OPEN_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_OPEN_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_type = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_type = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
/* Create several attributes */
@@ -1826,10 +1826,10 @@ test_open_attribute_invalid_params(void)
}
if ((space_id =
- generate_random_dataspace(ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_type = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_type = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME, attr_type, space_id,
@@ -2342,7 +2342,7 @@ test_write_attribute(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_WRITE_TEST_SPACE_RANK, NULL, dims, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_WRITE_TEST_SPACE_RANK, NULL, dims, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_WRITE_TEST_ATTR_NAME, ATTRIBUTE_WRITE_TEST_ATTR_DTYPE,
@@ -2475,7 +2475,7 @@ test_write_attribute_invalid_params(void)
}
if ((space_id =
- generate_random_dataspace(ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_SPACE_RANK, NULL, dims, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_SPACE_RANK, NULL, dims, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_ATTR_NAME,
@@ -2662,7 +2662,7 @@ test_read_attribute(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_READ_TEST_SPACE_RANK, NULL, dims, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_READ_TEST_SPACE_RANK, NULL, dims, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_READ_TEST_ATTR_NAME, ATTRIBUTE_READ_TEST_ATTR_DTYPE,
@@ -2821,7 +2821,7 @@ test_read_attribute_invalid_params(void)
}
if ((space_id =
- generate_random_dataspace(ATTRIBUTE_READ_INVALID_PARAMS_TEST_SPACE_RANK, NULL, dims, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_READ_INVALID_PARAMS_TEST_SPACE_RANK, NULL, dims, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_READ_INVALID_PARAMS_TEST_ATTR_NAME,
@@ -3029,7 +3029,7 @@ test_read_empty_attribute(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_READ_EMPTY_SPACE_RANK, NULL, dims, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_READ_EMPTY_SPACE_RANK, NULL, dims, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_READ_EMPTY_ATTR_NAME, ATTRIBUTE_READ_EMPTY_DTYPE, space_id,
@@ -3216,10 +3216,10 @@ test_get_attribute_space_and_type(void)
}
if ((attr_space_id =
- generate_random_dataspace(ATTRIBUTE_GET_SPACE_TYPE_TEST_SPACE_RANK, NULL, attr_dims, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_GET_SPACE_TYPE_TEST_SPACE_RANK, NULL, attr_dims, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_SPACE_TYPE_TEST_ATTR_NAME, attr_dtype, attr_space_id,
@@ -3520,10 +3520,10 @@ test_get_attribute_space_and_type_invalid_params(void)
}
if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_GET_SPACE_TYPE_INVALID_PARAMS_TEST_SPACE_RANK,
- NULL, NULL, TRUE)) < 0)
+ NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_SPACE_TYPE_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype,
@@ -3678,12 +3678,12 @@ test_attribute_property_lists(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_PROPERTY_LIST_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_PROPERTY_LIST_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
- if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((acpl_id1 = H5Pcreate(H5P_ATTRIBUTE_CREATE)) < 0) {
@@ -3979,10 +3979,10 @@ test_get_attribute_name(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_NAME_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_NAME_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
/* Create several attributes */
@@ -4082,8 +4082,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
@@ -4127,8 +4127,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_crt_order_increasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
@@ -4145,8 +4145,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_crt_order_increasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
@@ -4163,8 +4163,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_crt_order_increasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
@@ -4195,8 +4195,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_crt_order_decreasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
@@ -4213,8 +4213,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_crt_order_decreasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
@@ -4231,8 +4231,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_crt_order_decreasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
@@ -4257,8 +4257,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_name_order_increasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
@@ -4275,8 +4275,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_name_order_increasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
@@ -4293,8 +4293,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_name_order_increasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
@@ -4319,8 +4319,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_name_order_decreasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
@@ -4337,8 +4337,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_name_order_decreasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
@@ -4355,8 +4355,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_name_order_decreasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
@@ -4463,10 +4463,10 @@ test_get_attribute_name_invalid_params(void)
}
if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_NAME_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL,
- TRUE)) < 0)
+ true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_NAME_INVALID_PARAMS_TEST_ATTRIBUTE_NAME, attr_dtype,
@@ -4844,10 +4844,10 @@ test_get_attribute_info(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_INFO_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_INFO_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
/* Create several attributes */
@@ -5480,10 +5480,10 @@ test_get_attribute_info_invalid_params(void)
}
if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_INFO_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL,
- TRUE)) < 0)
+ true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_INFO_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype,
@@ -5938,10 +5938,10 @@ test_rename_attribute(void)
goto error;
}
- if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_RENAME_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_RENAME_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_RENAME_TEST_ATTR_NAME, attr_dtype, attr_space_id,
@@ -6157,10 +6157,10 @@ test_rename_attribute_invalid_params(void)
}
if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_RENAME_INVALID_PARAMS_TEST_SPACE_RANK, NULL,
- NULL, TRUE)) < 0)
+ NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_RENAME_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype,
@@ -6543,18 +6543,18 @@ test_attribute_iterate_group(void)
goto error;
}
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_space_id =
- generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
/* Create some attributes with a reverse-ordering naming scheme to test creation order */
for (i = 0; i < ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; i++) {
char attr_name[ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE];
- HDsnprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE,
- ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d", (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1));
+ snprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE, ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d",
+ (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1));
if ((attr_id = H5Acreate2(group_id, attr_name, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) <
0) {
@@ -6939,16 +6939,16 @@ test_attribute_iterate_dataset(void)
}
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((dset_space_id =
- generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_DSET_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
if ((attr_space_id =
- generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, ATTRIBUTE_ITERATE_TEST_DSET_NAME, dset_dtype, dset_space_id,
@@ -6962,8 +6962,8 @@ test_attribute_iterate_dataset(void)
for (i = 0; i < ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; i++) {
char attr_name[ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE];
- HDsnprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE,
- ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d", (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1));
+ snprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE, ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d",
+ (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1));
if ((attr_id = H5Acreate2(dset_id, attr_name, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) <
0) {
@@ -7361,13 +7361,13 @@ test_attribute_iterate_datatype(void)
}
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_space_id =
- generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
if (H5Tcommit2(group_id, ATTRIBUTE_ITERATE_TEST_DTYPE_NAME, type_id, H5P_DEFAULT, tcpl_id, H5P_DEFAULT) <
@@ -7381,8 +7381,8 @@ test_attribute_iterate_datatype(void)
for (i = 0; i < ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; i++) {
char attr_name[ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE];
- HDsnprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE,
- ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d", (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1));
+ snprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE, ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d",
+ (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1));
if ((attr_id = H5Acreate2(type_id, attr_name, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) <
0) {
@@ -7774,11 +7774,11 @@ test_attribute_iterate_invalid_params(void)
goto error;
}
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_ITERATE_INVALID_PARAMS_TEST_ATTR_SPACE_RANK,
- NULL, NULL, TRUE)) < 0)
+ NULL, NULL, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_ITERATE_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype,
@@ -8193,11 +8193,11 @@ test_attribute_iterate_0_attributes(void)
goto error;
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_space_id = generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_0_ATTRIBUTES_DSET_SPACE_RANK, NULL,
- NULL, FALSE)) < 0)
+ NULL, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, ATTRIBUTE_ITERATE_TEST_0_ATTRIBUTES_DSET_NAME, dset_dtype,
@@ -8395,10 +8395,10 @@ test_delete_attribute(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_DELETION_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_DELETION_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
PASSED();
@@ -9616,10 +9616,10 @@ test_delete_attribute_invalid_params(void)
}
if ((space_id = generate_random_dataspace(ATTRIBUTE_DELETION_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL,
- TRUE)) < 0)
+ true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype,
@@ -10031,10 +10031,10 @@ test_attribute_exists(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_EXISTS_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_EXISTS_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_EXISTS_TEST_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT,
@@ -10174,10 +10174,10 @@ test_attribute_exists_invalid_params(void)
}
if ((space_id = generate_random_dataspace(ATTRIBUTE_EXISTS_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL,
- TRUE)) < 0)
+ true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_EXISTS_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype, space_id,
@@ -10449,10 +10449,10 @@ test_attribute_many(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_MANY_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_MANY_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
/* Create many attributes */
@@ -10557,10 +10557,10 @@ test_attribute_duplicate_id(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_DUPLICATE_ID_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_DUPLICATE_ID_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DUPLICATE_ID_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT,
@@ -10675,10 +10675,10 @@ test_get_number_attributes(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_NUM_ATTRS_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_NUM_ATTRS_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_NUM_ATTRS_TEST_ATTR_NAME, attr_dtype, space_id,
@@ -10855,10 +10855,10 @@ test_attr_shared_dtype(void)
goto error;
}
- if ((space_id = generate_random_dataspace(ATTRIBUTE_SHARED_DTYPE_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((space_id = generate_random_dataspace(ATTRIBUTE_SHARED_DTYPE_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
/* Commit datatype to file */
@@ -10990,18 +10990,18 @@ attr_iter_callback1(hid_t location_id, const char *attr_name, const H5A_info_t *
*/
test_iteration = (counter_val / ATTRIBUTE_ITERATE_TEST_NUM_ATTRS);
if (test_iteration == 0 || test_iteration == 3) {
- HDsnprintf(expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE,
- ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d",
- (int)(counter_val % ATTRIBUTE_ITERATE_TEST_NUM_ATTRS));
+ snprintf(expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE,
+ ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d",
+ (int)(counter_val % ATTRIBUTE_ITERATE_TEST_NUM_ATTRS));
}
else {
- HDsnprintf(
+ snprintf(
expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE,
ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d",
(int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - (counter_val % ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) - 1));
}
- if (HDstrncmp(attr_name, expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE)) {
+ if (strncmp(attr_name, expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE)) {
printf(" attribute name '%s' didn't match expected name '%s'\n", attr_name, expected_attr_name);
ret_val = H5_ITER_ERROR;
goto done;
diff --git a/test/API/H5_api_dataset_test.c b/test/API/H5_api_dataset_test.c
index c64769c..996e2cc 100644
--- a/test/API/H5_api_dataset_test.c
+++ b/test/API/H5_api_dataset_test.c
@@ -179,10 +179,10 @@ test_create_dataset_under_root(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATASET_CREATE_UNDER_ROOT_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(DATASET_CREATE_UNDER_ROOT_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
/* Create the Dataset under the root group of the file */
@@ -261,11 +261,11 @@ test_create_dataset_under_existing_group(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATASET_CREATE_UNDER_EXISTING_SPACE_RANK, NULL, NULL, FALSE)) <
+ if ((fspace_id = generate_random_dataspace(DATASET_CREATE_UNDER_EXISTING_SPACE_RANK, NULL, NULL, false)) <
0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, DATASET_CREATE_UNDER_EXISTING_DSET_NAME, dset_dtype, fspace_id,
@@ -351,11 +351,11 @@ test_create_dataset_invalid_params(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATASET_CREATE_INVALID_PARAMS_SPACE_RANK, NULL, NULL, FALSE)) <
+ if ((fspace_id = generate_random_dataspace(DATASET_CREATE_INVALID_PARAMS_SPACE_RANK, NULL, NULL, false)) <
0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
PASSED();
@@ -605,10 +605,10 @@ test_create_anonymous_dataset(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATASET_CREATE_ANONYMOUS_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(DATASET_CREATE_ANONYMOUS_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate_anon(group_id, dset_dtype, fspace_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
@@ -696,10 +696,10 @@ test_create_anonymous_dataset_invalid_params(void)
}
if ((fspace_id = generate_random_dataspace(DATASET_CREATE_ANONYMOUS_INVALID_PARAMS_SPACE_RANK, NULL, NULL,
- FALSE)) < 0)
+ false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
PASSED();
@@ -891,7 +891,7 @@ test_create_dataset_null_space(void)
if ((fspace_id = H5Screate(H5S_NULL)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, DATASET_CREATE_NULL_DATASPACE_TEST_DSET_NAME, dset_dtype, fspace_id,
@@ -988,7 +988,7 @@ test_create_dataset_scalar_space(void)
if ((fspace_id = H5Screate(H5S_SCALAR)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, DATASET_CREATE_SCALAR_DATASPACE_TEST_DSET_NAME, dset_dtype, fspace_id,
@@ -1184,20 +1184,20 @@ test_create_dataset_random_shapes(void)
goto error;
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
for (i = 0; i < DATASET_SHAPE_TEST_NUM_ITERATIONS; i++) {
char name[100];
int ndims = rand() % DATASET_SHAPE_TEST_MAX_DIMS + 1;
- if ((space_id = generate_random_dataspace(ndims, NULL, NULL, FALSE)) < 0) {
+ if ((space_id = generate_random_dataspace(ndims, NULL, NULL, false)) < 0) {
H5_FAILED();
printf(" couldn't create dataspace\n");
goto error;
}
- HDsprintf(name, "%s%zu", DATASET_SHAPE_TEST_DSET_BASE_NAME, i + 1);
+ sprintf(name, "%s%zu", DATASET_SHAPE_TEST_DSET_BASE_NAME, i + 1);
if ((dset_id = H5Dcreate2(group_id, name, dset_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
@@ -1292,10 +1292,10 @@ test_create_dataset_predefined_types(void)
char name[100];
if ((fspace_id =
- generate_random_dataspace(DATASET_PREDEFINED_TYPE_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ generate_random_dataspace(DATASET_PREDEFINED_TYPE_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- HDsprintf(name, "%s%zu", DATASET_PREDEFINED_TYPE_TEST_BASE_NAME, i);
+ sprintf(name, "%s%zu", DATASET_PREDEFINED_TYPE_TEST_BASE_NAME, i);
if ((dset_id = H5Dcreate2(group_id, name, predefined_type_test_table[i], fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
@@ -1400,7 +1400,7 @@ test_create_dataset_string_types(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATASET_STRING_TYPE_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(DATASET_STRING_TYPE_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
PASSED();
@@ -1566,7 +1566,7 @@ test_create_dataset_compound_types(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATASET_COMPOUND_TYPE_TEST_DSET_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(DATASET_COMPOUND_TYPE_TEST_DSET_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
num_passes = (rand() % DATASET_COMPOUND_TYPE_TEST_MAX_PASSES) + 1;
@@ -1598,9 +1598,9 @@ test_create_dataset_compound_types(void)
size_t member_size;
char member_name[256];
- HDsnprintf(member_name, 256, "member%zu", j);
+ snprintf(member_name, 256, "member%zu", j);
- if ((type_pool[j] = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_pool[j] = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create compound datatype member %zu\n", j);
goto error;
@@ -1626,7 +1626,7 @@ test_create_dataset_compound_types(void)
if (H5Tpack(compound_type) < 0)
TEST_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "%s%zu", DATASET_COMPOUND_TYPE_TEST_DSET_NAME, i);
+ snprintf(dset_name, sizeof(dset_name), "%s%zu", DATASET_COMPOUND_TYPE_TEST_DSET_NAME, i);
if ((dset_id = H5Dcreate2(group_id, dset_name, compound_type, fspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
@@ -1747,13 +1747,13 @@ test_create_dataset_enum_types(void)
for (i = 0; i < DATASET_ENUM_TYPE_TEST_NUM_MEMBERS; i++) {
char val_name[15];
- HDsnprintf(val_name, 15, "%s%zu", DATASET_ENUM_TYPE_TEST_VAL_BASE_NAME, i);
+ snprintf(val_name, 15, "%s%zu", DATASET_ENUM_TYPE_TEST_VAL_BASE_NAME, i);
if (H5Tenum_insert(enum_non_native, val_name, &i) < 0)
TEST_ERROR;
}
- if ((fspace_id = generate_random_dataspace(DATASET_ENUM_TYPE_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(DATASET_ENUM_TYPE_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
if ((dset_id_native = H5Dcreate2(group_id, DATASET_ENUM_TYPE_TEST_DSET_NAME1, enum_native, fspace_id,
@@ -1879,7 +1879,7 @@ test_create_dataset_array_types(void)
for (i = 0; i < DATASET_ARRAY_TYPE_TEST_RANK1; i++)
array_dims1[i] = (hsize_t)(rand() % MAX_DIM_SIZE + 1);
- if ((array_base_type_id1 = generate_random_datatype(H5T_ARRAY, FALSE)) < 0)
+ if ((array_base_type_id1 = generate_random_datatype(H5T_ARRAY, false)) < 0)
TEST_ERROR;
if ((array_type_id1 = H5Tarray_create2(array_base_type_id1, DATASET_ARRAY_TYPE_TEST_RANK1, array_dims1)) <
@@ -1892,7 +1892,7 @@ test_create_dataset_array_types(void)
for (i = 0; i < DATASET_ARRAY_TYPE_TEST_RANK2; i++)
array_dims2[i] = (hsize_t)(rand() % MAX_DIM_SIZE + 1);
- if ((array_base_type_id2 = generate_random_datatype(H5T_ARRAY, FALSE)) < 0)
+ if ((array_base_type_id2 = generate_random_datatype(H5T_ARRAY, false)) < 0)
TEST_ERROR;
if ((array_type_id2 = H5Tarray_create2(array_base_type_id2, DATASET_ARRAY_TYPE_TEST_RANK2, array_dims2)) <
@@ -1906,7 +1906,7 @@ test_create_dataset_array_types(void)
for (i = 0; i < DATASET_ARRAY_TYPE_TEST_RANK3; i++)
array_dims3[i] = (hsize_t)(rand() % MAX_DIM_SIZE + 1);
- if ((array_base_type_id3 = generate_random_datatype(H5T_ARRAY, FALSE)) < 0)
+ if ((array_base_type_id3 = generate_random_datatype(H5T_ARRAY, false)) < 0)
TEST_ERROR;
if ((nested_type_id = H5Tarray_create2(array_base_type_id3, DATASET_ARRAY_TYPE_TEST_RANK3, array_dims3)) <
@@ -1922,7 +1922,7 @@ test_create_dataset_array_types(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATASET_ARRAY_TYPE_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(DATASET_ARRAY_TYPE_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
if ((dset_id1 = H5Dcreate2(group_id, DATASET_ARRAY_TYPE_TEST_DSET_NAME1, array_type_id1, fspace_id,
@@ -2076,19 +2076,19 @@ test_create_dataset_creation_properties(void)
}
if ((fspace_id =
- generate_random_dataspace(DATASET_CREATION_PROPERTIES_TEST_SHAPE_RANK, NULL, dims, FALSE)) < 0)
+ generate_random_dataspace(DATASET_CREATION_PROPERTIES_TEST_SHAPE_RANK, NULL, dims, false)) < 0)
TEST_ERROR;
if ((compact_fspace_id =
- generate_random_dataspace(DATASET_CREATION_PROPERTIES_TEST_SHAPE_RANK, NULL, NULL, TRUE)) < 0)
+ generate_random_dataspace(DATASET_CREATION_PROPERTIES_TEST_SHAPE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
/* Set chunk dims to be size of dataset - for filters test */
for (i = 0; i < DATASET_CREATION_PROPERTIES_TEST_SHAPE_RANK; i++)
chunk_dims[i] = dims[i];
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((compact_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((compact_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
PASSED();
@@ -2118,7 +2118,7 @@ test_create_dataset_creation_properties(void)
PART_ERROR(DCPL_alloc_time_test);
}
- HDsprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_ALLOC_TIMES_BASE_NAME, i);
+ sprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_ALLOC_TIMES_BASE_NAME, i);
if ((dset_id = H5Dcreate2(group_id, name, dset_dtype, fspace_id, H5P_DEFAULT, dcpl_id,
H5P_DEFAULT)) < 0) {
@@ -2194,7 +2194,7 @@ test_create_dataset_creation_properties(void)
PART_ERROR(DCPL_attr_crt_order_test);
}
- HDsprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_CRT_ORDER_BASE_NAME, i);
+ sprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_CRT_ORDER_BASE_NAME, i);
if ((dset_id = H5Dcreate2(group_id, name, dset_dtype, fspace_id, H5P_DEFAULT, dcpl_id,
H5P_DEFAULT)) < 0) {
@@ -2327,7 +2327,7 @@ test_create_dataset_creation_properties(void)
PART_ERROR(DCPL_fill_time_property_test);
}
- HDsprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_FILL_TIMES_BASE_NAME, i);
+ sprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_FILL_TIMES_BASE_NAME, i);
if ((dset_id = H5Dcreate2(group_id, name, dset_dtype, fspace_id, H5P_DEFAULT, dcpl_id,
H5P_DEFAULT)) < 0) {
@@ -2513,7 +2513,7 @@ test_create_dataset_creation_properties(void)
}
}
- HDsprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_LAYOUTS_BASE_NAME, i);
+ sprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_LAYOUTS_BASE_NAME, i);
if ((dset_id =
H5Dcreate2(group_id, name, (H5D_COMPACT == layouts[i]) ? compact_dtype : dset_dtype,
@@ -2872,11 +2872,11 @@ test_open_dataset_invalid_params(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATASET_OPEN_INVALID_PARAMS_SPACE_RANK, NULL, NULL, FALSE)) <
+ if ((fspace_id = generate_random_dataspace(DATASET_OPEN_INVALID_PARAMS_SPACE_RANK, NULL, NULL, false)) <
0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, DATASET_OPEN_INVALID_PARAMS_DSET_NAME, dset_dtype, fspace_id,
@@ -3108,10 +3108,10 @@ test_get_dataset_space_and_type(void)
}
if ((dset_space_id =
- generate_random_dataspace(DATASET_GET_SPACE_TYPE_TEST_SPACE_RANK, NULL, dset_dims, FALSE)) < 0)
+ generate_random_dataspace(DATASET_GET_SPACE_TYPE_TEST_SPACE_RANK, NULL, dset_dims, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, DATASET_GET_SPACE_TYPE_TEST_DSET_NAME, dset_dtype, dset_space_id,
@@ -3397,10 +3397,10 @@ test_get_dataset_space_and_type_invalid_params(void)
}
if ((dset_space_id = generate_random_dataspace(DATASET_GET_SPACE_TYPE_INVALID_PARAMS_TEST_SPACE_RANK,
- NULL, NULL, FALSE)) < 0)
+ NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, DATASET_GET_SPACE_TYPE_INVALID_PARAMS_TEST_DSET_NAME, dset_dtype,
@@ -3586,19 +3586,19 @@ test_dataset_property_lists(void)
goto error;
}
- if ((space_id = generate_random_dataspace(DATASET_PROPERTY_LIST_TEST_SPACE_RANK, NULL, dims, FALSE)) < 0)
+ if ((space_id = generate_random_dataspace(DATASET_PROPERTY_LIST_TEST_SPACE_RANK, NULL, dims, false)) < 0)
TEST_ERROR;
for (i = 0; i < DATASET_PROPERTY_LIST_TEST_SPACE_RANK; i++)
chunk_dims[i] = (hsize_t)(rand() % (int)dims[i] + 1);
- if ((dset_dtype1 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype1 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((dset_dtype2 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype2 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((dset_dtype3 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype3 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((dset_dtype4 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype4 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dcpl_id1 = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
@@ -3765,7 +3765,7 @@ test_dataset_property_lists(void)
PART_ERROR(H5Dget_access_plist);
}
- if (HDstrncmp(tmp_prefix, path_prefix, (size_t)buf_size + 1)) {
+ if (strncmp(tmp_prefix, path_prefix, (size_t)buf_size + 1)) {
H5_FAILED();
printf(" DAPL values were incorrect!\n");
PART_ERROR(H5Dget_access_plist);
@@ -3779,7 +3779,7 @@ test_dataset_property_lists(void)
PART_ERROR(H5Dget_access_plist);
}
- if (!HDstrncmp(tmp_prefix, path_prefix, (size_t)buf_size + 1)) {
+ if (!strncmp(tmp_prefix, path_prefix, (size_t)buf_size + 1)) {
H5_FAILED();
printf(" DAPL property value was set!\n");
PART_ERROR(H5Dget_access_plist);
@@ -4451,7 +4451,7 @@ test_dataset_io_point_selections(void)
int file_state[DATASET_IO_POINT_DIM_0][DATASET_IO_POINT_DIM_1];
int erbuf[DATASET_IO_POINT_DIM_0][DATASET_IO_POINT_DIM_1];
int buf_point[DATASET_IO_POINT_NPOINTS];
- hbool_t do_chunk;
+ bool do_chunk;
int i, j;
TESTING("point selection I/O with all selection in memory and points in file");
@@ -4492,7 +4492,7 @@ test_dataset_io_point_selections(void)
TEST_ERROR;
/* Perform with and without chunking */
- for (do_chunk = FALSE;; do_chunk = TRUE) {
+ for (do_chunk = false;; do_chunk = true) {
if (do_chunk) {
TESTING("point selection I/O with all selection in memory and points in file with chunking");
@@ -7146,10 +7146,10 @@ test_dataset_set_extent_chunked_unlimited(void)
}
if ((fspace_id = generate_random_dataspace(DATASET_SET_EXTENT_CHUNKED_UNLIMITED_TEST_SPACE_RANK, max_dims,
- dims, FALSE)) < 0)
+ dims, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
@@ -7385,7 +7385,7 @@ test_dataset_set_extent_chunked_fixed(void)
if ((fspace_id2 = H5Screate_simple(DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_SPACE_RANK, dims2, NULL)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
@@ -7417,14 +7417,14 @@ test_dataset_set_extent_chunked_fixed(void)
}
for (i = 0; i < DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_NUM_PASSES; i++) {
- hbool_t skip_iterations = FALSE;
- size_t j;
+ bool skip_iterations = false;
+ size_t j;
for (j = 0; j < DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_SPACE_RANK; j++) {
/* Ensure that the new dimensionality is less than the old dimensionality. */
do {
if (dims[j] == 1) {
- skip_iterations = TRUE;
+ skip_iterations = true;
break;
}
else
@@ -7486,14 +7486,14 @@ test_dataset_set_extent_chunked_fixed(void)
* of the changes to the dataset's dimensionality.
*/
for (i = 0; i < DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_NUM_PASSES; i++) {
- hbool_t skip_iterations = FALSE;
- size_t j;
+ bool skip_iterations = false;
+ size_t j;
for (j = 0; j < DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_SPACE_RANK; j++) {
/* Ensure that the new dimensionality is less than the old dimensionality. */
do {
if (dims2[j] == 1) {
- skip_iterations = TRUE;
+ skip_iterations = true;
break;
}
else
@@ -8151,7 +8151,7 @@ test_dataset_set_extent_invalid_params(void)
}
if ((fspace_id = generate_random_dataspace(DATASET_SET_EXTENT_INVALID_PARAMS_TEST_SPACE_RANK, NULL, dims,
- FALSE)) < 0)
+ false)) < 0)
TEST_ERROR;
for (i = 0; i < DATASET_SET_EXTENT_INVALID_PARAMS_TEST_SPACE_RANK; i++) {
@@ -8163,7 +8163,7 @@ test_dataset_set_extent_invalid_params(void)
} while (chunk_dims[i] > dims[i]);
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
/* Create a compact dataset */
@@ -8458,9 +8458,9 @@ test_create_single_chunk_dataset(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATASET_SINGLE_CHUNK_TEST_SPACE_RANK, NULL, dims, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(DATASET_SINGLE_CHUNK_TEST_SPACE_RANK, NULL, dims, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
@@ -8640,7 +8640,7 @@ test_write_single_chunk_dataset(void)
}
if ((fspace_id = generate_random_dataspace(DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_SPACE_RANK, NULL, dims,
- FALSE)) < 0)
+ false)) < 0)
TEST_ERROR;
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
@@ -8859,7 +8859,7 @@ test_create_multi_chunk_dataset(void)
if ((fspace_id = H5Screate_simple(DATASET_MULTI_CHUNK_TEST_SPACE_RANK, dims, NULL)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
@@ -10658,7 +10658,7 @@ test_read_partial_chunk_hyperslab_selection(void)
for (i = 0; i < FIXED_NCHUNKS; i++) {
hsize_t start[DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_DSET_SPACE_RANK];
hsize_t count[DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_DSET_SPACE_RANK];
- hbool_t on_partial_edge_chunk = FALSE;
+ bool on_partial_edge_chunk = false;
size_t n_chunks_per_dim = (dims[1] / chunk_dims[1]) + (((dims[1] % chunk_dims[1]) > 0) ? 1 : 0);
on_partial_edge_chunk =
@@ -10844,7 +10844,7 @@ test_get_vlen_buf_size(void)
hid_t dataset = H5I_INVALID_HID;
hid_t dspace_id = H5I_INVALID_HID;
hid_t dtype_id = H5I_INVALID_HID;
- hbool_t freed_wdata = FALSE;
+ bool freed_wdata = false;
hsize_t dims1[] = {DATASET_GET_VLEN_BUF_SIZE_DSET_SPACE_DIM};
hsize_t size; /* Number of bytes which will be used */
unsigned i, j;
@@ -10924,7 +10924,7 @@ test_get_vlen_buf_size(void)
if (H5Treclaim(dtype_id, dspace_id, H5P_DEFAULT, wdata) < 0)
TEST_ERROR;
- freed_wdata = TRUE;
+ freed_wdata = true;
if (H5Dclose(dataset) < 0)
TEST_ERROR;
diff --git a/test/API/H5_api_datatype_test.c b/test/API/H5_api_datatype_test.c
index 5d6aa26..43baf71 100644
--- a/test/API/H5_api_datatype_test.c
+++ b/test/API/H5_api_datatype_test.c
@@ -114,7 +114,7 @@ test_create_committed_datatype(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype to commit\n");
goto error;
@@ -198,7 +198,7 @@ test_create_committed_datatype_invalid_params(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype to commit\n");
goto error;
@@ -416,7 +416,7 @@ test_create_anonymous_committed_datatype(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -499,7 +499,7 @@ test_create_anonymous_committed_datatype_invalid_params(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -801,7 +801,7 @@ error:
static int
test_recommit_committed_type(void)
{
- htri_t is_committed = FALSE;
+ htri_t is_committed = false;
herr_t err_ret;
hid_t file_id = H5I_INVALID_HID;
hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID;
@@ -942,7 +942,7 @@ test_open_committed_datatype(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype to commit\n");
goto error;
@@ -1034,7 +1034,7 @@ test_open_committed_datatype_invalid_params(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype to commit\n");
goto error;
@@ -1207,7 +1207,7 @@ test_reopen_committed_datatype_indirect(void)
goto error;
}
- if ((space_id = generate_random_dataspace(DATATYPE_REOPEN_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((space_id = generate_random_dataspace(DATATYPE_REOPEN_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
PASSED();
@@ -1730,13 +1730,13 @@ test_datatype_property_lists(void)
goto error;
}
- if ((type_id1 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id1 = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
}
- if ((type_id2 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id2 = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -1945,7 +1945,7 @@ test_create_dataset_with_committed_type(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -1992,7 +1992,7 @@ test_create_dataset_with_committed_type(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(DATATYPE_CREATE_TEST_DATASET_DIMS, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(DATATYPE_CREATE_TEST_DATASET_DIMS, NULL, NULL, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, DATASET_CREATE_WITH_DATATYPE_TEST_DSET_NAME, type_id, fspace_id,
@@ -2089,7 +2089,7 @@ test_create_attribute_with_committed_type(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, true)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -2112,7 +2112,7 @@ test_create_attribute_with_committed_type(void)
}
if ((space_id =
- generate_random_dataspace(ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ generate_random_dataspace(ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_ATTR_NAME, type_id, space_id,
@@ -2220,7 +2220,7 @@ test_delete_committed_type(void)
goto error;
}
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -2557,7 +2557,7 @@ error:
static int
test_cant_modify_committed_type(void)
{
- htri_t is_committed = FALSE;
+ htri_t is_committed = false;
herr_t err_ret;
hid_t file_id = H5I_INVALID_HID;
hid_t container_group = H5I_INVALID_HID;
diff --git a/test/API/H5_api_file_test.c b/test/API/H5_api_file_test.c
index 5f3af25..804b3bd 100644
--- a/test/API/H5_api_file_test.c
+++ b/test/API/H5_api_file_test.c
@@ -948,7 +948,7 @@ test_flush_file(void)
}
for (u = 0; u < 10; u++) {
- HDsprintf(dset_name, "Dataset %u", u);
+ sprintf(dset_name, "Dataset %u", u);
if ((dset_id = H5Dcreate2(file_id, dset_name, H5T_STD_U32LE, dspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
@@ -2211,7 +2211,7 @@ test_get_file_name(void)
PART_ERROR(H5Fget_name_file_id);
}
- if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
+ if (strncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
prefixed_filename);
@@ -2242,7 +2242,7 @@ test_get_file_name(void)
PART_ERROR(H5Fget_name_grp_id);
}
- if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
+ if (strncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
prefixed_filename);
@@ -2287,7 +2287,7 @@ test_get_file_name(void)
PART_ERROR(H5Fget_name_dset_id);
}
- if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
+ if (strncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
prefixed_filename);
@@ -2340,7 +2340,7 @@ test_get_file_name(void)
PART_ERROR(H5Fget_name_attr_id);
}
- if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
+ if (strncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
prefixed_filename);
@@ -2393,7 +2393,7 @@ test_get_file_name(void)
PART_ERROR(H5Fget_name_dtype_id);
}
- if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
+ if (strncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
prefixed_filename);
diff --git a/test/API/H5_api_group_test.c b/test/API/H5_api_group_test.c
index 7b95655..4132f64 100644
--- a/test/API/H5_api_group_test.c
+++ b/test/API/H5_api_group_test.c
@@ -408,7 +408,7 @@ test_create_intermediate_group(void)
/* Set up plist for creating intermediate groups */
if ((crt_intmd_lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0)
TEST_ERROR;
- if (H5Pset_create_intermediate_group(crt_intmd_lcpl_id, TRUE) < 0)
+ if (H5Pset_create_intermediate_group(crt_intmd_lcpl_id, true) < 0)
TEST_ERROR;
/* Create an intermediate group using a relative path */
@@ -1437,8 +1437,7 @@ test_get_group_info(void)
/* Create multiple groups under the parent group */
for (i = 0; i < GROUP_GET_INFO_TEST_GROUP_NUMB; i++) {
/* Create the groups with a reverse-ordering naming scheme to test creation order */
- HDsnprintf(group_name, NAME_BUF_SIZE, "group %02u",
- (unsigned)(GROUP_GET_INFO_TEST_GROUP_NUMB - i - 1));
+ snprintf(group_name, NAME_BUF_SIZE, "group %02u", (unsigned)(GROUP_GET_INFO_TEST_GROUP_NUMB - i - 1));
if ((group_id = H5Gcreate2(parent_group_id, group_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -1495,10 +1494,10 @@ test_get_group_info(void)
PART_ERROR(H5Gget_info);
}
- /* Assume that mounted should be FALSE in this case */
- if (group_info.mounted != FALSE) {
+ /* Assume that mounted should be false in this case */
+ if (group_info.mounted != false) {
H5_FAILED();
- printf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
+ printf(" group info's 'mounted' field was true when it should have been false\n");
PART_ERROR(H5Gget_info);
}
@@ -1548,10 +1547,10 @@ test_get_group_info(void)
PART_ERROR(H5Gget_info_by_name);
}
- /* Assume that mounted should be FALSE in this case */
- if (group_info.mounted != FALSE) {
+ /* Assume that mounted should be false in this case */
+ if (group_info.mounted != false) {
H5_FAILED();
- printf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
+ printf(" group info's 'mounted' field was true when it should have been false\n");
PART_ERROR(H5Gget_info_by_name);
}
@@ -1604,10 +1603,10 @@ test_get_group_info(void)
PART_ERROR(H5Gget_info_by_idx_crt_order_increasing);
}
- /* Assume that mounted should be FALSE in this case */
- if (group_info.mounted != FALSE) {
+ /* Assume that mounted should be false in this case */
+ if (group_info.mounted != false) {
H5_FAILED();
- printf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
+ printf(" group info's 'mounted' field was true when it should have been false\n");
PART_ERROR(H5Gget_info_by_idx_crt_order_increasing);
}
}
@@ -1661,10 +1660,10 @@ test_get_group_info(void)
PART_ERROR(H5Gget_info_by_idx_crt_order_decreasing);
}
- /* Assume that mounted should be FALSE in this case */
- if (group_info.mounted != FALSE) {
+ /* Assume that mounted should be false in this case */
+ if (group_info.mounted != false) {
H5_FAILED();
- printf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
+ printf(" group info's 'mounted' field was true when it should have been false\n");
PART_ERROR(H5Gget_info_by_idx_crt_order_decreasing);
}
}
@@ -1712,10 +1711,10 @@ test_get_group_info(void)
PART_ERROR(H5Gget_info_by_idx_name_order_increasing);
}
- /* Assume that mounted should be FALSE in this case */
- if (group_info.mounted != FALSE) {
+ /* Assume that mounted should be false in this case */
+ if (group_info.mounted != false) {
H5_FAILED();
- printf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
+ printf(" group info's 'mounted' field was true when it should have been false\n");
PART_ERROR(H5Gget_info_by_idx_name_order_increasing);
}
}
@@ -1763,10 +1762,10 @@ test_get_group_info(void)
PART_ERROR(H5Gget_info_by_idx_name_order_decreasing);
}
- /* Assume that mounted should be FALSE in this case */
- if (group_info.mounted != FALSE) {
+ /* Assume that mounted should be false in this case */
+ if (group_info.mounted != false) {
H5_FAILED();
- printf(" group info's 'mounted' field was TRUE when it should have been FALSE\n");
+ printf(" group info's 'mounted' field was true when it should have been false\n");
PART_ERROR(H5Gget_info_by_idx_name_order_decreasing);
}
}
diff --git a/test/API/H5_api_link_test.c b/test/API/H5_api_link_test.c
index caeafa6..b6ae512 100644
--- a/test/API/H5_api_link_test.c
+++ b/test/API/H5_api_link_test.c
@@ -512,7 +512,7 @@ test_create_hard_link_many(void)
goto error;
}
- if (HDstrcmp(objname, "/" LINK_TEST_GROUP_NAME "/" HARD_LINK_TEST_GROUP_MANY_NAME "/hard21")) {
+ if (strcmp(objname, "/" LINK_TEST_GROUP_NAME "/" HARD_LINK_TEST_GROUP_MANY_NAME "/hard21")) {
H5_FAILED();
printf(" wrong name of the object '%s'\n", objname);
goto error;
@@ -900,8 +900,7 @@ test_create_hard_link_invalid_params(void)
{
TESTING_2("H5Lcreate_hard across files");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -1710,7 +1709,7 @@ test_create_soft_link_many(void)
goto error;
}
- if (HDstrcmp(objname, "/" LINK_TEST_GROUP_NAME "/" SOFT_LINK_TEST_GROUP_MANY_NAME "/soft16")) {
+ if (strcmp(objname, "/" LINK_TEST_GROUP_NAME "/" SOFT_LINK_TEST_GROUP_MANY_NAME "/soft16")) {
H5_FAILED();
printf(" wrong name of the object '%s'\n", objname);
goto error;
@@ -2000,7 +1999,7 @@ test_create_external_link(void)
return 0;
}
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -2108,7 +2107,7 @@ test_create_external_link_dangling(void)
return 0;
}
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -2249,8 +2248,7 @@ test_create_external_link_multi(void)
{
TESTING_2("Create the first external file to be pointed to");
- HDsnprintf(ext_link_filename1, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename1, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -2310,8 +2308,8 @@ test_create_external_link_multi(void)
{
TESTING_2("Create the second external file to be pointed to");
- HDsnprintf(ext_link_filename2, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME2);
+ snprintf(ext_link_filename2, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
+ EXTERNAL_LINK_TEST_FILE_NAME2);
if ((file_id = H5Fcreate(ext_link_filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -2367,8 +2365,8 @@ test_create_external_link_multi(void)
{
TESTING_2("Create the third external file to be pointed to");
- HDsnprintf(ext_link_filename3, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME3);
+ snprintf(ext_link_filename3, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
+ EXTERNAL_LINK_TEST_FILE_NAME3);
if ((file_id = H5Fcreate(ext_link_filename3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -2464,7 +2462,7 @@ test_create_external_link_multi(void)
PART_ERROR(H5Lcreate_external_final_file);
}
- if (HDstrcmp(objname, "/A/B/C")) {
+ if (strcmp(objname, "/A/B/C")) {
H5_FAILED();
printf(" wrong name of the object '%s'\n", objname);
PART_ERROR(H5Lcreate_external_final_file);
@@ -2534,7 +2532,7 @@ test_create_external_link_multi(void)
PART_ERROR(H5Lcreate_external_object_created);
}
- if (HDstrcmp(objname, "/A/B/C/new_group")) {
+ if (strcmp(objname, "/A/B/C/new_group")) {
H5_FAILED();
printf(" wrong name of the object '%s'\n", objname);
PART_ERROR(H5Lcreate_external_object_created);
@@ -2607,8 +2605,8 @@ test_create_external_link_ping_pong(void)
return 0;
}
- HDsnprintf(ext_link_filename1, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_PING_PONG_NAME1);
- HDsnprintf(ext_link_filename2, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_PING_PONG_NAME2);
+ snprintf(ext_link_filename1, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_PING_PONG_NAME1);
+ snprintf(ext_link_filename2, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_PING_PONG_NAME2);
BEGIN_MULTIPART
{
@@ -2737,7 +2735,7 @@ test_create_external_link_ping_pong(void)
PART_ERROR(H5Lcreate_external_verify);
}
- if (HDstrcmp(objname, "/final")) {
+ if (strcmp(objname, "/final")) {
H5_FAILED();
printf(" wrong name of the object '%s'\n", objname);
PART_ERROR(H5Lcreate_external_verify);
@@ -2797,7 +2795,7 @@ test_create_external_link_ping_pong(void)
PART_ERROR(H5Lcreate_external_verify_again);
}
- if (HDstrcmp(objname, "/final/new_group")) {
+ if (strcmp(objname, "/final/new_group")) {
H5_FAILED();
printf(" wrong name of the object '%s'\n", objname);
PART_ERROR(H5Lcreate_external_verify_again);
@@ -2862,8 +2860,8 @@ test_create_external_link_invalid_params(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_INVALID_PARAMS_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
+ EXTERNAL_LINK_INVALID_PARAMS_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -3168,7 +3166,7 @@ test_create_user_defined_link(void)
goto error;
}
- if ((udata_size = HDsnprintf(udata, UD_LINK_TEST_UDATA_MAX_SIZE, "udata")) < 0)
+ if ((udata_size = snprintf(udata, UD_LINK_TEST_UDATA_MAX_SIZE, "udata")) < 0)
TEST_ERROR;
if (H5Lcreate_ud(group_id, UD_LINK_TEST_LINK_NAME, H5L_TYPE_EXTERNAL, udata, (size_t)udata_size,
@@ -3260,7 +3258,7 @@ test_create_user_defined_link_invalid_params(void)
goto error;
}
- if ((udata_size = HDsnprintf(udata, UD_LINK_INVALID_PARAMS_TEST_UDATA_MAX_SIZE, "udata")) < 0)
+ if ((udata_size = snprintf(udata, UD_LINK_INVALID_PARAMS_TEST_UDATA_MAX_SIZE, "udata")) < 0)
TEST_ERROR;
PASSED();
@@ -3753,8 +3751,7 @@ test_delete_link(void)
{
TESTING_2("H5Ldelete on external link");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -5717,8 +5714,7 @@ test_delete_link(void)
}
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -5999,8 +5995,7 @@ test_delete_link(void)
}
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -6275,8 +6270,7 @@ test_delete_link(void)
TESTING_2("H5Ldelete_by_idx on external link by alphabetical order in increasing order");
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -6551,8 +6545,7 @@ test_delete_link(void)
TESTING_2("H5Ldelete_by_idx on external link by alphabetical order in decreasing order");
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -8127,7 +8120,7 @@ test_copy_link(void)
PART_ERROR(H5Lcopy_soft_check);
}
- if (HDstrncmp(orig_link_val, new_link_val, COPY_LINK_TEST_LINK_VAL_BUF_SIZE)) {
+ if (strncmp(orig_link_val, new_link_val, COPY_LINK_TEST_LINK_VAL_BUF_SIZE)) {
H5_FAILED();
printf(" copied soft link's value '%s' doesn't match original link's value '%s'\n",
new_link_val, orig_link_val);
@@ -8260,8 +8253,7 @@ test_copy_link(void)
{
TESTING_2("H5Lcopy on external link (copied link's properties not checked)");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -8369,8 +8361,7 @@ test_copy_link(void)
TESTING_2("H5Lcopy on external link (copied link's properties checked)");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -8542,7 +8533,7 @@ test_copy_link(void)
PART_ERROR(H5Lcopy_external_check);
}
- if (HDstrncmp(new_filename, orig_filename, strlen(orig_filename)) < 0) {
+ if (strncmp(new_filename, orig_filename, strlen(orig_filename)) < 0) {
H5_FAILED();
printf(" copied external link's filename '%s' doesn't match original external link's "
"filename '%s'\n",
@@ -8550,7 +8541,7 @@ test_copy_link(void)
PART_ERROR(H5Lcopy_external_check);
}
- if (HDstrncmp(new_objname, orig_objname, strlen(orig_objname)) < 0) {
+ if (strncmp(new_objname, orig_objname, strlen(orig_objname)) < 0) {
H5_FAILED();
printf(" copied external link's object name '%s' doesn't match original external link's "
"object name '%s'\n",
@@ -8573,8 +8564,7 @@ test_copy_link(void)
{
TESTING_2("H5Lcopy on external link using H5L_SAME_LOC");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -9091,8 +9081,7 @@ test_copy_link_invalid_params(void)
{
TESTING_2("H5Lcopy invalid across files");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -9186,7 +9175,7 @@ test_move_link(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -9857,7 +9846,7 @@ test_move_link(void)
PART_ERROR(H5Lmove_soft_check);
}
- if (HDstrncmp(orig_link_val, new_link_val, MOVE_LINK_TEST_LINK_VAL_BUF_SIZE)) {
+ if (strncmp(orig_link_val, new_link_val, MOVE_LINK_TEST_LINK_VAL_BUF_SIZE)) {
H5_FAILED();
printf(" moved soft link's value '%s' doesn't match original link's value '%s'\n",
new_link_val, orig_link_val);
@@ -10067,8 +10056,7 @@ test_move_link(void)
{
TESTING_2("H5Lmove on external link (moved link's properties not checked)");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -10176,8 +10164,7 @@ test_move_link(void)
TESTING_2("H5Lmove on external link (moved link's properties checked)");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -10349,7 +10336,7 @@ test_move_link(void)
PART_ERROR(H5Lmove_external_check);
}
- if (HDstrncmp(new_filename, orig_filename, strlen(orig_filename)) < 0) {
+ if (strncmp(new_filename, orig_filename, strlen(orig_filename)) < 0) {
H5_FAILED();
printf(" moved external link's filename '%s' doesn't match original external link's "
"filename '%s'\n",
@@ -10357,7 +10344,7 @@ test_move_link(void)
PART_ERROR(H5Lmove_external_check);
}
- if (HDstrncmp(new_objname, orig_objname, strlen(orig_objname)) < 0) {
+ if (strncmp(new_objname, orig_objname, strlen(orig_objname)) < 0) {
H5_FAILED();
printf(" moved external link's object name '%s' doesn't match original external link's "
"object name '%s'\n",
@@ -10380,8 +10367,7 @@ test_move_link(void)
{
TESTING_2("H5Lmove on external link using H5L_SAME_LOC");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -10519,8 +10505,7 @@ test_move_link(void)
{
TESTING_2("H5Lmove to rename external link without moving it");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -11404,8 +11389,7 @@ test_move_link_invalid_params(void)
{
TESTING_2("H5Lmove into another file");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -11613,7 +11597,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_soft);
}
- if (HDstrncmp(link_val_buf, link_target, link_val_size)) {
+ if (strncmp(link_val_buf, link_target, link_val_size)) {
H5_FAILED();
printf(" soft link value did not match\n");
PART_ERROR(H5Lget_val_soft);
@@ -11644,8 +11628,7 @@ test_get_link_val(void)
memset(&link_info, 0, sizeof(link_info));
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -11714,14 +11697,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_external);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_external);
}
- if (HDstrncmp(ext_link_val, ext_obj_name, strlen(ext_obj_name) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name, strlen(ext_obj_name) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name);
@@ -11873,7 +11856,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
- if (HDstrncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
+ if (strncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 0, link_target_a);
@@ -11904,7 +11887,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
- if (HDstrncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
+ if (strncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 1, link_target_b);
@@ -11935,7 +11918,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
- if (HDstrncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
+ if (strncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 2, link_target_c);
@@ -12067,7 +12050,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
- if (HDstrncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
+ if (strncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 2, link_target_a);
@@ -12098,7 +12081,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
- if (HDstrncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
+ if (strncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 1, link_target_b);
@@ -12129,7 +12112,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
- if (HDstrncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
+ if (strncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 0, link_target_c);
@@ -12255,7 +12238,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
- if (HDstrncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
+ if (strncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 0, link_target_a);
@@ -12286,7 +12269,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
- if (HDstrncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
+ if (strncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 1, link_target_b);
@@ -12317,7 +12300,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
- if (HDstrncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
+ if (strncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 2, link_target_c);
@@ -12443,7 +12426,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
- if (HDstrncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
+ if (strncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 2, link_target_a);
@@ -12474,7 +12457,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
- if (HDstrncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
+ if (strncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 1, link_target_b);
@@ -12505,7 +12488,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
- if (HDstrncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
+ if (strncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 0, link_target_c);
@@ -12543,8 +12526,7 @@ test_get_link_val(void)
PART_EMPTY(H5Lget_val_by_idx_external_crt_order_increasing);
}
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -12656,14 +12638,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_a);
@@ -12701,14 +12683,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_b);
@@ -12746,14 +12728,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_c);
@@ -12793,8 +12775,7 @@ test_get_link_val(void)
PART_EMPTY(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -12906,14 +12887,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_a);
@@ -12951,14 +12932,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_b);
@@ -12996,14 +12977,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_c);
@@ -13037,8 +13018,7 @@ test_get_link_val(void)
TESTING_2("H5Lget_val_by_idx on external link by alphabetical order in increasing order");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -13150,14 +13130,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_a);
@@ -13195,14 +13175,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_b);
@@ -13240,14 +13220,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_c);
@@ -13281,8 +13261,7 @@ test_get_link_val(void)
TESTING_2("H5Lget_val_by_idx on external link by alphabetical order in decreasing order");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -13394,14 +13373,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_a);
@@ -13439,14 +13418,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_b);
@@ -13484,14 +13463,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_c);
@@ -14189,8 +14168,7 @@ test_get_link_info(void)
memset(&link_info, 0, sizeof(link_info));
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -15755,8 +15733,7 @@ test_get_link_info(void)
PART_EMPTY(H5Lget_info_by_idx_external_crt_order_increasing);
}
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -15959,8 +15936,7 @@ test_get_link_info(void)
PART_EMPTY(H5Lget_info_by_idx_external_crt_order_decreasing);
}
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -16157,8 +16133,7 @@ test_get_link_info(void)
{
TESTING_2("H5Lget_info_by_idx2 on external link by alphabetical order in increasing order");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -16361,8 +16336,7 @@ test_get_link_info(void)
{
TESTING_2("H5Lget_info_by_idx2 on external link by alphabetical order in decreasing order");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -17156,8 +17130,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME3);
@@ -17178,8 +17152,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME2);
@@ -17200,8 +17174,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME);
@@ -17324,8 +17298,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME);
@@ -17346,8 +17320,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME2);
@@ -17368,8 +17342,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME3);
@@ -17486,8 +17460,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME);
@@ -17508,8 +17482,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME2);
@@ -17530,8 +17504,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME3);
@@ -17648,8 +17622,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME3);
@@ -17670,8 +17644,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME2);
@@ -17692,8 +17666,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME);
@@ -17816,8 +17790,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
@@ -17838,8 +17812,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
@@ -17860,8 +17834,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME);
@@ -17984,8 +17958,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME);
@@ -18006,8 +17980,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
@@ -18028,8 +18002,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
@@ -18146,8 +18120,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME);
@@ -18168,8 +18142,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
@@ -18190,8 +18164,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
@@ -18308,8 +18282,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
@@ -18330,8 +18304,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
@@ -18352,8 +18326,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME);
@@ -18388,8 +18362,7 @@ test_get_link_name(void)
}
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -18495,8 +18468,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
@@ -18517,8 +18490,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
@@ -18539,8 +18512,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
@@ -18577,8 +18550,7 @@ test_get_link_name(void)
}
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -18684,8 +18656,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
@@ -18706,8 +18678,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
@@ -18728,8 +18700,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
@@ -18760,8 +18732,7 @@ test_get_link_name(void)
TESTING_2("H5Lget_name_by_idx on external link by alphabetical order in increasing order");
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -18867,8 +18838,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
@@ -18889,8 +18860,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
@@ -18911,8 +18882,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
@@ -18943,8 +18914,7 @@ test_get_link_name(void)
TESTING_2("H5Lget_name_by_idx on external link by alphabetical order in decreasing order");
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -19050,8 +19020,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
@@ -19072,8 +19042,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
@@ -19094,8 +19064,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
@@ -19554,19 +19524,19 @@ test_link_iterate_hard_links(void)
goto error;
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_dspace =
- generate_random_dataspace(LINK_ITER_HARD_LINKS_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ generate_random_dataspace(LINK_ITER_HARD_LINKS_TEST_DSET_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
for (i = 0; i < LINK_ITER_HARD_LINKS_TEST_NUM_LINKS; i++) {
char dset_name[LINK_ITER_HARD_LINKS_TEST_BUF_SIZE];
/* Create the datasets with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(dset_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE, LINK_ITER_HARD_LINKS_TEST_LINK_NAME "%d",
- (int)(LINK_ITER_HARD_LINKS_TEST_NUM_LINKS - i - 1));
+ snprintf(dset_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE, LINK_ITER_HARD_LINKS_TEST_LINK_NAME "%d",
+ (int)(LINK_ITER_HARD_LINKS_TEST_NUM_LINKS - i - 1));
if ((dset_id = H5Dcreate2(group_id, dset_name, dset_dtype, dset_dspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
@@ -19929,11 +19899,11 @@ test_link_iterate_soft_links(void)
char link_target[LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE, LINK_ITER_SOFT_LINKS_TEST_LINK_NAME "%d",
- (int)(LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS - i - 1));
+ snprintf(link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE, LINK_ITER_SOFT_LINKS_TEST_LINK_NAME "%d",
+ (int)(LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS - i - 1));
- HDsnprintf(link_target, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE, "target%d",
- (int)(LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS - i - 1));
+ snprintf(link_target, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE, "target%d",
+ (int)(LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS - i - 1));
if (H5Lcreate_soft(link_target, group_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -20245,7 +20215,7 @@ test_link_iterate_external_links(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -20293,8 +20263,8 @@ test_link_iterate_external_links(void)
char link_name[LINK_ITER_EXT_LINKS_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE, LINK_ITER_EXT_LINKS_TEST_LINK_NAME "%d",
- (int)(LINK_ITER_EXT_LINKS_TEST_NUM_LINKS - i - 1));
+ snprintf(link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE, LINK_ITER_EXT_LINKS_TEST_LINK_NAME "%d",
+ (int)(LINK_ITER_EXT_LINKS_TEST_NUM_LINKS - i - 1));
if (H5Lcreate_external(ext_link_filename, "/", group_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -20642,7 +20612,7 @@ test_link_iterate_mixed_links(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -20686,11 +20656,11 @@ test_link_iterate_mixed_links(void)
goto error;
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_dspace =
- generate_random_dataspace(LINK_ITER_MIXED_LINKS_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ generate_random_dataspace(LINK_ITER_MIXED_LINKS_TEST_DSET_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME, dset_dtype, dset_dspace,
@@ -21128,7 +21098,7 @@ test_link_iterate_invalid_params(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -21158,11 +21128,11 @@ test_link_iterate_invalid_params(void)
goto error;
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_dspace =
- generate_random_dataspace(LINK_ITER_INVALID_PARAMS_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ generate_random_dataspace(LINK_ITER_INVALID_PARAMS_TEST_DSET_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, LINK_ITER_INVALID_PARAMS_TEST_HARD_LINK_NAME, dset_dtype, dset_dspace,
@@ -21810,11 +21780,11 @@ test_link_visit_hard_links_no_cycles(void)
goto error;
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_dspace = generate_random_dataspace(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_DSET_SPACE_RANK, NULL,
- NULL, FALSE)) < 0)
+ NULL, false)) < 0)
TEST_ERROR;
for (i = 0; i < LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS; i++) {
@@ -21822,9 +21792,9 @@ test_link_visit_hard_links_no_cycles(void)
char grp_name[LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE];
/* Create the groups with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(grp_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
+ snprintf(grp_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -21836,9 +21806,9 @@ test_link_visit_hard_links_no_cycles(void)
char dset_name[LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE];
/* Create the datasets with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(dset_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(dset_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
if ((dset_id = H5Dcreate2(subgroup_id, dset_name, dset_dtype, dset_dspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
@@ -22213,9 +22183,9 @@ test_link_visit_soft_links_no_cycles(void)
char grp_name[LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE];
/* Create the groups with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(grp_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
+ snprintf(grp_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -22228,12 +22198,12 @@ test_link_visit_soft_links_no_cycles(void)
char link_target[LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
- HDsnprintf(link_target, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE, "target%d",
- (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(link_target, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE, "target%d",
+ (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
if (H5Lcreate_soft(link_target, subgroup_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -22555,7 +22525,7 @@ test_link_visit_external_links_no_cycles(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -22605,9 +22575,9 @@ test_link_visit_external_links_no_cycles(void)
char grp_name[LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE];
/* Create the groups with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(grp_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
+ snprintf(grp_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -22619,9 +22589,9 @@ test_link_visit_external_links_no_cycles(void)
char link_name[LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, link_name, H5P_DEFAULT, H5P_DEFAULT) <
0) {
@@ -22983,7 +22953,7 @@ test_link_visit_mixed_links_no_cycles(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -23044,11 +23014,11 @@ test_link_visit_mixed_links_no_cycles(void)
goto error;
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((fspace_id = generate_random_dataspace(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_SPACE_RANK, NULL,
- NULL, FALSE)) < 0)
+ NULL, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(subgroup1, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME, dset_dtype,
@@ -23499,9 +23469,9 @@ test_link_visit_hard_links_cycles(void)
char grp_name[LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE];
/* Create the groups with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(grp_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
+ snprintf(grp_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -23513,9 +23483,9 @@ test_link_visit_hard_links_cycles(void)
char link_name[LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -23872,9 +23842,9 @@ test_link_visit_soft_links_cycles(void)
char grp_name[LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE];
/* Create the groups with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(grp_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
+ snprintf(grp_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -23887,13 +23857,13 @@ test_link_visit_soft_links_cycles(void)
char link_target[2 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
- HDsnprintf(link_target, 2 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_SUBGROUP_NAME "/%s",
- grp_name);
+ snprintf(link_target, 2 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_SUBGROUP_NAME "/%s",
+ grp_name);
if (H5Lcreate_soft(link_target, subgroup_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -24252,9 +24222,9 @@ test_link_visit_external_links_cycles(void)
char grp_name[LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE];
/* Create the groups with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(grp_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
+ snprintf(grp_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -24267,13 +24237,13 @@ test_link_visit_external_links_cycles(void)
char link_target_obj[2 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
- HDsnprintf(link_target_obj, 2 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_SUBGROUP_NAME "/%s",
- grp_name);
+ snprintf(link_target_obj, 2 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_SUBGROUP_NAME "/%s",
+ grp_name);
if (H5Lcreate_external(H5_api_test_filename, link_target_obj, subgroup_id, link_name, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
@@ -24623,7 +24593,7 @@ test_link_visit_mixed_links_cycles(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -25060,7 +25030,7 @@ test_link_visit_invalid_params(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -25104,11 +25074,11 @@ test_link_visit_invalid_params(void)
goto error;
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((fspace_id = generate_random_dataspace(LINK_VISIT_INVALID_PARAMS_TEST_DSET_SPACE_RANK, NULL, NULL,
- FALSE)) < 0)
+ false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(subgroup1, LINK_VISIT_INVALID_PARAMS_TEST_DSET_NAME, dset_dtype, fspace_id,
@@ -25761,18 +25731,18 @@ link_iter_hard_links_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
*/
test_iteration = (counter_val / LINK_ITER_HARD_LINKS_TEST_NUM_LINKS);
if (test_iteration == 0 || test_iteration == 3) {
- HDsnprintf(expected_link_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE,
- LINK_ITER_HARD_LINKS_TEST_LINK_NAME "%d",
- (int)(counter_val % LINK_ITER_HARD_LINKS_TEST_NUM_LINKS));
+ snprintf(expected_link_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE,
+ LINK_ITER_HARD_LINKS_TEST_LINK_NAME "%d",
+ (int)(counter_val % LINK_ITER_HARD_LINKS_TEST_NUM_LINKS));
}
else {
- HDsnprintf(expected_link_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE,
- LINK_ITER_HARD_LINKS_TEST_LINK_NAME "%d",
- (int)(LINK_ITER_HARD_LINKS_TEST_NUM_LINKS -
- (counter_val % LINK_ITER_HARD_LINKS_TEST_NUM_LINKS) - 1));
+ snprintf(expected_link_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE,
+ LINK_ITER_HARD_LINKS_TEST_LINK_NAME "%d",
+ (int)(LINK_ITER_HARD_LINKS_TEST_NUM_LINKS -
+ (counter_val % LINK_ITER_HARD_LINKS_TEST_NUM_LINKS) - 1));
}
- if (HDstrncmp(name, expected_link_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -25821,18 +25791,18 @@ link_iter_soft_links_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
*/
test_iteration = (counter_val / LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS);
if (test_iteration == 0 || test_iteration == 3) {
- HDsnprintf(expected_link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE,
- LINK_ITER_SOFT_LINKS_TEST_LINK_NAME "%d",
- (int)(counter_val % LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS));
+ snprintf(expected_link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE,
+ LINK_ITER_SOFT_LINKS_TEST_LINK_NAME "%d",
+ (int)(counter_val % LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS));
}
else {
- HDsnprintf(expected_link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE,
- LINK_ITER_SOFT_LINKS_TEST_LINK_NAME "%d",
- (int)(LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS -
- (counter_val % LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS) - 1));
+ snprintf(expected_link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE,
+ LINK_ITER_SOFT_LINKS_TEST_LINK_NAME "%d",
+ (int)(LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS -
+ (counter_val % LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS) - 1));
}
- if (HDstrncmp(name, expected_link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -25888,18 +25858,18 @@ link_iter_external_links_cb(hid_t group_id, const char *name, const H5L_info2_t
*/
test_iteration = (counter_val / LINK_ITER_EXT_LINKS_TEST_NUM_LINKS);
if (test_iteration == 0 || test_iteration == 3) {
- HDsnprintf(expected_link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE,
- LINK_ITER_EXT_LINKS_TEST_LINK_NAME "%d",
- (int)(counter_val % LINK_ITER_EXT_LINKS_TEST_NUM_LINKS));
+ snprintf(expected_link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE,
+ LINK_ITER_EXT_LINKS_TEST_LINK_NAME "%d",
+ (int)(counter_val % LINK_ITER_EXT_LINKS_TEST_NUM_LINKS));
}
else {
- HDsnprintf(expected_link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE,
- LINK_ITER_EXT_LINKS_TEST_LINK_NAME "%d",
- (int)(LINK_ITER_EXT_LINKS_TEST_NUM_LINKS -
- (counter_val % LINK_ITER_EXT_LINKS_TEST_NUM_LINKS) - 1));
+ snprintf(expected_link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE,
+ LINK_ITER_EXT_LINKS_TEST_LINK_NAME "%d",
+ (int)(LINK_ITER_EXT_LINKS_TEST_NUM_LINKS -
+ (counter_val % LINK_ITER_EXT_LINKS_TEST_NUM_LINKS) - 1));
}
- if (HDstrncmp(name, expected_link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -25932,8 +25902,8 @@ link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *in
UNUSED(group_id);
- if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME) + 1) &&
+ if (!strncmp(name, LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME) + 1) &&
(counter_val == 1 || counter_val == 4 || counter_val == 6 || counter_val == 11)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -25942,8 +25912,8 @@ link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *in
goto done;
}
- else if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME) + 1) &&
+ else if (!strncmp(name, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME) + 1) &&
(counter_val == 2 || counter_val == 3 || counter_val == 7 || counter_val == 10)) {
if (H5L_TYPE_SOFT != info->type) {
ret_val = -1;
@@ -25952,8 +25922,8 @@ link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *in
goto done;
}
- else if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME) + 1) &&
+ else if (!strncmp(name, LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME) + 1) &&
(counter_val == 0 || counter_val == 5 || counter_val == 8 || counter_val == 9)) {
if (H5L_TYPE_EXTERNAL != info->type) {
ret_val = -1;
@@ -26022,29 +25992,29 @@ link_iter_idx_saving_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
UNUSED(group_id);
if (broken && !*broken &&
- !HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME) + 1)) {
+ !strncmp(name, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME) + 1)) {
return (*broken = 1);
}
- if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME) + 1)) {
+ if (!strncmp(name, LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME) + 1)) {
if (H5L_TYPE_HARD != info->type) {
H5_FAILED();
printf(" link type did not match\n");
goto error;
}
}
- else if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME) + 1)) {
+ else if (!strncmp(name, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME) + 1)) {
if (H5L_TYPE_SOFT != info->type) {
H5_FAILED();
printf(" link type did not match\n");
goto error;
}
}
- else if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME) + 1)) {
+ else if (!strncmp(name, LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME) + 1)) {
if (H5L_TYPE_EXTERNAL != info->type) {
H5_FAILED();
printf(" link type did not match\n");
@@ -26071,7 +26041,7 @@ error:
static herr_t
link_visit_hard_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data)
{
- hbool_t is_subgroup_link;
+ bool is_subgroup_link;
size_t *i = (size_t *)op_data;
size_t counter_val = *((size_t *)op_data);
size_t test_iteration;
@@ -26127,34 +26097,34 @@ link_visit_hard_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_i
if (test_iteration == 0 || test_iteration == 3) {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)subgroup_number, (int)link_idx_val);
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)subgroup_number, (int)link_idx_val);
}
}
else {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
- (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
+ (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
}
}
- if (HDstrncmp(name, expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -26174,7 +26144,7 @@ done:
static herr_t
link_visit_soft_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data)
{
- hbool_t is_subgroup_link;
+ bool is_subgroup_link;
size_t *i = (size_t *)op_data;
size_t counter_val = *((size_t *)op_data);
size_t test_iteration;
@@ -26240,34 +26210,34 @@ link_visit_soft_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_i
if (test_iteration == 0 || test_iteration == 3) {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)subgroup_number, (int)link_idx_val);
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)subgroup_number, (int)link_idx_val);
}
}
else {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
- (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
+ (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
}
}
- if (HDstrncmp(name, expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -26288,7 +26258,7 @@ static herr_t
link_visit_external_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
void *op_data)
{
- hbool_t is_subgroup_link;
+ bool is_subgroup_link;
size_t *i = (size_t *)op_data;
size_t counter_val = *((size_t *)op_data);
size_t test_iteration;
@@ -26361,34 +26331,34 @@ link_visit_external_links_no_cycles_cb(hid_t group_id, const char *name, const H
if (test_iteration == 0 || test_iteration == 3) {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)subgroup_number, (int)link_idx_val);
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)subgroup_number, (int)link_idx_val);
}
}
else {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
- (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
+ (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
}
}
- if (HDstrncmp(name, expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -26422,12 +26392,12 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
UNUSED(group_id);
UNUSED(op_data);
- if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1) +
- 1) &&
+ if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1) +
+ 1) &&
(counter_val == 2 || counter_val == 14 || counter_val == 18 || counter_val == 30)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26438,12 +26408,12 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2) +
+ 1) &&
(counter_val == 3 || counter_val == 13 || counter_val == 19 || counter_val == 29)) {
if (H5L_TYPE_SOFT != info->type) {
ret_val = -1;
@@ -26454,12 +26424,12 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3) +
+ 1) &&
(counter_val == 6 || counter_val == 10 || counter_val == 22 || counter_val == 26)) {
if (H5L_TYPE_EXTERNAL != info->type) {
ret_val = -1;
@@ -26470,12 +26440,12 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4) +
+ 1) &&
(counter_val == 7 || counter_val == 9 || counter_val == 23 || counter_val == 25)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26486,12 +26456,12 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME) +
+ 1) &&
(counter_val == 1 || counter_val == 15 || counter_val == 17 || counter_val == 31)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26502,12 +26472,12 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME2,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME2) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME2,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME2) +
+ 1) &&
(counter_val == 5 || counter_val == 11 || counter_val == 21 || counter_val == 27)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26518,8 +26488,8 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2) + 1) &&
+ else if (!strncmp(name, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2) + 1) &&
(counter_val == 0 || counter_val == 12 || counter_val == 16 || counter_val == 28)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26529,8 +26499,8 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3) + 1) &&
+ else if (!strncmp(name, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3) + 1) &&
(counter_val == 4 || counter_val == 8 || counter_val == 20 || counter_val == 24)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26559,7 +26529,7 @@ done:
static herr_t
link_visit_hard_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data)
{
- hbool_t is_subgroup_link;
+ bool is_subgroup_link;
size_t *i = (size_t *)op_data;
size_t counter_val = *((size_t *)op_data);
size_t test_iteration;
@@ -26615,34 +26585,34 @@ link_visit_hard_links_cycles_cb(hid_t group_id, const char *name, const H5L_info
if (test_iteration == 0 || test_iteration == 3) {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_HARD_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)subgroup_number, (int)link_idx_val);
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_HARD_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)subgroup_number, (int)link_idx_val);
}
}
else {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_HARD_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
- (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_HARD_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
+ (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
}
}
- if (HDstrncmp(name, expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -26662,7 +26632,7 @@ done:
static herr_t
link_visit_soft_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data)
{
- hbool_t is_subgroup_link;
+ bool is_subgroup_link;
size_t *i = (size_t *)op_data;
size_t counter_val = *((size_t *)op_data);
size_t test_iteration;
@@ -26728,34 +26698,34 @@ link_visit_soft_links_cycles_cb(hid_t group_id, const char *name, const H5L_info
if (test_iteration == 0 || test_iteration == 3) {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)subgroup_number, (int)link_idx_val);
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)subgroup_number, (int)link_idx_val);
}
}
else {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
- (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
+ (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
}
}
- if (HDstrncmp(name, expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -26775,7 +26745,7 @@ done:
static herr_t
link_visit_external_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data)
{
- hbool_t is_subgroup_link;
+ bool is_subgroup_link;
size_t *i = (size_t *)op_data;
size_t counter_val = *((size_t *)op_data);
size_t test_iteration;
@@ -26848,34 +26818,34 @@ link_visit_external_links_cycles_cb(hid_t group_id, const char *name, const H5L_
if (test_iteration == 0 || test_iteration == 3) {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)subgroup_number, (int)link_idx_val);
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)subgroup_number, (int)link_idx_val);
}
}
else {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
- (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
+ (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
}
}
- if (HDstrncmp(name, expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -26909,12 +26879,12 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
UNUSED(group_id);
UNUSED(op_data);
- if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1,
- strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1) +
- 1) &&
+ if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1,
+ strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1) +
+ 1) &&
(counter_val == 1 || counter_val == 11 || counter_val == 13 || counter_val == 23)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26925,12 +26895,12 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2,
- strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2,
+ strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2) +
+ 1) &&
(counter_val == 2 || counter_val == 10 || counter_val == 14 || counter_val == 22)) {
if (H5L_TYPE_SOFT != info->type) {
ret_val = -1;
@@ -26941,12 +26911,12 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3,
- strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3,
+ strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3) +
+ 1) &&
(counter_val == 4 || counter_val == 8 || counter_val == 16 || counter_val == 20)) {
if (H5L_TYPE_EXTERNAL != info->type) {
ret_val = -1;
@@ -26957,12 +26927,12 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4,
- strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4,
+ strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4) +
+ 1) &&
(counter_val == 5 || counter_val == 7 || counter_val == 17 || counter_val == 19)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26973,8 +26943,8 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
goto done;
}
- else if (!HDstrncmp(name, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2,
- strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2) + 1) &&
+ else if (!strncmp(name, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2,
+ strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2) + 1) &&
(counter_val == 0 || counter_val == 9 || counter_val == 12 || counter_val == 21)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26984,8 +26954,8 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
goto done;
}
- else if (!HDstrncmp(name, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3,
- strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3) + 1) &&
+ else if (!strncmp(name, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3,
+ strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3) + 1) &&
(counter_val == 3 || counter_val == 6 || counter_val == 15 || counter_val == 18)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
diff --git a/test/API/H5_api_misc_test.c b/test/API/H5_api_misc_test.c
index 2e53804..bce618b 100644
--- a/test/API/H5_api_misc_test.c
+++ b/test/API/H5_api_misc_test.c
@@ -60,11 +60,11 @@ test_open_link_without_leading_slash(void)
goto error;
}
- if ((space_id = generate_random_dataspace(OPEN_LINK_WITHOUT_SLASH_DSET_SPACE_RANK, NULL, NULL, FALSE)) <
+ if ((space_id = generate_random_dataspace(OPEN_LINK_WITHOUT_SLASH_DSET_SPACE_RANK, NULL, NULL, false)) <
0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(container_group, OPEN_LINK_WITHOUT_SLASH_DSET_NAME, dset_dtype, space_id,
@@ -235,13 +235,13 @@ test_object_creation_by_absolute_path(void)
/* Try to create a dataset nested at the end of this group chain by using an absolute pathname */
if ((fspace_id = generate_random_dataspace(OBJECT_CREATE_BY_ABSOLUTE_PATH_TEST_DSET_SPACE_RANK,
- NULL, NULL, FALSE)) < 0) {
+ NULL, NULL, false)) < 0) {
H5_FAILED();
printf(" failed to generate dataspace\n");
PART_ERROR(H5Dcreate_using_absolute_path);
}
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" failed to generate datatype\n");
PART_ERROR(H5Dcreate_using_absolute_path);
@@ -284,7 +284,7 @@ test_object_creation_by_absolute_path(void)
TESTING_2("creation of committed datatype using absolute pathname");
/* Try to create a committed datatype in the same fashion as the preceding dataset */
- if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
PART_ERROR(H5Tcommit_using_absolute_path);
@@ -411,20 +411,20 @@ test_absolute_vs_relative_path(void)
}
if ((fspace_id = generate_random_dataspace(ABSOLUTE_VS_RELATIVE_PATH_TEST_DSET_SPACE_RANK, NULL, NULL,
- FALSE)) < 0)
+ false)) < 0)
TEST_ERROR;
- if ((dset_dtype1 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype1 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((dset_dtype2 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype2 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((dset_dtype3 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype3 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((dset_dtype4 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype4 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((dset_dtype5 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype5 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((dset_dtype6 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype6 = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
PASSED();
@@ -944,19 +944,19 @@ test_symbols_in_compound_field_name(void)
}
for (i = 0, total_type_size = 0; i < COMPOUND_WITH_SYMBOLS_IN_MEMBER_NAMES_TEST_NUM_SUBTYPES; i++) {
- type_pool[i] = generate_random_datatype(H5T_NO_CLASS, FALSE);
+ type_pool[i] = generate_random_datatype(H5T_NO_CLASS, false);
total_type_size += H5Tget_size(type_pool[i]);
}
- HDsnprintf(member_names[0], 256, "{{{ member0");
- HDsnprintf(member_names[1], 256, "member1 }}}");
- HDsnprintf(member_names[2], 256, "{{{ member2 }}");
- HDsnprintf(member_names[3], 256, "{{ member3 }}}");
- HDsnprintf(member_names[4], 256, "\\\"member4");
- HDsnprintf(member_names[5], 256, "member5\\\"");
- HDsnprintf(member_names[6], 256, "mem\\\"ber6");
- HDsnprintf(member_names[7], 256, "{{ member7\\\" }");
- HDsnprintf(member_names[8], 256, "{{ member8\\\\");
+ snprintf(member_names[0], 256, "{{{ member0");
+ snprintf(member_names[1], 256, "member1 }}}");
+ snprintf(member_names[2], 256, "{{{ member2 }}");
+ snprintf(member_names[3], 256, "{{ member3 }}}");
+ snprintf(member_names[4], 256, "\\\"member4");
+ snprintf(member_names[5], 256, "member5\\\"");
+ snprintf(member_names[6], 256, "mem\\\"ber6");
+ snprintf(member_names[7], 256, "{{ member7\\\" }");
+ snprintf(member_names[8], 256, "{{ member8\\\\");
if ((compound_type = H5Tcreate(H5T_COMPOUND, total_type_size)) < 0) {
H5_FAILED();
@@ -978,7 +978,7 @@ test_symbols_in_compound_field_name(void)
TEST_ERROR;
if ((fspace_id = generate_random_dataspace(COMPOUND_WITH_SYMBOLS_IN_MEMBER_NAMES_TEST_DSET_RANK, NULL,
- NULL, FALSE)) < 0)
+ NULL, false)) < 0)
TEST_ERROR;
if ((dset_id = H5Dcreate2(group_id, COMPOUND_WITH_SYMBOLS_IN_MEMBER_NAMES_TEST_DSET_NAME, compound_type,
diff --git a/test/API/H5_api_object_test.c b/test/API/H5_api_object_test.c
index 992071e..d861661 100644
--- a/test/API/H5_api_object_test.c
+++ b/test/API/H5_api_object_test.c
@@ -150,10 +150,10 @@ test_open_object(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(OBJECT_OPEN_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(OBJECT_OPEN_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
PASSED();
@@ -242,7 +242,7 @@ test_open_object(void)
{
TESTING_2("H5Oopen on a committed datatype");
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype '%s'\n", OBJECT_OPEN_TEST_TYPE_NAME);
PART_ERROR(H5Oopen_dtype);
@@ -836,10 +836,10 @@ test_object_exists(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(OBJECT_EXISTS_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(OBJECT_EXISTS_TEST_DSET_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
PASSED();
@@ -921,7 +921,7 @@ test_object_exists(void)
{
TESTING_2("H5Oexists_by_name on a committed datatype");
- if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype '%s'\n", OBJECT_EXISTS_TEST_TYPE_NAME);
PART_ERROR(H5Oexists_by_name_dtype);
@@ -1287,10 +1287,10 @@ test_link_object(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(OBJECT_LINK_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(OBJECT_LINK_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
PASSED();
@@ -1645,10 +1645,10 @@ test_incr_decr_object_refcount(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(OBJECT_REF_COUNT_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(OBJECT_REF_COUNT_TEST_DSET_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
PASSED();
@@ -2022,12 +2022,12 @@ test_object_copy_basic(void)
goto error;
}
- if ((space_id = generate_random_dataspace(OBJECT_COPY_BASIC_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((space_id = generate_random_dataspace(OBJECT_COPY_BASIC_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((attr_space_id = generate_random_dataspace(OBJECT_COPY_BASIC_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ if ((attr_space_id = generate_random_dataspace(OBJECT_COPY_BASIC_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
/* Create the test group object, along with its nested members and the attributes attached to it. */
@@ -2117,7 +2117,7 @@ test_object_copy_basic(void)
}
/* Create the test committed datatype object, along with the attributes attached to it. */
- if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -2592,9 +2592,9 @@ test_object_copy_already_existing(void)
}
if ((space_id =
- generate_random_dataspace(OBJECT_COPY_ALREADY_EXISTING_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ generate_random_dataspace(OBJECT_COPY_ALREADY_EXISTING_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
/* Create the test group object */
@@ -2614,7 +2614,7 @@ test_object_copy_already_existing(void)
}
/* Create the test committed datatype object */
- if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -3024,13 +3024,13 @@ test_object_copy_no_attributes(void)
goto error;
}
- if ((space_id = generate_random_dataspace(OBJECT_COPY_NO_ATTRS_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((space_id = generate_random_dataspace(OBJECT_COPY_NO_ATTRS_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((attr_space_id = generate_random_dataspace(OBJECT_COPY_NO_ATTRS_TEST_SPACE_RANK, NULL, NULL, TRUE)) <
+ if ((attr_space_id = generate_random_dataspace(OBJECT_COPY_NO_ATTRS_TEST_SPACE_RANK, NULL, NULL, true)) <
0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
/* Create the test group object, along with the attributes attached to it. */
@@ -3090,7 +3090,7 @@ test_object_copy_no_attributes(void)
}
/* Create the test committed datatype object, along with the attributes attached to it. */
- if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -3532,7 +3532,7 @@ test_object_copy_by_soft_link(void)
goto error;
}
- if ((attr_space_id = generate_random_dataspace(OBJECT_COPY_SOFT_LINK_TEST_SPACE_RANK, NULL, NULL, TRUE)) <
+ if ((attr_space_id = generate_random_dataspace(OBJECT_COPY_SOFT_LINK_TEST_SPACE_RANK, NULL, NULL, true)) <
0)
TEST_ERROR;
@@ -4241,14 +4241,14 @@ test_object_copy_between_files(void)
goto error;
}
- if ((space_id = generate_random_dataspace(OBJECT_COPY_BETWEEN_FILES_TEST_SPACE_RANK, NULL, NULL, FALSE)) <
+ if ((space_id = generate_random_dataspace(OBJECT_COPY_BETWEEN_FILES_TEST_SPACE_RANK, NULL, NULL, false)) <
0)
TEST_ERROR;
if ((attr_space_id =
- generate_random_dataspace(OBJECT_COPY_BETWEEN_FILES_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0)
+ generate_random_dataspace(OBJECT_COPY_BETWEEN_FILES_TEST_SPACE_RANK, NULL, NULL, true)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
/* Create the test group object, along with its nested members and the attributes attached to it. */
@@ -4338,7 +4338,7 @@ test_object_copy_between_files(void)
}
/* Create the test committed datatype object, along with the attributes attached to it. */
- if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype\n");
goto error;
@@ -5106,13 +5106,13 @@ test_object_visit(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(OBJECT_VISIT_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(OBJECT_VISIT_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
- if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype '%s'\n", OBJECT_VISIT_TEST_TYPE_NAME);
goto error;
@@ -6420,10 +6420,10 @@ test_close_object(void)
goto error;
}
- if ((fspace_id = generate_random_dataspace(OBJECT_CLOSE_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0)
+ if ((fspace_id = generate_random_dataspace(OBJECT_CLOSE_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0)
+ if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0)
TEST_ERROR;
PASSED();
@@ -6500,7 +6500,7 @@ test_close_object(void)
{
TESTING_2("H5Oclose on a committed datatype");
- if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) {
+ if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
printf(" couldn't create datatype '%s'\n", OBJECT_CLOSE_TEST_TYPE_NAME);
PART_ERROR(H5Oclose_dtype);
@@ -6675,11 +6675,11 @@ test_close_invalid_objects(void)
goto error;
}
- if ((attr_space_id = generate_random_dataspace(OBJECT_CLOSE_INVALID_TEST_SPACE_RANK, NULL, NULL, TRUE)) <
+ if ((attr_space_id = generate_random_dataspace(OBJECT_CLOSE_INVALID_TEST_SPACE_RANK, NULL, NULL, true)) <
0)
TEST_ERROR;
- if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0)
+ if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0)
TEST_ERROR;
if ((attr_id = H5Acreate2(group_id, OBJECT_CLOSE_INVALID_TEST_ATTRIBUTE_NAME, attr_dtype, attr_space_id,
@@ -6883,7 +6883,7 @@ object_copy_attribute_iter_callback(hid_t location_id, const char *attr_name, co
snprintf(expected_name, 256, "attr%d", (int)(*counter));
- if (HDstrncmp(attr_name, expected_name, 256)) {
+ if (strncmp(attr_name, expected_name, 256)) {
printf(" attribute name '%s' did not match expected name '%s'\n", attr_name, expected_name);
ret_value = H5_ITER_ERROR;
goto done;
@@ -7028,28 +7028,28 @@ object_visit_callback(hid_t o_id, const char *name, const H5O_info2_t *object_in
UNUSED(o_id);
- if (!HDstrncmp(name, ".", strlen(".") + 1) &&
+ if (!strncmp(name, ".", strlen(".") + 1) &&
(counter_val == 0 || counter_val == 4 || counter_val == 8 || counter_val == 12)) {
if (H5O_TYPE_GROUP == object_info->type)
goto done;
else
printf(" type for object '%s' was not H5O_TYPE_GROUP\n", name);
}
- else if (!HDstrncmp(name, OBJECT_VISIT_TEST_GROUP_NAME, strlen(OBJECT_VISIT_TEST_GROUP_NAME) + 1) &&
+ else if (!strncmp(name, OBJECT_VISIT_TEST_GROUP_NAME, strlen(OBJECT_VISIT_TEST_GROUP_NAME) + 1) &&
(counter_val == 2 || counter_val == 6 || counter_val == 9 || counter_val == 15)) {
if (H5O_TYPE_GROUP == object_info->type)
goto done;
else
printf(" type for object '%s' was not H5O_TYPE_GROUP\n", name);
}
- else if (!HDstrncmp(name, OBJECT_VISIT_TEST_DSET_NAME, strlen(OBJECT_VISIT_TEST_DSET_NAME) + 1) &&
+ else if (!strncmp(name, OBJECT_VISIT_TEST_DSET_NAME, strlen(OBJECT_VISIT_TEST_DSET_NAME) + 1) &&
(counter_val == 1 || counter_val == 7 || counter_val == 10 || counter_val == 14)) {
if (H5O_TYPE_DATASET == object_info->type)
goto done;
else
printf(" type for object '%s' was not H5O_TYPE_DATASET\n", name);
}
- else if (!HDstrncmp(name, OBJECT_VISIT_TEST_TYPE_NAME, strlen(OBJECT_VISIT_TEST_TYPE_NAME) + 1) &&
+ else if (!strncmp(name, OBJECT_VISIT_TEST_TYPE_NAME, strlen(OBJECT_VISIT_TEST_TYPE_NAME) + 1) &&
(counter_val == 3 || counter_val == 5 || counter_val == 11 || counter_val == 13)) {
if (H5O_TYPE_NAMED_DATATYPE == object_info->type)
goto done;
@@ -7078,7 +7078,7 @@ object_visit_dset_callback(hid_t o_id, const char *name, const H5O_info2_t *obje
UNUSED(o_id);
UNUSED(op_data);
- if (HDstrncmp(name, ".", strlen(".") + 1)) {
+ if (strncmp(name, ".", strlen(".") + 1)) {
printf(" object '%s' didn't match known names\n", name);
return -1;
}
@@ -7102,7 +7102,7 @@ object_visit_dtype_callback(hid_t o_id, const char *name, const H5O_info2_t *obj
UNUSED(o_id);
UNUSED(op_data);
- if (HDstrncmp(name, ".", strlen(".") + 1)) {
+ if (strncmp(name, ".", strlen(".") + 1)) {
printf(" object '%s' didn't match known names\n", name);
return -1;
}
@@ -7128,7 +7128,7 @@ object_visit_soft_link_callback(hid_t o_id, const char *name, const H5O_info2_t
UNUSED(o_id);
- if (!HDstrncmp(name, ".", strlen(".") + 1) && (counter_val <= 5)) {
+ if (!strncmp(name, ".", strlen(".") + 1) && (counter_val <= 5)) {
if (H5O_TYPE_GROUP == object_info->type)
goto done;
else
diff --git a/test/API/H5_api_test.c b/test/API/H5_api_test.c
index 3685506..654eb40 100644
--- a/test/API/H5_api_test.c
+++ b/test/API/H5_api_test.c
@@ -124,7 +124,7 @@ main(int argc, char **argv)
hid_t registered_con_id = H5I_INVALID_HID;
char *vol_connector_string_copy = NULL;
char *vol_connector_info = NULL;
- hbool_t err_occurred = FALSE;
+ bool err_occurred = false;
/* Simple argument checking, TODO can improve that later */
if (argc > 1) {
@@ -155,13 +155,12 @@ main(int argc, char **argv)
seed = (unsigned)HDtime(NULL);
srand(seed);
- if (NULL == (test_path_prefix = HDgetenv(HDF5_API_TEST_PATH_PREFIX)))
+ if (NULL == (test_path_prefix = getenv(HDF5_API_TEST_PATH_PREFIX)))
test_path_prefix = "";
- HDsnprintf(H5_api_test_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix,
- TEST_FILE_NAME);
+ snprintf(H5_api_test_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, TEST_FILE_NAME);
- if (NULL == (vol_connector_string = HDgetenv(HDF5_VOL_CONNECTOR))) {
+ if (NULL == (vol_connector_string = getenv(HDF5_VOL_CONNECTOR))) {
printf("No VOL connector selected; using native VOL connector\n");
vol_connector_name = "native";
vol_connector_info = NULL;
@@ -169,21 +168,21 @@ main(int argc, char **argv)
else {
char *token;
- if (NULL == (vol_connector_string_copy = HDstrdup(vol_connector_string))) {
+ if (NULL == (vol_connector_string_copy = strdup(vol_connector_string))) {
fprintf(stderr, "Unable to copy VOL connector string\n");
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
- if (NULL == (token = HDstrtok(vol_connector_string_copy, " "))) {
+ if (NULL == (token = strtok(vol_connector_string_copy, " "))) {
fprintf(stderr, "Error while parsing VOL connector string\n");
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
vol_connector_name = token;
- if (NULL != (token = HDstrtok(NULL, " "))) {
+ if (NULL != (token = strtok(NULL, " "))) {
vol_connector_info = token;
}
}
@@ -197,7 +196,7 @@ main(int argc, char **argv)
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
fprintf(stderr, "Unable to create FAPL\n");
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
@@ -208,19 +207,19 @@ main(int argc, char **argv)
* Otherwise, HDF5 will default to running the tests
* with the native connector, which could be misleading.
*/
- if (0 != HDstrcmp(vol_connector_name, "native")) {
+ if (0 != strcmp(vol_connector_name, "native")) {
htri_t is_registered;
if ((is_registered = H5VLis_connector_registered_by_name(vol_connector_name)) < 0) {
fprintf(stderr, "Unable to determine if VOL connector is registered\n");
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
if (!is_registered) {
fprintf(stderr, "Specified VOL connector '%s' wasn't correctly registered!\n",
vol_connector_name);
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
else {
@@ -231,19 +230,19 @@ main(int argc, char **argv)
*/
if (H5Pget_vol_id(fapl_id, &default_con_id) < 0) {
fprintf(stderr, "Couldn't retrieve ID of VOL connector set on default FAPL\n");
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
if ((registered_con_id = H5VLget_connector_id_by_name(vol_connector_name)) < 0) {
fprintf(stderr, "Couldn't retrieve ID of registered VOL connector\n");
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
if (default_con_id != registered_con_id) {
fprintf(stderr, "VOL connector set on default FAPL didn't match specified VOL connector\n");
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
}
@@ -255,7 +254,7 @@ main(int argc, char **argv)
vol_cap_flags_g = H5VL_CAP_FLAG_NONE;
if (H5Pget_vol_cap_flags(fapl_id, &vol_cap_flags_g) < 0) {
fprintf(stderr, "Unable to retrieve VOL connector capability flags\n");
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
@@ -265,7 +264,7 @@ main(int argc, char **argv)
*/
if (create_test_container(H5_api_test_filename, vol_cap_flags_g) < 0) {
fprintf(stderr, "Unable to create testing container file '%s'\n", H5_api_test_filename);
- err_occurred = TRUE;
+ err_occurred = true;
goto done;
}
@@ -290,17 +289,17 @@ done:
if (default_con_id >= 0 && H5VLclose(default_con_id) < 0) {
fprintf(stderr, "Unable to close VOL connector ID\n");
- err_occurred = TRUE;
+ err_occurred = true;
}
if (registered_con_id >= 0 && H5VLclose(registered_con_id) < 0) {
fprintf(stderr, "Unable to close VOL connector ID\n");
- err_occurred = TRUE;
+ err_occurred = true;
}
if (fapl_id >= 0 && H5Pclose(fapl_id) < 0) {
fprintf(stderr, "Unable to close FAPL\n");
- err_occurred = TRUE;
+ err_occurred = true;
}
H5close();
diff --git a/test/API/H5_api_test_util.c b/test/API/H5_api_test_util.c
index 916f2ca..d0194f7 100644
--- a/test/API/H5_api_test_util.c
+++ b/test/API/H5_api_test_util.c
@@ -76,15 +76,15 @@
#define COMPACT_SPACE_MAX_DIM_SIZE 4
#define COMPACT_SPACE_MAX_DIMS 3
-typedef hid_t (*generate_datatype_func)(H5T_class_t parent_class, hbool_t is_compact);
+typedef hid_t (*generate_datatype_func)(H5T_class_t parent_class, bool is_compact);
-static hid_t generate_random_datatype_integer(H5T_class_t parent_class, hbool_t is_compact);
-static hid_t generate_random_datatype_float(H5T_class_t parent_class, hbool_t is_compact);
-static hid_t generate_random_datatype_string(H5T_class_t parent_class, hbool_t is_compact);
-static hid_t generate_random_datatype_compound(H5T_class_t parent_class, hbool_t is_compact);
-static hid_t generate_random_datatype_reference(H5T_class_t parent_class, hbool_t is_compact);
-static hid_t generate_random_datatype_enum(H5T_class_t parent_class, hbool_t is_compact);
-static hid_t generate_random_datatype_array(H5T_class_t parent_class, hbool_t is_compact);
+static hid_t generate_random_datatype_integer(H5T_class_t parent_class, bool is_compact);
+static hid_t generate_random_datatype_float(H5T_class_t parent_class, bool is_compact);
+static hid_t generate_random_datatype_string(H5T_class_t parent_class, bool is_compact);
+static hid_t generate_random_datatype_compound(H5T_class_t parent_class, bool is_compact);
+static hid_t generate_random_datatype_reference(H5T_class_t parent_class, bool is_compact);
+static hid_t generate_random_datatype_enum(H5T_class_t parent_class, bool is_compact);
+static hid_t generate_random_datatype_array(H5T_class_t parent_class, bool is_compact);
/*
* Helper function to generate a random HDF5 datatype in order to thoroughly
@@ -93,7 +93,7 @@ static hid_t generate_random_datatype_array(H5T_class_t parent_class, hbool_t is
* called with H5T_NO_CLASS for the parent_class parameter.
*/
hid_t
-generate_random_datatype(H5T_class_t parent_class, hbool_t is_compact)
+generate_random_datatype(H5T_class_t parent_class, bool is_compact)
{
generate_datatype_func gen_func;
static int depth = 0;
@@ -211,7 +211,7 @@ done:
}
static hid_t
-generate_random_datatype_integer(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H5_ATTR_UNUSED is_compact)
+generate_random_datatype_integer(H5T_class_t H5_ATTR_UNUSED parent_class, bool H5_ATTR_UNUSED is_compact)
{
hid_t type_to_copy = H5I_INVALID_HID;
hid_t datatype = H5I_INVALID_HID;
@@ -288,7 +288,7 @@ done:
}
static hid_t
-generate_random_datatype_float(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H5_ATTR_UNUSED is_compact)
+generate_random_datatype_float(H5T_class_t H5_ATTR_UNUSED parent_class, bool H5_ATTR_UNUSED is_compact)
{
hid_t type_to_copy = H5I_INVALID_HID;
hid_t datatype = H5I_INVALID_HID;
@@ -330,7 +330,7 @@ done:
}
static hid_t
-generate_random_datatype_string(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H5_ATTR_UNUSED is_compact)
+generate_random_datatype_string(H5T_class_t H5_ATTR_UNUSED parent_class, bool H5_ATTR_UNUSED is_compact)
{
hid_t datatype = H5I_INVALID_HID;
hid_t ret_value = H5I_INVALID_HID;
@@ -387,7 +387,7 @@ done:
}
static hid_t
-generate_random_datatype_compound(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t is_compact)
+generate_random_datatype_compound(H5T_class_t H5_ATTR_UNUSED parent_class, bool is_compact)
{
size_t num_members = 0;
size_t next_offset = 0;
@@ -410,7 +410,7 @@ generate_random_datatype_compound(H5T_class_t H5_ATTR_UNUSED parent_class, hbool
size_t member_size;
char member_name[256];
- HDsnprintf(member_name, 256, "compound_member%zu", i);
+ snprintf(member_name, 256, "compound_member%zu", i);
if ((compound_members[i] = generate_random_datatype(H5T_COMPOUND, is_compact)) < 0) {
printf(" couldn't create compound datatype member %zu\n", i);
@@ -455,7 +455,7 @@ done:
}
static hid_t
-generate_random_datatype_reference(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H5_ATTR_UNUSED is_compact)
+generate_random_datatype_reference(H5T_class_t H5_ATTR_UNUSED parent_class, bool H5_ATTR_UNUSED is_compact)
{
hid_t datatype = H5I_INVALID_HID;
hid_t ret_value = H5I_INVALID_HID;
@@ -490,7 +490,7 @@ done:
}
static hid_t
-generate_random_datatype_enum(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H5_ATTR_UNUSED is_compact)
+generate_random_datatype_enum(H5T_class_t H5_ATTR_UNUSED parent_class, bool H5_ATTR_UNUSED is_compact)
{
size_t num_members = 0;
hid_t datatype = H5I_INVALID_HID;
@@ -510,20 +510,20 @@ generate_random_datatype_enum(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H
}
for (size_t i = 0; i < num_members; i++) {
- hbool_t unique;
- char name[ENUM_TYPE_MAX_MEMBER_NAME_LENGTH];
- int enum_val;
+ bool unique;
+ char name[ENUM_TYPE_MAX_MEMBER_NAME_LENGTH];
+ int enum_val;
- HDsnprintf(name, ENUM_TYPE_MAX_MEMBER_NAME_LENGTH, "enum_val%zu", i);
+ snprintf(name, ENUM_TYPE_MAX_MEMBER_NAME_LENGTH, "enum_val%zu", i);
do {
enum_val = rand();
/* Check for uniqueness of enum member */
- unique = TRUE;
+ unique = true;
for (size_t j = 0; j < i; j++)
if (enum_val == enum_member_vals[j])
- unique = FALSE;
+ unique = false;
} while (!unique);
enum_member_vals[i] = enum_val;
@@ -548,7 +548,7 @@ done:
}
static hid_t
-generate_random_datatype_array(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t is_compact)
+generate_random_datatype_array(H5T_class_t H5_ATTR_UNUSED parent_class, bool is_compact)
{
unsigned ndims = 0;
hsize_t *array_dims = NULL;
@@ -599,7 +599,7 @@ done:
* test support for dataspaces.
*/
hid_t
-generate_random_dataspace(int rank, const hsize_t *max_dims, hsize_t *dims_out, hbool_t is_compact)
+generate_random_dataspace(int rank, const hsize_t *max_dims, hsize_t *dims_out, bool is_compact)
{
hsize_t dataspace_dims[H5S_MAX_RANK];
size_t i;
@@ -750,7 +750,7 @@ prefix_filename(const char *prefix, const char *filename, char **filename_out)
goto done;
}
- HDsnprintf(out_buf, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", prefix, filename);
+ snprintf(out_buf, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", prefix, filename);
*filename_out = out_buf;
diff --git a/test/API/H5_api_test_util.h b/test/API/H5_api_test_util.h
index 5d127bb..4e416af 100644
--- a/test/API/H5_api_test_util.h
+++ b/test/API/H5_api_test_util.h
@@ -15,8 +15,8 @@
#include "hdf5.h"
-hid_t generate_random_datatype(H5T_class_t parent_class, hbool_t is_compact);
-hid_t generate_random_dataspace(int rank, const hsize_t *max_dims, hsize_t *dims_out, hbool_t is_compact);
+hid_t generate_random_datatype(H5T_class_t parent_class, bool is_compact);
+hid_t generate_random_dataspace(int rank, const hsize_t *max_dims, hsize_t *dims_out, bool is_compact);
int create_test_container(char *filename, uint64_t vol_cap_flags);
herr_t prefix_filename(const char *prefix, const char *filename, char **filename_out);
herr_t remove_test_file(const char *prefix, const char *filename);
diff --git a/test/API/driver/CMakeLists.txt b/test/API/driver/CMakeLists.txt
index 23ba053..5993a44 100644
--- a/test/API/driver/CMakeLists.txt
+++ b/test/API/driver/CMakeLists.txt
@@ -2,9 +2,9 @@ cmake_minimum_required (VERSION 3.18)
project(H5_API_TEST_DRIVER CXX)
if (NOT KWSYS_USE_LOCALCONTENT)
- set (KWSYS_URL ${KWSYS_TGZ_ORIGPATH}/${KWSYS_TGZ_ORIGNAME})
+ set (KWSYS_URL ${KWSYS_TGZ_ORIGPATH}/${KWSYS_TGZ_NAME})
else ()
- set (KWSYS_URL ${TGZPATH}/${KWSYS_TGZ_ORIGNAME})
+ set (KWSYS_URL ${TGZPATH}/${KWSYS_TGZ_NAME})
endif ()
# Only tgz files
FetchContent_Declare (KWSYS
diff --git a/test/API/tarray.c b/test/API/tarray.c
index e05cab3..7ab2114 100644
--- a/test/API/tarray.c
+++ b/test/API/tarray.c
@@ -686,7 +686,7 @@ test_array_compound_atomic(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid2, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "i") != 0)
+ if (strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -705,7 +705,7 @@ test_array_compound_atomic(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid2, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "f") != 0)
+ if (strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -908,7 +908,7 @@ test_array_compound_array(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid2, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "i") != 0)
+ if (strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -927,7 +927,7 @@ test_array_compound_array(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid2, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "f") != 0)
+ if (strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -1664,9 +1664,9 @@ test_array_bkg(void)
for (i = 0; i < dtsinfo->nsubfields; i++)
dtsinfo->name[i] = (char *)calloc((size_t)20, sizeof(char));
- HDstrcpy(dtsinfo->name[0], "One");
- HDstrcpy(dtsinfo->name[1], "Two");
- HDstrcpy(dtsinfo->name[2], "Three");
+ strcpy(dtsinfo->name[0], "One");
+ strcpy(dtsinfo->name[1], "Two");
+ strcpy(dtsinfo->name[2], "Three");
/* Create file */
/* ----------- */
@@ -1919,7 +1919,7 @@ test_compat(void)
size_t off; /* Offset of compound field */
hid_t mtid; /* Datatype ID for field */
int i; /* Index variables */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -1967,7 +1967,7 @@ test_compat(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid1, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "i") != 0)
+ if (strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -1986,7 +1986,7 @@ test_compat(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid1, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "f") != 0)
+ if (strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -2005,7 +2005,7 @@ test_compat(void)
/* Check the 3rd field's name */
mname = H5Tget_member_name(tid1, 2);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "l") != 0)
+ if (strcmp(mname, "l") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -2048,7 +2048,7 @@ test_compat(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid1, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "i") != 0)
+ if (mname && strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
@@ -2068,7 +2068,7 @@ test_compat(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid1, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "f") != 0)
+ if (mname && strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
@@ -2116,7 +2116,7 @@ test_compat(void)
/* Check the 3rd field's name */
mname = H5Tget_member_name(tid1, 2);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "l") != 0)
+ if (mname && strcmp(mname, "l") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
@@ -2164,7 +2164,7 @@ test_compat(void)
/* Check the 4th field's name */
mname = H5Tget_member_name(tid1, 3);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "d") != 0)
+ if (mname && strcmp(mname, "d") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
diff --git a/test/API/tattr.c b/test/API/tattr.c
index a1ff6c6..c4ae9f9 100644
--- a/test/API/tattr.c
+++ b/test/API/tattr.c
@@ -166,7 +166,7 @@ typedef struct {
int stop; /* # of iterations to stop after */
hsize_t curr; /* Current creation order value */
size_t max_visit; /* Size of "visited attribute" flag array */
- hbool_t *visited; /* Pointer to array of "visited attribute" flags */
+ bool *visited; /* Pointer to array of "visited attribute" flags */
} attr_iter_info_t;
static herr_t attr_op1(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *op_data);
@@ -314,8 +314,8 @@ test_attr_basic_write(hid_t fapl)
if (attr_name) {
ret = (herr_t)H5Aget_name(attr, (size_t)(attr_name_size + 1), attr_name);
CHECK(ret, FAIL, "H5Aget_name");
- ret = HDstrcmp(attr_name, ATTR_TMP_NAME);
- VERIFY(ret, 0, "HDstrcmp");
+ ret = strcmp(attr_name, ATTR_TMP_NAME);
+ VERIFY(ret, 0, "strcmp");
free(attr_name);
attr_name = NULL;
@@ -351,8 +351,8 @@ test_attr_basic_write(hid_t fapl)
if (attr_name) {
ret = (herr_t)H5Aget_name(attr2, (size_t)(attr_name_size + 1), attr_name);
CHECK(ret, FAIL, "H5Aget_name");
- ret = HDstrcmp(attr_name, ATTR1A_NAME);
- VERIFY(ret, 0, "HDstrcmp");
+ ret = strcmp(attr_name, ATTR1A_NAME);
+ VERIFY(ret, 0, "strcmp");
free(attr_name);
attr_name = NULL;
@@ -887,8 +887,8 @@ test_attr_compound_read(hid_t fapl)
VERIFY(fields, 3, "H5Tget_nmembers");
for (i = 0; i < fields; i++) {
fieldname = H5Tget_member_name(type, (unsigned)i);
- if (!(HDstrcmp(fieldname, ATTR4_FIELDNAME1) != 0 || HDstrcmp(fieldname, ATTR4_FIELDNAME2) != 0 ||
- HDstrcmp(fieldname, ATTR4_FIELDNAME3) != 0))
+ if (!(strcmp(fieldname, ATTR4_FIELDNAME1) != 0 || strcmp(fieldname, ATTR4_FIELDNAME2) != 0 ||
+ strcmp(fieldname, ATTR4_FIELDNAME3) != 0))
TestErrPrintf("invalid field name for field #%d: %s\n", i, fieldname);
H5free_memory(fieldname);
} /* end for */
@@ -947,8 +947,8 @@ test_attr_compound_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR4_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR4_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR4_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR4_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR4_NAME);
/* Close attribute datatype */
@@ -1330,16 +1330,16 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR1_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR1_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR1_NAME);
/* Verify Name with too small of a buffer */
- name_len = H5Aget_name(attr, HDstrlen(ATTR1_NAME), attr_name);
- VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- HDstrcpy(temp_name, ATTR1_NAME); /* make a copy of the name */
- temp_name[HDstrlen(ATTR1_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name) != 0)
+ name_len = H5Aget_name(attr, strlen(ATTR1_NAME), attr_name);
+ VERIFY(name_len, strlen(ATTR1_NAME), "H5Aget_name");
+ strcpy(temp_name, ATTR1_NAME); /* make a copy of the name */
+ temp_name[strlen(ATTR1_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
+ if (strcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1388,16 +1388,16 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR2_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR2_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR2_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR2_NAME);
/* Verify Name with too small of a buffer */
- name_len = H5Aget_name(attr, HDstrlen(ATTR2_NAME), attr_name);
- VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name");
- HDstrcpy(temp_name, ATTR2_NAME); /* make a copy of the name */
- temp_name[HDstrlen(ATTR2_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name) != 0)
+ name_len = H5Aget_name(attr, strlen(ATTR2_NAME), attr_name);
+ VERIFY(name_len, strlen(ATTR2_NAME), "H5Aget_name");
+ strcpy(temp_name, ATTR2_NAME); /* make a copy of the name */
+ temp_name[strlen(ATTR2_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
+ if (strcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1450,16 +1450,16 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Verify Name with too small of a buffer */
- name_len = H5Aget_name(attr, HDstrlen(ATTR3_NAME), attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- HDstrcpy(temp_name, ATTR3_NAME); /* make a copy of the name */
- temp_name[HDstrlen(ATTR3_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name) != 0)
+ name_len = H5Aget_name(attr, strlen(ATTR3_NAME), attr_name);
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ strcpy(temp_name, ATTR3_NAME); /* make a copy of the name */
+ temp_name[strlen(ATTR3_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
+ if (strcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1488,19 +1488,19 @@ attr_op1(hid_t H5_ATTR_UNUSED loc_id, const char *name, const H5A_info_t H5_ATTR
switch (*count) {
case 0:
- if (HDstrcmp(name, ATTR1_NAME) != 0)
+ if (strcmp(name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR1_NAME);
(*count)++;
break;
case 1:
- if (HDstrcmp(name, ATTR2_NAME) != 0)
+ if (strcmp(name, ATTR2_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR2_NAME);
(*count)++;
break;
case 2:
- if (HDstrcmp(name, ATTR3_NAME) != 0)
+ if (strcmp(name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR3_NAME);
(*count)++;
break;
@@ -1647,8 +1647,8 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR1_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR1_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR1_NAME);
/* Close attribute */
@@ -1662,8 +1662,8 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Close attribute */
@@ -1686,8 +1686,8 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Close attribute */
@@ -2159,7 +2159,7 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
/* Re-open all the attributes by name and verify the data */
for (u = 0; u < max_attr; u++) {
/* Open attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Aopen(loc_id, attrname, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Aopen");
@@ -2184,10 +2184,10 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
CHECK(attr, FAIL, "H5Aopen_by_idx");
/* Verify Name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, check_name);
- VERIFY(name_len, HDstrlen(attrname), "H5Aget_name");
- if (HDstrcmp(check_name, attrname) != 0)
+ VERIFY(name_len, strlen(attrname), "H5Aget_name");
+ if (strcmp(check_name, attrname) != 0)
TestErrPrintf("attribute name different: attrname = '%s', should be '%s'\n", check_name,
attrname);
@@ -2283,12 +2283,12 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2303,17 +2303,17 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add one more attribute, to push into "dense" storage */
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -2436,12 +2436,12 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2460,17 +2460,17 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add one more attribute, to push into "dense" storage */
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -2550,7 +2550,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
*/
fcpl = H5Pcopy(fcpl);
CHECK(fcpl, FAIL, "H5Pcopy");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, 1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, 1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
}
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
@@ -2603,12 +2603,12 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes, until well into dense storage */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2628,7 +2628,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Close dataspace */
ret = H5Sclose(sid);
@@ -2653,7 +2653,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
/* Delete attributes until the attributes revert to compact storage again */
for (u--; u >= min_dense; u--) {
/* Delete attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -2664,29 +2664,29 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Delete one more attribute, which should cause reversion to compact storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Verify attributes still left */
ret = test_attr_dense_verify(dataset, (u - 1));
CHECK(ret, FAIL, "test_attr_dense_verify");
/* Delete another attribute, to verify deletion in compact storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (u - 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (u - 1));
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Verify attributes still left */
ret = test_attr_dense_verify(dataset, (u - 2));
@@ -2754,7 +2754,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
*/
fcpl = H5Pcopy(fcpl);
CHECK(fcpl, FAIL, "H5Pcopy");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, 1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, 1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
}
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
@@ -2794,7 +2794,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pget_attr_phase_change");
/* Using creation order or not */
- for (use_corder = FALSE; use_corder <= TRUE; use_corder++) {
+ for (use_corder = false; use_corder <= true; use_corder++) {
if (use_corder) {
ret = H5Pset_attr_creation_order(dcpl, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED);
@@ -2807,12 +2807,12 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes, until well into dense storage */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, H5I_INVALID_HID, "H5Acreate2");
@@ -2825,7 +2825,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Rename attribute */
- HDsnprintf(new_attrname, sizeof(new_attrname), "new attr %02u", u);
+ snprintf(new_attrname, sizeof(new_attrname), "new attr %02u", u);
/* Rename attribute */
ret = H5Arename_by_name(fid, DSET1_NAME, attrname, new_attrname, H5P_DEFAULT);
@@ -2839,7 +2839,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -2878,7 +2878,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
unsigned value; /* Attribute value */
/* Open attribute */
- HDsnprintf(attrname, sizeof(attrname), "new attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "new attr %02u", u);
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
CHECK(attr, H5I_INVALID_HID, "H5Aopen");
@@ -2953,7 +2953,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
*/
fcpl = H5Pcopy(fcpl);
CHECK(fcpl, FAIL, "H5Pcopy");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, 1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, 1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
}
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
@@ -3000,12 +3000,12 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes, until well into dense storage */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3025,7 +3025,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Close dataspace */
ret = H5Sclose(sid);
@@ -3148,14 +3148,14 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add first attribute, which should be immediately in dense storage */
/* Create attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3169,14 +3169,14 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Add second attribute, to allow deletions to be checked easily */
/* Create attribute */
u = 1;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3190,7 +3190,7 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Delete second attribute, attributes should still be stored densely */
@@ -3201,20 +3201,20 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Delete first attribute, attributes should not be stored densely */
/* Delete attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Close dataspace */
@@ -3316,12 +3316,12 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3336,7 +3336,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add one more attribute, to push into "dense" storage */
/* Create dataspace for attribute */
@@ -3344,13 +3344,13 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Open the attribute just created and get a second ID */
attr2 = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -3385,7 +3385,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Open first attribute for the dataset */
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -3437,7 +3437,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Open first attribute for the dataset */
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -3500,7 +3500,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Open first attribute for the dataset */
attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)4, H5P_DEFAULT, H5P_DEFAULT);
@@ -3554,7 +3554,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Open attribute of the dataset for the first time */
attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)2, H5P_DEFAULT, H5P_DEFAULT);
@@ -3568,7 +3568,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Open attribute for the second time */
attr2 = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)2, H5P_DEFAULT, H5P_DEFAULT);
@@ -3618,7 +3618,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Open attribute of the dataset for the first time */
attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)3, H5P_DEFAULT, H5P_DEFAULT);
@@ -3627,7 +3627,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Delete a few attributes until the storage switches to compact */
for (u = min_dense - 1; u <= max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
add_attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(add_attr, FAIL, "H5Acreate2");
@@ -3642,7 +3642,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Open attribute for the second time */
attr2 = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)3, H5P_DEFAULT, H5P_DEFAULT);
@@ -3695,7 +3695,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(gid1, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3714,7 +3714,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
#if 0
/* Check on group's attribute storage status */
is_dense = H5O__is_attr_dense_test(gid1);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Open the hard link just created */
gid2 = H5Gopen2(fid, GROUP2_NAME, H5P_DEFAULT);
@@ -3858,16 +3858,16 @@ test_attr_big(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add first "small" attribute, which should be in compact storage */
/* Create attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3877,16 +3877,16 @@ test_attr_big(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add second "small" attribute, which should stay in compact storage */
/* Create attribute */
u = 1;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3896,16 +3896,16 @@ test_attr_big(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add first "big" attribute, which should push storage into dense form */
/* Create attribute */
u = 2;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT);
if (low == H5F_LIBVER_LATEST || attr >= 0) {
CHECK(attr, FAIL, "H5Acreate2");
@@ -3921,16 +3921,16 @@ test_attr_big(hid_t fcpl, hid_t fapl)
*/
#if 0
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (nshared_indices ? false : true), "H5O__is_attr_dense_test");
#endif
/* Add second "big" attribute, which should leave storage in dense form */
/* Create attribute */
u = 3;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3945,67 +3945,67 @@ test_attr_big(hid_t fcpl, hid_t fapl)
*/
#if 0
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (nshared_indices ? false : true), "H5O__is_attr_dense_test");
#endif
/* Delete second "small" attribute, attributes should still be stored densely */
/* Delete attribute */
u = 1;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (nshared_indices ? false : true), "H5O__is_attr_dense_test");
#endif
/* Delete second "big" attribute, attributes should still be stored densely */
/* Delete attribute */
u = 3;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (nshared_indices ? false : true), "H5O__is_attr_dense_test");
#endif
/* Delete first "big" attribute, attributes should _not_ be stored densely */
/* Delete attribute */
u = 2;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Delete first "small" attribute, should be no attributes now */
/* Delete attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
#endif
} /* end if */
#if 0
@@ -4019,9 +4019,9 @@ test_attr_big(hid_t fcpl, hid_t fapl)
* form - QAK)
*/
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
} /* end else */
#endif
@@ -4114,7 +4114,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Add attribute with 'null' dataspace */
/* Create attribute */
- HDstrcpy(attrname, "null attr");
+ strcpy(attrname, "null attr");
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4132,7 +4132,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Compare the dataspaces */
cmp = H5Sextent_equal(attr_sid, null_sid);
CHECK(cmp, FAIL, "H5Sextent_equal");
- VERIFY(cmp, TRUE, "H5Sextent_equal");
+ VERIFY(cmp, true, "H5Sextent_equal");
/* Close dataspace */
ret = H5Sclose(attr_sid);
@@ -4155,7 +4155,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Add another attribute with 'null' dataspace */
/* Create attribute */
- HDstrcpy(attrname, "null attr #2");
+ strcpy(attrname, "null attr #2");
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4189,7 +4189,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Open first attribute */
- HDstrcpy(attrname, "null attr #2");
+ strcpy(attrname, "null attr #2");
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Aopen");
@@ -4207,7 +4207,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Compare the dataspaces */
cmp = H5Sextent_equal(attr_sid, null_sid);
CHECK(cmp, FAIL, "H5Sextent_equal");
- VERIFY(cmp, TRUE, "H5Sextent_equal");
+ VERIFY(cmp, true, "H5Sextent_equal");
/* Close dataspace */
ret = H5Sclose(attr_sid);
@@ -4229,7 +4229,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Open second attribute */
- HDstrcpy(attrname, "null attr");
+ strcpy(attrname, "null attr");
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Aopen");
@@ -4387,7 +4387,7 @@ test_attr_deprec(hid_t fcpl, hid_t fapl)
**
****************************************************************/
static void
-test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_many(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t gid; /* Group ID */
@@ -4416,22 +4416,22 @@ test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create many attributes */
for (u = 0; u < nattr; u++) {
- HDsnprintf(attrname, sizeof(attrname), "a-%06u", u);
+ snprintf(attrname, sizeof(attrname), "a-%06u", u);
exists = H5Aexists(gid, attrname);
- VERIFY(exists, FALSE, "H5Aexists");
+ VERIFY(exists, false, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, FALSE, "H5Aexists_by_name");
+ VERIFY(exists, false, "H5Aexists_by_name");
aid = H5Acreate2(gid, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
exists = H5Aexists(gid, attrname);
- VERIFY(exists, TRUE, "H5Aexists");
+ VERIFY(exists, true, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, TRUE, "H5Aexists_by_name");
+ VERIFY(exists, true, "H5Aexists_by_name");
ret = H5Awrite(aid, H5T_NATIVE_UINT, &u);
CHECK(ret, FAIL, "H5Awrite");
@@ -4440,10 +4440,10 @@ test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
exists = H5Aexists(gid, attrname);
- VERIFY(exists, TRUE, "H5Aexists");
+ VERIFY(exists, true, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, TRUE, "H5Aexists_by_name");
+ VERIFY(exists, true, "H5Aexists_by_name");
} /* end for */
/* Close group */
@@ -4468,22 +4468,22 @@ test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
for (u = 0; u < nattr; u++) {
unsigned value; /* Attribute value */
- HDsnprintf(attrname, sizeof(attrname), "a-%06u", u);
+ snprintf(attrname, sizeof(attrname), "a-%06u", u);
exists = H5Aexists(gid, attrname);
- VERIFY(exists, TRUE, "H5Aexists");
+ VERIFY(exists, true, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, TRUE, "H5Aexists_by_name");
+ VERIFY(exists, true, "H5Aexists_by_name");
aid = H5Aopen(gid, attrname, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Aopen");
exists = H5Aexists(gid, attrname);
- VERIFY(exists, TRUE, "H5Aexists");
+ VERIFY(exists, true, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, TRUE, "H5Aexists_by_name");
+ VERIFY(exists, true, "H5Aexists_by_name");
ret = H5Aread(aid, H5T_NATIVE_UINT, &value);
CHECK(ret, FAIL, "H5Aread");
@@ -4583,9 +4583,9 @@ test_attr_corder_create_basic(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Close Dataset */
@@ -4610,9 +4610,9 @@ test_attr_corder_create_basic(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Retrieve dataset creation property list for group */
@@ -4722,14 +4722,14 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Create several attributes, but keep storage in compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4746,9 +4746,9 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (u + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
} /* end for */
} /* end for */
@@ -4809,9 +4809,9 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Loop through attributes, checking their creation order values */
/* (the name index is used, but the creation order value is in the same order) */
@@ -4819,12 +4819,12 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
H5A_info_t ainfo; /* Attribute information */
/* Retrieve information for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Aget_info_by_name(my_dataset, ".", attrname, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_name");
/* Verify creation order of attribute */
- VERIFY(ainfo.corder_valid, TRUE, "H5Aget_info_by_name");
+ VERIFY(ainfo.corder_valid, true, "H5Aget_info_by_name");
VERIFY(ainfo.corder, u, "H5Aget_info_by_name");
} /* end for */
} /* end for */
@@ -4929,14 +4929,14 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Create several attributes, but keep storage in compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4953,14 +4953,14 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (u + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
} /* end for */
/* Create another attribute, to push into dense storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
+ snprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4977,9 +4977,9 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5044,9 +5044,9 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Loop through attributes, checking their creation order values */
/* (the name index is used, but the creation order value is in the same order) */
@@ -5054,12 +5054,12 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
H5A_info_t ainfo; /* Attribute information */
/* Retrieve information for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Aget_info_by_name(my_dataset, ".", attrname, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_name");
/* Verify creation order of attribute */
- VERIFY(ainfo.corder_valid, TRUE, "H5Aget_info_by_name");
+ VERIFY(ainfo.corder_valid, true, "H5Aget_info_by_name");
VERIFY(ainfo.corder, u, "H5Aget_info_by_name");
} /* end for */
} /* end for */
@@ -5274,9 +5274,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
} /* end for */
@@ -5330,7 +5330,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Create several attributes, but keep storage in compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5347,14 +5347,14 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (u + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
} /* end for */
/* Create another attribute, to push into dense storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
+ snprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5371,9 +5371,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5382,7 +5382,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
#endif
/* Delete several attributes from object, until attribute storage resumes compact form */
for (u = max_compact; u >= min_dense; u--) {
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
@@ -5391,9 +5391,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, u, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5403,7 +5403,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end for */
/* Delete another attribute, to push attribute storage into compact form */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
@@ -5412,14 +5412,14 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (min_dense - 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Re-add attributes to get back into dense form */
for (u = (min_dense - 1); u < (max_compact + 1); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5437,9 +5437,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5496,9 +5496,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5507,7 +5507,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
#endif
/* Delete several attributes from object, until attribute storage resumes compact form */
for (u = max_compact; u >= min_dense; u--) {
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
@@ -5516,9 +5516,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, u, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5528,7 +5528,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end for */
/* Delete another attribute, to push attribute storage into compact form */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
@@ -5537,14 +5537,14 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (min_dense - 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Re-add attributes to get back into dense form */
for (u = (min_dense - 1); u < (max_compact + 1); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5562,9 +5562,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5573,11 +5573,11 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
#endif
/* Delete all attributes */
for (u = max_compact; u > 0; u--) {
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
} /* end for */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", 0);
+ snprintf(attrname, sizeof(attrname), "attr %02u", 0);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
} /* end for */
@@ -5678,7 +5678,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
/* Loop to leave file open when deleting dataset, or to close & re-open file
* before deleting dataset */
- for (reopen_file = FALSE; reopen_file <= TRUE; reopen_file++) {
+ for (reopen_file = false; reopen_file <= true; reopen_file++) {
/* Create test file */
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
CHECK(fid, FAIL, "H5Fopen");
@@ -5712,14 +5712,14 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Create attributes, until attribute storage is in dense form */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5737,9 +5737,9 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5821,7 +5821,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
*-------------------------------------------------------------------------
*/
static int
-attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t use_index)
+attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, bool use_index)
{
char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */
H5A_info_t ainfo; /* Attribute info struct */
@@ -5848,7 +5848,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Don't test "native" order if there is no creation order index, since
@@ -5875,7 +5875,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC /* H5_ITER_NATIVE */, n,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
} /* end if */
@@ -5896,7 +5896,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Verify the information for first attribute, in increasing name order */
@@ -5916,7 +5916,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Don't test "native" order queries on link name order, since there's not
@@ -5940,7 +5940,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Retrieve current # of errors */
@@ -5957,7 +5957,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
**
****************************************************************/
static void
-test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_info_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -6001,7 +6001,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pget_attr_phase_change");
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Output message about test being performed */
if (use_index)
MESSAGE(5, ("Testing Querying Attribute Info By Index w/Creation Order Index\n"))
@@ -6013,7 +6013,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -6048,9 +6048,9 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Check for query on non-existent attribute */
H5E_BEGIN_TRY
@@ -6071,7 +6071,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6093,9 +6093,9 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Check for out of bound offset queries */
H5E_BEGIN_TRY
@@ -6123,7 +6123,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6137,7 +6137,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Verify state of object */
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
#endif
/* Verify information for new attribute */
ret = attr_info_by_idx_check(my_dataset, attrname, (hsize_t)u, use_index);
@@ -6149,9 +6149,9 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -6441,7 +6441,7 @@ test_attr_get_name_invalid_buf(hid_t fcpl, hid_t fapl)
**
****************************************************************/
static void
-test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_delete_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -6498,7 +6498,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_DEC; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -6542,7 +6542,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -6577,9 +6577,9 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Check for deleting non-existent attribute */
H5E_BEGIN_TRY
@@ -6592,7 +6592,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6615,9 +6615,9 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Check for out of bound deletions */
H5E_BEGIN_TRY
@@ -6671,10 +6671,10 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (max_compact - (u + 2)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u", (max_compact - (u + 2)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6684,7 +6684,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Verify state of attribute storage (empty) */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
#endif
} /* end for */
@@ -6710,7 +6710,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6726,7 +6726,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
#endif
/* Verify information for new attribute */
@@ -6739,9 +6739,9 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -6804,11 +6804,10 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u",
- ((max_compact * 2) - (u + 2)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u", ((max_compact * 2) - (u + 2)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6818,7 +6817,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Verify state of attribute storage (empty) */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
#endif
/* Check for deletion on empty attribute storage again */
H5E_BEGIN_TRY
@@ -6853,7 +6852,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, to push into dense form */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6869,7 +6868,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
#endif
/* Verify information for new attribute */
@@ -6922,11 +6921,11 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 1));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u",
- ((max_compact * 2) - ((u * 2) + 2)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u",
+ ((max_compact * 2) - ((u * 2) + 2)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
} /* end for */
@@ -6975,11 +6974,11 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 3));
+ snprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 3));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u",
- ((max_compact * 2) - ((u * 2) + 4)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u",
+ ((max_compact * 2) - ((u * 2) + 4)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6989,7 +6988,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Verify state of attribute storage (empty) */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
#endif
/* Check for deletion on empty attribute storage again */
H5E_BEGIN_TRY
@@ -7063,8 +7062,8 @@ attr_iterate2_cb(hid_t loc_id, const char *attr_name, const H5A_info_t *info, vo
} /* end if */
/* Verify name of link */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (unsigned)my_info.corder);
- if (HDstrcmp(attr_name, attrname) != 0)
+ snprintf(attrname, sizeof(attrname), "attr %02u", (unsigned)my_info.corder);
+ if (strcmp(attr_name, attrname) != 0)
return (H5_ITER_ERROR);
/* Check if we've visited this link before */
@@ -7072,7 +7071,7 @@ attr_iterate2_cb(hid_t loc_id, const char *attr_name, const H5A_info_t *info, vo
return (H5_ITER_ERROR);
if (op_data->visited[op_data->curr])
return (H5_ITER_ERROR);
- op_data->visited[op_data->curr] = TRUE;
+ op_data->visited[op_data->curr] = true;
/* Advance to next value, in correct direction */
if (op_data->order != H5_ITER_DEC)
@@ -7162,14 +7161,14 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate2(obj_id, idx_type, order, &skip, attr_iterate2_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate2");
/* Verify that we visited all the attributes */
VERIFY(skip, max_attrs, "H5Aiterate2");
for (v = 0; v < max_attrs; v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate2");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate2");
/* Iterate over attributes on object */
iter_info->nskipped = (unsigned)(skip = 0);
@@ -7177,14 +7176,14 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
/* Verify that we visited all the attributes */
VERIFY(skip, max_attrs, "H5Aiterate_by_name");
for (v = 0; v < max_attrs; v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate_by_name");
/* Iterate over attributes on object */
iter_info->nskipped = (unsigned)(skip = 0);
@@ -7192,14 +7191,14 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(obj_id, ".", idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
/* Verify that we visited all the attributes */
VERIFY(skip, max_attrs, "H5Aiterate_by_name");
for (v = 0; v < max_attrs; v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate_by_name");
#if 0
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -7209,14 +7208,14 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate1(obj_id, &oskip, attr_iterate1_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate1");
/* Verify that we visited all the attributes */
VERIFY(skip, max_attrs, "H5Aiterate1");
for (v = 0; v < max_attrs; v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate1");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate1");
#endif /* H5_NO_DEPRECATED_SYMBOLS */
#endif
@@ -7226,7 +7225,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_attrs - 1) - skip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate2(obj_id, idx_type, order, &skip, attr_iterate2_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate2");
@@ -7234,18 +7233,18 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
VERIFY(skip, max_attrs, "H5Aiterate2");
if (order == H5_ITER_INC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v + (max_attrs / 2)], TRUE, "H5Aiterate2");
+ VERIFY(iter_info->visited[v + (max_attrs / 2)], true, "H5Aiterate2");
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate2");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate2");
} /* end if */
else {
unsigned nvisit = 0; /* # of links visited */
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
VERIFY(skip, (max_attrs / 2), "H5Aiterate2");
@@ -7257,7 +7256,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_attrs - 1) - skip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
@@ -7265,18 +7264,18 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
VERIFY(skip, max_attrs, "H5Aiterate_by_name");
if (order == H5_ITER_INC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v + (max_attrs / 2)], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v + (max_attrs / 2)], true, "H5Aiterate_by_name");
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate_by_name");
} /* end if */
else {
unsigned nvisit = 0; /* # of links visited */
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
VERIFY(skip, (max_attrs / 2), "H5Aiterate_by_name");
@@ -7288,7 +7287,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_attrs - 1) - skip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(obj_id, ".", idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
@@ -7296,18 +7295,18 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
VERIFY(skip, max_attrs, "H5Aiterate_by_name");
if (order == H5_ITER_INC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v + (max_attrs / 2)], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v + (max_attrs / 2)], true, "H5Aiterate_by_name");
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate_by_name");
} /* end if */
else {
unsigned nvisit = 0; /* # of links visited */
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
VERIFY(skip, (max_attrs / 2), "H5Aiterate_by_name");
@@ -7321,7 +7320,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? (unsigned)oskip : ((max_attrs - 1) - oskip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate1(obj_id, &oskip, attr_iterate1_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate1");
@@ -7329,18 +7328,18 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
VERIFY(oskip, max_attrs, "H5Aiterate1");
if (order == H5_ITER_INC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v + (max_attrs / 2)], TRUE, "H5Aiterate1");
+ VERIFY(iter_info->visited[v + (max_attrs / 2)], true, "H5Aiterate1");
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate1");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate1");
} /* end if */
else {
unsigned nvisit = 0; /* # of links visited */
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
VERIFY(skip, (max_attrs / 2), "H5Aiterate1");
@@ -7354,7 +7353,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate2(obj_id, idx_type, order, &skip, attr_iterate2_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate2");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate2");
@@ -7366,7 +7365,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate_by_name");
@@ -7378,7 +7377,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(obj_id, ".", idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate_by_name");
@@ -7392,7 +7391,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate1(obj_id, &oskip, attr_iterate1_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate1");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate1");
@@ -7441,7 +7440,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
**
****************************************************************/
static void
-test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_iterate2(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -7461,7 +7460,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
attr_iter_info_t iter_info; /* Iterator info */
- hbool_t *visited = NULL; /* Array of flags for visiting links */
+ bool *visited = NULL; /* Array of flags for visiting links */
hsize_t idx; /* Start index for iteration */
unsigned use_index; /* Use index on creation order values */
const char *dsetname; /* Name of dataset for attributes */
@@ -7494,7 +7493,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Allocate the "visited link" array */
iter_info.max_visit = max_compact * 2;
- visited = (hbool_t *)malloc(sizeof(hbool_t) * iter_info.max_visit);
+ visited = (bool *)malloc(sizeof(bool) * iter_info.max_visit);
CHECK_PTR(visited, "malloc");
iter_info.visited = visited;
@@ -7503,7 +7502,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_DEC; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -7547,7 +7546,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -7585,9 +7584,9 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Check for iterating over object with no attributes (should be OK) */
ret = H5Aiterate2(my_dataset, idx_type, order, NULL, attr_iterate2_cb, NULL);
@@ -7604,7 +7603,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7627,9 +7626,9 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
if (vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) {
@@ -7691,7 +7690,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7707,7 +7706,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
#endif
/* Verify information for new attribute */
@@ -7720,9 +7719,9 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -7857,7 +7856,7 @@ attr_open_by_idx_check(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
**
****************************************************************/
static void
-test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_open_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -7910,7 +7909,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_DEC; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -7954,7 +7953,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -7989,9 +7988,9 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Check for opening an attribute on an object with no attributes */
H5E_BEGIN_TRY
@@ -8005,7 +8004,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -8028,9 +8027,9 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Check for out of bound opening an attribute on an object */
H5E_BEGIN_TRY
@@ -8068,7 +8067,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -8084,7 +8083,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
#endif
/* Verify information for new attribute */
@@ -8097,9 +8096,9 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -8174,7 +8173,7 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id, unsigned max_attr
/* Open each attribute on object by index and check that it's the correct one */
for (u = 0; u < max_attrs; u++) {
/* Open the attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr_id = H5Aopen(obj_id, attrname, H5P_DEFAULT);
CHECK(attr_id, FAIL, "H5Aopen");
@@ -8234,7 +8233,7 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id, unsigned max_attr
**
****************************************************************/
static void
-test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_open_by_name(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -8278,7 +8277,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pget_attr_phase_change");
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (use_index)
MESSAGE(5, ("Testing Opening Attributes By Name w/Creation Order Index\n"))
@@ -8290,7 +8289,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -8328,9 +8327,9 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Check for opening a non-existent attribute on an object with no attributes */
H5E_BEGIN_TRY
@@ -8357,7 +8356,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -8379,9 +8378,9 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Check for opening a non-existent attribute on an object with compact attribute storage */
H5E_BEGIN_TRY
@@ -8435,7 +8434,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -8450,7 +8449,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
#endif
/* Verify information for new attribute */
@@ -8463,9 +8462,9 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -8532,7 +8531,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
**
****************************************************************/
static void
-test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_create_by_name(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -8575,7 +8574,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pget_attr_phase_change");
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (use_index)
MESSAGE(5, ("Testing Creating Attributes By Name w/Creation Order Index\n"))
@@ -8587,7 +8586,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -8625,14 +8624,14 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
#if 0
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate_by_name(fid, dsetname, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate_by_name");
@@ -8655,9 +8654,9 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Test opening attributes stored compactly */
ret = attr_open_check(fid, dsetname, my_dataset, u);
@@ -8689,7 +8688,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate_by_name(fid, dsetname, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate_by_name");
@@ -8705,7 +8704,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
#endif
/* Verify information for new attribute */
@@ -8718,9 +8717,9 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -8916,14 +8915,14 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
#if 0
/* Check on datasets' attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
is_dense = H5O__is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -8933,7 +8932,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
#endif
/* Write data into the attribute */
attr_value = u + 1;
@@ -8947,7 +8946,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -8973,9 +8972,9 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Alternate between creating "small" & "big" attributes */
@@ -8986,7 +8985,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
#endif
/* Write data into the attribute */
attr_value = u + 1;
@@ -9000,7 +8999,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9026,9 +9025,9 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset2);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
} /* end for */
@@ -9265,14 +9264,14 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
#if 0
/* Check on datasets' attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
is_dense = H5O__is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9282,7 +9281,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
#endif
/* Write data into the attribute */
attr_value = u + 1;
@@ -9296,7 +9295,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9322,9 +9321,9 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Alternate between creating "small" & "big" attributes */
@@ -9335,7 +9334,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
#endif
/* Write data into the attribute */
attr_value = u + 1;
@@ -9349,7 +9348,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9375,13 +9374,13 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset2);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Create new attribute name */
- HDsnprintf(attrname2, sizeof(attrname2), "new attr %02u", u);
+ snprintf(attrname2, sizeof(attrname2), "new attr %02u", u);
/* Change second dataset's attribute's name */
ret = H5Arename_by_name(fid, DSET2_NAME, attrname, attrname2, H5P_DEFAULT);
@@ -9396,12 +9395,12 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9420,12 +9419,12 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9450,12 +9449,12 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9474,12 +9473,12 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9724,14 +9723,14 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
#if 0
/* Check on datasets' attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
is_dense = H5O__is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9741,7 +9740,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
#endif
/* Write data into the attribute */
attr_value = u + 1;
@@ -9755,7 +9754,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9781,9 +9780,9 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Alternate between creating "small" & "big" attributes */
@@ -9794,7 +9793,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
#endif
/* Write data into the attribute */
attr_value = u + 1;
@@ -9808,7 +9807,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9834,16 +9833,16 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset2);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
} /* end for */
/* Delete attributes from second dataset */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Delete second dataset's attribute */
ret = H5Adelete_by_name(fid, DSET2_NAME, attrname, H5P_DEFAULT);
@@ -9858,12 +9857,12 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -10108,14 +10107,14 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
#if 0
/* Check on datasets' attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
is_dense = H5O__is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
#endif
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -10125,7 +10124,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
#endif
/* Write data into the attribute */
attr_value = u + 1;
@@ -10139,7 +10138,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
#if 0
/* ChecFk that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -10165,9 +10164,9 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Alternate between creating "small" & "big" attributes */
@@ -10178,7 +10177,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
#endif
/* Write data into the attribute */
attr_value = u + 1;
@@ -10192,7 +10191,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
#if 0
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -10218,9 +10217,9 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset2);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
} /* end for */
@@ -10239,12 +10238,12 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
#if 0
/* Check on first dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Check ref count on attributes of first dataset */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Open attribute on first dataset */
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -10253,12 +10252,12 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -10518,7 +10517,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Create attributes on group */
for (i = 0; i < BUG2_NATTR; i++) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
aid = H5Acreate2(gid, aname, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
@@ -10528,7 +10527,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Delete every other attribute */
for (i = 1; i < BUG2_NATTR; i += 2) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
ret = H5Adelete(gid, aname);
CHECK(ret, FAIL, "H5Adelete");
}
@@ -10552,7 +10551,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Open an attribute in the middle */
i = (BUG2_NATTR / 4) * 2;
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
aid = H5Aopen(gid, aname, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Aopen");
@@ -10561,7 +10560,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
CHECK(tid, FAIL, "H5Aget_type");
tri_ret = H5Tequal(tid, H5T_STD_I32LE);
- VERIFY(tri_ret, TRUE, "H5Tequal");
+ VERIFY(tri_ret, true, "H5Tequal");
/* Close IDs */
ret = H5Tclose(tid);
@@ -10595,7 +10594,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Create attributes on group */
for (i = 0; i < BUG2_NATTR2; i++) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
aid = H5Acreate2(gid, aname, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
@@ -10605,7 +10604,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Delete every other attribute */
for (i = 0; i < BUG2_NATTR2; i++) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
ret = H5Adelete(gid, aname);
CHECK(ret, FAIL, "H5Adelete");
}
@@ -11465,7 +11464,7 @@ test_attr_bug9(hid_t fcpl, hid_t fapl)
/* Create enough attributes to cause a change to dense storage */
for (i = 0; i < max_compact + 1; i++) {
/* Create attribute */
- HDsnprintf(aname, sizeof(aname), "%u", i);
+ snprintf(aname, sizeof(aname), "%u", i);
aid = H5Acreate2(gid, aname, H5T_NATIVE_CHAR, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
@@ -11721,13 +11720,13 @@ test_attr(void)
MESSAGE(7, ("testing with minimzied dataset object headers\n"));
dcpl = H5Pcreate(H5P_DATASET_CREATE);
CHECK(dcpl, FAIL, "H5Pcreate");
- ret = H5Pset_dset_no_attrs_hint(dcpl, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl, true);
CHECK_I(ret, "H5Pset_dset_no_attrs_hint");
dcpl_g = dcpl;
}
#endif
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl = fapl;
if (new_format)
@@ -11773,10 +11772,10 @@ test_attr(void)
/* This next test uses its own file information */
test_attr_duplicate_ids(my_fapl);
- for (use_shared = FALSE; use_shared <= TRUE; use_shared++) {
+ for (use_shared = false; use_shared <= true; use_shared++) {
hid_t my_fcpl;
- if (new_format == TRUE && use_shared) {
+ if (new_format == true && use_shared) {
MESSAGE(7, ("testing with shared attributes\n"));
my_fcpl = fcpl2;
}
@@ -11826,7 +11825,7 @@ test_attr(void)
through a different file handle */
/* tests specific to the "new format" */
- if (new_format == TRUE) {
+ if (new_format == true) {
/* General attribute tests */
test_attr_dense_create(my_fcpl, my_fapl); /* Test dense attribute storage creation */
test_attr_dense_open(my_fcpl, my_fapl); /* Test opening attributes in dense storage */
@@ -11857,7 +11856,7 @@ test_attr(void)
w/attribute creation order info */
/* More complex tests with exclusively both "new format" and "shared" attributes */
- if (use_shared == TRUE) {
+ if (use_shared == true) {
test_attr_shared_write(
my_fcpl,
my_fapl); /* Test writing to shared attributes in compact & dense storage */
diff --git a/test/API/tcoords.c b/test/API/tcoords.c
index d9b9711..5599def 100644
--- a/test/API/tcoords.c
+++ b/test/API/tcoords.c
@@ -42,7 +42,7 @@ int da_buffer[2][3][6][2];
**
*************************************************************/
static void
-test_singleEnd_selElements(hid_t file, hbool_t is_chunked)
+test_singleEnd_selElements(hid_t file, bool is_chunked)
{
hid_t sid, plid, did, msid;
char dset_name[NAME_LEN]; /* Dataset name */
@@ -87,9 +87,9 @@ test_singleEnd_selElements(hid_t file, hbool_t is_chunked)
/* Construct dataset's name */
memset(dset_name, 0, (size_t)NAME_LEN);
- HDstrcat(dset_name, SINGLE_END_DSET);
+ strcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
- HDstrcat(dset_name, "_chunked");
+ strcat(dset_name, "_chunked");
did = H5Dcreate2(file, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, plid, H5P_DEFAULT);
CHECK(did, FAIL, "H5Dcreate2");
@@ -225,7 +225,7 @@ test_singleEnd_selElements(hid_t file, hbool_t is_chunked)
**
*************************************************************/
static void
-test_singleEnd_selHyperslab(hid_t file, hbool_t is_chunked)
+test_singleEnd_selHyperslab(hid_t file, bool is_chunked)
{
hid_t sid, did, msid;
char dset_name[NAME_LEN]; /* Dataset name */
@@ -259,9 +259,9 @@ test_singleEnd_selHyperslab(hid_t file, hbool_t is_chunked)
/* Construct dataset's name */
memset(dset_name, 0, NAME_LEN);
- HDstrcat(dset_name, SINGLE_END_DSET);
+ strcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
- HDstrcat(dset_name, "_chunked");
+ strcat(dset_name, "_chunked");
/* Dataspace for the dataset in file */
sid = H5Screate_simple(4, da_dims, da_dims);
@@ -371,7 +371,7 @@ test_singleEnd_selHyperslab(hid_t file, hbool_t is_chunked)
**
*************************************************************/
static void
-test_multiple_ends(hid_t file, hbool_t is_chunked)
+test_multiple_ends(hid_t file, bool is_chunked)
{
hid_t sid, plid, did, msid;
char dset_name[NAME_LEN]; /* Dataset name */
@@ -462,9 +462,9 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
/* Construct dataset's name */
memset(dset_name, 0, NAME_LEN);
- HDstrcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET);
+ strcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET);
if (is_chunked)
- HDstrcat(dset_name, "_chunked");
+ strcat(dset_name, "_chunked");
did = H5Dcreate2(file, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, plid, H5P_DEFAULT);
CHECK(did, FAIL, "H5Dcreate2");
@@ -680,10 +680,10 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
void
test_coords(void)
{
- hid_t fid;
- hbool_t is_chunk[2] = {TRUE, FALSE};
- int i;
- herr_t ret; /* Generic error return */
+ hid_t fid;
+ bool is_chunk[2] = {true, false};
+ int i;
+ herr_t ret; /* Generic error return */
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fcreate");
diff --git a/test/API/testhdf5.c b/test/API/testhdf5.c
index f69b1c8..ca5d0e4 100644
--- a/test/API/testhdf5.c
+++ b/test/API/testhdf5.c
@@ -56,7 +56,7 @@ print_func(const char *format, ...)
int ret_value;
va_start(arglist, format);
- ret_value = HDvprintf(format, arglist);
+ ret_value = vprintf(format, arglist);
va_end(arglist);
return ret_value;
}
@@ -76,7 +76,7 @@ TestErrPrintf(const char *format, ...)
/* Print the requested information */
va_start(arglist, format);
- ret_value = HDvprintf(format, arglist);
+ ret_value = vprintf(format, arglist);
va_end(arglist);
/* Return the length of the string produced (like printf() does) */
@@ -121,9 +121,9 @@ getenv_all(MPI_Comm comm, int root, const char *name)
/* The root task does the getenv call
* and sends the result to the other tasks */
if (mpi_rank == root) {
- env = HDgetenv(name);
+ env = getenv(name);
if (env) {
- len = (int)HDstrlen(env);
+ len = (int)strlen(env);
MPI_Bcast(&len, 1, MPI_INT, root, comm);
MPI_Bcast(env, len, MPI_CHAR, root, comm);
}
@@ -138,7 +138,7 @@ getenv_all(MPI_Comm comm, int root, const char *name)
if (len >= 0) {
if (env == NULL)
env = (char *)malloc((size_t)len + 1);
- else if (HDstrlen(env) < (size_t)len)
+ else if (strlen(env) < (size_t)len)
env = (char *)realloc(env, (size_t)len + 1);
MPI_Bcast(env, len, MPI_CHAR, root, comm);
@@ -158,7 +158,7 @@ getenv_all(MPI_Comm comm, int root, const char *name)
/* use original getenv */
if (env)
free(env);
- env = HDgetenv(name);
+ env = getenv(name);
} /* end if */
return env;
@@ -218,7 +218,7 @@ h5_get_libver_fapl(hid_t fapl)
char buf[1024]; /* buffer for tokenizing HDF5_DRIVER */
/* Get the environment variable, if it exists */
- env = HDgetenv("HDF5_LIBVER_BOUNDS");
+ env = getenv("HDF5_LIBVER_BOUNDS");
#ifdef HDF5_LIBVER_BOUNDS
/* Use the environment variable, then the compile-time constant */
if (!env)
@@ -235,12 +235,12 @@ h5_get_libver_fapl(hid_t fapl)
* If it's nothing (environment variable was whitespace)
* just return the default fapl.
*/
- HDstrncpy(buf, env, sizeof(buf));
+ strncpy(buf, env, sizeof(buf));
buf[sizeof(buf) - 1] = '\0';
if (NULL == (tok = HDstrtok_r(buf, " \t\n\r", &lasts)))
goto done;
- if (!HDstrcmp(tok, "latest")) {
+ if (!strcmp(tok, "latest")) {
/* use the latest format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
goto error;
@@ -262,7 +262,7 @@ error:
#endif
static char *
h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fullname, size_t size,
- hbool_t nest_printf, hbool_t subst_for_superblock)
+ bool nest_printf, bool subst_for_superblock)
{
const char *prefix = NULL;
const char *driver_env_var = NULL; /* HDF5_DRIVER environment variable */
@@ -280,7 +280,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
/* Determine if driver is set by environment variable. If it is,
* only generate a suffix if fixing the filename for the superblock
* file. */
- driver_env_var = HDgetenv(HDF5_DRIVER);
+ driver_env_var = getenv(HDF5_DRIVER);
if (driver_env_var && (H5P_DEFAULT == fapl) && subst_for_superblock)
fapl = H5P_FILE_ACCESS_DEFAULT;
@@ -302,7 +302,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
* we are using the split driver since both of those
* use the multi VFD under the hood.
*/
- if (driver_env_var && !HDstrcmp(driver_env_var, "split")) {
+ if (driver_env_var && !strcmp(driver_env_var, "split")) {
/* split VFD */
if (subst_for_superblock)
suffix = ".h5.meta";
@@ -334,7 +334,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
#endif /* H5_HAVE_PARALLEL */
}
else {
- if (HDgetenv(HDF5_NOCLEANUP))
+ if (getenv(HDF5_NOCLEANUP))
SetTestNoCleanup();
}
#endif
@@ -370,7 +370,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
" export HDF5_PARAPREFIX\n"
"*** End of Hint ***\n");
- explained = TRUE;
+ explained = true;
#ifdef HDF5_PARAPREFIX
prefix = HDF5_PARAPREFIX;
#endif /* HDF5_PARAPREFIX */
@@ -382,7 +382,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
* For serial:
* First use the environment variable, then try the constant
*/
- prefix = HDgetenv("HDF5_PREFIX");
+ prefix = getenv("HDF5_PREFIX");
#ifdef HDF5_PREFIX
if (!prefix)
@@ -396,7 +396,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
/* This is a parallel system */
char *subdir;
- if (!HDstrcmp(prefix, HDF5_PARAPREFIX)) {
+ if (!strcmp(prefix, HDF5_PARAPREFIX)) {
/*
* If the prefix specifies the HDF5_PARAPREFIX directory, then
* default to using the "/tmp/$USER" or "/tmp/$LOGIN"
@@ -404,8 +404,8 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
*/
char *user, *login;
- user = HDgetenv("USER");
- login = HDgetenv("LOGIN");
+ user = getenv("USER");
+ login = getenv("LOGIN");
subdir = (user ? user : login);
if (subdir) {
@@ -421,11 +421,11 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
if (!fullname[0]) {
/* We didn't append the prefix yet */
- HDstrncpy(fullname, prefix, size);
+ strncpy(fullname, prefix, size);
fullname[size - 1] = '\0';
}
- if (HDstrlen(fullname) + HDstrlen(base_name) + 1 < size) {
+ if (strlen(fullname) + strlen(base_name) + 1 < size) {
/*
* Append the base_name with a slash first. Multiple
* slashes are handled below.
@@ -440,10 +440,10 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
* subdirectory. Default to PREFIX's original
* prefix value.
*/
- HDstrcpy(fullname, prefix);
+ strcpy(fullname, prefix);
- HDstrcat(fullname, "/");
- HDstrcat(fullname, base_name);
+ strcat(fullname, "/");
+ strcat(fullname, base_name);
}
else {
/* Buffer is too small */
@@ -451,25 +451,25 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
}
}
else {
- if (HDsnprintf(fullname, size, "%s/%s", prefix, base_name) == (int)size)
+ if (snprintf(fullname, size, "%s/%s", prefix, base_name) == (int)size)
/* Buffer is too small */
return NULL;
}
}
- else if (HDstrlen(base_name) >= size) {
+ else if (strlen(base_name) >= size) {
/* Buffer is too small */
return NULL;
}
else {
- HDstrcpy(fullname, base_name);
+ strcpy(fullname, base_name);
}
/* Append a suffix */
if (suffix) {
- if (HDstrlen(fullname) + HDstrlen(suffix) >= size)
+ if (strlen(fullname) + strlen(suffix) >= size)
return NULL;
- HDstrcat(fullname, suffix);
+ strcat(fullname, suffix);
}
/* Remove any double slashes in the filename */
@@ -486,33 +486,33 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
char *
h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
{
- return (h5_fixname_real(base_name, fapl, ".h5", fullname, size, FALSE, FALSE));
+ return (h5_fixname_real(base_name, fapl, ".h5", fullname, size, false, false));
}
char *
h5_fixname_superblock(const char *base_name, hid_t fapl_id, char *fullname, size_t size)
{
- return (h5_fixname_real(base_name, fapl_id, ".h5", fullname, size, FALSE, TRUE));
+ return (h5_fixname_real(base_name, fapl_id, ".h5", fullname, size, false, true));
}
-hbool_t
+bool
h5_using_default_driver(const char *drv_name)
{
- hbool_t ret_val = TRUE;
+ bool ret_val = true;
assert(H5_DEFAULT_VFD == H5FD_SEC2);
if (!drv_name)
- drv_name = HDgetenv(HDF5_DRIVER);
+ drv_name = getenv(HDF5_DRIVER);
if (drv_name)
- return (!HDstrcmp(drv_name, "sec2") || !HDstrcmp(drv_name, "nomatch"));
+ return (!strcmp(drv_name, "sec2") || !strcmp(drv_name, "nomatch"));
return ret_val;
}
herr_t
-h5_driver_is_default_vfd_compatible(hid_t fapl_id, hbool_t *default_vfd_compatible)
+h5_driver_is_default_vfd_compatible(hid_t fapl_id, bool *default_vfd_compatible)
{
unsigned long feat_flags = 0;
hid_t driver_id = H5I_INVALID_HID;
diff --git a/test/API/testhdf5.h b/test/API/testhdf5.h
index f2510b2..4e9e81d 100644
--- a/test/API/testhdf5.h
+++ b/test/API/testhdf5.h
@@ -29,8 +29,8 @@
#define VERBO_HI 9 /* High */
/* Turn off verbose reporting by default */
-#define VERBOSE_MED (FALSE)
-#define VERBOSE_HI (FALSE)
+#define VERBOSE_MED (false)
+#define VERBOSE_HI (false)
/* Use %ld to print the value because long should cover most cases. */
/* Used to make certain a return value _is_not_ a value */
@@ -147,7 +147,7 @@
"%s \n", \
(where), (int)__LINE__, __FILE__, x); \
} \
- if (HDstrcmp(x, val) != 0) { \
+ if (strcmp(x, val) != 0) { \
TestErrPrintf("*** UNEXPECTED VALUE from %s should be %s, but is %s at line %4d " \
"in %s\n", \
where, val, x, (int)__LINE__, __FILE__); \
@@ -220,27 +220,27 @@
}
#define PASSED() \
{ \
- HDputs(" PASSED"); \
+ puts(" PASSED"); \
fflush(stdout); \
}
#define H5_FAILED() \
{ \
- HDputs("*FAILED*"); \
+ puts("*FAILED*"); \
fflush(stdout); \
}
#define H5_WARNING() \
{ \
- HDputs("*WARNING*"); \
+ puts("*WARNING*"); \
fflush(stdout); \
}
#define SKIPPED() \
{ \
- HDputs(" -SKIP-"); \
+ puts(" -SKIP-"); \
fflush(stdout); \
}
#define PUTS_ERROR(s) \
{ \
- HDputs(s); \
+ puts(s); \
AT(); \
goto error; \
}
@@ -266,7 +266,7 @@
{ \
H5_FAILED(); \
AT(); \
- HDputs(s); \
+ puts(s); \
goto error; \
}
@@ -280,12 +280,12 @@ int print_func(const char *format, ...);
int TestErrPrintf(const char *format, ...);
hid_t h5_fileaccess(void);
/* Functions that will replace components of a FAPL */
-herr_t h5_get_vfd_fapl(hid_t fapl_id);
-herr_t h5_get_libver_fapl(hid_t fapl_id);
-char *h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size);
-char *h5_fixname_superblock(const char *base_name, hid_t fapl, char *fullname, size_t size);
-hbool_t h5_using_default_driver(const char *drv_name);
-herr_t h5_driver_is_default_vfd_compatible(hid_t fapl_id, hbool_t *default_vfd_compatible);
+herr_t h5_get_vfd_fapl(hid_t fapl_id);
+herr_t h5_get_libver_fapl(hid_t fapl_id);
+char *h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size);
+char *h5_fixname_superblock(const char *base_name, hid_t fapl, char *fullname, size_t size);
+bool h5_using_default_driver(const char *drv_name);
+herr_t h5_driver_is_default_vfd_compatible(hid_t fapl_id, bool *default_vfd_compatible);
#ifdef H5_HAVE_PARALLEL
char *getenv_all(MPI_Comm comm, int root, const char *name);
diff --git a/test/API/tfile.c b/test/API/tfile.c
index 16429c7..6b316d4 100644
--- a/test/API/tfile.c
+++ b/test/API/tfile.c
@@ -1213,14 +1213,14 @@ test_get_obj_ids(void)
/* creates NGROUPS groups under the root group */
for (m = 0; m < NGROUPS; m++) {
- HDsnprintf(gname, sizeof(gname), "group%d", m);
+ snprintf(gname, sizeof(gname), "group%d", m);
gid[m] = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(gid[m], FAIL, "H5Gcreate2");
}
/* create NDSETS datasets under the root group */
for (n = 0; n < NDSETS; n++) {
- HDsnprintf(dname, sizeof(dname), "dataset%d", n);
+ snprintf(dname, sizeof(dname), "dataset%d", n);
dset[n] = H5Dcreate2(fid, dname, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dset[n], FAIL, "H5Dcreate2");
}
@@ -1280,7 +1280,7 @@ test_get_obj_ids(void)
/* Open NDSETS datasets under the root group */
for (n = 0; n < NDSETS; n++) {
- HDsnprintf(dname, sizeof(dname), "dataset%d", n);
+ snprintf(dname, sizeof(dname), "dataset%d", n);
dset[n] = H5Dopen2(fid, dname, H5P_DEFAULT);
CHECK(dset[n], FAIL, "H5Dcreate2");
}
@@ -1770,8 +1770,8 @@ test_file_is_accessible(const char *env_h5_drvr)
#if 0
int posix_ret; /* Return value from POSIX calls */
#endif
- hbool_t driver_is_default_compatible;
- herr_t ret; /* Return value from HDF5 calls */
+ bool driver_is_default_compatible;
+ herr_t ret; /* Return value from HDF5 calls */
/* Output message about test being performed */
MESSAGE(5, ("Testing Detection of HDF5 Files\n"));
@@ -1805,7 +1805,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_accessible(filename, fapl_id);
- VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
+ VERIFY(is_hdf5, true, "H5Fis_accessible");
/*****************************************/
/* Newly created file that is still open */
@@ -1824,7 +1824,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_accessible(filename, fapl_id);
- VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
+ VERIFY(is_hdf5, true, "H5Fis_accessible");
/* Close file */
ret = H5Fclose(fid);
@@ -1837,7 +1837,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* This test is not currently working for the family VFD.
* There are failures when creating files with userblocks.
*/
- if (0 != HDstrcmp(env_h5_drvr, "family")) {
+ if (0 != strcmp(env_h5_drvr, "family")) {
/* Create a file creation property list with a non-default user block size */
fcpl_id = H5Pcreate(H5P_FILE_CREATE);
CHECK(fcpl_id, H5I_INVALID_HID, "H5Pcreate");
@@ -1859,7 +1859,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_accessible(filename, fapl_id);
- VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
+ VERIFY(is_hdf5, true, "H5Fis_accessible");
} /* end if */
#if 0
if (driver_is_default_compatible) {
@@ -1877,7 +1877,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is NOT an HDF5 file using the base filename */
is_hdf5 = H5Fis_accessible(non_hdf5_filename, fapl_id);
- VERIFY(is_hdf5, FALSE, "H5Fis_accessible (empty non-HDF5 file)");
+ VERIFY(is_hdf5, false, "H5Fis_accessible (empty non-HDF5 file)");
/***************************/
/* Non-empty non-HDF5 file */
@@ -1901,7 +1901,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is not an HDF5 file */
is_hdf5 = H5Fis_accessible(non_hdf5_filename, fapl_id);
- VERIFY(is_hdf5, FALSE, "H5Fis_accessible (non-HDF5 file)");
+ VERIFY(is_hdf5, false, "H5Fis_accessible (non-HDF5 file)");
}
/* Clean up files */
@@ -1973,7 +1973,7 @@ test_file_ishdf5(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_hdf5(sb_filename);
- VERIFY(is_hdf5, TRUE, "H5Fis_hdf5");
+ VERIFY(is_hdf5, true, "H5Fis_hdf5");
/*******************************/
/* Non-default user block size */
@@ -2000,7 +2000,7 @@ test_file_ishdf5(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_hdf5(sb_filename);
- VERIFY(is_hdf5, TRUE, "H5Fis_hdf5");
+ VERIFY(is_hdf5, true, "H5Fis_hdf5");
/***************************/
/* Non-empty non-HDF5 file */
@@ -2027,7 +2027,7 @@ test_file_ishdf5(const char *env_h5_drvr)
/* Verify that the file is not an HDF5 file */
is_hdf5 = H5Fis_hdf5(sb_filename);
- VERIFY(is_hdf5, FALSE, "H5Fis_hdf5");
+ VERIFY(is_hdf5, false, "H5Fis_hdf5");
/* Clean up files */
#if 0
@@ -2082,7 +2082,7 @@ test_file_delete(hid_t fapl_id)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_accessible(filename, fapl_id);
- VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
+ VERIFY(is_hdf5, true, "H5Fis_accessible");
/* Delete the file */
ret = H5Fdelete(filename, fapl_id);
@@ -2127,7 +2127,7 @@ test_file_delete(hid_t fapl_id)
is_hdf5 = H5Fis_accessible(filename, fapl_id);
}
H5E_END_TRY
- CHECK(is_hdf5, TRUE, "H5Fis_accessible");
+ CHECK(is_hdf5, true, "H5Fis_accessible");
/* Try to delete it (should fail) */
H5E_BEGIN_TRY
@@ -2645,7 +2645,7 @@ test_file_double_dataset_open(void)
**
*****************************************************************/
static void
-test_file_double_file_dataset_open(hbool_t new_format)
+test_file_double_file_dataset_open(bool new_format)
{
hid_t fapl = -1; /* File access property list */
hid_t dcpl = -1; /* Dataset creation property list */
@@ -3065,8 +3065,8 @@ test_userblock_file_size(const char *env_h5_drvr)
herr_t ret; /* Generic return value */
/* Don't run with multi/split, family or direct drivers */
- if (!HDstrcmp(env_h5_drvr, "multi") || !HDstrcmp(env_h5_drvr, "split") ||
- !HDstrcmp(env_h5_drvr, "family") || !HDstrcmp(env_h5_drvr, "direct"))
+ if (!strcmp(env_h5_drvr, "multi") || !strcmp(env_h5_drvr, "split") ||
+ !strcmp(env_h5_drvr, "family") || !strcmp(env_h5_drvr, "direct"))
return;
/* Output message about test being performed */
@@ -3251,7 +3251,7 @@ cal_chksum(const char *file, uint32_t *chksum)
if (file_data) {
/* Read file's data into memory */
bytes_read = HDread(fdes, file_data, (size_t)sb.st_size);
- CHECK(bytes_read == sb.st_size, FALSE, "malloc");
+ CHECK(bytes_read == sb.st_size, false, "malloc");
/* Calculate checksum */
*chksum = H5_checksum_lookup3(file_data, sizeof(file_data), 0);
@@ -3386,7 +3386,7 @@ test_userblock_alignment_helper1(hid_t fcpl, hid_t fapl)
**
*****************************************************************/
static int
-test_userblock_alignment_helper2(hid_t fapl, hbool_t open_rw)
+test_userblock_alignment_helper2(hid_t fapl, bool open_rw)
{
hid_t fid; /* File ID */
int curr_num_errs = nerrors(); /* Retrieve the current # of errors */
@@ -3486,7 +3486,7 @@ test_userblock_alignment(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3516,7 +3516,7 @@ test_userblock_alignment(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3546,7 +3546,7 @@ test_userblock_alignment(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3650,9 +3650,9 @@ test_userblock_alignment(const char *env_h5_drvr)
CHECK(ret, FAIL, "H5Pset_alignment");
/* Call helper routines to perform file manipulations */
- ret = test_userblock_alignment_helper2(fapl, FALSE);
+ ret = test_userblock_alignment_helper2(fapl, false);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3710,13 +3710,13 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
CHECK(ret, FAIL, "H5Pset_libver_bounds");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3740,7 +3740,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)512);
/* Create file access property list */
@@ -3752,7 +3752,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3814,7 +3814,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3828,7 +3828,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3852,7 +3852,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3892,7 +3892,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)1023);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3932,7 +3932,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)1023);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3946,7 +3946,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3970,7 +3970,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -4010,7 +4010,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -4024,7 +4024,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -4050,7 +4050,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -4070,9 +4070,9 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(ret, FAIL, "H5Pset_alignment");
/* Call helper routines to perform file manipulations */
- ret = test_userblock_alignment_helper2(fapl, FALSE);
+ ret = test_userblock_alignment_helper2(fapl, false);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -4104,7 +4104,7 @@ test_filespace_info(const char *env_h5_drvr)
hid_t fapl, new_fapl; /* File access property lists */
hid_t fcpl, fcpl1, fcpl2; /* File creation property lists */
H5F_fspace_strategy_t strategy; /* File space strategy */
- hbool_t persist; /* Persist free-space or not */
+ bool persist; /* Persist free-space or not */
hsize_t threshold; /* Free-space section threshold */
unsigned new_format; /* New or old format */
H5F_fspace_strategy_t fs_strategy; /* File space strategy--iteration variable */
@@ -4112,14 +4112,14 @@ test_filespace_info(const char *env_h5_drvr)
hsize_t fs_threshold; /* Free-space section threshold--iteration variable */
hsize_t fsp_size; /* File space page size */
char filename[FILENAME_LEN]; /* Filename to use */
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing file creation public routines: H5Pget/set_file_space_strategy & "
"H5Pget/set_file_space_page_size\n"));
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
fapl = h5_fileaccess();
h5_fixname(FILESPACE_NAME[0], fapl, filename, sizeof filename);
@@ -4137,7 +4137,7 @@ test_filespace_info(const char *env_h5_drvr)
* Check file space information from a default file creation property list.
* Values expected:
* strategy--H5F_FILE_SPACE_AGGR
- * persist--FALSE
+ * persist--false
* threshold--1
* file space page size--4096
*/
@@ -4151,7 +4151,7 @@ test_filespace_info(const char *env_h5_drvr)
/* Verify file space information */
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Retrieve file space page size */
@@ -4222,7 +4222,7 @@ test_filespace_info(const char *env_h5_drvr)
* Check file space information when creating a file with default properties.
* Values expected:
* strategy--H5F_FILE_SPACE_AGGR
- * persist--FALSE
+ * persist--false
* threshold--1
* file space page size--4096
*/
@@ -4240,7 +4240,7 @@ test_filespace_info(const char *env_h5_drvr)
/* Verify file space information */
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Retrieve file space page size */
@@ -4260,7 +4260,7 @@ test_filespace_info(const char *env_h5_drvr)
* latest library format and default properties.
* Values expected:
* strategy--H5F_FILE_SPACE_AGGR
- * persist--FALSE
+ * persist--false
* threshold--1
* file space page size--4096
*/
@@ -4278,7 +4278,7 @@ test_filespace_info(const char *env_h5_drvr)
/* Verify file space information */
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Retrieve file space page size */
@@ -4305,7 +4305,7 @@ test_filespace_info(const char *env_h5_drvr)
* File space page size: set to 512
*
*/
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl;
/* Set the FAPL for the type of format */
@@ -4318,8 +4318,8 @@ test_filespace_info(const char *env_h5_drvr)
my_fapl = fapl;
} /* end else */
- /* Test with TRUE or FALSE for persisting free-space */
- for (fs_persist = FALSE; fs_persist <= TRUE; fs_persist++) {
+ /* Test with true or false for persisting free-space */
+ for (fs_persist = false; fs_persist <= true; fs_persist++) {
/* Test with free-space section threshold size: 0 to 10 */
for (fs_threshold = 0; fs_threshold <= TEST_THRESHOLD10; fs_threshold++) {
@@ -4336,7 +4336,7 @@ test_filespace_info(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
/* Set file space information */
- ret = H5Pset_file_space_strategy(fcpl, fs_strategy, (hbool_t)fs_persist, fs_threshold);
+ ret = H5Pset_file_space_strategy(fcpl, fs_strategy, (bool)fs_persist, fs_threshold);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE512);
@@ -4350,11 +4350,11 @@ test_filespace_info(const char *env_h5_drvr)
VERIFY(strategy, fs_strategy, "H5Pget_file_space_strategy");
if (fs_strategy < H5F_FSPACE_STRATEGY_AGGR) {
- VERIFY(persist, (hbool_t)fs_persist, "H5Pget_file_space_strategy");
+ VERIFY(persist, (bool)fs_persist, "H5Pget_file_space_strategy");
VERIFY(threshold, fs_threshold, "H5Pget_file_space_strategy");
}
else {
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
}
@@ -4383,7 +4383,7 @@ test_filespace_info(const char *env_h5_drvr)
VERIFY(threshold, fs_threshold, "H5Pget_file_space_strategy");
}
else {
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
}
@@ -4415,7 +4415,7 @@ test_filespace_info(const char *env_h5_drvr)
VERIFY(threshold, fs_threshold, "H5Pget_file_space_strategy");
}
else {
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
}
@@ -4464,13 +4464,13 @@ test_filespace_info(const char *env_h5_drvr)
*****************************************************************/
#if 0
static int
-set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split)
+set_multi_split(hid_t fapl, hsize_t pagesize, bool split)
{
H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl_arr[H5FD_MEM_NTYPES];
char *memb_name[H5FD_MEM_NTYPES];
haddr_t memb_addr[H5FD_MEM_NTYPES];
- hbool_t relax;
+ bool relax;
H5FD_mem_t mt;
assert(split);
@@ -4537,13 +4537,13 @@ test_file_freespace(const char *env_h5_drvr)
char filename[FILENAME_LEN]; /* Filename to use */
char name[32]; /* Dataset name */
unsigned new_format; /* To use old or new format */
- hbool_t split_vfd, multi_vfd; /* Indicate multi/split driver */
+ bool split_vfd, multi_vfd; /* Indicate multi/split driver */
hsize_t expected_freespace; /* Freespace expected */
hsize_t expected_fs_del; /* Freespace expected after delete */
herr_t ret; /* Return value */
- split_vfd = !HDstrcmp(env_h5_drvr, "split");
- multi_vfd = !HDstrcmp(env_h5_drvr, "multi");
+ split_vfd = !strcmp(env_h5_drvr, "split");
+ multi_vfd = !strcmp(env_h5_drvr, "multi");
if (!split_vfd && !multi_vfd) {
fapl = h5_fileaccess();
@@ -4560,7 +4560,7 @@ test_file_freespace(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
/* Test with old & new format */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl;
/* Set the FAPL for the type of format */
@@ -4574,7 +4574,7 @@ test_file_freespace(const char *env_h5_drvr)
CHECK(ret, FAIL, "set_multi_split");
}
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5P_set_file_space_strategy");
expected_freespace = 4534;
@@ -4630,7 +4630,7 @@ test_file_freespace(const char *env_h5_drvr)
/* Create datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
dset = H5Dcreate2(file, name, H5T_STD_U32LE, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dcreate2");
@@ -4653,7 +4653,7 @@ test_file_freespace(const char *env_h5_drvr)
#endif
/* Delete datasets in file */
for (k = 9; k >= 0; k--) {
- HDsnprintf(name, sizeof(name), "Dataset %u", (unsigned)k);
+ snprintf(name, sizeof(name), "Dataset %u", (unsigned)k);
ret = H5Ldelete(file, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
} /* end for */
@@ -4689,7 +4689,7 @@ test_file_freespace(const char *env_h5_drvr)
**
*****************************************************************/
static void
-test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
+test_sects_freespace(const char *env_h5_drvr, bool new_format)
{
char filename[FILENAME_LEN]; /* Filename to use */
hid_t file; /* File ID */
@@ -4715,14 +4715,14 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
hsize_t dims[1]; /* Dimension sizes */
unsigned u; /* Local index variable */
H5FD_mem_t type;
- hbool_t split_vfd = FALSE, multi_vfd = FALSE;
+ bool split_vfd = false, multi_vfd = false;
herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing H5Fget_free_sections()--free-space section info in the file\n"));
- split_vfd = !HDstrcmp(env_h5_drvr, "split");
- multi_vfd = !HDstrcmp(env_h5_drvr, "multi");
+ split_vfd = !strcmp(env_h5_drvr, "split");
+ multi_vfd = !strcmp(env_h5_drvr, "multi");
if (!split_vfd && !multi_vfd) {
@@ -4738,7 +4738,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
CHECK(ret, FAIL, "H5Pset_libver_bounds");
/* Set to paged aggregation and persistent free-space */
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1);
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
/* Set up paged aligned address space for multi/split driver */
@@ -4748,7 +4748,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
}
}
else {
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1);
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
}
@@ -4784,7 +4784,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
/* Create datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
dset = H5Dcreate2(file, name, H5T_STD_U32LE, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dcreate2");
@@ -4802,7 +4802,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
/* Delete odd-numbered datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
if (u % 2) {
ret = H5Ldelete(file, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
@@ -4961,7 +4961,7 @@ test_filespace_compatible(void)
ssize_t nread; /* Number of bytes read in */
unsigned i, j; /* Local index variable */
hssize_t free_space; /* Amount of free-space in the file */
- hbool_t persist; /* Persist free-space or not */
+ bool persist; /* Persist free-space or not */
hsize_t threshold; /* Free-space section threshold */
H5F_fspace_strategy_t strategy; /* File space handling strategy */
herr_t ret; /* Return value */
@@ -5008,10 +5008,10 @@ test_filespace_compatible(void)
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
/* File space handling strategy should be H5F_FSPACE_STRATEGY_FSM_AGGR */
- /* Persisting free-space should be FALSE */
+ /* Persisting free-space should be false */
/* Free-space section threshold should be 1 */
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Generate raw data */
@@ -5088,7 +5088,7 @@ test_filespace_1_10_0_compatible(void)
hid_t fid = -1; /* File id */
hid_t did = -1; /* Dataset id */
hid_t fcpl; /* File creation property list */
- hbool_t persist; /* Persist free-space or not */
+ bool persist; /* Persist free-space or not */
hsize_t threshold; /* Free-space section threshold */
H5F_fspace_strategy_t strategy; /* File space handling strategy */
int wbuf[24]; /* Buffer for dataset data */
@@ -5142,7 +5142,7 @@ test_filespace_1_10_0_compatible(void)
case 1:
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, TRUE, "H5Pget_file_space_strategy");
+ VERIFY(persist, true, "H5Pget_file_space_strategy");
#if 0
VERIFY(threshold, H5F_FREE_SPACE_THRESHOLD_DEF, "H5Pget_file_space_strategy");
#endif
@@ -5413,7 +5413,7 @@ test_filespace_round_compatible(void)
hid_t fcpl = -1; /* File creation property list ID */
unsigned j; /* Local index variable */
H5F_fspace_strategy_t strategy; /* File space strategy */
- hbool_t persist; /* Persist free-space or not */
+ bool persist; /* Persist free-space or not */
hsize_t threshold; /* Free-space section threshold */
hssize_t free_space; /* Amount of free space in the file */
int status; /* Status from copying the existing file */
@@ -5438,7 +5438,7 @@ test_filespace_round_compatible(void)
ret = H5Pget_file_space_strategy(fcpl, &strategy, &persist, &threshold);
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* There should not be any free space in the file */
@@ -5672,7 +5672,7 @@ test_libver_bounds_open(void)
/* Get new low bound and verify that it has been upgraded properly */
ret = H5Pget_libver_bounds(new_fapl, &new_low, NULL);
CHECK(ret, FAIL, "H5Pget_libver_bounds");
- VERIFY(new_low >= H5F_LIBVER_V110, TRUE, "Low bound should be upgraded to at least H5F_LIBVER_V110");
+ VERIFY(new_low >= H5F_LIBVER_V110, true, "Low bound should be upgraded to at least H5F_LIBVER_V110");
ret = H5Pclose(new_fapl);
CHECK(ret, FAIL, "H5Pclose");
@@ -5720,7 +5720,7 @@ test_libver_bounds_copy(void)
hid_t fapl = -1; /* File access property list ID */
const char *src_fname; /* Source file name */
herr_t ret; /* Generic return value */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
/* Output message about the test being performed */
MESSAGE(5, ("Testing H5Ocopy a dataset in a 1.8 library file to a 1.10 library file\n"));
@@ -5910,14 +5910,14 @@ test_libver_bounds_super(hid_t fapl, const char *env_h5_drvr)
/* Verify superblock version when creating a file with input fapl,
fcpl #A and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_create(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_create(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_create(fapl, fcpl, true, false);
+ test_libver_bounds_super_create(fapl, fcpl, false, false);
/* Verify superblock version when opening a file which is created
with input fapl, fcpl #A and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_open(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_open(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_open(fapl, fcpl, true, false);
+ test_libver_bounds_super_open(fapl, fcpl, false, false);
/* Close the fcpl */
ret = H5Pclose(fcpl);
@@ -5933,14 +5933,14 @@ test_libver_bounds_super(hid_t fapl, const char *env_h5_drvr)
/* Verify superblock version when creating a file with input fapl,
fcpl #B and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_create(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_create(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_create(fapl, fcpl, true, false);
+ test_libver_bounds_super_create(fapl, fcpl, false, false);
/* Verify superblock version when opening a file which is created
with input fapl, fcpl #B and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_open(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_open(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_open(fapl, fcpl, true, false);
+ test_libver_bounds_super_open(fapl, fcpl, false, false);
/* Close the fcpl */
ret = H5Pclose(fcpl);
@@ -5958,14 +5958,14 @@ test_libver_bounds_super(hid_t fapl, const char *env_h5_drvr)
/* Verify superblock version when creating a file with input fapl,
fcpl #C and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_create(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_create(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_create(fapl, fcpl, true, false);
+ test_libver_bounds_super_create(fapl, fcpl, false, false);
/* Verify superblock version when opening a file which is created
with input fapl, fcpl #C and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_open(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_open(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_open(fapl, fcpl, true, false);
+ test_libver_bounds_super_open(fapl, fcpl, false, false);
/* Close the fcpl */
ret = H5Pclose(fcpl);
@@ -5982,14 +5982,14 @@ test_libver_bounds_super(hid_t fapl, const char *env_h5_drvr)
/* Verify superblock version when creating a file with input fapl,
fcpl #D and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_create(fapl, fcpl, TRUE, TRUE);
- test_libver_bounds_super_create(fapl, fcpl, FALSE, TRUE);
+ test_libver_bounds_super_create(fapl, fcpl, true, true);
+ test_libver_bounds_super_create(fapl, fcpl, false, true);
/* Verify superblock version when opening a file which is created
with input fapl, fcpl #D and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_open(fapl, fcpl, TRUE, TRUE);
- test_libver_bounds_super_open(fapl, fcpl, FALSE, TRUE);
+ test_libver_bounds_super_open(fapl, fcpl, true, true);
+ test_libver_bounds_super_open(fapl, fcpl, false, true);
/* Close the fcpl */
ret = H5Pclose(fcpl);
@@ -6056,7 +6056,7 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n
#endif
H5F_libver_t low, high; /* Low and high bounds */
#if 0
- hbool_t ok; /* The result is ok or not */
+ bool ok; /* The result is ok or not */
#endif
herr_t ret; /* The return value */
@@ -6083,17 +6083,17 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n
else if (is_swmr) { /* SWMR is enabled */
if (high >= H5F_LIBVER_V110) { /* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fcreate");
+ VERIFY(fid >= 0, true, "H5Fcreate");
#if 0
VERIFY(HDF5_SUPERBLOCK_VERSION_3, f->shared->sblock->super_vers, "HDF5_superblock_ver_bounds");
- VERIFY(f->shared->low_bound >= H5F_LIBVER_V110, TRUE, "HDF5_superblock_ver_bounds");
+ VERIFY(f->shared->low_bound >= H5F_LIBVER_V110, true, "HDF5_superblock_ver_bounds");
#endif
}
else /* Should fail */
- VERIFY(fid >= 0, FALSE, "H5Fcreate");
+ VERIFY(fid >= 0, false, "H5Fcreate");
}
else { /* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fcreate");
+ VERIFY(fid >= 0, true, "H5Fcreate");
#if 0
VERIFY(low, f->shared->low_bound, "HDF5_superblock_ver_bounds");
@@ -6102,12 +6102,12 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n
ok = (f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_DEF ||
f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_1 ||
f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_2);
- VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds");
+ VERIFY(ok, true, "HDF5_superblock_ver_bounds");
break;
case H5F_LIBVER_V18:
ok = (f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_2);
- VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds");
+ VERIFY(ok, true, "HDF5_superblock_ver_bounds");
break;
case H5F_LIBVER_V110:
@@ -6115,7 +6115,7 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n
case H5F_LIBVER_V114:
case H5F_LIBVER_V116:
ok = (f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_3);
- VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds");
+ VERIFY(ok, true, "HDF5_superblock_ver_bounds");
break;
case H5F_LIBVER_ERROR:
@@ -6251,7 +6251,7 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
VERIFY(fid, H5I_INVALID_HID, "H5Fcreate");
}
else {
- VERIFY(fid >= 0, TRUE, "H5Fcreate");
+ VERIFY(fid >= 0, true, "H5Fcreate");
#if 0
/* Get the internal file pointer */
f = (H5F_t *)H5VL_object(fid);
@@ -6304,8 +6304,8 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
case 3:
if (high >= H5F_LIBVER_V110) {
/* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fopen");
- VERIFY(f->shared->low_bound >= H5F_LIBVER_V110, TRUE,
+ VERIFY(fid >= 0, true, "H5Fopen");
+ VERIFY(f->shared->low_bound >= H5F_LIBVER_V110, true,
"HDF5_superblock_ver_bounds");
/* Close the file */
@@ -6313,15 +6313,15 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
CHECK(ret, FAIL, "H5Fclose");
}
else /* Should fail */
- VERIFY(fid >= 0, FALSE, "H5Fopen");
+ VERIFY(fid >= 0, false, "H5Fopen");
break;
case 2:
if (is_swmr) /* Should fail */
- VERIFY(fid >= 0, FALSE, "H5Fopen");
+ VERIFY(fid >= 0, false, "H5Fopen");
else { /* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fopen");
- VERIFY(f->shared->low_bound >= H5F_LIBVER_V18, TRUE,
+ VERIFY(fid >= 0, true, "H5Fopen");
+ VERIFY(f->shared->low_bound >= H5F_LIBVER_V18, true,
"HDF5_superblock_ver_bounds");
/* Close the file */
@@ -6333,9 +6333,9 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
case 1:
case 0:
if (is_swmr) /* Should fail */
- VERIFY(fid >= 0, FALSE, "H5Fopen");
+ VERIFY(fid >= 0, false, "H5Fopen");
else { /* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fopen");
+ VERIFY(fid >= 0, true, "H5Fopen");
VERIFY(f->shared->low_bound, low, "HDF5_superblock_ver_bounds");
ret = H5Fclose(fid);
@@ -7652,37 +7652,37 @@ test_libver_macros(void)
/* Output message about test being performed */
MESSAGE(5, ("Testing macros for library version comparison\n"));
- VERIFY(H5_VERSION_GE(major, minor, release), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major - 1, minor, release), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major - 1, minor + 1, release), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major - 1, minor, release + 1), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor - 1, release), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor - 1, release + 1), TRUE, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor, release), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major - 1, minor, release), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major - 1, minor + 1, release), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major - 1, minor, release + 1), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor - 1, release), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor - 1, release + 1), true, "H5_VERSION_GE");
if (H5_VERS_RELEASE > 0)
- VERIFY(H5_VERSION_GE(major, minor, release - 1), TRUE, "H5_VERSION_GE");
-
- VERIFY(H5_VERSION_GE(major + 1, minor, release), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major + 1, minor - 1, release), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major + 1, minor - 1, release - 1), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor + 1, release), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor + 1, release - 1), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor, release + 1), FALSE, "H5_VERSION_GE");
-
- VERIFY(H5_VERSION_LE(major, minor, release), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major + 1, minor, release), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major + 1, minor - 1, release), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major + 1, minor - 1, release - 1), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor + 1, release), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor + 1, release - 1), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor, release + 1), TRUE, "H5_VERSION_LE");
-
- VERIFY(H5_VERSION_LE(major - 1, minor, release), FALSE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major - 1, minor + 1, release), FALSE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major - 1, minor + 1, release + 1), FALSE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor - 1, release), FALSE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor - 1, release + 1), FALSE, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_GE(major, minor, release - 1), true, "H5_VERSION_GE");
+
+ VERIFY(H5_VERSION_GE(major + 1, minor, release), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major + 1, minor - 1, release), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major + 1, minor - 1, release - 1), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor + 1, release), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor + 1, release - 1), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor, release + 1), false, "H5_VERSION_GE");
+
+ VERIFY(H5_VERSION_LE(major, minor, release), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major + 1, minor, release), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major + 1, minor - 1, release), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major + 1, minor - 1, release - 1), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor + 1, release), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor + 1, release - 1), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor, release + 1), true, "H5_VERSION_LE");
+
+ VERIFY(H5_VERSION_LE(major - 1, minor, release), false, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major - 1, minor + 1, release), false, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major - 1, minor + 1, release + 1), false, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor - 1, release), false, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor - 1, release + 1), false, "H5_VERSION_LE");
if (H5_VERS_RELEASE > 0)
- VERIFY(H5_VERSION_LE(major, minor, release - 1), FALSE, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor, release - 1), false, "H5_VERSION_LE");
} /* test_libver_macros() */
/****************************************************************
@@ -7730,7 +7730,7 @@ test_libver_macros2(void)
CHECK(ret, FAIL, "H5Lunlink");
status = H5Lexists(file, "Group", H5P_DEFAULT);
- VERIFY(status, FALSE, "H5Lexists");
+ VERIFY(status, false, "H5Lexists");
#else
ret = H5Gunlink(file, "Group");
CHECK(ret, FAIL, "H5Gunlink");
@@ -7798,7 +7798,7 @@ test_incr_filesize(void)
CHECK(fcpl, FAIL, "H5Pcreate");
/* Set file space strategy */
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, false, (hsize_t)1);
CHECK(ret, FAIL, "H5P_set_file_space_strategy");
/* Create the test file */
@@ -7819,7 +7819,7 @@ test_incr_filesize(void)
/* Create datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
dset = H5Dcreate2(fid, name, H5T_STD_U32LE, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dcreate2");
@@ -7896,7 +7896,7 @@ test_min_dset_ohdr(void)
char filename[FILENAME_LEN] = "";
hid_t file_id = -1;
hid_t file2_id = -1;
- hbool_t minimize;
+ bool minimize;
herr_t ret;
MESSAGE(5, ("Testing dataset object header minimization\n"));
@@ -7919,17 +7919,17 @@ test_min_dset_ohdr(void)
*/
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, FALSE, "minimize flag");
+ VERIFY(minimize, false, "minimize flag");
/*----------------------------------------
- * TEST set to TRUE
+ * TEST set to true
*/
- ret = H5Fset_dset_no_attrs_hint(file_id, TRUE);
+ ret = H5Fset_dset_no_attrs_hint(file_id, true);
CHECK(ret, FAIL, "H5Fset_dset_no_attrs_hint");
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, TRUE, "minimize flag");
+ VERIFY(minimize, true, "minimize flag");
/*----------------------------------------
* TEST second file open on same filename
@@ -7937,41 +7937,41 @@ test_min_dset_ohdr(void)
file2_id = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT);
CHECK_I(file2_id, "H5Fopen");
- /* verify TRUE setting on second open
+ /* verify true setting on second open
*/
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, TRUE, "minimize flag");
+ VERIFY(minimize, true, "minimize flag");
- /* re-set to FALSE on first open
+ /* re-set to false on first open
*/
- ret = H5Fset_dset_no_attrs_hint(file_id, FALSE);
+ ret = H5Fset_dset_no_attrs_hint(file_id, false);
CHECK(ret, FAIL, "H5Fset_dset_no_attrs_hint");
- /* verify FALSE set on both opens
+ /* verify false set on both opens
*/
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, FALSE, "minimize flag");
+ VERIFY(minimize, false, "minimize flag");
ret = H5Fget_dset_no_attrs_hint(file2_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, FALSE, "minimize flag");
+ VERIFY(minimize, false, "minimize flag");
- /* re-set to TRUE on second open
+ /* re-set to true on second open
*/
- ret = H5Fset_dset_no_attrs_hint(file2_id, TRUE);
+ ret = H5Fset_dset_no_attrs_hint(file2_id, true);
CHECK(ret, FAIL, "H5Fset_dset_no_attrs_hint");
- /* verify TRUE set on both opens
+ /* verify true set on both opens
*/
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, TRUE, "minimize flag");
+ VERIFY(minimize, true, "minimize flag");
ret = H5Fget_dset_no_attrs_hint(file2_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, TRUE, "minimize flag");
+ VERIFY(minimize, true, "minimize flag");
/*----------------------------------------
* TEST error cases
@@ -7980,7 +7980,7 @@ test_min_dset_ohdr(void)
/* trying to set with invalid file ID */
H5E_BEGIN_TRY
{
- ret = H5Fset_dset_no_attrs_hint(-1, TRUE);
+ ret = H5Fset_dset_no_attrs_hint(-1, true);
}
H5E_END_TRY
VERIFY(ret, FAIL, "H5Fset_dset_no_attrs_hint");
@@ -8253,14 +8253,14 @@ test_file(void)
{
const char *env_h5_drvr; /* File Driver value from environment */
hid_t fapl_id = H5I_INVALID_HID; /* VFD-dependent fapl ID */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret;
/* Output message about test being performed */
MESSAGE(5, ("Testing Low-Level File I/O\n"));
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -8288,8 +8288,8 @@ test_file(void)
test_file_double_group_open(); /* Test opening same group from two files works properly */
test_file_double_dataset_open(); /* Test opening same dataset from two files works properly */
test_file_double_datatype_open(); /* Test opening same named datatype from two files works properly */
- test_file_double_file_dataset_open(TRUE);
- test_file_double_file_dataset_open(FALSE);
+ test_file_double_file_dataset_open(true);
+ test_file_double_file_dataset_open(false);
#if 0
test_userblock_file_size(
env_h5_drvr); /* Tests that files created with a userblock have the correct size */
@@ -8310,10 +8310,10 @@ test_file(void)
/* Skipped testing for multi/split drivers */
/* Setup for multi/split drivers are there already */
test_sects_freespace(env_h5_drvr,
- TRUE); /* Test file public routine H5Fget_free_sections() for new format */
+ true); /* Test file public routine H5Fget_free_sections() for new format */
/* Skipped testing for multi/split drivers */
/* Setup for multi/split drivers are there already */
- test_sects_freespace(env_h5_drvr, FALSE); /* Test file public routine H5Fget_free_sections() */
+ test_sects_freespace(env_h5_drvr, false); /* Test file public routine H5Fget_free_sections() */
/* Skipped testing for multi/split drivers */
if (driver_is_default_compatible) {
diff --git a/test/API/tgenprop.c b/test/API/tgenprop.c
index 4b64bae..9a1f551 100644
--- a/test/API/tgenprop.c
+++ b/test/API/tgenprop.c
@@ -94,7 +94,7 @@ test_genprop_basic_class(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
@@ -125,7 +125,7 @@ test_genprop_basic_class(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS2_NAME) != 0)
+ if (strcmp(name, CLASS2_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS2_NAME=%s\n", name, CLASS2_NAME);
H5free_memory(name);
@@ -313,7 +313,7 @@ test_genprop_iter1(hid_t H5_ATTR_UNUSED id, const char *name, void *iter_data)
{
iter_data_t *idata = (iter_data_t *)iter_data;
- return HDstrcmp(name, idata->names[idata->iter_count++]);
+ return strcmp(name, idata->names[idata->iter_count++]);
}
/****************************************************************
@@ -868,7 +868,7 @@ test_genprop_iter2(hid_t H5_ATTR_UNUSED id, const char *name, void *iter_data)
{
iter_data_t *idata = (iter_data_t *)iter_data;
- return HDstrcmp(name, idata->names[idata->iter_count++]);
+ return strcmp(name, idata->names[idata->iter_count++]);
}
/****************************************************************
@@ -1026,7 +1026,7 @@ test_genprop_prop_crt_cb1(const char *name, size_t size, void *def_value)
{
/* Set the information from the creation call */
prop1_cb_info.crt_count++;
- prop1_cb_info.crt_name = HDstrdup(name);
+ prop1_cb_info.crt_name = strdup(name);
prop1_cb_info.crt_value = malloc(size);
memcpy(prop1_cb_info.crt_value, def_value, size);
@@ -1045,7 +1045,7 @@ test_genprop_prop_set_cb1(hid_t plist_id, const char *name, size_t size, void *v
prop1_cb_info.set_count++;
prop1_cb_info.set_plist_id = plist_id;
if (prop1_cb_info.set_name == NULL)
- prop1_cb_info.set_name = HDstrdup(name);
+ prop1_cb_info.set_name = strdup(name);
if (prop1_cb_info.set_value == NULL)
prop1_cb_info.set_value = malloc(size);
memcpy(prop1_cb_info.set_value, value, size);
@@ -1065,7 +1065,7 @@ test_genprop_prop_get_cb1(hid_t plist_id, const char *name, size_t size, void *v
prop1_cb_info.get_count++;
prop1_cb_info.get_plist_id = plist_id;
if (prop1_cb_info.get_name == NULL)
- prop1_cb_info.get_name = HDstrdup(name);
+ prop1_cb_info.get_name = strdup(name);
if (prop1_cb_info.get_value == NULL)
prop1_cb_info.get_value = malloc(size);
memcpy(prop1_cb_info.get_value, value, size);
@@ -1084,7 +1084,7 @@ test_genprop_prop_cop_cb1(const char *name, size_t size, void *value)
/* Set the information from the get call */
prop1_cb_info.cop_count++;
if (prop1_cb_info.cop_name == NULL)
- prop1_cb_info.cop_name = HDstrdup(name);
+ prop1_cb_info.cop_name = strdup(name);
if (prop1_cb_info.cop_value == NULL)
prop1_cb_info.cop_value = malloc(size);
memcpy(prop1_cb_info.cop_value, value, size);
@@ -1131,7 +1131,7 @@ test_genprop_prop_cls_cb1(const char *name, size_t size, void *value)
/* Set the information from the close call */
prop1_cb_info.cls_count++;
if (prop1_cb_info.cls_name == NULL)
- prop1_cb_info.cls_name = HDstrdup(name);
+ prop1_cb_info.cls_name = strdup(name);
if (prop1_cb_info.cls_value == NULL)
prop1_cb_info.cls_value = malloc(size);
memcpy(prop1_cb_info.cls_value, value, size);
@@ -1150,7 +1150,7 @@ test_genprop_prop_del_cb2(hid_t plist_id, const char *name, size_t size, void *v
/* Set the information from the delete call */
prop2_cb_info.del_count++;
prop2_cb_info.del_plist_id = plist_id;
- prop2_cb_info.del_name = HDstrdup(name);
+ prop2_cb_info.del_name = strdup(name);
prop2_cb_info.del_value = malloc(size);
memcpy(prop2_cb_info.del_value, value, size);
@@ -1238,7 +1238,7 @@ test_genprop_list_callback(void)
/* Verify creation callback information for properties tracked */
VERIFY(prop1_cb_info.crt_count, 1, "H5Pcreate");
- if (HDstrcmp(prop1_cb_info.crt_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.crt_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.crt_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1274,7 +1274,7 @@ test_genprop_list_callback(void)
/* Verify get callback information for properties tracked */
VERIFY(prop1_cb_info.get_count, 1, "H5Pget");
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
- if (HDstrcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.get_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1286,7 +1286,7 @@ test_genprop_list_callback(void)
/* Verify set callback information for properties tracked */
VERIFY(prop1_cb_info.set_count, 1, "H5Pset");
VERIFY(prop1_cb_info.set_plist_id, lid1, "H5Pset");
- if (HDstrcmp(prop1_cb_info.set_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.set_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.set_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1309,7 +1309,7 @@ test_genprop_list_callback(void)
/* Verify get callback information again for properties tracked */
VERIFY(prop1_cb_info.get_count, 2, "H5Pget");
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
- if (HDstrcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.get_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1321,7 +1321,7 @@ test_genprop_list_callback(void)
/* Verify delete callback information for properties tracked */
VERIFY(prop2_cb_info.del_count, 1, "H5Premove");
VERIFY(prop2_cb_info.del_plist_id, lid1, "H5Premove");
- if (HDstrcmp(prop2_cb_info.del_name, PROP2_NAME) != 0)
+ if (strcmp(prop2_cb_info.del_name, PROP2_NAME) != 0)
TestErrPrintf("Property #2 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop2_cb_info.del_value, PROP2_DEF_VALUE, PROP2_SIZE) != 0)
TestErrPrintf("Property #2 value doesn't match!, line=%d\n", __LINE__);
@@ -1332,7 +1332,7 @@ test_genprop_list_callback(void)
/* Verify copy callback information for properties tracked */
VERIFY(prop1_cb_info.cop_count, 1, "H5Pcopy");
- if (HDstrcmp(prop1_cb_info.cop_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.cop_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.cop_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1355,7 +1355,7 @@ test_genprop_list_callback(void)
/* Verify close callback information for properties tracked */
VERIFY(prop1_cb_info.cls_count, 1, "H5Pclose");
- if (HDstrcmp(prop1_cb_info.cls_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.cls_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.cls_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1811,7 +1811,7 @@ test_genprop_path(void)
/* Get full path for first class */
path = H5P__get_class_path_test(cid1);
CHECK_PTR(path, "H5P__get_class_path_test");
- if (HDstrcmp(path, CLASS1_PATH) != 0)
+ if (strcmp(path, CLASS1_PATH) != 0)
TestErrPrintf("Class names don't match!, path=%s, CLASS1_PATH=%s\n", path, CLASS1_PATH);
H5free_memory(path);
#endif
@@ -1827,7 +1827,7 @@ test_genprop_path(void)
/* Get full path for second class */
path = H5P__get_class_path_test(cid2);
CHECK_PTR(path, "H5P__get_class_path_test");
- if (HDstrcmp(path, CLASS2_PATH) != 0)
+ if (strcmp(path, CLASS2_PATH) != 0)
TestErrPrintf("Class names don't match!, path=%s, CLASS2_PATH=%s\n", path, CLASS2_PATH);
/* Open a copy of the class with the path name */
@@ -1888,7 +1888,7 @@ test_genprop_refcount(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
@@ -1907,7 +1907,7 @@ test_genprop_refcount(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
@@ -1918,7 +1918,7 @@ test_genprop_refcount(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
diff --git a/test/API/th5o.c b/test/API/th5o.c
index 898c11d..8a052ee 100644
--- a/test/API/th5o.c
+++ b/test/API/th5o.c
@@ -978,7 +978,7 @@ test_h5o_link(void)
/* Create LCPL with intermediate group creation flag set */
lcpl_id = H5Pcreate(H5P_LINK_CREATE);
CHECK(lcpl_id, FAIL, "H5Pcreate");
- ret = H5Pset_create_intermediate_group(lcpl_id, TRUE);
+ ret = H5Pset_create_intermediate_group(lcpl_id, true);
CHECK(ret, FAIL, "H5Pset_create_intermediate_group");
/* Create a file access property list */
@@ -1013,7 +1013,7 @@ test_h5o_link(void)
ret = H5Tcommit_anon(file_id, type_id, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit_anon");
committed = H5Tcommitted(type_id);
- VERIFY(committed, TRUE, "H5Tcommitted");
+ VERIFY(committed, true, "H5Tcommitted");
/* Create a dataset with no name using the committed datatype*/
dset_id = H5Dcreate_anon(file_id, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT);
@@ -1209,7 +1209,7 @@ test_h5o_comment(void)
len = H5Oget_comment(fid, check_comment, (size_t)comment_len + 1);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(file_comment, check_comment);
+ ret_value = strcmp(file_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Open the group */
@@ -1223,7 +1223,7 @@ test_h5o_comment(void)
len = H5Oget_comment(grp, check_comment, (size_t)comment_len + 1);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(grp_comment, check_comment);
+ ret_value = strcmp(grp_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Open the datatype */
@@ -1237,7 +1237,7 @@ test_h5o_comment(void)
len = H5Oget_comment(dtype, check_comment, (size_t)comment_len + 1);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(dtype_comment, check_comment);
+ ret_value = strcmp(dtype_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Open the dataset */
@@ -1251,7 +1251,7 @@ test_h5o_comment(void)
len = H5Oget_comment(dset, check_comment, (size_t)comment_len + 1);
CHECK(ret, len, "H5Oget_comment");
- ret_value = HDstrcmp(dset_comment, check_comment);
+ ret_value = strcmp(dset_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Close the IDs */
@@ -1384,7 +1384,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(fid, ".", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment_by_name");
- ret_value = HDstrcmp(file_comment, check_comment);
+ ret_value = strcmp(file_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Open the group */
@@ -1398,7 +1398,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(fid, "group", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment_by_name");
- ret_value = HDstrcmp(grp_comment, check_comment);
+ ret_value = strcmp(grp_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Getting the comment on the datatype and verify it */
@@ -1408,7 +1408,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(grp, "datatype", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(dtype_comment, check_comment);
+ ret_value = strcmp(dtype_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Getting the comment on the dataset and verify it */
@@ -1418,7 +1418,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(fid, "dataset", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment_by_name");
- ret_value = HDstrcmp(dset_comment, check_comment);
+ ret_value = strcmp(dset_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Close the IDs */
@@ -1706,16 +1706,16 @@ visit_obj_cb(hid_t group_id, const char *name, const H5O_info1_t *oinfo1, void H
H5O_info1_t oinfo2; /* Object info structs */
/* Verify the object info for "group1", "group2" and the root group */
- if (!(HDstrcmp(name, "group1"))) {
+ if (!(strcmp(name, "group1"))) {
H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_NUM_ATTRS, H5P_DEFAULT);
VERIFY(oinfo1->num_attrs, oinfo2.num_attrs, "obj info from H5Ovisit1");
}
- else if (!(HDstrcmp(name, "group2"))) {
+ else if (!(strcmp(name, "group2"))) {
H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_HDR, H5P_DEFAULT);
VERIFY(oinfo1->hdr.nmesgs, oinfo2.hdr.nmesgs, "obj info from H5Ovisit1/H5Oget_info2");
VERIFY(oinfo1->hdr.nchunks, oinfo2.hdr.nchunks, "obj info from H5Ovisit1/H5Oget_info2");
}
- else if (!(HDstrcmp(name, "."))) {
+ else if (!(strcmp(name, "."))) {
H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_META_SIZE, H5P_DEFAULT);
VERIFY(oinfo1->meta_size.obj.index_size, oinfo2.meta_size.obj.index_size,
"obj info from H5Ovisit1/H5Oget_info2");
@@ -1768,7 +1768,7 @@ test_h5o_getinfo_visit(void)
/* Attach 10 attributes to "group1" */
for (j = 0; j < 10; j++) {
/* Create the attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr%u", j);
+ snprintf(attrname, sizeof(attrname), "attr%u", j);
/* Create the attribute */
aid = H5Acreate2(gid1, attrname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
diff --git a/test/API/th5s.c b/test/API/th5s.c
index 7bf3191..3ab21f4 100644
--- a/test/API/th5s.c
+++ b/test/API/th5s.c
@@ -128,7 +128,7 @@ test_h5s_basic(void)
hsize_t tmax[4];
hssize_t n; /* Number of dataspace elements */
#if 0
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
#endif
herr_t ret; /* Generic return value */
@@ -1624,7 +1624,7 @@ test_h5s_encode1(void)
****************************************************************/
static herr_t
test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, uint32_t expected_version, uint8_t expected_enc_size,
- hbool_t expected_to_fail)
+ bool expected_to_fail)
{
char *buf = NULL; /* Pointer to the encoded buffer */
size_t buf_size; /* Size of the encoded buffer */
@@ -1667,7 +1667,7 @@ test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, uint32_t expected_version,
/* Verify if the two dataspace selections (in_sid, d_sid) are the same shape */
check = H5Sselect_shape_same(in_sid, d_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare the starting/ending coordinates of the bounding box for in_sid and d_sid */
ret = H5Sget_select_bounds(in_sid, in_low_bounds, in_high_bounds);
@@ -1759,7 +1759,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
/* Testing with each configuration */
for (config = CONFIG_16; config <= CONFIG_32; config++) {
- hbool_t expected_to_fail = FALSE;
+ bool expected_to_fail = false;
/* Testing with unlimited or not */
for (unlim = 0; unlim <= 1; unlim++) {
@@ -1767,7 +1767,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
count = unlim ? H5S_UNLIMITED : 2;
if ((high <= H5F_LIBVER_V18) && (unlim || config == CONFIG_32))
- expected_to_fail = TRUE;
+ expected_to_fail = true;
if (low >= H5F_LIBVER_V112)
expected_version = 3;
@@ -1952,7 +1952,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
/* Testing with each configuration */
for (config = CONFIG_8; config <= CONFIG_32; config++) {
- hbool_t expected_to_fail = FALSE; /* Whether H5Sencode2 is expected to fail */
+ bool expected_to_fail = false; /* Whether H5Sencode2 is expected to fail */
uint32_t expected_version = 0; /* Expected version for selection info */
uint32_t expected_enc_size = 0; /* Expected encoded size for selection info */
@@ -1963,7 +1963,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
/* H5Sencode2 is expected to fail for library v110 and below
when the selection exceeds the 32 bits integer limit */
if (high <= H5F_LIBVER_V110 && config == CONFIG_32)
- expected_to_fail = TRUE;
+ expected_to_fail = true;
if (low >= H5F_LIBVER_V112 || config == CONFIG_32)
expected_version = 3;
@@ -2023,7 +2023,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
/* Should be irregular hyperslab */
is_regular = H5Sis_regular_hyperslab(sid);
- VERIFY(is_regular, FALSE, "H5Sis_regular_hyperslab");
+ VERIFY(is_regular, false, "H5Sis_regular_hyperslab");
/* Verify the version and encoded size expected for the configuration */
assert(expected_enc_size <= 255);
@@ -2057,7 +2057,7 @@ test_h5s_encode_points(H5F_libver_t low, H5F_libver_t high)
hsize_t vdsdims[1] = {total_particles}; /* Dimension size */
hsize_t coord[4]; /* The point coordinates */
herr_t ret; /* Generic return value */
- hbool_t expected_to_fail = FALSE; /* Expected to fail or not */
+ bool expected_to_fail = false; /* Expected to fail or not */
uint32_t expected_version = 0; /* Expected version for selection info */
uint8_t expected_enc_size = 0; /* Expected encoded size of selection info */
@@ -2084,7 +2084,7 @@ test_h5s_encode_points(H5F_libver_t low, H5F_libver_t high)
ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)4, coord);
CHECK(ret, FAIL, "H5Sselect_elements");
- expected_to_fail = FALSE;
+ expected_to_fail = false;
expected_enc_size = 4;
expected_version = 1;
@@ -2109,7 +2109,7 @@ test_h5s_encode_points(H5F_libver_t low, H5F_libver_t high)
/* test 3 */
if (high <= H5F_LIBVER_V110)
- expected_to_fail = TRUE;
+ expected_to_fail = true;
if (high >= H5F_LIBVER_V112) {
expected_version = 2;
@@ -2677,423 +2677,423 @@ test_h5s_extent_equal(void)
/* Compare null dataspace against all others, including itself */
ext_equal = H5Sextent_equal(null_space, null_space);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare scalar dataspace against all others, including itself */
ext_equal = H5Sextent_equal(scalar_space, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, scalar_space);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 1-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d1_space1, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d1_space1);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare larger 1-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d1_space2, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d1_space2);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 1-D dataspace w/fixed max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d1_space3, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d1_space3);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 1-D dataspace w/unlimited max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d1_space4, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d1_space4);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d2_space1, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d2_space1);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare larger 2-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d2_space2, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d2_space2);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/fixed max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d2_space3, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d2_space3);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/unlimited max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d2_space4, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d2_space4);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 3-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d3_space1, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d3_space1);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare larger 2-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d3_space2, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d3_space2);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/fixed max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d3_space3, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d3_space3);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/unlimited max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d3_space4, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d3_space4);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
/* Close dataspaces */
ret = H5Sclose(null_space);
@@ -3216,7 +3216,7 @@ test_h5s_extent_copy(void)
/* Verify that the extents are equal */
ext_equal = H5Sextent_equal(tmp_space, spaces[j]);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
/* Verify that the correct number of elements is selected */
npoints_ret = H5Sget_select_npoints(tmp_space);
@@ -3228,7 +3228,7 @@ test_h5s_extent_copy(void)
/* Verify that the extents are equal */
ext_equal = H5Sextent_equal(tmp_space, spaces[i]);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
/* Verify that the correct number of elements is selected */
npoints_ret = H5Sget_select_npoints(tmp_space);
@@ -3279,7 +3279,7 @@ test_h5s_bug1(void)
/* Check that space1's selection is valid */
select_valid = H5Sselect_valid(space1);
CHECK(select_valid, FAIL, "H5Sselect_valid");
- VERIFY(select_valid, TRUE, "H5Sselect_valid result");
+ VERIFY(select_valid, true, "H5Sselect_valid result");
/* Close dataspaces */
ret = H5Sclose(space1);
@@ -3327,7 +3327,7 @@ test_h5s_bug2(void)
/* Check that space's selection is valid */
select_valid = H5Sselect_valid(space);
CHECK(select_valid, FAIL, "H5Sselect_valid");
- VERIFY(select_valid, TRUE, "H5Sselect_valid result");
+ VERIFY(select_valid, true, "H5Sselect_valid result");
/* Check that 4 elements are selected */
elements_selected = H5Sget_select_npoints(space);
diff --git a/test/API/tid.c b/test/API/tid.c
index b353a8a..649bacb 100644
--- a/test/API/tid.c
+++ b/test/API/tid.c
@@ -397,15 +397,15 @@ test_is_valid(void)
/* Check that the ID is valid */
tri_ret = H5Iis_valid(dtype);
- VERIFY(tri_ret, TRUE, "H5Iis_valid");
- if (tri_ret != TRUE)
+ VERIFY(tri_ret, true, "H5Iis_valid");
+ if (tri_ret != true)
goto out;
#if 0 /* Cannot call internal APIs and cannot call public H5Inmembers on library types */
/* Artificially manipulate the reference counts so app_count is 0, and dtype
* appears to be an internal id. This takes advantage of the fact that
* H5Ipkg is included.
*/
- ret = H5I_inc_ref(dtype, FALSE);
+ ret = H5I_inc_ref(dtype, false);
CHECK(ret, FAIL, "H5I_inc_ref");
if (ret < 0)
goto out;
@@ -416,8 +416,8 @@ test_is_valid(void)
/* Check that dtype is invalid */
tri_ret = H5Iis_valid(dtype);
- VERIFY(tri_ret, FALSE, "H5Iis_valid");
- if (tri_ret != FALSE)
+ VERIFY(tri_ret, false, "H5Iis_valid");
+ if (tri_ret != false)
goto out;
/* Close dtype and verify that it has been closed */
@@ -436,14 +436,14 @@ test_is_valid(void)
/* Check that dtype is invalid */
tri_ret = H5Iis_valid(dtype);
- VERIFY(tri_ret, FALSE, "H5Iis_valid");
- if (tri_ret != FALSE)
+ VERIFY(tri_ret, false, "H5Iis_valid");
+ if (tri_ret != false)
goto out;
#endif
/* Check that an id of -1 is invalid */
tri_ret = H5Iis_valid((hid_t)-1);
- VERIFY(tri_ret, FALSE, "H4Iis_valid");
- if (tri_ret != FALSE)
+ VERIFY(tri_ret, false, "H4Iis_valid");
+ if (tri_ret != false)
goto out;
return 0;
@@ -619,7 +619,7 @@ typedef struct rct_obj_t {
/* Whether we are currently freeing this object directly
* through H5Idec_ref().
*/
- hbool_t freeing;
+ bool freeing;
/* Pointer to the master list of all objects */
rct_obj_list_t *list;
@@ -677,7 +677,7 @@ rct_free_cb(void *_obj, void H5_ATTR_UNUSED **_ctx)
* not free another object. We don't want to recursively free the
* entire list when we free the first ID.
*/
- obj->list->objects[i].freeing = TRUE;
+ obj->list->objects[i].freeing = true;
/* Decrement the reference count on the object */
ret = H5Idec_ref(obj->list->objects[i].id);
@@ -686,7 +686,7 @@ rct_free_cb(void *_obj, void H5_ATTR_UNUSED **_ctx)
goto error;
/* Unset the "freeing" flag */
- obj->list->objects[i].freeing = FALSE;
+ obj->list->objects[i].freeing = false;
}
/* Verify the number of objects remaining in the master list is non-negative */
@@ -751,7 +751,7 @@ test_remove_clear_type(void)
/* Object setup */
objects[j].nfrees = 0;
- objects[j].freeing = FALSE;
+ objects[j].freeing = false;
objects[j].list = &obj_list;
/* Register an ID for it */
@@ -770,13 +770,13 @@ test_remove_clear_type(void)
}
/******************************************
- * Clear the type with force set to FALSE *
+ * Clear the type with force set to false *
******************************************/
- /* Clear the type. Since force is FALSE, only
+ /* Clear the type. Since force is false, only
* IDs with a reference count of 1 will be cleared.
*/
- ret = H5Iclear_type(obj_type, FALSE);
+ ret = H5Iclear_type(obj_type, false);
CHECK(ret, FAIL, "H5Iclear_type");
if (ret == FAIL)
goto error;
@@ -799,8 +799,8 @@ test_remove_clear_type(void)
}
/* No object should still be marked as "freeing" */
- VERIFY(objects[j].freeing, FALSE, "object marked as freeing");
- if (objects[j].freeing != FALSE)
+ VERIFY(objects[j].freeing, false, "object marked as freeing");
+ if (objects[j].freeing != false)
goto error;
}
@@ -821,11 +821,11 @@ test_remove_clear_type(void)
goto error;
/*****************************************
- * Clear the type with force set to TRUE *
+ * Clear the type with force set to true *
*****************************************/
- /* Clear the type. Since force is TRUE, all IDs will be cleared. */
- ret = H5Iclear_type(obj_type, TRUE);
+ /* Clear the type. Since force is true, all IDs will be cleared. */
+ ret = H5Iclear_type(obj_type, true);
CHECK(ret, FAIL, "H5Iclear_type");
if (ret == FAIL)
goto error;
@@ -839,8 +839,8 @@ test_remove_clear_type(void)
goto error;
/* No object should still be marked as "freeing" */
- VERIFY(objects[j].freeing, FALSE, "object marked as freeing");
- if (objects[j].freeing != FALSE)
+ VERIFY(objects[j].freeing, false, "object marked as freeing");
+ if (objects[j].freeing != false)
goto error;
}
@@ -1357,7 +1357,7 @@ test_future_ids(void)
CHECK(ret, FAIL, "H5Pisa_class");
if (FAIL == ret)
goto error;
- if (TRUE != ret)
+ if (true != ret)
goto error;
/* Verify that the application believes the ID is still a property list */
diff --git a/test/API/titerate.c b/test/API/titerate.c
index 23b65fc..5e6ce36 100644
--- a/test/API/titerate.c
+++ b/test/API/titerate.c
@@ -52,8 +52,8 @@ typedef struct {
#define CORRUPTED_ATNAMELEN_FILE "memleak_H5O_dtype_decode_helper_H5Odtype.h5"
#define DSET_NAME "image"
typedef struct searched_err_t {
- char message[256];
- hbool_t found;
+ char message[256];
+ bool found;
} searched_err_t;
#if 0
/* Call back function for test_corrupted_attnamelen */
@@ -74,7 +74,7 @@ herr_t aiter_cb(hid_t group, const char *name, const H5A_info_t *ainfo, v
H5_ATTR_PURE int
iter_strcmp(const void *s1, const void *s2)
{
- return (HDstrcmp(*(const char *const *)s1, *(const char *const *)s2));
+ return (strcmp(*(const char *const *)s1, *(const char *const *)s2));
}
/****************************************************************
@@ -97,7 +97,7 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t H5_ATTR
return 1;
}
- HDstrcpy(info->name, name);
+ strcpy(info->name, name);
switch (info->command) {
case RET_ZERO:
@@ -126,7 +126,7 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t H5_ATTR
**
****************************************************************/
static void
-test_iter_group(hid_t fapl, hbool_t new_format)
+test_iter_group(hid_t fapl, bool new_format)
{
hid_t file; /* File ID */
hid_t dataset; /* Dataset ID */
@@ -166,12 +166,12 @@ test_iter_group(hid_t fapl, hbool_t new_format)
CHECK(filespace, FAIL, "H5Screate");
for (i = 0; i < NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "Dataset %d", i);
+ snprintf(name, sizeof(name), "Dataset %d", i);
dataset = H5Dcreate2(file, name, datatype, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate2");
/* Keep a copy of the dataset names around for later */
- lnames[i] = HDstrdup(name);
+ lnames[i] = strdup(name);
CHECK_PTR(lnames[i], "strdup");
ret = H5Dclose(dataset);
@@ -182,13 +182,13 @@ test_iter_group(hid_t fapl, hbool_t new_format)
grp = H5Gcreate2(file, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Gcreate2");
- lnames[NDATASETS] = HDstrdup("grp");
+ lnames[NDATASETS] = strdup("grp");
CHECK_PTR(lnames[NDATASETS], "strdup");
ret = H5Tcommit2(file, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit2");
- lnames[NDATASETS + 1] = HDstrdup("dtype");
+ lnames[NDATASETS + 1] = strdup("dtype");
CHECK_PTR(lnames[NDATASETS], "strdup");
/* Close everything up */
@@ -333,7 +333,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
TestErrPrintf("Group iteration function walked too far!\n");
/* Verify that the correct name is retrieved */
- if (HDstrncmp(info.name, lnames[(size_t)(idx - 1)], NAMELEN) != 0)
+ if (strncmp(info.name, lnames[(size_t)(idx - 1)], NAMELEN) != 0)
TestErrPrintf(
"Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n",
(unsigned)(idx - 1), lnames[(size_t)(idx - 1)]);
@@ -365,7 +365,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
TestErrPrintf("Group iteration function walked too far!\n");
/* Verify that the correct name is retrieved */
- if (HDstrncmp(info.name, lnames[(size_t)(idx - 1)], NAMELEN) != 0)
+ if (strncmp(info.name, lnames[(size_t)(idx - 1)], NAMELEN) != 0)
TestErrPrintf(
"Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n",
(unsigned)(idx - 1), lnames[(size_t)(idx - 1)]);
@@ -397,7 +397,7 @@ aiter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5A_info_t H5_ATTR_
static int count = 0;
static int count2 = 0;
- HDstrcpy(info->name, name);
+ strcpy(info->name, name);
switch (info->command) {
case RET_ZERO:
@@ -426,7 +426,7 @@ aiter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5A_info_t H5_ATTR_
**
****************************************************************/
static void
-test_iter_attr(hid_t fapl, hbool_t new_format)
+test_iter_attr(hid_t fapl, bool new_format)
{
hid_t file; /* File ID */
hid_t dataset; /* Common Dataset ID */
@@ -458,12 +458,12 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
CHECK(dataset, FAIL, "H5Dcreate2");
for (i = 0; i < NATTR; i++) {
- HDsnprintf(name, sizeof(name), "Attribute %02d", i);
+ snprintf(name, sizeof(name), "Attribute %02d", i);
attribute = H5Acreate2(dataset, name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attribute, FAIL, "H5Acreate2");
/* Keep a copy of the attribute names around for later */
- anames[i] = HDstrdup(name);
+ anames[i] = strdup(name);
CHECK_PTR(anames[i], "strdup");
ret = H5Aclose(attribute);
@@ -533,7 +533,7 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
if (!new_format) {
/* Verify that the correct name is retrieved */
if (idx > 0) {
- if (HDstrcmp(info.name, anames[(size_t)idx - 1]) != 0)
+ if (strcmp(info.name, anames[(size_t)idx - 1]) != 0)
TestErrPrintf(
"%u: Attribute iteration function didn't set names correctly, info.name = "
"'%s', anames[%u] = '%s'!\n",
@@ -567,7 +567,7 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
if (!new_format) {
/* Verify that the correct name is retrieved */
if (idx > 0) {
- if (HDstrcmp(info.name, anames[(size_t)idx - 1]) != 0)
+ if (strcmp(info.name, anames[(size_t)idx - 1]) != 0)
TestErrPrintf(
"%u: Attribute iteration function didn't set names correctly, info.name = "
"'%s', anames[%u] = '%s'!\n",
@@ -602,7 +602,7 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
H5_ATTR_PURE int
iter_strcmp2(const void *s1, const void *s2)
{
- return (HDstrcmp((const char *)s1, (const char *)s2));
+ return (strcmp((const char *)s1, (const char *)s2));
} /* end iter_strcmp2() */
/****************************************************************
@@ -624,7 +624,7 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info2_t H5_ATTR_UNUSED *link
return 1;
}
- if (HDstrcmp(name, test_info->name) != 0) {
+ if (strcmp(name, test_info->name) != 0) {
TestErrPrintf("name = '%s', test_info = '%s'\n", name, test_info->name);
return (H5_ITER_ERROR);
} /* end if */
@@ -691,10 +691,10 @@ test_iter_group_large(hid_t fapl)
/* Create a bunch of groups */
for (i = 0; i < ITER_NGROUPS; i++) {
- HDsnprintf(gname, sizeof(gname), "Group_%d", i);
+ snprintf(gname, sizeof(gname), "Group_%d", i);
/* Add the name to the list of objects in the root group */
- HDstrcpy(names[i].name, gname);
+ strcpy(names[i].name, gname);
names[i].type = H5O_TYPE_GROUP;
/* Create a group */
@@ -711,7 +711,7 @@ test_iter_group_large(hid_t fapl)
CHECK(dataset, FAIL, "H5Dcreate2");
/* Add the name to the list of objects in the root group */
- HDstrcpy(names[ITER_NGROUPS].name, "Dataset1");
+ strcpy(names[ITER_NGROUPS].name, "Dataset1");
names[ITER_NGROUPS].type = H5O_TYPE_DATASET;
/* Close Dataset */
@@ -741,7 +741,7 @@ test_iter_group_large(hid_t fapl)
CHECK(ret, FAIL, "H5Tcommit2");
/* Add the name to the list of objects in the root group */
- HDstrcpy(names[ITER_NGROUPS + 1].name, "Datatype1");
+ strcpy(names[ITER_NGROUPS + 1].name, "Datatype1");
names[ITER_NGROUPS + 1].type = H5O_TYPE_NAMED_DATATYPE;
/* Close datatype */
@@ -809,12 +809,12 @@ test_grp_memb_funcs(hid_t fapl)
CHECK(filespace, FAIL, "H5Screate");
for (i = 0; i < NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "Dataset %d", i);
+ snprintf(name, sizeof(name), "Dataset %d", i);
dataset = H5Dcreate2(file, name, datatype, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate2");
/* Keep a copy of the dataset names around for later */
- dnames[i] = HDstrdup(name);
+ dnames[i] = strdup(name);
CHECK_PTR(dnames[i], "strdup");
ret = H5Dclose(dataset);
@@ -825,13 +825,13 @@ test_grp_memb_funcs(hid_t fapl)
grp = H5Gcreate2(file, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Gcreate2");
- dnames[NDATASETS] = HDstrdup("grp");
+ dnames[NDATASETS] = strdup("grp");
CHECK_PTR(dnames[NDATASETS], "strdup");
ret = H5Tcommit2(file, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit2");
- dnames[NDATASETS + 1] = HDstrdup("dtype");
+ dnames[NDATASETS + 1] = strdup("dtype");
CHECK_PTR(dnames[NDATASETS], "strdup");
/* Close everything up */
@@ -880,18 +880,18 @@ test_grp_memb_funcs(hid_t fapl)
VERIFY(ret, name_len, "H5Lget_name_by_idx");
/* Keep a copy of the dataset names around for later */
- obj_names[i] = HDstrdup(dataset_name);
+ obj_names[i] = strdup(dataset_name);
CHECK_PTR(obj_names[i], "strdup");
ret = H5Oget_info_by_idx3(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo,
H5O_INFO_BASIC, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_idx3");
- if (!HDstrcmp(dataset_name, "grp"))
+ if (!strcmp(dataset_name, "grp"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- if (!HDstrcmp(dataset_name, "dtype"))
+ if (!strcmp(dataset_name, "dtype"))
VERIFY(oinfo.type, H5O_TYPE_NAMED_DATATYPE, "H5Lget_name_by_idx");
- if (!HDstrncmp(dataset_name, "Dataset", (size_t)7))
+ if (!strncmp(dataset_name, "Dataset", (size_t)7))
VERIFY(oinfo.type, H5O_TYPE_DATASET, "H5Lget_name_by_idx");
} /* end for */
@@ -909,8 +909,8 @@ test_grp_memb_funcs(hid_t fapl)
/* Compare object names */
for (i = 0; i < (int)ginfo.nlinks; i++) {
- ret = HDstrcmp(dnames[i], obj_names[i]);
- VERIFY(ret, 0, "HDstrcmp");
+ ret = strcmp(dnames[i], obj_names[i]);
+ VERIFY(ret, 0, "strcmp");
} /* end for */
ret = H5Gclose(root_group);
@@ -988,11 +988,11 @@ test_links(hid_t fapl)
CHECK(ret, FAIL, "H5Oget_info_by_idx3");
} /* end if */
- if (!HDstrcmp(obj_name, "g1.1"))
+ if (!strcmp(obj_name, "g1.1"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "hardlink"))
+ else if (!strcmp(obj_name, "hardlink"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "softlink"))
+ else if (!strcmp(obj_name, "softlink"))
VERIFY(linfo.type, H5L_TYPE_SOFT, "H5Lget_name_by_idx");
else
ERROR("unknown object name");
@@ -1030,8 +1030,8 @@ find_err_msg_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *_
return H5_ITER_ERROR;
/* If the searched error message is found, stop the iteration */
- if (err_desc->desc != NULL && HDstrcmp(err_desc->desc, searched_err->message) == 0) {
- searched_err->found = TRUE;
+ if (err_desc->desc != NULL && strcmp(err_desc->desc, searched_err->message) == 0) {
+ searched_err->found = true;
status = H5_ITER_STOP;
}
@@ -1055,7 +1055,7 @@ test_corrupted_attnamelen(void)
searched_err_t err_caught; /* Data to be passed to callback func */
int err_status; /* Status returned by H5Aiterate2 */
herr_t ret; /* Return value */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
const char *testfile = H5_get_srcdir_filename(CORRUPTED_ATNAMELEN_FILE); /* Corrected test file name */
const char *err_message = "attribute name has different length than stored length";
@@ -1087,15 +1087,15 @@ test_corrupted_attnamelen(void)
/* Make sure the intended error was caught */
if (err_status == -1) {
/* Initialize client data */
- HDstrcpy(err_caught.message, err_message);
- err_caught.found = FALSE;
+ strcpy(err_caught.message, err_message);
+ err_caught.found = false;
/* Look for the correct error message */
ret = H5Ewalk2(H5E_DEFAULT, H5E_WALK_UPWARD, find_err_msg_cb, &err_caught);
CHECK(ret, FAIL, "H5Ewalk2");
/* Fail if the indicated message is not found */
- CHECK(err_caught.found, FALSE, "test_corrupted_attnamelen: Expected error not found");
+ CHECK(err_caught.found, false, "test_corrupted_attnamelen: Expected error not found");
}
/* Close the dataset and file */
@@ -1172,11 +1172,11 @@ test_links_deprec(hid_t fapl)
CHECK(ret, FAIL, "H5Oget_info_by_idx");
} /* end if */
- if (!HDstrcmp(obj_name, "g1.1"))
+ if (!strcmp(obj_name, "g1.1"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "hardlink"))
+ else if (!strcmp(obj_name, "hardlink"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "softlink"))
+ else if (!strcmp(obj_name, "softlink"))
VERIFY(linfo.type, H5L_TYPE_SOFT, "H5Lget_name_by_idx");
else
ERROR("unknown object name");
@@ -1222,7 +1222,7 @@ test_iterate(void)
CHECK(ret, FAIL, "H5Pset_libver_bounds");
/* These next tests use the same file */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
test_iter_group(new_format ? fapl2 : fapl, new_format); /* Test group iteration */
test_iter_group_large(new_format ? fapl2 : fapl); /* Test group iteration for large # of objects */
test_iter_attr(new_format ? fapl2 : fapl, new_format); /* Test attribute iteration */
diff --git a/test/API/tmisc.c b/test/API/tmisc.c
index 791d22b..4c87425 100644
--- a/test/API/tmisc.c
+++ b/test/API/tmisc.c
@@ -488,8 +488,8 @@ test_misc2_write_attribute(void)
hid_t type;
herr_t ret;
misc2_struct data, data_check;
- char *string_att1 = HDstrdup("string attribute in file one");
- char *string_att2 = HDstrdup("string attribute in file two");
+ char *string_att1 = strdup("string attribute in file one");
+ char *string_att2 = strdup("string attribute in file two");
memset(&data, 0, sizeof(data));
memset(&data_check, 0, sizeof(data_check));
@@ -1131,7 +1131,7 @@ test_misc6(void)
/* Loop through adding attributes to each dataset */
for (u = 0; u < MISC6_NUMATTR; u++) {
/* Create name for attribute */
- HDsnprintf(attr_name, sizeof(attr_name), "Attr#%u", u);
+ snprintf(attr_name, sizeof(attr_name), "Attr#%u", u);
/* Open the file */
loc_id = H5Fopen(MISC6_FILE, H5F_ACC_RDWR, H5P_DEFAULT);
@@ -1848,7 +1848,7 @@ test_misc10(void)
hid_t dcpl; /* Dataset creation property list */
hid_t space, type; /* Old dataset's dataspace & datatype */
const char *testfile = H5_get_srcdir_filename(MISC10_FILE_OLD); /* Corrected test file name */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret;
/* Output message about test being performed */
@@ -1934,7 +1934,7 @@ test_misc11(void)
#endif
H5F_fspace_strategy_t strategy; /* File space strategy */
hsize_t threshold; /* Free-space section threshold */
- hbool_t persist; /* To persist free-space or not */
+ bool persist; /* To persist free-space or not */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -1995,7 +1995,7 @@ test_misc11(void)
ret = H5Pset_shared_mesg_nindexes(fcpl, MISC11_NINDEXES);
CHECK(ret, FAIL, "H5Pset_shared_mesg");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space");
/* Creating a file with the non-default file creation property list should
@@ -2062,7 +2062,7 @@ test_misc11(void)
ret = H5Pget_file_space_strategy(fcpl, &strategy, &persist, &threshold);
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
VERIFY(strategy, 3, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Close file */
@@ -2166,11 +2166,11 @@ test_misc12(void)
CHECK(ret, FAIL, "H5Dread");
for (i = 0; i < MISC12_SPACE1_DIM1; i++)
- if (HDstrcmp(wdata[i], rdata[i]) != 0)
+ if (strcmp(wdata[i], rdata[i]) != 0)
TestErrPrintf("Error on line %d: wdata[%d]=%s, rdata[%d]=%s\n", __LINE__, i, wdata[i], i,
rdata[i]);
for (; i < (MISC12_SPACE1_DIM1 + MISC12_APPEND_SIZE); i++)
- if (HDstrcmp(wdata1[i - MISC12_SPACE1_DIM1], rdata[i]) != 0)
+ if (strcmp(wdata1[i - MISC12_SPACE1_DIM1], rdata[i]) != 0)
TestErrPrintf("Error on line %d: wdata1[%d]=%s, rdata[%d]=%s\n", __LINE__, i - MISC12_SPACE1_DIM1,
wdata1[i - MISC12_SPACE1_DIM1], i, rdata[i]);
@@ -2208,16 +2208,16 @@ misc13_init_data(unsigned *original_data)
original_data[u] = u;
}
-static hbool_t
+static bool
misc13_verify_data_match(const unsigned *original_data, const unsigned *read_data)
{
unsigned u;
for (u = 0; u < MISC13_DIM1; u++)
if (original_data[u] != read_data[u])
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
static void
@@ -2389,7 +2389,7 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
CHECK_PTR(user_block, "calloc");
/* Copy in the user block data */
- memcpy(user_block, str, HDstrlen(str));
+ memcpy(user_block, str, strlen(str));
/* Open the new file */
new_fp = fopen(new_name, "wb");
@@ -2432,7 +2432,7 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
static void
misc13_verify_file(const char *name, const unsigned *data, hsize_t userblock_size,
- hbool_t check_for_new_dataset)
+ bool check_for_new_dataset)
{
hid_t fid = -1; /* File ID */
hid_t gid1 = -1; /* Group IDs */
@@ -2476,7 +2476,7 @@ misc13_verify_file(const char *name, const unsigned *data, hsize_t userblock_siz
CHECK(tid, FAIL, "H5Topen2");
/* Verify the type is correct */
- VERIFY(H5Tequal(tid, H5T_NATIVE_INT), TRUE, "H5Tequal");
+ VERIFY(H5Tequal(tid, H5T_NATIVE_INT), true, "H5Tequal");
/* Close named datatype */
ret = H5Tclose(tid);
@@ -2497,7 +2497,7 @@ misc13_verify_file(const char *name, const unsigned *data, hsize_t userblock_siz
CHECK(tid, FAIL, "H5Topen2");
/* Verify the type is correct */
- VERIFY(H5Tequal(tid, H5T_NATIVE_INT), TRUE, "H5Tequal");
+ VERIFY(H5Tequal(tid, H5T_NATIVE_INT), true, "H5Tequal");
/* Close named datatype */
ret = H5Tclose(tid);
@@ -2551,7 +2551,7 @@ test_misc13(void)
{
unsigned *data = NULL; /* Data to write to dataset */
hsize_t userblock_size; /* Correct size of userblock */
- hbool_t check_for_new_dataset; /* Whether to check for the post-userblock-creation dataset */
+ bool check_for_new_dataset; /* Whether to check for the post-userblock-creation dataset */
/* Create a data buffer for the datasets */
data = (unsigned *)calloc(MISC13_DIM1, sizeof(unsigned));
@@ -2565,7 +2565,7 @@ test_misc13(void)
/* Verify file contents are correct */
userblock_size = 0;
- check_for_new_dataset = FALSE;
+ check_for_new_dataset = false;
misc13_verify_file(MISC13_FILE_1, data, userblock_size, check_for_new_dataset);
/* Create a new file by inserting a user block in front of the first file */
@@ -2573,7 +2573,7 @@ test_misc13(void)
/* Verify file contents are still correct */
userblock_size = MISC13_USERBLOCK_SIZE;
- check_for_new_dataset = FALSE;
+ check_for_new_dataset = false;
misc13_verify_file(MISC13_FILE_2, data, userblock_size, check_for_new_dataset);
/* Make certain we can modify the new file */
@@ -2581,7 +2581,7 @@ test_misc13(void)
/* Verify file contents are still correct */
userblock_size = MISC13_USERBLOCK_SIZE;
- check_for_new_dataset = TRUE;
+ check_for_new_dataset = true;
misc13_verify_file(MISC13_FILE_2, data, userblock_size, check_for_new_dataset);
/* Free the dataset buffer */
@@ -2925,13 +2925,13 @@ test_misc16(void)
/* Compare data read in */
for (i = 0; i < MISC16_SPACE_DIM; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf(
"Line %u: VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",
- (unsigned)__LINE__, (int)i, (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (unsigned)__LINE__, (int)i, (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("Line %u: VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",
(unsigned)__LINE__, (int)i, wdata[i], (int)i, rdata[i]);
continue;
@@ -3013,13 +3013,13 @@ test_misc17(void)
/* Compare data in the way of strings. */
for (i = 0; i < MISC17_SPACE_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf(
"Line %u: VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",
- (unsigned)__LINE__, (int)i, (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (unsigned)__LINE__, (int)i, (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("Line %u: VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",
(unsigned)__LINE__, (int)i, wdata[i], (int)i, rdata[i]);
continue;
@@ -3133,7 +3133,7 @@ test_misc18(void)
/* Loop creating attributes on each dataset, flushing them to the file each time */
for (u = 0; u < 10; u++) {
/* Set up attribute name */
- HDsnprintf(attr_name, sizeof(attr_name), "Attr %u", u);
+ snprintf(attr_name, sizeof(attr_name), "Attr %u", u);
/* Create & close attribute on first dataset */
aid = H5Acreate2(did1, attr_name, H5T_STD_U32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
@@ -3777,7 +3777,7 @@ test_misc20(void)
unsigned version; /* Version of storage layout info */
hsize_t contig_size; /* Size of contiguous storage size from layout into */
const char *testfile = H5_get_srcdir_filename(MISC20_FILE_OLD); /* Corrected test file name */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -4255,7 +4255,7 @@ test_misc23(void)
CHECK(create_id, FAIL, "H5Pcreate");
/* Set flag for intermediate group creation */
- status = H5Pset_create_intermediate_group(create_id, TRUE);
+ status = H5Pset_create_intermediate_group(create_id, true);
CHECK(status, FAIL, "H5Pset_create_intermediate_group");
tmp_id = H5Gcreate2(file_id, "/A/B01/grp", create_id, H5P_DEFAULT, access_id);
@@ -4316,7 +4316,7 @@ test_misc23(void)
CHECK(create_id, FAIL, "H5Pcreate");
/* Set flag for intermediate group creation */
- status = H5Pset_create_intermediate_group(create_id, TRUE);
+ status = H5Pset_create_intermediate_group(create_id, true);
CHECK(status, FAIL, "H5Pset_create_intermediate_group");
tmp_id = H5Dcreate2(file_id, "/A/B06/dset", type_id, space_id, create_id, H5P_DEFAULT, H5P_DEFAULT);
@@ -4367,7 +4367,7 @@ test_misc23(void)
CHECK(create_id, FAIL, "H5Pcreate");
/* Set flag for intermediate group creation */
- status = H5Pset_create_intermediate_group(create_id, TRUE);
+ status = H5Pset_create_intermediate_group(create_id, true);
CHECK(status, FAIL, "H5Pset_create_intermediate_group");
tmp_id = H5Tcopy(H5T_NATIVE_INT16);
@@ -4427,17 +4427,17 @@ test_misc23(void)
CHECK(create_id, FAIL, "H5Pcreate");
/* Set flag for intermediate group creation */
- status = H5Pset_create_intermediate_group(create_id, TRUE);
+ status = H5Pset_create_intermediate_group(create_id, true);
CHECK(status, FAIL, "H5Pset_create_intermediate_group");
status = H5Lcopy(file_id, "/A/B01/grp", file_id, "/A/B16/grp", create_id, access_id);
CHECK(status, FAIL, "H5Lcopy");
tri_status = H5Lexists(file_id, "/A/B16/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
tri_status = H5Lexists(file_id, "/A/B01/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
/**********************************************************************
* test H5Lmove()
@@ -4447,10 +4447,10 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lmove");
tri_status = H5Lexists(file_id, "/A/B17/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
tri_status = H5Lexists(file_id, "/A/B16/grp", access_id);
- VERIFY(tri_status, FALSE, "H5Lexists");
+ VERIFY(tri_status, false, "H5Lexists");
/**********************************************************************
* test H5Lcreate_hard()
@@ -4460,7 +4460,7 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lcreate_hard");
tri_status = H5Lexists(file_id, "/A/B18/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
/**********************************************************************
* test H5Lcreate_soft()
@@ -4470,7 +4470,7 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lcreate_soft");
tri_status = H5Lexists(file_id, "/A/B19/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
/**********************************************************************
* test H5Lcreate_external()
@@ -4482,7 +4482,7 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lcreate_external");
tri_status = H5Lexists(file_id, "/A/B20/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
}
/**********************************************************************
@@ -4495,7 +4495,7 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lcreate_ud");
tri_status = H5Lexists(file_id, "/A/B21/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
}
/**********************************************************************
@@ -5084,7 +5084,7 @@ test_misc25b(void)
hid_t fid; /* File ID */
hid_t gid; /* Group ID */
const char *testfile = H5_get_srcdir_filename(MISC25B_FILE); /* Corrected test file name */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -5347,7 +5347,7 @@ test_misc27(void)
hid_t fid; /* File ID */
hid_t gid; /* Group ID */
const char *testfile = H5_get_srcdir_filename(MISC27_FILE); /* Corrected test file name */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -5574,7 +5574,7 @@ test_misc28(void)
static void
test_misc29(void)
{
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
hid_t fid; /* File ID */
herr_t ret; /* Generic return value */
@@ -5641,7 +5641,7 @@ test_misc30(void)
/* Output message about test being performed */
MESSAGE(5, ("Local heap dropping free block info\n"));
- for (get_info = FALSE; get_info <= TRUE; get_info++) {
+ for (get_info = false; get_info <= true; get_info++) {
hid_t fid; /* File ID */
hid_t gid; /* Group ID */
int i; /* Local index counter */
@@ -5668,7 +5668,7 @@ test_misc30(void)
CHECK(ret, FAIL, "test_misc30_get_info");
}
- HDsnprintf(gname, sizeof(gname), "/g0/group%d", i);
+ snprintf(gname, sizeof(gname), "/g0/group%d", i);
gid = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(gid, FAIL, "H5Gcreate2");
@@ -5824,15 +5824,15 @@ test_misc32(void)
/* Size zero returns NULL.
* Also checks that a size of zero and setting the buffer clear flag
- * to TRUE can be used together.
+ * to true can be used together.
*
* Note that we have asserts in the code, so only check when NDEBUG
* is defined.
*/
#ifdef NDEBUG
- buffer = H5allocate_memory(0, FALSE);
+ buffer = H5allocate_memory(0, false);
CHECK_PTR_NULL(buffer, "H5allocate_memory"); /*BAD*/
- buffer = H5allocate_memory(0, TRUE);
+ buffer = H5allocate_memory(0, true);
CHECK_PTR_NULL(buffer, "H5allocate_memory"); /*BAD*/
#endif /* NDEBUG */
@@ -5840,7 +5840,7 @@ test_misc32(void)
/* Size zero returns NULL. Valgrind will confirm buffer is freed. */
size = 1024;
- buffer = H5allocate_memory(size, TRUE);
+ buffer = H5allocate_memory(size, true);
resized = H5resize_memory(buffer, 0);
CHECK_PTR_NULL(resized, "H5resize_memory");
@@ -5874,7 +5874,7 @@ test_misc33(void)
hid_t fid = -1; /* File ID */
const char *testfile = H5_get_srcdir_filename(MISC33_FILE); /* Corrected test file name */
H5O_info2_t oinfo; /* Structure for object metadata information */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -6057,15 +6057,15 @@ static int test_misc36_context;
static void
test_misc36_cb1(void *_ctx)
{
- int *ctx = (int *)_ctx; /* Set up context pointer */
- hbool_t is_terminating; /* Flag indicating the library is terminating */
- herr_t ret; /* Return value */
+ int *ctx = (int *)_ctx; /* Set up context pointer */
+ bool is_terminating; /* Flag indicating the library is terminating */
+ herr_t ret; /* Return value */
/* Check whether the library thinks it's terminating */
- is_terminating = FALSE;
+ is_terminating = false;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, TRUE, "H5is_library_terminating");
+ VERIFY(is_terminating, true, "H5is_library_terminating");
/* Verify correct ordering for 'atclose' callbacks */
if (0 != *ctx)
@@ -6078,15 +6078,15 @@ test_misc36_cb1(void *_ctx)
static void
test_misc36_cb2(void *_ctx)
{
- int *ctx = (int *)_ctx; /* Set up context pointer */
- hbool_t is_terminating; /* Flag indicating the library is terminating */
- herr_t ret; /* Return value */
+ int *ctx = (int *)_ctx; /* Set up context pointer */
+ bool is_terminating; /* Flag indicating the library is terminating */
+ herr_t ret; /* Return value */
/* Check whether the library thinks it's terminating */
- is_terminating = FALSE;
+ is_terminating = false;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, TRUE, "H5is_library_terminating");
+ VERIFY(is_terminating, true, "H5is_library_terminating");
/* Verify correct ordering for 'atclose' callbacks */
if (1 != *ctx)
@@ -6104,27 +6104,27 @@ test_misc36_cb2(void *_ctx)
static void
test_misc36(void)
{
- hbool_t is_terminating; /* Flag indicating the library is terminating */
- herr_t ret; /* Return value */
+ bool is_terminating; /* Flag indicating the library is terminating */
+ herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("H5atclose and H5is_library_terminating API calls"));
/* Check whether the library thinks it's terminating */
- is_terminating = TRUE;
+ is_terminating = true;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, FALSE, "H5is_library_terminating");
+ VERIFY(is_terminating, false, "H5is_library_terminating");
/* Shut the library down */
test_misc36_context = 0;
H5close();
/* Check whether the library thinks it's terminating */
- is_terminating = TRUE;
+ is_terminating = true;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, FALSE, "H5is_library_terminating");
+ VERIFY(is_terminating, false, "H5is_library_terminating");
/* Check the close context was not changed */
VERIFY(test_misc36_context, 0, "H5atclose");
@@ -6133,10 +6133,10 @@ test_misc36(void)
H5open();
/* Check whether the library thinks it's terminating */
- is_terminating = TRUE;
+ is_terminating = true;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, FALSE, "H5is_library_terminating");
+ VERIFY(is_terminating, false, "H5is_library_terminating");
/* Register the 'atclose' callbacks */
/* (Note that these will be called in reverse order, which is checked) */
@@ -6176,7 +6176,7 @@ static void
test_misc37(void)
{
const char *testfile = H5_get_srcdir_filename(CVE_2020_10812_FILENAME);
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
hid_t fid;
herr_t ret;
@@ -6214,7 +6214,7 @@ test_misc37(void)
void
test_misc(void)
{
- hbool_t default_driver = h5_using_default_driver(NULL);
+ bool default_driver = h5_using_default_driver(NULL);
/* Output message about test being performed */
MESSAGE(5, ("Testing Miscellaneous Routines\n"));
diff --git a/test/API/trefer.c b/test/API/trefer.c
index 6e194d2..e8abe16 100644
--- a/test/API/trefer.c
+++ b/test/API/trefer.c
@@ -1307,7 +1307,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
H5E_END_TRY
if (dset1 < 0) {
- VERIFY(libver_high <= H5F_LIBVER_V110, TRUE, "H5Dcreate2");
+ VERIFY(libver_high <= H5F_LIBVER_V110, true, "H5Dcreate2");
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
@@ -1605,7 +1605,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(hssize_ret, (hssize_t)H5S_UNLIMITED, "H5Sget_select_npoints");
tri_ret = H5Sis_regular_hyperslab(sid2);
CHECK(tri_ret, FAIL, "H5Sis_regular_hyperslab");
- VERIFY(tri_ret, TRUE, "H5Sis_regular_hyperslab Result");
+ VERIFY(tri_ret, true, "H5Sis_regular_hyperslab Result");
ret = H5Sget_regular_hyperslab(sid2, start, stride, count, block);
CHECK(ret, FAIL, "H5Sget_regular_hyperslab");
VERIFY(start[0], (hsize_t)1, "Hyperslab Coordinates");
@@ -1764,7 +1764,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
if (dset1 < 0) {
- VERIFY(libver_high <= H5F_LIBVER_V110, TRUE, "H5Dcreate2");
+ VERIFY(libver_high <= H5F_LIBVER_V110, true, "H5Dcreate2");
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
@@ -2126,19 +2126,19 @@ test_deref_iter_op(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2
/* Simple check for correct names */
if (*count == 0) {
- if (HDstrcmp(name, DSETNAME2) == 0)
+ if (strcmp(name, DSETNAME2) == 0)
ret_value = 0;
else
ret_value = -1;
} /* end if */
else if (*count == 1) {
- if (HDstrcmp(name, GROUPNAME2) == 0)
+ if (strcmp(name, GROUPNAME2) == 0)
ret_value = 0;
else
ret_value = -1;
} /* end if */
else if (*count == 2) {
- if (HDstrcmp(name, GROUPNAME3) == 0)
+ if (strcmp(name, GROUPNAME3) == 0)
ret_value = 0;
else
ret_value = -1;
@@ -3571,7 +3571,7 @@ test_reference(void)
MESSAGE(5, ("Testing References\n"));
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -3595,7 +3595,7 @@ test_reference(void)
} /* end low bound */
/* The following test is currently broken with the Direct VFD */
- if (HDstrcmp(env_h5_drvr, "direct") != 0) {
+ if (strcmp(env_h5_drvr, "direct") != 0) {
test_reference_obj_deleted(); /* Test H5R object reference code for deleted objects */
}
diff --git a/test/API/tselect.c b/test/API/tselect.c
index b0a3626..9d398be 100644
--- a/test/API/tselect.c
+++ b/test/API/tselect.c
@@ -1884,13 +1884,13 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t cube_si
uint16_t expected_value; /* Expected value in dataset */
unsigned i, j, k, l, m; /* Local index variables */
size_t s; /* Local index variable */
- hbool_t mis_match; /* Flag to indicate mismatch in expected value */
+ bool mis_match; /* Flag to indicate mismatch in expected value */
assert(cube_buf);
assert(cube_size > 0);
expected_value = 0;
- mis_match = FALSE;
+ mis_match = false;
cube_ptr = cube_buf;
s = 0;
i = 0;
@@ -1908,7 +1908,7 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t cube_si
/* Check for correct value */
if (*cube_ptr != expected_value)
- mis_match = TRUE;
+ mis_match = true;
/* Advance to next element */
cube_ptr++;
@@ -1944,7 +1944,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
unsigned edge_size, unsigned chunk_edge_size, unsigned small_rank,
unsigned large_rank, hid_t dset_type, hid_t xfer_plist)
{
- hbool_t mis_match; /* Flag indicating a value read in wasn't what was expected */
+ bool mis_match; /* Flag indicating a value read in wasn't what was expected */
hid_t fapl; /* File access property list */
hid_t fid1; /* File ID */
hid_t small_cube_sid; /* Dataspace ID for small cube in memory & file */
@@ -2015,7 +2015,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
CHECK(fapl, FAIL, "H5Pcreate");
/* Use the 'core' VFD for this test */
- ret = H5Pset_fapl_core(fapl, (size_t)(1024 * 1024), FALSE);
+ ret = H5Pset_fapl_core(fapl, (size_t)(1024 * 1024), false);
CHECK(ret, FAIL, "H5Pset_fapl_core");
/* Create file */
@@ -2162,7 +2162,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
* selections as having the same shape.
*/
check = H5Sselect_shape_same(small_cube_sid, file_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Read selection from disk */
ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid, file_large_cube_sid,
@@ -2170,14 +2170,14 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
CHECK(ret, FAIL, "H5Dread");
/* verify that expected data is retrieved */
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = small_cube_buf_1;
expected_value = (uint16_t)((u * edge_size * edge_size * edge_size * edge_size) +
(v * edge_size * edge_size * edge_size) +
(w * edge_size * edge_size) + (x * edge_size));
for (s = 0; s < small_cube_size; s++) {
if (*ptr_1 != expected_value)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
expected_value++;
} /* end for */
@@ -2227,7 +2227,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
* selections as having the same shape.
*/
check = H5Sselect_shape_same(small_cube_sid, mem_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Read selection from disk */
ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid, small_cube_sid,
@@ -2245,23 +2245,23 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
assert(start_index < stop_index);
assert(stop_index <= large_cube_size);
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = large_cube_buf_1;
expected_value = 0;
for (s = 0; s < start_index; s++) {
if (*ptr_1 != 0)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
} /* end for */
for (; s <= stop_index; s++) {
if (*ptr_1 != expected_value)
- mis_match = TRUE;
+ mis_match = true;
expected_value++;
ptr_1++;
} /* end for */
for (; s < large_cube_size; s++) {
if (*ptr_1 != 0)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
} /* end for */
if (mis_match)
@@ -2326,7 +2326,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
* on disk full small cube selections as having the same shape.
*/
check = H5Sselect_shape_same(small_cube_sid, mem_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* write the slice from the in memory large cube to the on disk small cube */
ret = H5Dwrite(small_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid, small_cube_sid,
@@ -2339,14 +2339,14 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
CHECK(ret, FAIL, "H5Dread");
/* verify that expected data is retrieved */
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = small_cube_buf_1;
expected_value = (uint16_t)((u * edge_size * edge_size * edge_size * edge_size) +
(v * edge_size * edge_size * edge_size) +
(w * edge_size * edge_size) + (x * edge_size));
for (s = 0; s < small_cube_size; s++) {
if (*ptr_1 != expected_value)
- mis_match = TRUE;
+ mis_match = true;
expected_value++;
ptr_1++;
} /* end for */
@@ -2413,7 +2413,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
* as having the same shape.
*/
check = H5Sselect_shape_same(small_cube_sid, file_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* write the cube from memory to the target slice of the disk cube */
ret = H5Dwrite(large_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid, file_large_cube_sid,
@@ -2439,23 +2439,23 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
assert(start_index < stop_index);
assert(stop_index <= large_cube_size);
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = large_cube_buf_1;
expected_value = 0;
for (s = 0; s < start_index; s++) {
if (*ptr_1 != 0)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
} /* end for */
for (; s <= stop_index; s++) {
if (*ptr_1 != expected_value)
- mis_match = TRUE;
+ mis_match = true;
expected_value++;
ptr_1++;
} /* end for */
for (; s < large_cube_size; s++) {
if (*ptr_1 != 0)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
} /* end for */
if (mis_match)
@@ -2590,7 +2590,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u
unsigned edge_size, unsigned checker_edge_size,
unsigned sel_rank, const hsize_t sel_start[])
{
- hbool_t first_selection = TRUE;
+ bool first_selection = true;
unsigned n_cube_offset;
unsigned sel_offset;
hsize_t base_count;
@@ -2725,7 +2725,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u
if (((i + j + k + l + m) % 2) == 0) {
if (first_selection) {
- first_selection = FALSE;
+ first_selection = false;
ret = H5Sselect_hyperslab(tgt_n_cube_sid, H5S_SELECT_SET,
&(start[n_cube_offset]), &(stride[n_cube_offset]),
@@ -2775,7 +2775,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u
** test_select_hyper_checker_board_dr__verify_data():
**
** Examine the supplied buffer to see if it contains the
-** expected data. Return TRUE if it does, and FALSE
+** expected data. Return true if it does, and false
** otherwise.
**
** The supplied buffer is presumed to contain the results
@@ -2813,14 +2813,14 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u
**
****************************************************************/
#if 0
-H5_ATTR_PURE static hbool_t
+H5_ATTR_PURE static bool
test_select_hyper_checker_board_dr__verify_data(uint16_t *buf_ptr, unsigned rank, unsigned edge_size,
unsigned checker_edge_size, uint16_t first_expected_val,
- hbool_t buf_starts_in_checker)
+ bool buf_starts_in_checker)
{
- hbool_t good_data = TRUE;
- hbool_t in_checker;
- hbool_t start_in_checker[5];
+ bool good_data = true;
+ bool in_checker;
+ bool start_in_checker[5];
uint16_t expected_value;
uint16_t *val_ptr;
unsigned i, j, k, l, m; /* to track position in n-cube */
@@ -2885,11 +2885,11 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t *buf_ptr, unsigned rank
if (in_checker) {
if (*val_ptr != expected_value)
- good_data = FALSE;
+ good_data = false;
} /* end if */
else {
if (*val_ptr != 0)
- good_data = FALSE;
+ good_data = false;
} /* end else */
val_ptr++;
@@ -2931,7 +2931,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
unsigned chunk_edge_size, unsigned small_rank,
unsigned large_rank, hid_t dset_type, hid_t xfer_plist)
{
- hbool_t data_ok;
+ bool data_ok;
hid_t fapl; /* File access property list */
hid_t fid; /* HDF5 File IDs */
hid_t full_small_cube_sid; /* Dataspace for small cube w/all selection */
@@ -3006,7 +3006,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
CHECK(fapl, FAIL, "H5Pcreate");
/* Use the 'core' VFD for this test */
- ret = H5Pset_fapl_core(fapl, (size_t)(1024 * 1024), FALSE);
+ ret = H5Pset_fapl_core(fapl, (size_t)(1024 * 1024), false);
CHECK(ret, FAIL, "H5Pset_fapl_core");
/* Create file */
@@ -3173,7 +3173,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(mem_small_cube_sid, file_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* zero the buffer that we will be using for reading */
memset(small_cube_buf_1, 0, sizeof(*small_cube_buf_1) * small_cube_size);
@@ -3189,7 +3189,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
data_ok = test_select_hyper_checker_board_dr__verify_data(small_cube_buf_1, small_rank,
edge_size, checker_edge_size,
- expected_value, (hbool_t)TRUE);
+ expected_value, (bool)true);
if (!data_ok)
TestErrPrintf("small cube read from largecube has bad data! Line=%d\n", __LINE__);
@@ -3253,7 +3253,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(file_small_cube_sid, mem_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* zero out the in memory large cube */
memset(large_cube_buf_1, 0, sizeof(*large_cube_buf_1) * large_cube_size);
@@ -3266,7 +3266,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the expected data and only the
* expected data was read.
*/
- data_ok = TRUE;
+ data_ok = true;
ptr_1 = large_cube_buf_1;
expected_value = 0;
start_index = (u * edge_size * edge_size * edge_size * edge_size) +
@@ -3280,13 +3280,13 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the large cube contains only zeros before the slice */
for (s = 0; s < start_index; s++) {
if (*ptr_1 != 0)
- data_ok = FALSE;
+ data_ok = false;
ptr_1++;
} /* end for */
assert(s == start_index);
data_ok &= test_select_hyper_checker_board_dr__verify_data(
- ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (hbool_t)TRUE);
+ ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (bool)true);
ptr_1 += small_cube_size;
s += small_cube_size;
@@ -3296,7 +3296,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the large cube contains only zeros after the slice */
for (s = stop_index + 1; s < large_cube_size; s++) {
if (*ptr_1 != 0)
- data_ok = FALSE;
+ data_ok = false;
ptr_1++;
} /* end for */
if (!data_ok)
@@ -3373,7 +3373,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(file_small_cube_sid, mem_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* write the slice from the in memory large cube to the
* on disk small cube
@@ -3396,7 +3396,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
data_ok = test_select_hyper_checker_board_dr__verify_data(small_cube_buf_1, small_rank,
edge_size, checker_edge_size,
- expected_value, (hbool_t)TRUE);
+ expected_value, (bool)true);
if (!data_ok)
TestErrPrintf("small cube read from largecube has bad data! Line=%d\n", __LINE__);
@@ -3468,7 +3468,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(file_large_cube_sid, mem_small_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* write the checker board selection of the in memory
* small cube to a slice through the on disk large
@@ -3490,7 +3490,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* expected data was written to the on disk large
* cube.
*/
- data_ok = TRUE;
+ data_ok = true;
ptr_1 = large_cube_buf_1;
expected_value = 0;
start_index = (u * edge_size * edge_size * edge_size * edge_size) +
@@ -3504,14 +3504,14 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the large cube contains only zeros before the slice */
for (s = 0; s < start_index; s++) {
if (*ptr_1 != 0)
- data_ok = FALSE;
+ data_ok = false;
ptr_1++;
} /* end for */
assert(s == start_index);
/* verify that the slice contains the expected data */
data_ok &= test_select_hyper_checker_board_dr__verify_data(
- ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (hbool_t)TRUE);
+ ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (bool)true);
ptr_1 += small_cube_size;
s += small_cube_size;
@@ -3521,7 +3521,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the large cube contains only zeros after the slice */
for (s = stop_index + 1; s < large_cube_size; s++) {
if (*ptr_1 != 0)
- data_ok = FALSE;
+ data_ok = false;
ptr_1++;
} /* end for */
if (!data_ok)
@@ -4126,7 +4126,7 @@ test_select_hyper_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Check an invalid offset */
offset[0] = 10;
@@ -4135,7 +4135,7 @@ test_select_hyper_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
/* Reset offset */
offset[0] = 0;
@@ -4144,7 +4144,7 @@ test_select_hyper_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Select 15x26 hyperslab for memory dataset */
start[0] = 15;
@@ -4164,7 +4164,7 @@ test_select_hyper_offset(void)
ret = H5Soffset_simple(sid2, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid2);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Create a dataset */
dataset = H5Dcreate2(fid1, SPACE1_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -4295,7 +4295,7 @@ test_select_hyper_offset2(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Select 4x10 hyperslab for memory dataset */
start[0] = 1;
@@ -4311,7 +4311,7 @@ test_select_hyper_offset2(void)
ret = H5Soffset_simple(sid2, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid2);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Create a dataset */
dataset = H5Dcreate2(fid1, SPACE7_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -4452,7 +4452,7 @@ test_select_point_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Check an invalid offset */
offset[0] = 10;
@@ -4461,7 +4461,7 @@ test_select_point_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
/* Reset offset */
offset[0] = 0;
@@ -4470,7 +4470,7 @@ test_select_point_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Select sequence of ten points for write dataset */
coord2[0][0] = 12;
@@ -4502,7 +4502,7 @@ test_select_point_offset(void)
ret = H5Soffset_simple(sid2, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid2);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Create a dataset */
dataset = H5Dcreate2(fid1, SPACE1_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -6985,13 +6985,13 @@ test_select_valid(void)
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
error = H5Sselect_hyperslab(sub_space, H5S_SELECT_OR, safe_start, NULL, safe_count, NULL);
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
error = H5Sclose(sub_space);
CHECK(error, FAIL, "H5Sclose");
@@ -7008,13 +7008,13 @@ test_select_valid(void)
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
error = H5Sselect_hyperslab(sub_space, H5S_SELECT_OR, safe_start, NULL, safe_count, NULL);
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
error = H5Sclose(sub_space);
CHECK(error, FAIL, "H5Sclose");
@@ -7031,13 +7031,13 @@ test_select_valid(void)
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
error = H5Sselect_hyperslab(sub_space, H5S_SELECT_OR, safe_start, NULL, safe_count, NULL);
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
error = H5Sclose(sub_space);
CHECK(error, FAIL, "H5Sclose");
@@ -8640,289 +8640,289 @@ test_shape_same(void)
/* Compare "all" selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(all_sid, all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(all_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "none" selection */
check = H5Sselect_shape_same(all_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(all_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(all_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(all_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(all_sid, single_hyper_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(all_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(all_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(all_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(all_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(all_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(all_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare "none" selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(none_sid, none_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(none_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(none_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(none_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(none_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(none_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(none_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(none_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(none_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(none_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(none_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(none_sid, none_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(none_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(none_sid, scalar_none_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare single point selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(single_pt_sid, single_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_pt_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(single_pt_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(single_pt_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(single_pt_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(single_pt_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, single_hyper_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, scalar_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare multiple point selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(mult_pt_sid, mult_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(mult_pt_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(mult_pt_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(mult_pt_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(mult_pt_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(mult_pt_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare single "normal" hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(single_hyper_sid, single_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_hyper_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(single_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(single_hyper_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(single_hyper_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(single_hyper_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(single_hyper_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
#ifdef NOT_YET
/* In theory, these two selections are the same shape, but the
@@ -8949,7 +8949,7 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -8980,69 +8980,69 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare single "all" hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(single_hyper_all_sid, single_hyper_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_hyper_all_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(single_hyper_all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(single_hyper_all_sid, all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(single_hyper_all_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(single_hyper_all_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(single_hyper_all_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
#ifdef NOT_YET
/* In theory, these two selections are the same shape, but the
@@ -9068,7 +9068,7 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -9099,128 +9099,128 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare single "point" hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(single_hyper_pt_sid, single_hyper_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_hyper_pt_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(single_hyper_pt_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, single_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, scalar_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare regular, strided hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(regular_hyper_sid, regular_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(regular_hyper_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(regular_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(regular_hyper_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(regular_hyper_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(regular_hyper_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(regular_hyper_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Construct point selection which matches regular, strided hyperslab selection */
/* Create dataspace for point selection */
@@ -9239,7 +9239,7 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -9269,7 +9269,7 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -9294,69 +9294,69 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare irregular hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(irreg_hyper_sid, irreg_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(irreg_hyper_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(irreg_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(irreg_hyper_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(irreg_hyper_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(irreg_hyper_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(irreg_hyper_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Construct hyperslab selection which matches irregular hyperslab selection */
/* Create dataspace for hyperslab selection */
@@ -9390,138 +9390,138 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare scalar "all" dataspace with all selections created */
/* Compare against itself */
check = H5Sselect_shape_same(scalar_all_sid, scalar_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(scalar_all_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(scalar_all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(scalar_all_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(scalar_all_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(scalar_all_sid, single_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(scalar_all_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, single_hyper_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare scalar "none" dataspace with all selections created */
/* Compare against itself */
check = H5Sselect_shape_same(scalar_none_sid, scalar_none_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(scalar_none_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(scalar_none_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(scalar_none_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(scalar_none_sid, none_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(scalar_none_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(scalar_none_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, none_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(all_sid);
@@ -9563,16 +9563,16 @@ test_shape_same(void)
** xz plane, and three parallel to the yz plane.
**
** Assuming that z is the fastest changing dimension,
-** H5Sselect_shape_same() should return TRUE when comparing
+** H5Sselect_shape_same() should return true when comparing
** the full 2-D space against any hyperslab parallel to the
-** yz plane in the 3-D space, and FALSE when comparing the
+** yz plane in the 3-D space, and false when comparing the
** full 2-D space against the other two hyperslabs.
**
** Also create two additional 3-D dataspaces (10 X 10 X 10),
** and select a (10 X 10 X 2) hyperslab parallel to the yz
** axis in one of them, and two parallel (10 X 10 X 1) hyper
** slabs parallel to the yz axis in the other.
-** H5Sselect_shape_same() should return FALSE when comparing
+** H5Sselect_shape_same() should return false when comparing
** each to the 2-D selection.
**
****************************************************************/
@@ -9747,39 +9747,39 @@ test_shape_same_dr__smoke_check_1(void)
/* Compare against "xy" selection */
check = H5Sselect_shape_same(small_cube_xy_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "xz" selection */
check = H5Sselect_shape_same(small_cube_xz_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "yz" selection */
check = H5Sselect_shape_same(small_cube_yz_slice_0_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_1_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_2_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_3_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_4_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(small_square_sid);
@@ -9848,17 +9848,17 @@ test_shape_same_dr__smoke_check_1(void)
** to the yz plane.
**
** Assuming that z is the fastest changing dimension,
-** H5Sselect_shape_same() should return TRUE when comparing
+** H5Sselect_shape_same() should return true when comparing
** the 2-D space checker board selection against a checker
** board hyperslab parallel to the yz plane in the 3-D
-** space, and FALSE when comparing the 2-D checkerboard
+** space, and false when comparing the 2-D checkerboard
** selection against two hyperslabs parallel to the xy
** or xz planes.
**
** Also create an additional 3-D dataspaces (10 X 10 X 10),
** and select a checker board parallel with the yz axis,
** save with some squares being on different planes.
-** H5Sselect_shape_same() should return FALSE when
+** H5Sselect_shape_same() should return false when
** comparing this selection to the 2-D selection.
**
****************************************************************/
@@ -10124,36 +10124,36 @@ test_shape_same_dr__smoke_check_2(void)
/* Compare against "xy" selection */
check = H5Sselect_shape_same(small_cube_xy_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "xz" selection */
check = H5Sselect_shape_same(small_cube_xz_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "yz" selection */
check = H5Sselect_shape_same(small_cube_yz_slice_0_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_1_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_2_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_3_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(small_square_sid);
@@ -10222,10 +10222,10 @@ test_shape_same_dr__smoke_check_2(void)
** cases.
**
** Assuming that z is the fastest changing dimension,
-** H5Sselect_shape_same() should return TRUE when
+** H5Sselect_shape_same() should return true when
** comparing the 2-D irregular hyperslab selection
** against the irregular hyperslab selections parallel
-** to the yz plane in the 3-D space, and FALSE when
+** to the yz plane in the 3-D space, and false when
** comparing it against the irregular hyperslabs
** selections parallel to the xy or xz planes.
**
@@ -10605,33 +10605,33 @@ test_shape_same_dr__smoke_check_3(void)
/* Compare against "xy" selection */
check = H5Sselect_shape_same(small_cube_xy_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "xz" selection */
check = H5Sselect_shape_same(small_cube_xz_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "yz" selection */
check = H5Sselect_shape_same(small_cube_yz_slice_0_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_1_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_2_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(small_square_sid);
@@ -10691,8 +10691,8 @@ test_shape_same_dr__smoke_check_3(void)
**
** Compare the 2-D space against all the other spaces
** with H5Sselect_shape_same(). The (1 X 10 X 10) &
-** (1 X 1 X 10 X 10) should return TRUE. All others
-** should return FALSE.
+** (1 X 1 X 10 X 10) should return true. All others
+** should return false.
**
****************************************************************/
static void
@@ -10807,37 +10807,37 @@ test_shape_same_dr__smoke_check_4(void)
/* setup is done -- run the tests: */
check = H5Sselect_shape_same(three_d_space_0_sid, square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(three_d_space_1_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(three_d_space_2_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(three_d_space_3_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_0_sid, square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_1_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_2_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_3_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_4_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_5_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_6_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(square_sid);
@@ -10884,7 +10884,7 @@ test_shape_same_dr__smoke_check_4(void)
** of an m-cube (m > n) in a call to H5Sselect_shape_same().
** Note that this test does not require the n-cube and the
** n-dimensional slice to have the same rank (although
-** H5Sselect_shape_same() should always return FALSE if
+** H5Sselect_shape_same() should always return false if
** they don't).
**
** Per Quincey's suggestion, only test up to 5 dimensional
@@ -10893,7 +10893,7 @@ test_shape_same_dr__smoke_check_4(void)
****************************************************************/
static void
test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_rank, int offset,
- hsize_t edge_size, hbool_t dim_selected[], hbool_t expected_result)
+ hsize_t edge_size, bool dim_selected[], bool expected_result)
{
char test_desc_0[128];
char test_desc_1[256];
@@ -10920,15 +10920,13 @@ test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_
assert(edge_size > 0);
assert(edge_size <= 1000);
- HDsnprintf(test_desc_0, sizeof(test_desc_0), "\tn-cube slice through m-cube (n <= m) test %d.\n",
- test_num);
+ snprintf(test_desc_0, sizeof(test_desc_0), "\tn-cube slice through m-cube (n <= m) test %d.\n", test_num);
MESSAGE(7, ("%s", test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- HDsnprintf(test_desc_1, sizeof(test_desc_1),
- "\t\tranks: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d.\n", small_rank, large_rank, offset,
- (int)dim_selected[0], (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3],
- (int)dim_selected[4]);
+ snprintf(test_desc_1, sizeof(test_desc_1), "\t\tranks: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d.\n",
+ small_rank, large_rank, offset, (int)dim_selected[0], (int)dim_selected[1], (int)dim_selected[2],
+ (int)dim_selected[3], (int)dim_selected[4]);
MESSAGE(7, ("%s", test_desc_1));
/* copy the edge size into the dims array */
@@ -11022,8 +11020,8 @@ test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_
static void
test_shape_same_dr__run_full_space_vs_slice_tests(void)
{
- hbool_t dim_selected[5];
- hbool_t expected_result;
+ bool dim_selected[5];
+ bool expected_result;
int i, j;
int v, w, x, y, z;
int test_num = 0;
@@ -11036,52 +11034,52 @@ test_shape_same_dr__run_full_space_vs_slice_tests(void)
v = 0;
do {
if (v == 0)
- dim_selected[0] = FALSE;
+ dim_selected[0] = false;
else
- dim_selected[0] = TRUE;
+ dim_selected[0] = true;
w = 0;
do {
if (w == 0)
- dim_selected[1] = FALSE;
+ dim_selected[1] = false;
else
- dim_selected[1] = TRUE;
+ dim_selected[1] = true;
x = 0;
do {
if (x == 0)
- dim_selected[2] = FALSE;
+ dim_selected[2] = false;
else
- dim_selected[2] = TRUE;
+ dim_selected[2] = true;
y = 0;
do {
if (y == 0)
- dim_selected[3] = FALSE;
+ dim_selected[3] = false;
else
- dim_selected[3] = TRUE;
+ dim_selected[3] = true;
z = 0;
do {
if (z == 0)
- dim_selected[4] = FALSE;
+ dim_selected[4] = false;
else
- dim_selected[4] = TRUE;
+ dim_selected[4] = true;
/* compute the expected result: */
i = 0;
j = 4;
- expected_result = TRUE;
+ expected_result = true;
while ((i < small_rank) && expected_result) {
if (!dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
}
while ((i < large_rank) && expected_result) {
if (dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
}
@@ -11127,7 +11125,7 @@ test_shape_same_dr__run_full_space_vs_slice_tests(void)
**
** Note that this test does not require the n-cube and the
** n-dimensional slice to have the same rank (although
-** H5Sselect_shape_same() should always return FALSE if
+** H5Sselect_shape_same() should always return false if
** they don't).
**
** Per Quincey's suggestion, only test up to 5 dimensional
@@ -11136,7 +11134,7 @@ test_shape_same_dr__run_full_space_vs_slice_tests(void)
****************************************************************/
static void
test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, int offset, hsize_t edge_size,
- hsize_t checker_size, hbool_t dim_selected[], hbool_t expected_result)
+ hsize_t checker_size, bool dim_selected[], bool expected_result)
{
char test_desc_0[128];
char test_desc_1[256];
@@ -11174,22 +11172,22 @@ test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, i
assert(offset < (int)edge_size);
for (i = SS_DR_MAX_RANK - large_rank; i < SS_DR_MAX_RANK; i++)
- if (dim_selected[i] == TRUE)
+ if (dim_selected[i] == true)
dims_selected++;
assert(dims_selected >= 0);
assert(dims_selected <= large_rank);
- HDsnprintf(test_desc_0, sizeof(test_desc_0),
- "\tcheckerboard n-cube slice through m-cube (n <= m) test %d.\n", test_num);
+ snprintf(test_desc_0, sizeof(test_desc_0),
+ "\tcheckerboard n-cube slice through m-cube (n <= m) test %d.\n", test_num);
MESSAGE(7, ("%s", test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- HDsnprintf(test_desc_1, sizeof(test_desc_1),
- "\tranks: %d/%d edge/chkr size: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d:%d.\n",
- small_rank, large_rank, (int)edge_size, (int)checker_size, offset, (int)dim_selected[0],
- (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4],
- dims_selected);
+ snprintf(test_desc_1, sizeof(test_desc_1),
+ "\tranks: %d/%d edge/chkr size: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d:%d.\n", small_rank,
+ large_rank, (int)edge_size, (int)checker_size, offset, (int)dim_selected[0],
+ (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4],
+ dims_selected);
MESSAGE(7, ("%s", test_desc_1));
/* copy the edge size into the dims array */
@@ -11461,65 +11459,65 @@ test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, i
static void
test_shape_same_dr__run_checkerboard_tests(void)
{
- hbool_t dim_selected[5];
- hbool_t expected_result;
- int i, j;
- int v, w, x, y, z;
- int test_num = 0;
- int small_rank;
- int large_rank;
+ bool dim_selected[5];
+ bool expected_result;
+ int i, j;
+ int v, w, x, y, z;
+ int test_num = 0;
+ int small_rank;
+ int large_rank;
for (large_rank = 1; large_rank <= 5; large_rank++) {
for (small_rank = 1; small_rank <= large_rank; small_rank++) {
v = 0;
do {
if (v == 0)
- dim_selected[0] = FALSE;
+ dim_selected[0] = false;
else
- dim_selected[0] = TRUE;
+ dim_selected[0] = true;
w = 0;
do {
if (w == 0)
- dim_selected[1] = FALSE;
+ dim_selected[1] = false;
else
- dim_selected[1] = TRUE;
+ dim_selected[1] = true;
x = 0;
do {
if (x == 0)
- dim_selected[2] = FALSE;
+ dim_selected[2] = false;
else
- dim_selected[2] = TRUE;
+ dim_selected[2] = true;
y = 0;
do {
if (y == 0)
- dim_selected[3] = FALSE;
+ dim_selected[3] = false;
else
- dim_selected[3] = TRUE;
+ dim_selected[3] = true;
z = 0;
do {
if (z == 0)
- dim_selected[4] = FALSE;
+ dim_selected[4] = false;
else
- dim_selected[4] = TRUE;
+ dim_selected[4] = true;
/* compute the expected result: */
i = 0;
j = 4;
- expected_result = TRUE;
+ expected_result = true;
while ((i < small_rank) && expected_result) {
if (!dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
} /* end while */
while ((i < large_rank) && expected_result) {
if (dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
} /* end while */
@@ -11639,13 +11637,13 @@ test_shape_same_dr__run_checkerboard_tests(void)
**
** Note that this test does not require the n-cube and the
** n-dimensional slice to have the same rank (although
-** H5Sselect_shape_same() should always return FALSE if
+** H5Sselect_shape_same() should always return false if
** they don't).
**
****************************************************************/
static void
test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int pattern_offset,
- int slice_offset, hbool_t dim_selected[], hbool_t expected_result)
+ int slice_offset, bool dim_selected[], bool expected_result)
{
char test_desc_0[128];
char test_desc_1[256];
@@ -11719,22 +11717,21 @@ test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int
assert(pattern_offset <= 2);
for (i = SS_DR_MAX_RANK - large_rank; i < SS_DR_MAX_RANK; i++)
- if (dim_selected[i] == TRUE)
+ if (dim_selected[i] == true)
dims_selected++;
assert(dims_selected >= 0);
assert(dims_selected <= large_rank);
- HDsnprintf(test_desc_0, sizeof(test_desc_0),
- "\tirregular sub set of n-cube slice through m-cube (n <= m) test %d.\n", test_num);
+ snprintf(test_desc_0, sizeof(test_desc_0),
+ "\tirregular sub set of n-cube slice through m-cube (n <= m) test %d.\n", test_num);
MESSAGE(7, ("%s", test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- HDsnprintf(test_desc_1, sizeof(test_desc_1),
- "\tranks: %d/%d edge: %d s/p offset: %d/%d dim_selected: %d/%d/%d/%d/%d:%d.\n", small_rank,
- large_rank, edge_size, slice_offset, pattern_offset, (int)dim_selected[0],
- (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4],
- dims_selected);
+ snprintf(test_desc_1, sizeof(test_desc_1),
+ "\tranks: %d/%d edge: %d s/p offset: %d/%d dim_selected: %d/%d/%d/%d/%d:%d.\n", small_rank,
+ large_rank, edge_size, slice_offset, pattern_offset, (int)dim_selected[0], (int)dim_selected[1],
+ (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4], dims_selected);
MESSAGE(7, ("%s", test_desc_1));
/* copy the edge size into the dims array */
@@ -11902,65 +11899,65 @@ test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int
static void
test_shape_same_dr__run_irregular_tests(void)
{
- hbool_t dim_selected[5];
- hbool_t expected_result;
- int i, j;
- int v, w, x, y, z;
- int test_num = 0;
- int small_rank;
- int large_rank;
+ bool dim_selected[5];
+ bool expected_result;
+ int i, j;
+ int v, w, x, y, z;
+ int test_num = 0;
+ int small_rank;
+ int large_rank;
for (large_rank = 1; large_rank <= 5; large_rank++) {
for (small_rank = 1; small_rank <= large_rank; small_rank++) {
v = 0;
do {
if (v == 0)
- dim_selected[0] = FALSE;
+ dim_selected[0] = false;
else
- dim_selected[0] = TRUE;
+ dim_selected[0] = true;
w = 0;
do {
if (w == 0)
- dim_selected[1] = FALSE;
+ dim_selected[1] = false;
else
- dim_selected[1] = TRUE;
+ dim_selected[1] = true;
x = 0;
do {
if (x == 0)
- dim_selected[2] = FALSE;
+ dim_selected[2] = false;
else
- dim_selected[2] = TRUE;
+ dim_selected[2] = true;
y = 0;
do {
if (y == 0)
- dim_selected[3] = FALSE;
+ dim_selected[3] = false;
else
- dim_selected[3] = TRUE;
+ dim_selected[3] = true;
z = 0;
do {
if (z == 0)
- dim_selected[4] = FALSE;
+ dim_selected[4] = false;
else
- dim_selected[4] = TRUE;
+ dim_selected[4] = true;
/* compute the expected result: */
i = 0;
j = 4;
- expected_result = TRUE;
+ expected_result = true;
while ((i < small_rank) && expected_result) {
if (!dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
} /* end while */
while ((i < large_rank) && expected_result) {
if (dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
} /* end while */
@@ -12155,9 +12152,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
}
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg1, sid_reg_ori1);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
#endif
/* For irregular hyperslab */
@@ -12243,9 +12240,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
} /* end if */
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg2, sid_reg_ori2);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
#endif
/* 2-D irregular case */
@@ -12341,9 +12338,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
}
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg3, sid_reg_ori3);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
#endif
@@ -12452,9 +12449,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
}
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg4, sid_reg_ori4);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
#endif
@@ -12579,9 +12576,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
}
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg5, sid_reg_ori5);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
#endif
@@ -12645,7 +12642,7 @@ test_space_rebuild(void)
#endif
/* We use 5-D to test a special case with
- rebuilding routine TRUE, FALSE and TRUE */
+ rebuilding routine true, false and true */
sid_spec = H5Screate_simple(SPACERE5_RANK, dims5, NULL);
/* Build up the original five dimensional regular selection */
@@ -14233,9 +14230,9 @@ test_hyper_regular(void)
ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* Query if 'hyperslab' selection is regular hyperslab (should be TRUE) */
+ /* Query if 'hyperslab' selection is regular hyperslab (should be true) */
is_regular = H5Sis_regular_hyperslab(sid);
- VERIFY(is_regular, TRUE, "H5Sis_regular_hyperslab");
+ VERIFY(is_regular, true, "H5Sis_regular_hyperslab");
/* Retrieve the hyperslab parameters */
ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block);
@@ -14263,9 +14260,9 @@ test_hyper_regular(void)
ret = H5Sselect_hyperslab(sid, H5S_SELECT_OR, t_start, NULL, t_count, NULL);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* Query if 'hyperslab' selection is regular hyperslab (should be FALSE) */
+ /* Query if 'hyperslab' selection is regular hyperslab (should be false) */
is_regular = H5Sis_regular_hyperslab(sid);
- VERIFY(is_regular, FALSE, "H5Sis_regular_hyperslab");
+ VERIFY(is_regular, false, "H5Sis_regular_hyperslab");
/* Query regular hyperslab selection info (should fail) */
H5E_BEGIN_TRY
@@ -14285,9 +14282,9 @@ test_hyper_regular(void)
ret = H5Sselect_hyperslab(sid, H5S_SELECT_XOR, t_start, NULL, t_count, NULL);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* Query if 'hyperslab' selection is regular hyperslab (should be TRUE) */
+ /* Query if 'hyperslab' selection is regular hyperslab (should be true) */
is_regular = H5Sis_regular_hyperslab(sid);
- VERIFY(is_regular, TRUE, "H5Sis_regular_hyperslab");
+ VERIFY(is_regular, true, "H5Sis_regular_hyperslab");
/* Retrieve the hyperslab parameters */
ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block);
@@ -14980,54 +14977,54 @@ test_internal_consistency(void)
CHECK(tmp_sid, FAIL, "H5Scopy");
#if 0
check = H5S__internal_consistency_test(tmp_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
#endif
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
#if 0
/* Test "none" selection */
check = H5S__internal_consistency_test(none_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test single point selection */
check = H5S__internal_consistency_test(single_pt_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test multiple point selection */
check = H5S__internal_consistency_test(mult_pt_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test "plain" single hyperslab selection */
check = H5S__internal_consistency_test(single_hyper_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test "all" single hyperslab selection */
check = H5S__internal_consistency_test(single_hyper_all_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test "single point" single hyperslab selection */
check = H5S__internal_consistency_test(single_hyper_pt_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test regular, strided hyperslab selection */
check = H5S__internal_consistency_test(regular_hyper_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test irregular hyperslab selection */
check = H5S__internal_consistency_test(irreg_hyper_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test "no" hyperslab selection */
check = H5S__internal_consistency_test(none_hyper_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test scalar "all" hyperslab selection */
check = H5S__internal_consistency_test(scalar_all_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test scalar "none" hyperslab selection */
check = H5S__internal_consistency_test(scalar_none_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
#endif
/* Close dataspaces */
@@ -15755,7 +15752,7 @@ test_select_intersect_block(void)
/* Test block intersection with 'none' selection (always false) */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* Set selection to 'all' */
ret = H5Sselect_all(sid);
@@ -15763,7 +15760,7 @@ test_select_intersect_block(void)
/* Test block intersection with 'all' selection (always true) */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
/* Select sequence of ten points */
coord[0][0] = 0;
@@ -15791,9 +15788,9 @@ test_select_intersect_block(void)
/* Test block intersection with 'point' selection */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
status = H5Sselect_intersect_block(sid, block_start, block_end4);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* Select single 4x6 hyperslab block at (2,1) */
start[0] = 2;
@@ -15809,9 +15806,9 @@ test_select_intersect_block(void)
/* Test block intersection with single 'hyperslab' selection */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
status = H5Sselect_intersect_block(sid, block_start, block_end4);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* 'OR' another hyperslab block in, making an irregular hyperslab selection */
start[0] = 3;
@@ -15827,9 +15824,9 @@ test_select_intersect_block(void)
/* Test block intersection with 'hyperslab' selection */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
status = H5Sselect_intersect_block(sid, block_start, block_end4);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* Select regular, strided hyperslab selection */
start[0] = 2;
@@ -15845,9 +15842,9 @@ test_select_intersect_block(void)
/* Test block intersection with single 'hyperslab' selection */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
status = H5Sselect_intersect_block(sid, block_start, block_end4);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* Close dataspace */
ret = H5Sclose(sid);
@@ -16062,7 +16059,7 @@ test_h5s_set_extent_none(void)
null_sid = H5Screate(H5S_NULL);
CHECK(null_sid, H5I_INVALID_HID, "H5Screate");
equal = H5Sextent_equal(sid, null_sid);
- VERIFY(equal, TRUE, "H5Sextent_equal");
+ VERIFY(equal, true, "H5Sextent_equal");
/* Close */
ret = H5Sclose(sid);
@@ -16096,7 +16093,7 @@ test_select(void)
MESSAGE(5, ("Testing Selections\n"));
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -16171,7 +16168,7 @@ test_select(void)
test_select_hyper_valid_combination(); /* Test different input combinations */
/* The following tests are currently broken with the Direct VFD */
- if (HDstrcmp(env_h5_drvr, "direct") != 0) {
+ if (strcmp(env_h5_drvr, "direct") != 0) {
test_select_hyper_and_2d(); /* Test hyperslab intersection (AND) code for 2-D dataset */
test_select_hyper_xor_2d(); /* Test hyperslab XOR code for 2-D dataset */
test_select_hyper_notb_2d(); /* Test hyperslab NOTB code for 2-D dataset */
diff --git a/test/API/tunicode.c b/test/API/tunicode.c
index 93e28e3..8b404f2 100644
--- a/test/API/tunicode.c
+++ b/test/API/tunicode.c
@@ -94,7 +94,7 @@ test_fl_string(hid_t fid, const char *string)
ret = H5Dread(dset_id, dtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf);
CHECK(ret, FAIL, "H5Dread");
- VERIFY(HDstrcmp(string, read_buf), 0, "strcmp");
+ VERIFY(strcmp(string, read_buf), 0, "strcmp");
/* Close all */
ret = H5Dclose(dset_id);
@@ -137,14 +137,14 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* the right number of bytes (even or odd, depending on the test).
* We create a 'new_string' whose length is convenient by prepending
* an 'x' to 'string' when necessary. */
- length = HDstrlen(string);
+ length = strlen(string);
if (length % 2 != 1) {
- HDstrcpy(new_string, "x");
- HDstrcat(new_string, string);
+ strcpy(new_string, "x");
+ strcat(new_string, string);
length++;
}
else {
- HDstrcpy(new_string, string);
+ strcpy(new_string, string);
}
/* Convert a null-terminated string to a shorter and longer null
@@ -163,8 +163,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Fill the buffer with two copies of the UTF-8 string, each with a
* terminating NULL. It will look like "abcdefg\0abcdefg\0". */
- HDstrncpy(buf, new_string, big_len);
- HDstrncpy(&buf[big_len], new_string, big_len);
+ strncpy(buf, new_string, big_len);
+ strncpy(&buf[big_len], new_string, big_len);
ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tconvert");
@@ -174,11 +174,11 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* like; UTF-8 characters may well have been truncated.
* To check that the conversion worked properly, we'll build this
* string manually. */
- HDstrncpy(cmpbuf, new_string, small_len - 1);
+ strncpy(cmpbuf, new_string, small_len - 1);
cmpbuf[small_len - 1] = '\0';
- HDstrncpy(&cmpbuf[small_len], new_string, small_len - 1);
+ strncpy(&cmpbuf[small_len], new_string, small_len - 1);
cmpbuf[2 * small_len - 1] = '\0';
- HDstrcpy(&cmpbuf[2 * small_len], new_string);
+ strcpy(&cmpbuf[2 * small_len], new_string);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -190,8 +190,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* First fill the buffer with NULLs */
memset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
- HDstrncpy(cmpbuf, new_string, small_len - 1);
- HDstrncpy(&cmpbuf[big_len], new_string, small_len - 1);
+ strncpy(cmpbuf, new_string, small_len - 1);
+ strncpy(&cmpbuf[big_len], new_string, small_len - 1);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -203,14 +203,14 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Now test null padding. Null-padded strings do *not* need
* terminating NULLs, so the sizes of the datatypes are slightly
* different and we want a string with an even number of characters. */
- length = HDstrlen(string);
+ length = strlen(string);
if (length % 2 != 0) {
- HDstrcpy(new_string, "x");
- HDstrcat(new_string, string);
+ strcpy(new_string, "x");
+ strcat(new_string, string);
length++;
}
else {
- HDstrcpy(new_string, string);
+ strcpy(new_string, string);
}
/* Create a src_type that holds the UTF-8 string */
@@ -225,8 +225,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Fill the buffer with two copies of the UTF-8 string.
* It will look like "abcdefghabcdefgh". */
- HDstrncpy(buf, new_string, big_len);
- HDstrncpy(&buf[big_len], new_string, big_len);
+ strncpy(buf, new_string, big_len);
+ strncpy(&buf[big_len], new_string, big_len);
ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tconvert");
@@ -236,9 +236,9 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* like; UTF-8 characters may well have been truncated.
* To check that the conversion worked properly, we'll build this
* string manually. */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[small_len], new_string, small_len);
- HDstrncpy(&cmpbuf[2 * small_len], new_string, big_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[small_len], new_string, small_len);
+ strncpy(&cmpbuf[2 * small_len], new_string, big_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -250,8 +250,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* First fill the buffer with NULLs */
memset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[big_len], new_string, small_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[big_len], new_string, small_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -270,8 +270,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Fill the buffer with two copies of the UTF-8 string.
* It will look like "abcdefghabcdefgh". */
- HDstrcpy(buf, new_string);
- HDstrcpy(&buf[big_len], new_string);
+ strcpy(buf, new_string);
+ strcpy(&buf[big_len], new_string);
ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tconvert");
@@ -281,9 +281,9 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* like; UTF-8 characters may have been truncated.
* To check that the conversion worked properly, we'll build this
* string manually. */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[small_len], new_string, small_len);
- HDstrncpy(&cmpbuf[2 * small_len], new_string, big_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[small_len], new_string, small_len);
+ strncpy(&cmpbuf[2 * small_len], new_string, big_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -295,8 +295,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* First fill the buffer with spaces */
memset(cmpbuf, ' ', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[big_len], new_string, small_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[big_len], new_string, small_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -340,14 +340,14 @@ test_vl_string(hid_t fid, const char *string)
/* Make certain the correct amount of memory will be used */
ret = H5Dvlen_get_buf_size(dset_id, type_id, space_id, &size);
CHECK(ret, FAIL, "H5Dvlen_get_buf_size");
- VERIFY(size, (hsize_t)HDstrlen(string) + 1, "H5Dvlen_get_buf_size");
+ VERIFY(size, (hsize_t)strlen(string) + 1, "H5Dvlen_get_buf_size");
/* Read dataset from disk */
ret = H5Dread(dset_id, type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf);
CHECK(ret, FAIL, "H5Dread");
/* Compare data read in */
- VERIFY(HDstrcmp(string, read_buf[0]), 0, "strcmp");
+ VERIFY(strcmp(string, read_buf[0]), 0, "strcmp");
/* Reclaim the read VL data */
ret = H5Treclaim(type_id, space_id, H5P_DEFAULT, read_buf);
@@ -403,7 +403,7 @@ test_objnames(hid_t fid, const char *string)
ret = H5Gclose(grp_id);
CHECK(ret, FAIL, "H5Gclose");
#if 0
- VERIFY(HDstrcmp(string, read_buf), 0, "strcmp");
+ VERIFY(strcmp(string, read_buf), 0, "strcmp");
#endif
/* Create a new dataset with a UTF-8 name */
grp1_id = H5Gcreate2(fid, GROUP1_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -487,9 +487,9 @@ test_objnames(hid_t fid, const char *string)
ret = H5Lcreate_hard(fid, GROUP2_NAME, grp3_id, GROUP2_NAME, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Lcreate_hard");
- HDstrcpy(path_buf, GROUP2_NAME);
- HDstrcat(path_buf, "/");
- HDstrcat(path_buf, string);
+ strcpy(path_buf, GROUP2_NAME);
+ strcat(path_buf, "/");
+ strcat(path_buf, string);
ret = H5Lcreate_hard(grp3_id, path_buf, H5L_SAME_LOC, string, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Lcreate_hard");
@@ -535,7 +535,7 @@ test_attrname(hid_t fid, const char *string)
CHECK(attr_id, FAIL, "H5Acreate2");
size = H5Aget_name(attr_id, (size_t)MAX_STRING_LENGTH, read_buf);
CHECK(size, FAIL, "H5Aget_name");
- ret = HDstrcmp(read_buf, string);
+ ret = strcmp(read_buf, string);
VERIFY(ret, 0, "strcmp");
read_buf[0] = '\0';
@@ -544,7 +544,7 @@ test_attrname(hid_t fid, const char *string)
CHECK(ret, FAIL, "H5Awrite");
ret = H5Aread(attr_id, dtype_id, read_buf);
CHECK(ret, FAIL, "H5Aread");
- ret = HDstrcmp(read_buf, string);
+ ret = strcmp(read_buf, string);
VERIFY(ret, 0, "strcmp");
/* Clean up */
@@ -602,7 +602,7 @@ test_compound(hid_t fid, const char *string)
/* Check that the field name was stored correctly */
readbuf = H5Tget_member_name(s1_tid, 0);
- ret = HDstrcmp(readbuf, string);
+ ret = strcmp(readbuf, string);
VERIFY(ret, 0, "strcmp");
H5free_memory(readbuf);
@@ -685,7 +685,7 @@ test_enum(hid_t H5_ATTR_UNUSED fid, const char *string)
VERIFY(val, E1_WHITE, "H5Tenum_valueof");
ret = H5Tenum_nameof(type_id, &val, readbuf, (size_t)MAX_STRING_LENGTH);
CHECK(ret, FAIL, "H5Tenum_nameof");
- ret = HDstrcmp(readbuf, string);
+ ret = strcmp(readbuf, string);
VERIFY(ret, 0, "strcmp");
/* Close the datatype */
@@ -712,7 +712,7 @@ test_opaque(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Read the tag back. */
read_buf = H5Tget_tag(type_id);
- ret = HDstrcmp(read_buf, string);
+ ret = strcmp(read_buf, string);
VERIFY(ret, 0, "H5Tget_tag");
H5free_memory(read_buf);
@@ -786,7 +786,7 @@ dump_string(const char *string)
printf("The string was:\n %s", string);
printf("Or in hex:\n");
- length = HDstrlen(string);
+ length = strlen(string);
for (x = 0; x < length; x++)
printf("%x ", string[x] & (0x000000FF));
diff --git a/test/API/tvlstr.c b/test/API/tvlstr.c
index ced17ea..a9375c8 100644
--- a/test/API/tvlstr.c
+++ b/test/API/tvlstr.c
@@ -186,7 +186,7 @@ test_vlstrings_basic(void)
/* Count the actual number of bytes used by the strings */
for (i = 0, str_used = 0; i < SPACE1_DIM1; i++)
- str_used += HDstrlen(wdata[i]) + 1;
+ str_used += strlen(wdata[i]) + 1;
/* Compare against the strings actually written */
VERIFY(size, (hsize_t)str_used, "H5Dvlen_get_buf_size");
@@ -200,12 +200,12 @@ test_vlstrings_basic(void)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
(int)i, rdata[i]);
continue;
@@ -304,16 +304,16 @@ test_vlstrings_special(void)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
if ((wdata[i] == NULL && rdata[i] != NULL) || (rdata[i] == NULL && wdata[i] != NULL)) {
TestErrPrintf("VL data values don't match!\n");
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
(int)i, rdata[i]);
continue;
@@ -424,12 +424,12 @@ test_vlstring_type(void)
ret = H5Tget_class(tid_vlstr);
VERIFY(ret, H5T_STRING, "H5Tget_class");
ret = H5Tis_variable_str(tid_vlstr);
- VERIFY(ret, TRUE, "H5Tis_variable_str");
+ VERIFY(ret, true, "H5Tis_variable_str");
/* Verify that the class detects as a string */
vl_str = H5Tdetect_class(tid_vlstr, H5T_STRING);
CHECK(vl_str, FAIL, "H5Tdetect_class");
- VERIFY(vl_str, TRUE, "H5Tdetect_class");
+ VERIFY(vl_str, true, "H5Tdetect_class");
/* Check default character set and padding */
cset = H5Tget_cset(tid_vlstr);
@@ -533,12 +533,12 @@ test_compact_vlstring(void)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
(int)i, rdata[i]);
continue;
@@ -611,7 +611,7 @@ test_write_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att) != 0)
+ if (strcmp(string_att_check, string_att) != 0)
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n", string_att,
string_att_check);
@@ -634,7 +634,7 @@ test_write_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att_write) != 0)
+ if (strcmp(string_att_check, string_att_write) != 0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",
string_att_write, string_att_check);
@@ -695,7 +695,7 @@ test_read_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att) != 0)
+ if (strcmp(string_att_check, string_att) != 0)
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n", string_att,
string_att_check);
@@ -713,7 +713,7 @@ test_read_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att_write) != 0)
+ if (strcmp(string_att_check, string_att_write) != 0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",
string_att_write, string_att_check);
@@ -772,7 +772,7 @@ read_scalar_dset(hid_t file, hid_t type, hid_t space, char *name, char *data)
ret = H5Dclose(dset);
CHECK(ret, FAIL, "H5Dclose");
- if (HDstrcmp(data, data_read) != 0)
+ if (strcmp(data, data_read) != 0)
TestErrPrintf("Expected %s for dataset %s but read %s\n", data, name, data_read);
ret = H5Treclaim(type, space, H5P_DEFAULT, &data_read);
@@ -816,33 +816,33 @@ test_vl_rewrite(void)
/* Create in file 1 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
write_scalar_dset(file1, type, space, name, name);
}
/* Effectively copy data from file 1 to 2 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
read_scalar_dset(file1, type, space, name, name);
write_scalar_dset(file2, type, space, name, name);
}
/* Read back from file 2 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
read_scalar_dset(file2, type, space, name, name);
} /* end for */
/* Remove from file 2. */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
ret = H5Ldelete(file2, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
} /* end for */
/* Effectively copy from file 1 to file 2 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
read_scalar_dset(file1, type, space, name, name);
write_scalar_dset(file2, type, space, name, name);
} /* end for */
diff --git a/test/API/tvltypes.c b/test/API/tvltypes.c
index b4ccef7..9e6027c 100644
--- a/test/API/tvltypes.c
+++ b/test/API/tvltypes.c
@@ -1244,9 +1244,9 @@ test_vltypes_compound_vlstr(void)
wdata[i].v.p = (s2 *)malloc((i + L3_INCM) * sizeof(s2));
wdata[i].v.len = i + L3_INCM;
for (t1 = (s2 *)((wdata[i].v).p), j = 0; j < (i + L3_INCM); j++, t1++) {
- HDstrcat(str, "m");
- t1->string = (char *)malloc(HDstrlen(str) * sizeof(char) + 1);
- HDstrcpy(t1->string, str);
+ strcat(str, "m");
+ t1->string = (char *)malloc(strlen(str) * sizeof(char) + 1);
+ strcpy(t1->string, str);
/*t1->color = red;*/
t1->color = blue;
}
@@ -1387,7 +1387,7 @@ test_vltypes_compound_vlstr(void)
for (t1 = (s2 *)(wdata[i].v.p), t2 = (s2 *)(rdata[i].v.p), j = 0; j < rdata[i].v.len;
j++, t1++, t2++) {
- if (HDstrcmp(t1->string, t2->string) != 0) {
+ if (strcmp(t1->string, t2->string) != 0) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n", t1->string,
t2->string);
continue;
@@ -1409,14 +1409,14 @@ test_vltypes_compound_vlstr(void)
CHECK(ret, FAIL, "H5Treclaim");
/* Use this part for new data */
- HDstrcpy(str, "bbbbbbbb\0");
+ strcpy(str, "bbbbbbbb\0");
for (i = 0; i < SPACE1_DIM1; i++) {
wdata2[i].v.p = (s2 *)malloc((i + 1) * sizeof(s2));
wdata2[i].v.len = i + 1;
for (t1 = (s2 *)(wdata2[i].v).p, j = 0; j < i + 1; j++, t1++) {
- HDstrcat(str, "pp");
- t1->string = (char *)malloc(HDstrlen(str) * sizeof(char) + 1);
- HDstrcpy(t1->string, str);
+ strcat(str, "pp");
+ t1->string = (char *)malloc(strlen(str) * sizeof(char) + 1);
+ strcpy(t1->string, str);
t1->color = green;
}
} /* end for */
@@ -1448,7 +1448,7 @@ test_vltypes_compound_vlstr(void)
for (t1 = (s2 *)(wdata2[i].v.p), t2 = (s2 *)(rdata2[i].v.p), j = 0; j < rdata2[i].v.len;
j++, t1++, t2++) {
- if (HDstrcmp(t1->string, t2->string) != 0) {
+ if (strcmp(t1->string, t2->string) != 0) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n", t1->string,
t2->string);
continue;
@@ -2657,16 +2657,16 @@ test_vltypes_fill_value(void)
/* Layout specific actions */
switch (layout) {
case H5D_COMPACT:
- HDstrcpy(dset_name1, "dataset1-compact");
- HDstrcpy(dset_name2, "dataset2-compact");
+ strcpy(dset_name1, "dataset1-compact");
+ strcpy(dset_name2, "dataset2-compact");
dset_dspace_id = small_dspace_id;
ret = H5Pset_layout(tmp_dcpl_id, H5D_COMPACT);
CHECK(ret, FAIL, "H5Pset_layout");
break;
case H5D_CONTIGUOUS:
- HDstrcpy(dset_name1, "dataset1-contig");
- HDstrcpy(dset_name2, "dataset2-contig");
+ strcpy(dset_name1, "dataset1-contig");
+ strcpy(dset_name2, "dataset2-contig");
dset_dspace_id = large_dspace_id;
break;
@@ -2678,15 +2678,15 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Pset_chunk");
#ifdef H5_HAVE_FILTER_DEFLATE
if (test_loop == 1) {
- HDstrcpy(dset_name1, "dataset1-chunked-compressed");
- HDstrcpy(dset_name2, "dataset2-chunked-compressed");
+ strcpy(dset_name1, "dataset1-chunked-compressed");
+ strcpy(dset_name2, "dataset2-chunked-compressed");
ret = H5Pset_deflate(tmp_dcpl_id, 3);
CHECK(ret, FAIL, "H5Pset_deflate");
} /* end if */
else {
#endif /* H5_HAVE_FILTER_DEFLATE */
- HDstrcpy(dset_name1, "dataset1-chunked");
- HDstrcpy(dset_name2, "dataset2-chunked");
+ strcpy(dset_name1, "dataset1-chunked");
+ strcpy(dset_name2, "dataset2-chunked");
#ifdef H5_HAVE_FILTER_DEFLATE
} /* end else */
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -2767,16 +2767,16 @@ test_vltypes_fill_value(void)
/* Layout specific actions */
switch (layout) {
case H5D_COMPACT:
- HDstrcpy(dset_name1, "dataset1-compact");
- HDstrcpy(dset_name2, "dataset2-compact");
+ strcpy(dset_name1, "dataset1-compact");
+ strcpy(dset_name2, "dataset2-compact");
dset_dspace_id = small_dspace_id;
dset_select_dspace_id = small_select_dspace_id;
dset_elmts = SPACE4_DIM_SMALL;
break;
case H5D_CONTIGUOUS:
- HDstrcpy(dset_name1, "dataset1-contig");
- HDstrcpy(dset_name2, "dataset2-contig");
+ strcpy(dset_name1, "dataset1-contig");
+ strcpy(dset_name2, "dataset2-contig");
dset_dspace_id = large_dspace_id;
dset_select_dspace_id = large_select_dspace_id;
dset_elmts = SPACE4_DIM_LARGE;
@@ -2785,13 +2785,13 @@ test_vltypes_fill_value(void)
case H5D_CHUNKED:
#ifdef H5_HAVE_FILTER_DEFLATE
if (test_loop == 1) {
- HDstrcpy(dset_name1, "dataset1-chunked-compressed");
- HDstrcpy(dset_name2, "dataset2-chunked-compressed");
+ strcpy(dset_name1, "dataset1-chunked-compressed");
+ strcpy(dset_name2, "dataset2-chunked-compressed");
} /* end if */
else {
#endif /* H5_HAVE_FILTER_DEFLATE */
- HDstrcpy(dset_name1, "dataset1-chunked");
- HDstrcpy(dset_name2, "dataset2-chunked");
+ strcpy(dset_name1, "dataset1-chunked");
+ strcpy(dset_name2, "dataset2-chunked");
#ifdef H5_HAVE_FILTER_DEFLATE
} /* end else */
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -2821,10 +2821,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 || HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2844,11 +2844,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2879,10 +2878,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 || HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2902,11 +2901,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2954,16 +2952,16 @@ test_vltypes_fill_value(void)
/* Layout specific actions */
switch (layout) {
case H5D_COMPACT:
- HDstrcpy(dset_name1, "dataset1-compact");
- HDstrcpy(dset_name2, "dataset2-compact");
+ strcpy(dset_name1, "dataset1-compact");
+ strcpy(dset_name2, "dataset2-compact");
dset_dspace_id = small_dspace_id;
dset_select_dspace_id = small_select_dspace_id;
dset_elmts = SPACE4_DIM_SMALL;
break;
case H5D_CONTIGUOUS:
- HDstrcpy(dset_name1, "dataset1-contig");
- HDstrcpy(dset_name2, "dataset2-contig");
+ strcpy(dset_name1, "dataset1-contig");
+ strcpy(dset_name2, "dataset2-contig");
dset_dspace_id = large_dspace_id;
dset_select_dspace_id = large_select_dspace_id;
dset_elmts = SPACE4_DIM_LARGE;
@@ -2972,13 +2970,13 @@ test_vltypes_fill_value(void)
case H5D_CHUNKED:
#ifdef H5_HAVE_FILTER_DEFLATE
if (test_loop == 1) {
- HDstrcpy(dset_name1, "dataset1-chunked-compressed");
- HDstrcpy(dset_name2, "dataset2-chunked-compressed");
+ strcpy(dset_name1, "dataset1-chunked-compressed");
+ strcpy(dset_name2, "dataset2-chunked-compressed");
} /* end if */
else {
#endif /* H5_HAVE_FILTER_DEFLATE */
- HDstrcpy(dset_name1, "dataset1-chunked");
- HDstrcpy(dset_name2, "dataset2-chunked");
+ strcpy(dset_name1, "dataset1-chunked");
+ strcpy(dset_name2, "dataset2-chunked");
#ifdef H5_HAVE_FILTER_DEFLATE
} /* end else */
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -3021,22 +3019,21 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3057,23 +3054,23 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 ||
+ strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3109,22 +3106,21 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3145,23 +3141,23 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 ||
+ strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
diff --git a/test/CMakePassthroughVOLTests.cmake b/test/CMakePassthroughVOLTests.cmake
index 94433de..a5d9b59 100644
--- a/test/CMakePassthroughVOLTests.cmake
+++ b/test/CMakePassthroughVOLTests.cmake
@@ -37,26 +37,26 @@ endforeach ()
foreach (voltest ${VOL_LIST})
foreach (h5_tfile ${HDF5_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${voltest}/${h5_tfile}" "HDF5_VOLTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${voltest}/${h5_tfile}" "HDF5_VOLTEST_LIB_files")
endforeach ()
endforeach ()
foreach (voltest ${VOL_LIST})
foreach (ref_file ${HDF5_REFERENCE_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${voltest}/${ref_file}" "HDF5_VOLTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${voltest}/${ref_file}" "HDF5_VOLTEST_LIB_files")
endforeach ()
endforeach ()
foreach (voltest ${VOL_LIST})
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${voltest}/${h5_file}" "HDF5_VOLTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/${voltest}/${h5_file}" "HDF5_VOLTEST_LIB_files")
endforeach ()
endforeach ()
foreach (voltest ${VOL_LIST})
foreach (plistfile ${HDF5_REFERENCE_PLIST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/${voltest}/testfiles/plist_files/${plistfile}" "HDF5_VOLTEST_LIB_files")
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/${voltest}/testfiles/plist_files/def_${plistfile}" "HDF5_VOLTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/${voltest}/testfiles/plist_files/${plistfile}" "HDF5_VOLTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/${voltest}/testfiles/plist_files/def_${plistfile}" "HDF5_VOLTEST_LIB_files")
endforeach ()
endforeach ()
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 67cba87..d2acc35 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -36,12 +36,9 @@ add_custom_command (
)
foreach (h5_tfile ${HDF5_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/H5TEST/${h5_tfile}" "HDF5_TEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/H5TEST/testfiles/${h5_tfile}" "HDF5_TEST_LIB_files")
endforeach ()
-# --------------------------------------------------------------------
-# Copy all the HDF5 files from the test directory into the source directory
-# --------------------------------------------------------------------
set (HDF5_REFERENCE_FILES
err_compat_1
err_compat_2
@@ -51,7 +48,7 @@ set (HDF5_REFERENCE_FILES
)
foreach (ref_file ${HDF5_REFERENCE_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/H5TEST/${ref_file}" "HDF5_TEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/H5TEST/testfiles/${ref_file}" "HDF5_TEST_LIB_files")
endforeach ()
# --------------------------------------------------------------------
@@ -109,8 +106,8 @@ set (HDF5_REFERENCE_PLIST_FILES
)
foreach (plistfile ${HDF5_REFERENCE_PLIST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/H5TEST/testfiles/plist_files/${plistfile}" "HDF5_TEST_LIB_files")
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/H5TEST/testfiles/plist_files/def_${plistfile}" "HDF5_TEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/H5TEST/testfiles/plist_files/${plistfile}" "HDF5_TEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/H5TEST/testfiles/plist_files/def_${plistfile}" "HDF5_TEST_LIB_files")
endforeach ()
# --------------------------------------------------------------------
@@ -172,7 +169,7 @@ set (HDF5_REFERENCE_TEST_FILES
)
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/H5TEST/${h5_file}" "HDF5_TEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${HDF5_TEST_BINARY_DIR}/H5TEST/testfiles/${h5_file}" "HDF5_TEST_LIB_files")
endforeach ()
add_custom_target(HDF5_TEST_LIB_files ALL COMMENT "Copying files needed by HDF5_TEST_LIB tests" DEPENDS ${HDF5_TEST_LIB_files_list})
diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake
index 7648166..ed7bd86 100644
--- a/test/CMakeVFDTests.cmake
+++ b/test/CMakeVFDTests.cmake
@@ -26,26 +26,26 @@ endforeach ()
foreach (vfdtest ${VFD_LIST})
foreach (h5_tfile ${HDF5_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}" "HDF5_VFDTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/${h5_tfile}" "HDF5_VFDTEST_LIB_files")
endforeach ()
endforeach ()
foreach (vfdtest ${VFD_LIST})
foreach (ref_file ${HDF5_REFERENCE_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${vfdtest}/${ref_file}" "HDF5_VFDTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/${ref_file}" "HDF5_VFDTEST_LIB_files")
endforeach ()
endforeach ()
foreach (vfdtest ${VFD_LIST})
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${vfdtest}/${h5_file}" "HDF5_VFDTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${vfdtest}/testfiles/${h5_file}" "HDF5_VFDTEST_LIB_files")
endforeach ()
endforeach ()
foreach (vfdtest ${VFD_LIST})
foreach (plistfile ${HDF5_REFERENCE_PLIST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files/${plistfile}" "HDF5_VFDTEST_LIB_files")
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files/def_${plistfile}" "HDF5_VFDTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files/${plistfile}" "HDF5_VFDTEST_LIB_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files/def_${plistfile}" "HDF5_VFDTEST_LIB_files")
endforeach ()
endforeach ()
diff --git a/test/accum.c b/test/accum.c
index 6f4db2d..5a19efe 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -51,7 +51,7 @@ unsigned test_read_after(H5F_t *f);
unsigned test_free(H5F_t *f);
unsigned test_big(H5F_t *f);
unsigned test_random_write(H5F_t *f);
-unsigned test_swmr_write_big(hbool_t newest_format);
+unsigned test_swmr_write_big(bool newest_format);
/* Helper Function Prototypes */
void accum_printf(const H5F_t *f);
@@ -61,7 +61,7 @@ void accum_printf(const H5F_t *f);
#define accum_read(a, s, b) H5F_block_read(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (size_t)(s), (b))
#define accum_free(f, a, s) H5F__accum_free(f->shared, H5FD_MEM_DEFAULT, (haddr_t)(a), (hsize_t)(s))
#define accum_flush(f) H5F__accum_flush(f->shared)
-#define accum_reset(f) H5F__accum_reset(f->shared, TRUE)
+#define accum_reset(f) H5F__accum_reset(f->shared, true)
/* ================= */
/* Main Test Routine */
@@ -81,14 +81,14 @@ int
main(void)
{
unsigned nerrors = 0; /* track errors */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- hid_t fid = -1;
- hid_t fapl = -1; /* File access property list */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
+ hid_t fid = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
char filename[1024];
H5F_t *f = NULL; /* File for all tests */
/* Test Setup */
- HDputs("Testing the metadata accumulator");
+ puts("Testing the metadata accumulator");
/* File access property list */
h5_reset();
@@ -103,7 +103,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get H5F_t * to internal file structure */
if (NULL == (f = (H5F_t *)H5VL_object(fid)))
@@ -133,30 +133,30 @@ main(void)
nerrors += test_random_write(f);
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
/* End of test code, close and delete file */
if (H5Fclose(fid) < 0)
TEST_ERROR;
/* This test uses a different file */
- nerrors += test_swmr_write_big(TRUE);
- nerrors += test_swmr_write_big(FALSE);
+ nerrors += test_swmr_write_big(true);
+ nerrors += test_swmr_write_big(false);
if (nerrors)
goto error;
- HDputs("All metadata accumulator tests passed.");
+ puts("All metadata accumulator tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
error:
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
return 1;
} /* end main() */
@@ -2047,19 +2047,19 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_swmr_write_big(hbool_t newest_format)
+test_swmr_write_big(bool newest_format)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list */
- H5F_t *rf = NULL; /* File pointer */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ H5F_t *rf = NULL; /* File pointer */
char filename[1024];
uint8_t *wbuf2 = NULL, *rbuf = NULL; /* Buffers for reading & writing */
uint8_t wbuf[1024]; /* Buffer for reading & writing */
unsigned u; /* Local index variable */
- hbool_t process_success = FALSE;
+ bool process_success = false;
char *driver = NULL; /* VFD string (from env variable) */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
if (newest_format)
TESTING("SWMR write of large metadata: with latest format");
@@ -2070,17 +2070,17 @@ test_swmr_write_big(hbool_t newest_format)
/* Not a Windows or POSIX system */
SKIPPED();
- HDputs(" Test skipped: Not a Windows or POSIX system.");
+ puts(" Test skipped: Not a Windows or POSIX system.");
return 0;
#else
/* Skip this test if SWMR I/O is not supported for the VFD specified
* by the environment variable.
*/
- driver = HDgetenv(HDF5_DRIVER);
+ driver = getenv(HDF5_DRIVER);
if (!H5FD__supports_swmr_test(driver)) {
SKIPPED();
- HDputs(" Test skipped due to VFD not supporting SWMR I/O.");
+ puts(" Test skipped due to VFD not supporting SWMR I/O.");
return 0;
}
@@ -2113,7 +2113,7 @@ test_swmr_write_big(hbool_t newest_format)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get H5F_t * to internal file structure */
if (NULL == (rf = (H5F_t *)H5VL_object(fid)))
@@ -2193,17 +2193,17 @@ test_swmr_write_big(hbool_t newest_format)
si.cb = sizeof(si);
ZeroMemory(&pi, sizeof(pi));
- if (0 == CreateProcess(NULL, SWMR_READER, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
+ if (0 == CreateProcess(NULL, SWMR_READER, NULL, NULL, false, 0, NULL, NULL, &si, &pi)) {
printf("CreateProcess failed (%d).\n", GetLastError());
FAIL_STACK_ERROR;
}
(void)WaitForSingleObject(pi.hProcess, INFINITE);
- if (FALSE == GetExitCodeProcess(pi.hProcess, &exit_code) || EXIT_FAILURE == exit_code)
- process_success = FALSE;
+ if (false == GetExitCodeProcess(pi.hProcess, &exit_code) || EXIT_FAILURE == exit_code)
+ process_success = false;
else
- process_success = TRUE;
+ process_success = true;
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
@@ -2215,7 +2215,7 @@ test_swmr_write_big(hbool_t newest_format)
/* Fork child process to verify that the data at [1024, 2014] does get written to disk */
if ((pid = fork()) < 0) {
- HDperror("fork");
+ perror("fork");
FAIL_STACK_ERROR;
}
else if (0 == pid) { /* Child process */
@@ -2228,7 +2228,7 @@ test_swmr_write_big(hbool_t newest_format)
char *const new_argv[] = {swmr_reader, NULL};
/* Run the reader */
status = execv(SWMR_READER, new_argv);
- printf("errno from execv = %s\n", HDstrerror(errno));
+ printf("errno from execv = %s\n", strerror(errno));
FAIL_STACK_ERROR;
} /* end if */
@@ -2238,7 +2238,7 @@ test_swmr_write_big(hbool_t newest_format)
/* Check if child process terminates normally and its return value */
if (WIFEXITED(status) && !WEXITSTATUS(status))
- process_success = TRUE;
+ process_success = true;
}
#endif /* defined(H5_HAVE_WIN32_API) */
@@ -2259,9 +2259,9 @@ test_swmr_write_big(hbool_t newest_format)
FAIL_STACK_ERROR;
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
/* Release memory */
if (wbuf2)
@@ -2277,7 +2277,7 @@ error:
H5Fclose(fid);
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
H5Pclose(fapl);
@@ -2319,7 +2319,7 @@ accum_printf(const H5F_t *f)
printf("=====================================================\n");
printf(" accumulator allocated size == %zu\n", accum->alloc_size);
printf(" accumulated data size == %zu\n", accum->size);
- fprintf(stdout, " accumulator dirty? == %s\n", accum->dirty ? "TRUE" : "FALSE");
+ fprintf(stdout, " accumulator dirty? == %s\n", accum->dirty ? "true" : "false");
printf("=====================================================\n");
fprintf(stdout, " start of accumulated data, loc = %" PRIuHADDR "\n", accum->loc);
if (accum->dirty) {
diff --git a/test/accum_swmr_reader.c b/test/accum_swmr_reader.c
index 659a60a..5b3ecd8 100644
--- a/test/accum_swmr_reader.c
+++ b/test/accum_swmr_reader.c
@@ -48,7 +48,7 @@ main(void)
uint8_t rbuf[1024]; /* Buffer for reading */
uint8_t buf[1024]; /* Buffer for holding the expected data */
char *driver = NULL; /* VFD string (from env variable) */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
/* Testing setup */
h5_reset();
@@ -56,7 +56,7 @@ main(void)
/* Skip this test if SWMR I/O is not supported for the VFD specified
* by the environment variable.
*/
- driver = HDgetenv(HDF5_DRIVER);
+ driver = getenv(HDF5_DRIVER);
if (!H5FD__supports_swmr_test(driver))
return EXIT_SUCCESS;
@@ -77,7 +77,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get H5F_t * to internal file structure */
if (NULL == (f = (H5F_t *)H5VL_object(fid)))
@@ -98,9 +98,9 @@ main(void)
FAIL_STACK_ERROR;
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
return EXIT_SUCCESS;
@@ -113,7 +113,7 @@ error:
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
return EXIT_FAILURE;
} /* end main() */
diff --git a/test/app_ref.c b/test/app_ref.c
index 7d46470..729862e 100644
--- a/test/app_ref.c
+++ b/test/app_ref.c
@@ -94,15 +94,15 @@ main(void)
TESTING("library shutdown with reference count > 1");
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
/* Don't run this test with the multi/split VFD. A bug in library shutdown
* ordering causes problems with the multi VFD when IDs are left dangling.
*/
- if (!HDstrcmp(env_h5_drvr, "multi") || !HDstrcmp(env_h5_drvr, "split")) {
- HDputs("\n -- SKIPPED for incompatible VFD --");
+ if (!strcmp(env_h5_drvr, "multi") || !strcmp(env_h5_drvr, "split")) {
+ puts("\n -- SKIPPED for incompatible VFD --");
return 0;
}
@@ -193,7 +193,7 @@ main(void)
error:
- HDputs("***** APPLICATION REFERENCE COUNT TESTS FAILED *****");
+ puts("***** APPLICATION REFERENCE COUNT TESTS FAILED *****");
return EXIT_FAILURE;
}
diff --git a/test/atomic_reader.c b/test/atomic_reader.c
index c8bbbae..12e2d5c 100644
--- a/test/atomic_reader.c
+++ b/test/atomic_reader.c
@@ -114,7 +114,7 @@ verify(int fd, unsigned int k)
} /* end if */
/* Position the file at the beginning */
- if (lseek(fd, (off_t)0, SEEK_SET) < 0) {
+ if (lseek(fd, 0, SEEK_SET) < 0) {
printf("READER: error from lseek\n");
goto error;
} /* end if */
diff --git a/test/atomic_writer.c b/test/atomic_writer.c
index 33252f1..89edfe7 100644
--- a/test/atomic_writer.c
+++ b/test/atomic_writer.c
@@ -190,7 +190,7 @@ main(int argc, char *argv[])
buf[u] = n;
/* Position the file to the proper location */
- if (lseek(fd, (off_t)(n * sizeof(unsigned int)), SEEK_SET) < 0) {
+ if (lseek(fd, (n * sizeof(unsigned int)), SEEK_SET) < 0) {
printf("WRITER: error from lseek\n");
goto error;
} /* end if */
diff --git a/test/big.c b/test/big.c
index 4c4d31c..428da0a 100644
--- a/test/big.c
+++ b/test/big.c
@@ -143,7 +143,7 @@ is_sparse(void)
if ((fd = HDopen("x.h5", O_RDWR | O_TRUNC | O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0)
return 0;
- if (HDlseek(fd, (off_t)(1024 * 1024), SEEK_SET) != 1024 * 1024)
+ if (HDlseek(fd, (HDoff_t)(1024 * 1024), SEEK_SET) != 1024 * 1024)
return 0;
if (5 != HDwrite(fd, "hello", (size_t)5))
return 0;
@@ -263,11 +263,11 @@ enough_room(hid_t fapl)
/* Create files */
for (i = 0; i < NELMTS(fd); i++) {
- HDsnprintf(name, sizeof(name), filename, i);
+ snprintf(name, sizeof(name), filename, i);
if ((fd[i] = HDopen(name, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
goto done;
}
- if ((off_t)size != HDlseek(fd[i], (off_t)size, SEEK_SET)) {
+ if ((HDoff_t)size != HDlseek(fd[i], (HDoff_t)size, SEEK_SET)) {
goto done;
}
if (1 != HDwrite(fd[i], "X", (size_t)1)) {
@@ -278,7 +278,7 @@ enough_room(hid_t fapl)
done:
for (i = 0; i < NELMTS(fd) && fd[i] >= 0; i++) {
- HDsnprintf(name, sizeof(name), filename, i);
+ snprintf(name, sizeof(name), filename, i);
if (HDclose(fd[i]) < 0)
ret_value = 0;
HDremove(name);
@@ -306,11 +306,12 @@ writer(char *filename, hid_t fapl, fsizes_t testsize, int wrt_n)
hsize_t size2[1] = {8LL * 1024LL * 1024LL * 1024LL};
hsize_t hs_start[1];
hsize_t hs_size[1];
- hid_t file = -1, space1 = -1, space2 = -1, mem_space = -1, d1 = -1, d2 = -1;
- int *buf = (int *)malloc(sizeof(int) * WRT_SIZE);
- int i, j;
- FILE *out = fopen(DNAME, "w");
- hid_t dcpl;
+ hid_t file = H5I_INVALID_HID, space1 = H5I_INVALID_HID, space2 = H5I_INVALID_HID,
+ mem_space = H5I_INVALID_HID, d1 = H5I_INVALID_HID, d2 = H5I_INVALID_HID;
+ int *buf = (int *)malloc(sizeof(int) * WRT_SIZE);
+ int i, j;
+ FILE *out = fopen(DNAME, "w");
+ hid_t dcpl;
switch (testsize) {
case LFILE:
@@ -449,7 +450,7 @@ static int
reader(char *filename, hid_t fapl)
{
FILE *script = NULL;
- hid_t file = -1, mspace = -1, fspace = -1, d2 = -1;
+ hid_t file = H5I_INVALID_HID, mspace = H5I_INVALID_HID, fspace = H5I_INVALID_HID, d2 = H5I_INVALID_HID;
char ln[128], *s;
hsize_t hs_offset[1];
hsize_t hs_size[1] = {WRT_SIZE};
@@ -474,7 +475,7 @@ reader(char *filename, hid_t fapl)
FAIL_STACK_ERROR;
/* Read each region */
- while (HDfgets(ln, (int)sizeof(ln), script)) {
+ while (fgets(ln, (int)sizeof(ln), script)) {
if ('#' != ln[0])
break;
i = (int)strtol(ln + 1, &s, 10);
@@ -500,7 +501,7 @@ reader(char *filename, hid_t fapl)
}
else if (wrong) {
SKIPPED();
- HDputs(" Possible overlap with another region.");
+ puts(" Possible overlap with another region.");
nerrors++;
}
else {
@@ -575,7 +576,7 @@ test_sec2(hid_t fapl)
goto quit;
}
/* Test big file with the SEC2 driver */
- HDputs("Testing big file with the SEC2 Driver ");
+ puts("Testing big file with the SEC2 Driver ");
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
@@ -584,7 +585,7 @@ test_sec2(hid_t fapl)
if (reader(filename, fapl))
goto error;
- HDputs("Test passed with the SEC2 Driver.");
+ puts("Test passed with the SEC2 Driver.");
quit:
/* End with normal return code */
@@ -594,7 +595,7 @@ quit:
return 0;
error:
- HDputs("*** TEST FAILED ***");
+ puts("*** TEST FAILED ***");
return 1;
} /* end test_sec2() */
@@ -609,7 +610,7 @@ test_stdio(hid_t fapl)
fprintf(stdout, "Test for stdio is skipped because file system does not support big files.\n");
goto quit;
}
- HDputs("\nTesting big file with the STDIO Driver ");
+ puts("\nTesting big file with the STDIO Driver ");
h5_fixname(FILENAME[2], fapl, filename, sizeof filename);
@@ -617,7 +618,7 @@ test_stdio(hid_t fapl)
goto error;
if (reader(filename, fapl))
goto error;
- HDputs("Test passed with the STDIO Driver.");
+ puts("Test passed with the STDIO Driver.");
/* Flush stdout at the end of this test routine to ensure later
* output to stderr will not come out before it.
@@ -632,7 +633,7 @@ quit:
return 0;
error:
- HDputs("*** TEST FAILED ***");
+ puts("*** TEST FAILED ***");
fflush(stdout);
return 1;
} /* end test_stdio() */
@@ -643,7 +644,7 @@ test_family(hid_t fapl)
char filename[1024];
/* Test huge file with the family driver */
- HDputs("Testing big file with the Family Driver ");
+ puts("Testing big file with the Family Driver ");
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
goto error;
@@ -655,14 +656,14 @@ test_family(hid_t fapl)
* We shouldn't run this test if the file system doesn't support holes
* because we would generate multi-gigabyte files.
*/
- HDputs("Checking if file system is adequate for this test...");
+ puts("Checking if file system is adequate for this test...");
if (!sparse_support) {
- HDputs("Test skipped because file system does not support holes.");
+ puts("Test skipped because file system does not support holes.");
usage();
goto quit;
}
if (!enough_room(fapl)) {
- HDputs("Test skipped because of quota (file size or num open files).");
+ puts("Test skipped because of quota (file size or num open files).");
usage();
goto quit;
}
@@ -676,7 +677,7 @@ test_family(hid_t fapl)
if (reader(filename, fapl))
goto error;
- HDputs("Test passed with the Family Driver.");
+ puts("Test passed with the Family Driver.");
quit:
/* End with normal return code */
@@ -686,7 +687,7 @@ quit:
return 0;
error:
- HDputs("*** TEST FAILED ***");
+ puts("*** TEST FAILED ***");
return 1;
} /* end test_family() */
@@ -705,14 +706,14 @@ int
main(int ac, char **av)
{
unsigned long seed = 0; /* Random # seed */
- hid_t fapl = -1;
- hid_t driver = -1;
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t driver = H5I_INVALID_HID;
/* parameters setup */
while (--ac > 0) {
av++;
- if (HDstrcmp("-fsize", *av) == 0) {
+ if (strcmp("-fsize", *av) == 0) {
/* specify a different family file size */
ac--;
av++;
@@ -725,11 +726,11 @@ main(int ac, char **av)
return 1;
}
}
- else if (HDstrcmp("-c", *av) == 0) {
+ else if (strcmp("-c", *av) == 0) {
/* turn off file system check before test */
cflag = 0;
}
- else if (HDstrcmp("-h", *av) == 0) {
+ else if (strcmp("-h", *av) == 0) {
usage();
return 0;
}
@@ -771,14 +772,14 @@ main(int ac, char **av)
goto error;
}
else
- HDputs("This VFD is not supported");
+ puts("This VFD is not supported");
/* End with normal exit code */
/* fapls are cleaned up in the vfd test code */
return 0;
error:
- HDputs("*** TEST FAILED ***");
+ puts("*** TEST FAILED ***");
if (fapl > 0)
H5Pclose(fapl);
return 1;
diff --git a/test/bittests.c b/test/bittests.c
index 10cd280..df42737 100644
--- a/test/bittests.c
+++ b/test/bittests.c
@@ -44,31 +44,31 @@ test_find(void)
/* The zero length buffer */
memset(v1, 0xaa, sizeof v1);
- n = H5T__bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_LSB, TRUE);
+ n = H5T__bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_LSB, true);
if (-1 != n) {
H5_FAILED();
- HDputs(" Zero length test failed (lsb)!");
+ puts(" Zero length test failed (lsb)!");
goto failed;
}
- n = H5T__bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_MSB, TRUE);
+ n = H5T__bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_MSB, true);
if (-1 != n) {
H5_FAILED();
- HDputs(" Zero length test failed (msb)!");
+ puts(" Zero length test failed (msb)!");
goto failed;
}
/* The zero buffer */
memset(v1, 0, sizeof v1);
- n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, TRUE);
+ n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, true);
if (-1 != n) {
H5_FAILED();
- HDputs(" Zero buffer test failed (lsb)!");
+ puts(" Zero buffer test failed (lsb)!");
goto failed;
}
- n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, TRUE);
+ n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, true);
if (-1 != n) {
H5_FAILED();
- HDputs(" Zero buffer test failed (msb)!");
+ puts(" Zero buffer test failed (msb)!");
goto failed;
}
@@ -76,13 +76,13 @@ test_find(void)
for (i = 0; i < 8 * (int)sizeof(v1); i++) {
memset(v1, 0, sizeof v1);
v1[i / 8] = (uint8_t)(1 << (i % 8));
- n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, TRUE);
+ n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, true);
if ((ssize_t)i != n) {
H5_FAILED();
printf(" Test for set bit %d failed (lsb)!\n", i);
goto failed;
}
- n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, TRUE);
+ n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, true);
if ((ssize_t)i != n) {
H5_FAILED();
printf(" Test for set bit %d failed (msb)!\n", i);
@@ -92,16 +92,16 @@ test_find(void)
/* The one buffer */
memset(v1, 0xff, sizeof v1);
- n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, FALSE);
+ n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, false);
if (-1 != n) {
H5_FAILED();
- HDputs(" One buffer test failed (lsb)!");
+ puts(" One buffer test failed (lsb)!");
goto failed;
}
- n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, FALSE);
+ n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, false);
if (-1 != n) {
H5_FAILED();
- HDputs(" One buffer test failed (msb)!");
+ puts(" One buffer test failed (msb)!");
goto failed;
}
@@ -109,13 +109,13 @@ test_find(void)
for (i = 0; i < 8 * (int)sizeof(v1); i++) {
memset(v1, 0xff, sizeof v1);
v1[i / 8] &= (uint8_t) ~(1 << (i % 8));
- n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, FALSE);
+ n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, false);
if ((ssize_t)i != n) {
H5_FAILED();
printf(" Test for clear bit %d failed (lsb)!\n", i);
goto failed;
}
- n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, FALSE);
+ n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, false);
if ((ssize_t)i != n) {
H5_FAILED();
printf(" Test for clear bit %d failed (lsb)!\n", i);
@@ -170,12 +170,12 @@ test_copy(void)
break;
if (size > 0 && j >= (int)sizeof(v2)) {
H5_FAILED();
- HDputs(" Unabled to find copied region in destination");
+ puts(" Unabled to find copied region in destination");
goto failed;
}
if (0 == size && j < (int)sizeof(v2)) {
H5_FAILED();
- HDputs(" Found copied bits when we shouldn't have");
+ puts(" Found copied bits when we shouldn't have");
goto failed;
}
@@ -190,7 +190,7 @@ test_copy(void)
}
if (0 == size && n >= 0) {
H5_FAILED();
- HDputs(" Found copied bits and shouldn't have!");
+ puts(" Found copied bits and shouldn't have!");
goto failed;
}
n = H5T__bit_find(v2, d_offset, 8 * sizeof(v2) - d_offset, H5T_BIT_LSB, 0);
@@ -203,7 +203,7 @@ test_copy(void)
}
if (d_offset + size == 8 * sizeof(v2) && n >= 0) {
H5_FAILED();
- HDputs(" High-order zeros are present and shouldn't be!");
+ puts(" High-order zeros are present and shouldn't be!");
goto failed;
}
@@ -221,7 +221,7 @@ test_copy(void)
}
if (0 == size && n >= 0) {
H5_FAILED();
- HDputs(" Found copied bits but shouldn't have (reverse)!");
+ puts(" Found copied bits but shouldn't have (reverse)!");
goto failed;
}
n = H5T__bit_find(v2, (size_t)0, d_offset + size, H5T_BIT_MSB, 0);
@@ -234,7 +234,7 @@ test_copy(void)
}
if (0 == d_offset && n >= 0) {
H5_FAILED();
- HDputs(" Found leading original data but shouldn't have!");
+ puts(" Found leading original data but shouldn't have!");
goto failed;
}
}
@@ -671,18 +671,18 @@ test_set(void)
memset(v2, 0x00, sizeof v2);
/* Set some bits in v2 */
- H5T__bit_set(v2, d_offset, size, TRUE);
+ H5T__bit_set(v2, d_offset, size, true);
for (j = 0; j < (int)sizeof(v2); j++)
if (v2[j])
break;
if (size > 0 && j >= (int)sizeof(v2)) {
H5_FAILED();
- HDputs(" Unabled to find set region in buffer");
+ puts(" Unabled to find set region in buffer");
goto failed;
}
if (0 == size && j < (int)sizeof(v2)) {
H5_FAILED();
- HDputs(" Found set bits when we shouldn't have");
+ puts(" Found set bits when we shouldn't have");
goto failed;
}
@@ -697,7 +697,7 @@ test_set(void)
}
if (0 == size && n >= 0) {
H5_FAILED();
- HDputs(" Found set bits and shouldn't have!");
+ puts(" Found set bits and shouldn't have!");
goto failed;
}
n = H5T__bit_find(v2, d_offset, 8 * sizeof(v2) - d_offset, H5T_BIT_LSB, 0);
@@ -710,7 +710,7 @@ test_set(void)
}
if (d_offset + size == 8 * sizeof(v2) && n >= 0) {
H5_FAILED();
- HDputs(" High-order zeros are present and shouldn't be!");
+ puts(" High-order zeros are present and shouldn't be!");
goto failed;
}
@@ -728,7 +728,7 @@ test_set(void)
}
if (0 == size && n >= 0) {
H5_FAILED();
- HDputs(" Found set bits but shouldn't have (reverse)!");
+ puts(" Found set bits but shouldn't have (reverse)!");
goto failed;
}
n = H5T__bit_find(v2, (size_t)0, d_offset + size, H5T_BIT_MSB, 0);
@@ -741,7 +741,7 @@ test_set(void)
}
if (0 == d_offset && n >= 0) {
H5_FAILED();
- HDputs(" Found leading zeros but shouldn't have!");
+ puts(" Found leading zeros but shouldn't have!");
goto failed;
}
}
@@ -786,18 +786,18 @@ test_clear(void)
memset(v2, 0xff, sizeof v2);
/* Clear some bits in v2 */
- H5T__bit_set(v2, d_offset, size, FALSE);
+ H5T__bit_set(v2, d_offset, size, false);
for (j = 0; j < (int)sizeof(v2); j++)
if (0xff != v2[j])
break;
if (size > 0 && j >= (int)sizeof(v2)) {
H5_FAILED();
- HDputs(" Unabled to find cleared region in buffer");
+ puts(" Unabled to find cleared region in buffer");
goto failed;
}
if (0 == size && j < (int)sizeof(v2)) {
H5_FAILED();
- HDputs(" Found cleared bits when we shouldn't have");
+ puts(" Found cleared bits when we shouldn't have");
goto failed;
}
@@ -812,7 +812,7 @@ test_clear(void)
}
if (0 == size && n >= 0) {
H5_FAILED();
- HDputs(" Found cleared bits and shouldn't have!");
+ puts(" Found cleared bits and shouldn't have!");
goto failed;
}
n = H5T__bit_find(v2, d_offset, 8 * sizeof(v2) - d_offset, H5T_BIT_LSB, 1);
@@ -825,7 +825,7 @@ test_clear(void)
}
if (d_offset + size == 8 * sizeof(v2) && n >= 0) {
H5_FAILED();
- HDputs(" High-order ones are present and shouldn't be!");
+ puts(" High-order ones are present and shouldn't be!");
goto failed;
}
@@ -843,7 +843,7 @@ test_clear(void)
}
if (0 == size && n >= 0) {
H5_FAILED();
- HDputs(" Found cleared bits but shouldn't have (reverse)!");
+ puts(" Found cleared bits but shouldn't have (reverse)!");
goto failed;
}
n = H5T__bit_find(v2, (size_t)0, d_offset + size, H5T_BIT_MSB, 1);
@@ -856,7 +856,7 @@ test_clear(void)
}
if (0 == d_offset && n >= 0) {
H5_FAILED();
- HDputs(" Found leading ones but shouldn't have!");
+ puts(" Found leading ones but shouldn't have!");
goto failed;
}
}
diff --git a/test/btree2.c b/test/btree2.c
index 9b8edbe..3ad30ac 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -39,7 +39,7 @@ static const char *FILENAME[] = {"btree2", "btree2_tmp", NULL};
/* Testing parameters */
typedef struct bt2_test_param_t {
- hbool_t reopen_btree; /* Whether to re-open the B-tree during the test */
+ bool reopen_btree; /* Whether to re-open the B-tree during the test */
} bt2_test_param_t;
/*-------------------------------------------------------------------------
@@ -351,7 +351,7 @@ iter_rec_cb(const void *_record, void *_op_data)
*
* Purpose: v2 B-tree find callback
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: FAIL
*
*-------------------------------------------------------------------------
@@ -363,9 +363,9 @@ find_cb(const void *_record, void *_op_data)
hsize_t *search = (hsize_t *)_op_data;
if (*record != *search)
- return (FALSE);
+ return (false);
- return (TRUE);
+ return (true);
} /* end find_cb() */
/*-------------------------------------------------------------------------
@@ -373,7 +373,7 @@ find_cb(const void *_record, void *_op_data)
*
* Purpose: v2 B-tree find callback for H5B2_test_rec_t records
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: FAIL
*
*-------------------------------------------------------------------------
@@ -385,10 +385,10 @@ find_rec_cb(const void *_record, void *_op_data)
H5B2_test_rec_t *search = (H5B2_test_rec_t *)_op_data;
if (record->key != search->key)
- return (FALSE);
+ return (false);
search->val = record->val;
- return (TRUE);
+ return (true);
} /* end find_rec_cb() */
/*-------------------------------------------------------------------------
@@ -420,7 +420,7 @@ find_dec_cb(const void *_record, void *_op_data)
*
* Purpose: v2 B-tree index callback for H5B2_test_rec_t records
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: FAIL
*
*-------------------------------------------------------------------------
@@ -436,7 +436,7 @@ index_rec_cb(const void *_record, void *_op_data)
search->key = record->key;
search->val = record->val;
- return (TRUE);
+ return (true);
} /* end index_rec_cb() */
/*-------------------------------------------------------------------------
@@ -473,13 +473,13 @@ neighbor_cb(const void *_record, void *_op_data)
*-------------------------------------------------------------------------
*/
static int
-modify_cb(void *_record, void *_op_data, hbool_t *changed)
+modify_cb(void *_record, void *_op_data, bool *changed)
{
hsize_t *record = (hsize_t *)_record;
hsize_t *modify = (hsize_t *)_op_data;
*record = *modify;
- *changed = TRUE;
+ *changed = true;
return (0);
} /* end modify_cb() */
@@ -495,14 +495,14 @@ modify_cb(void *_record, void *_op_data, hbool_t *changed)
*-------------------------------------------------------------------------
*/
static int
-modify_rec_cb(void *_record, void *_op_data, hbool_t *changed)
+modify_rec_cb(void *_record, void *_op_data, bool *changed)
{
H5B2_test_rec_t *record = (H5B2_test_rec_t *)_record;
H5B2_test_rec_t *modify = (H5B2_test_rec_t *)_op_data;
assert(record->key == modify->key);
record->val = modify->val;
- *changed = TRUE;
+ *changed = true;
return (0);
} /* end modify_rec_cb() */
@@ -519,9 +519,9 @@ modify_rec_cb(void *_record, void *_op_data, hbool_t *changed)
*-------------------------------------------------------------------------
*/
static int
-no_modify_cb(void H5_ATTR_UNUSED *_record, void H5_ATTR_UNUSED *_op_data, hbool_t *changed)
+no_modify_cb(void H5_ATTR_UNUSED *_record, void H5_ATTR_UNUSED *_op_data, bool *changed)
{
- *changed = FALSE;
+ *changed = false;
return (1);
} /* end no_modify_cb() */
@@ -561,14 +561,14 @@ remove_cb(const void *_record, void *_op_data)
static unsigned
test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t idx; /* Index within B-tree, for iterator */
- hbool_t found; /* Whether record was found */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ bool found; /* Whether record was found */
+ herr_t ret; /* Generic error return value */
/*
* Test v2 B-tree creation
@@ -604,7 +604,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find record in B-tree with no records */
idx = 0;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, NULL) < 0)
TEST_ERROR;
if (found)
@@ -639,7 +639,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find non-existent record in B-tree with 1 record */
/* (Should not be found, but not fail) */
idx = 41;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
TEST_ERROR;
if (found)
@@ -647,7 +647,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Try again with NULL 'op' */
/* (Should not be found, but not fail) */
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, NULL, NULL) < 0)
TEST_ERROR;
if (found)
@@ -655,14 +655,14 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find existent record in B-tree with 1 record */
idx = 42;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
TEST_ERROR;
if (!found)
TEST_ERROR;
/* Try again with NULL 'op' */
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, NULL, NULL) < 0)
TEST_ERROR;
if (!found)
@@ -719,7 +719,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find non-existent record in level-0 B-tree with several records */
/* (Should not be found, but not fail) */
idx = 41;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
TEST_ERROR;
if (found)
@@ -727,7 +727,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find existent record in level-0 B-tree with several record */
idx = 56;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
TEST_ERROR;
if (!found)
@@ -799,16 +799,16 @@ error:
static unsigned
test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t idx; /* Index within B-tree, for iterator */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- unsigned u; /* Local index variable */
- hbool_t found; /* Whether record was found */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
+ bool found; /* Whether record was found */
+ herr_t ret; /* Generic error return value */
/*
* Test inserting enough records into v2 B-tree to split the root node
@@ -894,7 +894,7 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p
/* Attempt to find non-existent record in level-1 B-tree */
/* (Should not be found, but not fail) */
idx = INSERT_SPLIT_ROOT_NREC + 10;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
TEST_ERROR;
if (found)
@@ -902,7 +902,7 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p
/* Attempt to find existent record in root of level-1 B-tree */
idx = 33;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
FAIL_STACK_ERROR;
if (!found)
@@ -910,7 +910,7 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p
/* Attempt to find existent record in leaf of level-1 B-tree */
idx = 56;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
FAIL_STACK_ERROR;
if (!found)
@@ -982,13 +982,13 @@ error:
static unsigned
test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -1132,13 +1132,13 @@ error:
static unsigned
test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -1290,14 +1290,14 @@ error:
static unsigned
test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -1429,14 +1429,14 @@ error:
static unsigned
test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -1544,16 +1544,16 @@ error:
static unsigned
test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
- hbool_t found; /* Whether record was found */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
+ bool found; /* Whether record was found */
+ herr_t ret; /* Generic error return value */
/*
* Test inserting many records into v2 B-tree
@@ -1625,7 +1625,7 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find non-existent record in level-2 B-tree */
/* (Should not be found, but not fail) */
idx = INSERT_SPLIT_ROOT_NREC * 30;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
TEST_ERROR;
if (found)
@@ -1633,7 +1633,7 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in root of level-2 B-tree */
idx = 948;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
FAIL_STACK_ERROR;
if (!found)
@@ -1646,7 +1646,7 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in internal node of level-2 B-tree */
idx = 505;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
FAIL_STACK_ERROR;
if (!found)
@@ -1659,7 +1659,7 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in leaf of level-2 B-tree */
idx = 555;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
FAIL_STACK_ERROR;
if (!found)
@@ -1736,14 +1736,14 @@ error:
static unsigned
test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -1961,14 +1961,14 @@ error:
static unsigned
test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -2192,14 +2192,14 @@ static unsigned
test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -2360,14 +2360,14 @@ error:
static unsigned
test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -2536,14 +2536,14 @@ static unsigned
test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -2710,14 +2710,14 @@ error:
static unsigned
test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -2885,22 +2885,22 @@ error:
static unsigned
test_insert_lots(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[1024]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t idx; /* Index within B-tree, for iterator */
- time_t curr_time; /* Current time, for seeding random number generator */
- hsize_t *records; /* Record #'s for random insertion */
- unsigned u; /* Local index variable */
- unsigned swap_idx; /* Location to swap with when shuffling */
- hsize_t temp_rec; /* Temporary record */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t nrec; /* Number of records in B-tree */
- hbool_t found; /* Whether record was found */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ char filename[1024]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t idx; /* Index within B-tree, for iterator */
+ time_t curr_time; /* Current time, for seeding random number generator */
+ hsize_t *records; /* Record #'s for random insertion */
+ unsigned u; /* Local index variable */
+ unsigned swap_idx; /* Location to swap with when shuffling */
+ hsize_t temp_rec; /* Temporary record */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t nrec; /* Number of records in B-tree */
+ bool found; /* Whether record was found */
+ herr_t ret; /* Generic error return value */
/* Initialize random number seed */
curr_time = HDtime(NULL);
@@ -3006,7 +3006,7 @@ fprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
/* Attempt to find non-existent record in level-4 B-tree */
/* (Should not be found, but not fail) */
idx = INSERT_MANY * 2;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
TEST_ERROR;
if (found)
@@ -3018,7 +3018,7 @@ fprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
idx = (hsize_t)(HDrandom() % INSERT_MANY);
/* Attempt to find existent record in root of level-4 B-tree */
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
FAIL_STACK_ERROR;
if (!found)
@@ -3125,15 +3125,15 @@ error:
static unsigned
test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- H5B2_test_rec_t record; /* Record to insert into tree */
- H5B2_test_rec_t modify; /* Modified value */
- H5B2_test_rec_t find; /* Record to find */
- hbool_t found; /* Whether record was found */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_test_rec_t modify; /* Modified value */
+ H5B2_test_rec_t find; /* Record to find */
+ bool found; /* Whether record was found */
+ herr_t ret; /* Generic error return value */
/* Create the file for the test */
if (create_file(&file, &f, fapl) < 0)
@@ -3161,7 +3161,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* (Should not be found, but not fail) */
find.key = 10;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (hsize_t)-1)
@@ -3171,7 +3171,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Try again with NULL 'op' */
/* (Should not be found, but not fail) */
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, NULL, NULL) < 0)
FAIL_STACK_ERROR;
if (find.val != (hsize_t)-1)
@@ -3181,7 +3181,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find existent record in B-tree with 1 record */
find.key = 42;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != 72)
@@ -3191,7 +3191,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Try again with NULL 'op' */
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, NULL, NULL) < 0)
FAIL_STACK_ERROR;
if (find.val != (hsize_t)-1)
@@ -3238,7 +3238,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* (Should not be found, but not fail) */
find.key = 10;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (hsize_t)-1)
@@ -3248,7 +3248,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Try again with NULL 'op' */
/* (Should not be found, but not fail) */
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, NULL, NULL) < 0)
FAIL_STACK_ERROR;
if (find.val != (hsize_t)-1)
@@ -3258,7 +3258,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find modified record in B-tree with 1 record */
find.key = 42;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != 43)
@@ -3268,7 +3268,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Try again with NULL 'op' */
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, NULL, NULL) < 0)
FAIL_STACK_ERROR;
if (find.val != (hsize_t)-1)
@@ -3335,7 +3335,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* (Should not be found, but not fail) */
find.key = 10;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR;
if (find.val != (hsize_t)-1)
@@ -3345,7 +3345,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find existent record in level-0 B-tree with several records */
find.key = 56;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR;
if (find.val != 12)
@@ -3429,7 +3429,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* (Should not be found, but not fail) */
find.key = 41;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR;
if (find.val != (hsize_t)-1)
@@ -3439,7 +3439,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find existent record in level-0 B-tree with several record */
find.key = 56;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR;
if (find.val != 22)
@@ -3532,18 +3532,18 @@ error:
static unsigned
test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- H5B2_test_rec_t record; /* Record to insert into tree */
- H5B2_test_rec_t modify; /* Modified value */
- H5B2_test_rec_t find; /* Record to find */
- H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- unsigned u; /* Local index variable */
- hbool_t found; /* Whether record was found */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_test_rec_t modify; /* Modified value */
+ H5B2_test_rec_t find; /* Record to find */
+ H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
+ bool found; /* Whether record was found */
+ herr_t ret; /* Generic error return value */
/*
* Test inserting enough records into v2 B-tree to split the root node
@@ -3677,7 +3677,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p
/* (Should not be found, but not fail) */
find.key = 800;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR;
if (find.val != (hsize_t)-1)
@@ -3688,7 +3688,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p
/* Attempt to find existent record in root of level-1 B-tree */
find.key = 33;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.key != 33)
@@ -3701,7 +3701,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p
/* Attempt to find existent record in leaf of level-1 B-tree */
find.key = 56;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.key != 56)
@@ -3791,13 +3791,13 @@ error:
static unsigned
test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- H5B2_test_rec_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -3945,13 +3945,13 @@ error:
static unsigned
test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- H5B2_test_rec_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -4107,14 +4107,14 @@ error:
static unsigned
test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- H5B2_test_rec_t record; /* Record to insert into tree */
- H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -4250,14 +4250,14 @@ error:
static unsigned
test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- H5B2_test_rec_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
/*
* Test inserting many records into v2 B-tree
@@ -4368,17 +4368,17 @@ error:
static unsigned
test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- H5B2_test_rec_t record; /* Record to insert into tree */
- H5B2_test_rec_t find; /* Record to find */
- H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- unsigned u; /* Local index variable */
- hbool_t found; /* Whether record was found */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_test_rec_t find; /* Record to find */
+ H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
+ bool found; /* Whether record was found */
+ herr_t ret; /* Generic error return value */
/*
* Test inserting many records into v2 B-tree
@@ -4458,7 +4458,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* (Should not be found, but not fail) */
find.key = INSERT_SPLIT_ROOT_NREC_REC * 42;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR;
if (find.val != (hsize_t)-1)
@@ -4469,7 +4469,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in root of level-2 B-tree */
find.key = 1347;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (1347 * 2))
@@ -4485,7 +4485,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in internal node of level-2 B-tree */
find.key = 513;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (513 * 2))
@@ -4501,7 +4501,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in leaf of level-2 B-tree */
find.key = 555;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (555 * 2))
@@ -4635,7 +4635,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* (Should not be found, but not fail) */
find.key = INSERT_SPLIT_ROOT_NREC_REC * 42;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR;
if (find.val != (hsize_t)-1)
@@ -4646,7 +4646,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in root of level-2 B-tree */
find.key = 1344;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (1344 * 2))
@@ -4662,7 +4662,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in internal node of level-2 B-tree */
find.key = 512;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (512 * 2))
@@ -4678,7 +4678,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in leaf of level-2 B-tree */
find.key = 555;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (555 * 2))
@@ -4822,7 +4822,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* (Should not be found, but not fail) */
find.key = INSERT_SPLIT_ROOT_NREC_REC * 42;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR;
if (find.val != (hsize_t)-1)
@@ -4833,7 +4833,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in root of level-2 B-tree */
find.key = 1345;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (1345 * 2))
@@ -4849,7 +4849,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in internal node of level-2 B-tree */
find.key = 513;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (513 * 2))
@@ -4865,7 +4865,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existent record in leaf of level-2 B-tree */
find.key = 555;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (555 * 2))
@@ -4956,21 +4956,21 @@ error:
static unsigned
test_update_lots(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- time_t curr_time; /* Current time, for seeding random number generator */
- H5B2_test_rec_t *records; /* Record #'s for random insertion */
- H5B2_test_rec_t record; /* Record to insert into tree */
- H5B2_test_rec_t modify; /* Modified value */
- H5B2_test_rec_t find; /* Record to find */
- H5B2_test_rec_t iter; /* Index within B-tree, for iterator */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- hsize_t nrec; /* Number of records in B-tree */
- unsigned u; /* Local index variable */
- hbool_t found; /* Whether record was found */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ time_t curr_time; /* Current time, for seeding random number generator */
+ H5B2_test_rec_t *records; /* Record #'s for random insertion */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_test_rec_t modify; /* Modified value */
+ H5B2_test_rec_t find; /* Record to find */
+ H5B2_test_rec_t iter; /* Index within B-tree, for iterator */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t nrec; /* Number of records in B-tree */
+ unsigned u; /* Local index variable */
+ bool found; /* Whether record was found */
+ herr_t ret; /* Generic error return value */
/* Initialize random number seed */
curr_time = HDtime(NULL);
@@ -5065,7 +5065,7 @@ fprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
/* (Should not be found, but not fail) */
find.key = INSERT_MANY_REC * 2;
find.val = (hsize_t)-1;
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR;
if (find.val != (hsize_t)-1)
@@ -5080,7 +5080,7 @@ fprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
find.val = (hsize_t)-1;
/* Attempt to find existent record in level-4 B-tree */
- found = FALSE;
+ found = false;
if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR;
if (find.val != (find.key * 2))
@@ -5205,15 +5205,15 @@ error:
static unsigned
test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ herr_t ret; /* Generic error return value */
/* Record removal tests */
TESTING("B-tree remove: record from empty B-tree");
@@ -5515,16 +5515,16 @@ error:
static unsigned
test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic error return value */
/* B-tree record removal tests */
TESTING("B-tree remove: non-existent record from level-1 B-tree");
@@ -5736,15 +5736,15 @@ error:
static unsigned
test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ unsigned u; /* Local index variable */
/* More complex record removals */
TESTING("B-tree remove: redistribute 2 leaves in level-1 B-tree (r->l)");
@@ -5929,16 +5929,16 @@ error:
static unsigned
test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: merge 2 leaves to 1 in level-1 B-tree (r->l)");
@@ -6104,16 +6104,16 @@ error:
static unsigned
test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: merge 3 leaves to 2 in level-1 B-tree");
@@ -6226,16 +6226,16 @@ error:
static unsigned
test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from right leaf of level-1 B-tree");
@@ -6450,16 +6450,16 @@ static unsigned
test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from leaf of level-1 B-tree w/2 node redistrib");
@@ -6595,16 +6595,16 @@ static unsigned
test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from leaf of level-1 B-tree w/3 node redistrib");
@@ -6740,16 +6740,16 @@ static unsigned
test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from leaf of level-1 B-tree w/2->1 merge");
@@ -6882,16 +6882,16 @@ static unsigned
test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from leaf of level-1 B-tree w/3->2 merge");
@@ -7023,16 +7023,16 @@ error:
static unsigned
test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: collapse level-1 B-tree back to level-0");
@@ -7158,16 +7158,16 @@ error:
static unsigned
test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from right internal of level-2 B-tree");
@@ -7441,16 +7441,16 @@ static unsigned
test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from right internal of level-2 B-tree w/redistrib");
@@ -7589,16 +7589,16 @@ static unsigned
test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from left internal of level-2 B-tree w/redistrib");
@@ -7737,16 +7737,16 @@ static unsigned
test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from right internal of level-2 B-tree w/merge");
@@ -7886,16 +7886,16 @@ static unsigned
test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: promote from middle internal of level-2 B-tree w/merge");
@@ -8035,16 +8035,16 @@ static unsigned
test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: merge 2 internal nodes to 1 in level-2 B-tree (l->r)");
@@ -8158,16 +8158,16 @@ static unsigned
test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: merge 2 internal nodes to 1 in level-2 B-tree (r->l)");
@@ -8280,16 +8280,16 @@ error:
static unsigned
test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: merge 3 internal nodes to 2 in level-2 B-tree");
@@ -8403,17 +8403,17 @@ error:
static unsigned
test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- hsize_t nrec; /* Number of records in B-tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ hsize_t nrec; /* Number of records in B-tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
TESTING("B-tree remove: collapse level-2 B-tree back to level-1 (r->l)");
@@ -8526,12 +8526,12 @@ static unsigned
gen_l4_btree2(const char *filename, hid_t fapl, const H5B2_create_t *cparam, haddr_t *bt2_addr,
const hsize_t *records)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- hsize_t record; /* Record to insert into tree */
- unsigned u; /* Local index variable */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ hsize_t record; /* Record to insert into tree */
+ unsigned u; /* Local index variable */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
@@ -8600,23 +8600,23 @@ error:
static unsigned
test_remove_lots(const char *env_h5_drvr, hid_t fapl, const H5B2_create_t *cparam)
{
- hid_t file = -1; /* File ID */
- char filename[1024]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
- int fd = -1; /* File descriptor */
- h5_stat_t sb; /* Stat buffer for file */
- void *file_data = NULL; /* Copy of file data */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t rrecord; /* Record to remove from tree */
- haddr_t root_addr; /* Address of root of B-tree created */
- time_t curr_time; /* Current time, for seeding random number generator */
- hsize_t *records; /* Record #'s for random insertion */
- unsigned u; /* Local index variable */
- unsigned rem_idx; /* Location to remove */
- hsize_t nrec; /* Number of records in B-tree */
- hbool_t single_file_vfd; /* Whether VFD used stores data in a single file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ char filename[1024]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ int fd = -1; /* File descriptor */
+ h5_stat_t sb; /* Stat buffer for file */
+ void *file_data = NULL; /* Copy of file data */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t rrecord; /* Record to remove from tree */
+ haddr_t root_addr; /* Address of root of B-tree created */
+ time_t curr_time; /* Current time, for seeding random number generator */
+ hsize_t *records; /* Record #'s for random insertion */
+ unsigned u; /* Local index variable */
+ unsigned rem_idx; /* Location to remove */
+ hsize_t nrec; /* Number of records in B-tree */
+ bool single_file_vfd; /* Whether VFD used stores data in a single file */
/* Initialize random number seed */
curr_time = HDtime(NULL);
@@ -9039,16 +9039,16 @@ error:
static unsigned
test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t search; /* Search value */
- hsize_t *records; /* Record #'s for random insertion */
- unsigned u; /* Local index variable */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t search; /* Search value */
+ hsize_t *records; /* Record #'s for random insertion */
+ unsigned u; /* Local index variable */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ herr_t ret; /* Generic error return value */
/* Allocate space for the records */
if (NULL == (records = (hsize_t *)malloc(sizeof(hsize_t) * FIND_NEIGHBOR)))
@@ -9261,16 +9261,16 @@ error:
static unsigned
test_delete(hid_t fapl, const H5B2_create_t *cparam)
{
- hid_t file = -1; /* File ID */
- char filename[1024]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
- h5_stat_size_t empty_size; /* Size of an empty file */
- h5_stat_size_t file_size; /* Size of each file created */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- unsigned u; /* Local index variable */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ char filename[1024]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ h5_stat_size_t empty_size; /* Size of an empty file */
+ h5_stat_size_t file_size; /* Size of each file created */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
@@ -9530,18 +9530,18 @@ error:
static unsigned
test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
- hsize_t record; /* Record to insert into tree */
- hsize_t modify; /* Modified value */
- hsize_t found; /* Found value */
- H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
- H5B2_node_info_test_t ninfo; /* B-tree node info */
- unsigned u; /* Local index variable */
- hbool_t rec_found; /* Whether record was found */
- herr_t ret; /* Generic error return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ hsize_t record; /* Record to insert into tree */
+ hsize_t modify; /* Modified value */
+ hsize_t found; /* Found value */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ H5B2_node_info_test_t ninfo; /* B-tree node info */
+ unsigned u; /* Local index variable */
+ bool rec_found; /* Whether record was found */
+ herr_t ret; /* Generic error return value */
/*
* Test modifying records
@@ -9612,7 +9612,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa
/* Attempt to find modified record */
record = 4331;
found = 4331;
- rec_found = FALSE;
+ rec_found = false;
if (H5B2_find(bt2, &record, &rec_found, find_cb, &found) < 0)
FAIL_STACK_ERROR;
if (found != 4331)
@@ -9663,7 +9663,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa
/* Attempt to find modified record */
record = 5352;
found = 5352;
- rec_found = FALSE;
+ rec_found = false;
if (H5B2_find(bt2, &record, &rec_found, find_cb, &found) < 0)
STACK_ERROR;
if (found != 5352)
@@ -9714,7 +9714,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa
/* Attempt to find modified record */
record = 9448;
found = 9448;
- rec_found = FALSE;
+ rec_found = false;
if (H5B2_find(bt2, &record, &rec_found, find_cb, &found) < 0)
STACK_ERROR;
if (found != 9448)
@@ -9773,17 +9773,17 @@ error:
static unsigned
test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam)
{
- char filename[1024]; /* Filename to use */
- char filename_tmp[1024]; /* Temporary file name */
- hid_t file = -1; /* File ID */
- hid_t file2 = -1; /* File ID */
- hid_t file0 = -1; /* File ID */
- hid_t file00 = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5F_t *f2 = NULL; /* Internal file object pointer */
- H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
- H5B2_t *bt2_2 = NULL; /* Second v2 B-tree wrapper */
- haddr_t bt2_addr; /* Address of B-tree created */
+ char filename[1024]; /* Filename to use */
+ char filename_tmp[1024]; /* Temporary file name */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t file2 = H5I_INVALID_HID; /* File ID */
+ hid_t file0 = H5I_INVALID_HID; /* File ID */
+ hid_t file00 = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5F_t *f2 = NULL; /* Internal file object pointer */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ H5B2_t *bt2_2 = NULL; /* Second v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
@@ -9909,16 +9909,16 @@ error:
int
main(void)
{
- H5B2_create_t cparam, cparam2; /* Creation parameters for v2 B-tree */
- bt2_test_param_t tparam; /* Test parameters for v2 B-tree */
- hid_t fapl = -1; /* File access property list for data files */
- unsigned nerrors = 0; /* Cumulative error count */
- unsigned reopen; /* Whether to reopen B-tree during tests */
+ H5B2_create_t cparam, cparam2; /* Creation parameters for v2 B-tree */
+ bt2_test_param_t tparam; /* Test parameters for v2 B-tree */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list for data files */
+ unsigned nerrors = 0; /* Cumulative error count */
+ unsigned reopen; /* Whether to reopen B-tree during tests */
int ExpressMode;
const char *envval = NULL;
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
- envval = HDgetenv(HDF5_DRIVER);
+ envval = getenv(HDF5_DRIVER);
if (envval == NULL)
envval = "nomatch";
@@ -9928,7 +9928,7 @@ main(void)
ExpressMode = GetTestExpress();
/* For the Direct I/O driver, skip intensive tests due to poor performance */
- if (!HDstrcmp(envval, "direct"))
+ if (!strcmp(envval, "direct"))
ExpressMode = 2;
if (ExpressMode > 1)
@@ -9940,17 +9940,17 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Loop over re-opening B-tree during tests */
- for (reopen = FALSE; reopen <= TRUE; reopen++) {
+ for (reopen = false; reopen <= true; reopen++) {
if (reopen) {
fprintf(stdout, "Testing with reopening B-tree:\n");
- tparam.reopen_btree = TRUE;
+ tparam.reopen_btree = true;
} /* end if */
else {
fprintf(stdout, "Testing without reopening B-tree:\n");
- tparam.reopen_btree = FALSE;
+ tparam.reopen_btree = false;
} /* end else */
/* Test B-tree record insertion */
@@ -10031,21 +10031,21 @@ main(void)
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
if (nerrors)
goto error;
- HDputs("All v2 B-tree tests passed.");
+ puts("All v2 B-tree tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
@@ -10054,7 +10054,7 @@ error:
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
return 1;
} /* end main() */
diff --git a/test/cache.c b/test/cache.c
index 673b253..4e62886 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -41,12 +41,12 @@ hid_t saved_fcpl_id = H5P_DEFAULT; /* store the fcpl id here between
* close.
*/
-hid_t saved_fid = -1; /* store the file id here between cache setup
- * and takedown.
- */
-hbool_t write_permitted = TRUE;
-hbool_t try_core_file_driver = FALSE;
-hbool_t core_file_driver_failed = FALSE;
+hid_t saved_fid = H5I_INVALID_HID; /* store the file id here between cache setup
+ * and takedown.
+ */
+bool write_permitted = true;
+bool try_core_file_driver = false;
+bool core_file_driver_failed = false;
/* global variable declarations: */
@@ -58,80 +58,80 @@ struct flush_cache_test_spec {
int entry_num;
int entry_type;
int entry_index;
- hbool_t insert_flag;
+ bool insert_flag;
unsigned int flags;
- hbool_t expected_deserialized;
- hbool_t expected_serialized;
- hbool_t expected_destroyed;
+ bool expected_deserialized;
+ bool expected_serialized;
+ bool expected_destroyed;
};
struct pe_flush_cache_test_spec {
int entry_num;
int entry_type;
int entry_index;
- hbool_t insert_flag;
+ bool insert_flag;
unsigned int flags;
int num_pins;
int pin_type[MAX_PINS];
int pin_idx[MAX_PINS];
- hbool_t expected_deserialized;
- hbool_t expected_serialized;
- hbool_t expected_destroyed;
+ bool expected_deserialized;
+ bool expected_serialized;
+ bool expected_destroyed;
};
struct fo_flush_entry_check {
- int entry_num;
- int entry_type;
- int entry_index;
- size_t expected_size;
- hbool_t in_cache;
- hbool_t at_main_addr;
- hbool_t is_dirty;
- hbool_t is_protected;
- hbool_t is_pinned;
- hbool_t expected_deserialized;
- hbool_t expected_serialized;
- hbool_t expected_destroyed;
+ int entry_num;
+ int entry_type;
+ int entry_index;
+ size_t expected_size;
+ bool in_cache;
+ bool at_main_addr;
+ bool is_dirty;
+ bool is_protected;
+ bool is_pinned;
+ bool expected_deserialized;
+ bool expected_serialized;
+ bool expected_destroyed;
};
struct fo_flush_cache_test_spec {
int entry_num;
int entry_type;
int entry_index;
- hbool_t insert_flag;
+ bool insert_flag;
unsigned int flags;
- hbool_t resize_flag;
+ bool resize_flag;
size_t new_size;
int num_pins;
int pin_type[MAX_PINS];
int pin_idx[MAX_PINS];
int num_flush_ops;
struct flush_op flush_ops[MAX_FLUSH_OPS];
- hbool_t expected_deserialized;
- hbool_t expected_serialized;
- hbool_t expected_destroyed;
+ bool expected_deserialized;
+ bool expected_serialized;
+ bool expected_destroyed;
};
struct move_entry_test_spec {
- int entry_type;
- int entry_index;
- hbool_t is_pinned;
- hbool_t is_protected;
+ int entry_type;
+ int entry_index;
+ bool is_pinned;
+ bool is_protected;
};
struct pinned_single_entry_test_spec {
int test_num;
int entry_type;
int entry_idx;
- hbool_t dirty_flag;
- hbool_t mark_dirty;
- hbool_t pop_mark_dirty_prot;
- hbool_t pop_mark_dirty_pinned;
- hbool_t unprotect_unpin;
+ bool dirty_flag;
+ bool mark_dirty;
+ bool pop_mark_dirty_prot;
+ bool pop_mark_dirty_pinned;
+ bool unprotect_unpin;
unsigned int flags;
unsigned int flush_flags;
- hbool_t expected_serialized;
- hbool_t expected_destroyed;
+ bool expected_serialized;
+ bool expected_destroyed;
};
/* private function declarations: */
@@ -158,21 +158,23 @@ static void check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num
struct pe_flush_cache_test_spec spec[]);
static void check_flush_cache__single_entry(H5F_t *file_ptr);
static void check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_type, int entry_idx,
- hbool_t insert_flag, unsigned int flags,
- unsigned int flush_flags, hbool_t expected_deserialized,
- hbool_t expected_serialized, hbool_t expected_destroyed);
-static void check_flush_cache__pinned_single_entry_test(
- H5F_t *file_ptr, int test_num, int entry_type, int entry_idx, hbool_t unprot_dirty_flag,
- hbool_t mark_dirty, hbool_t pop_mark_dirty_prot, hbool_t pop_mark_dirty_pinned, hbool_t unprotect_unpin,
- unsigned int flags, unsigned int flush_flags, hbool_t expected_serialized, hbool_t expected_destroyed);
-static void check_flush_cache__flush_ops(H5F_t *file_ptr);
-static void check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flush_flags,
- int spec_size, const struct fo_flush_cache_test_spec spec[],
- unsigned init_expected_index_len,
- size_t init_expected_index_size, unsigned expected_index_len,
- size_t expected_index_size, int check_size,
- struct fo_flush_entry_check check[]);
-static void check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr);
+ bool insert_flag, unsigned int flags,
+ unsigned int flush_flags, bool expected_deserialized,
+ bool expected_serialized, bool expected_destroyed);
+static void check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int entry_type,
+ int entry_idx, bool unprot_dirty_flag,
+ bool mark_dirty, bool pop_mark_dirty_prot,
+ bool pop_mark_dirty_pinned, bool unprotect_unpin,
+ unsigned int flags, unsigned int flush_flags,
+ bool expected_serialized, bool expected_destroyed);
+static void check_flush_cache__flush_ops(H5F_t *file_ptr);
+static void check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flush_flags,
+ int spec_size, const struct fo_flush_cache_test_spec spec[],
+ unsigned init_expected_index_len,
+ size_t init_expected_index_size, unsigned expected_index_len,
+ size_t expected_index_size, int check_size,
+ struct fo_flush_entry_check check[]);
+static void check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr);
static unsigned check_get_entry_status(unsigned paged);
static unsigned check_expunge_entry(unsigned paged);
static unsigned check_multiple_read_protect(unsigned paged);
@@ -199,17 +201,17 @@ static unsigned check_unprotect_ro_dirty_err(unsigned paged);
static unsigned check_protect_ro_rw_err(unsigned paged);
static unsigned check_protect_retries(unsigned paged);
static unsigned check_check_evictions_enabled_err(unsigned paged);
-static unsigned check_auto_cache_resize(hbool_t cork_ageout, unsigned paged);
+static unsigned check_auto_cache_resize(bool cork_ageout, unsigned paged);
static unsigned check_auto_cache_resize_disable(unsigned paged);
static unsigned check_auto_cache_resize_epoch_markers(unsigned paged);
static unsigned check_auto_cache_resize_input_errs(unsigned paged);
static unsigned check_auto_cache_resize_aux_fcns(unsigned paged);
-static unsigned check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged);
+static unsigned check_metadata_blizzard_absence(bool fill_via_insertion, unsigned paged);
static unsigned check_flush_deps(unsigned paged);
static unsigned check_flush_deps_err(unsigned paged);
static unsigned check_flush_deps_order(unsigned paged);
static unsigned check_notify_cb(unsigned paged);
-static unsigned check_metadata_cork(hbool_t fill_via_insertion, unsigned paged);
+static unsigned check_metadata_cork(bool fill_via_insertion, unsigned paged);
static unsigned check_entry_deletions_during_scans(unsigned paged);
static void cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr);
static void cedds__H5C_make_space_in_cache(H5F_t *file_ptr);
@@ -222,7 +224,7 @@ static void check_stats__smoke_check_1(H5F_t *file_ptr);
static H5F_t *setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged);
-static void takedown_cache(H5F_t *file_ptr, hbool_t dump_stats, hbool_t dump_detailed_stats);
+static void takedown_cache(H5F_t *file_ptr, bool dump_stats, bool dump_detailed_stats);
/**************************************************************************/
/**************************************************************************/
@@ -245,10 +247,10 @@ static void takedown_cache(H5F_t *file_ptr, hbool_t dump_stats, hbool_t dump_det
static unsigned
smoke_check_1(int express_test, unsigned paged)
{
- hbool_t show_progress = FALSE;
- int dirty_unprotects = FALSE;
- int dirty_destroys = FALSE;
- hbool_t display_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = false;
+ int dirty_destroys = false;
+ bool display_stats = false;
int32_t lag = 10;
int32_t max_index = (10 * 1024) - 1;
int mile_stone = 1;
@@ -285,7 +287,7 @@ smoke_check_1(int express_test, unsigned paged)
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -303,15 +305,15 @@ smoke_check_1(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ TRUE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ true,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -321,15 +323,15 @@ smoke_check_1(int express_test, unsigned paged)
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ FALSE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ TRUE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ false,
+ /* do_moves */ true,
+ /* move_to_main_addr */ true,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -339,15 +341,15 @@ smoke_check_1(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -357,9 +359,9 @@ smoke_check_1(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 7 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -367,11 +369,11 @@ smoke_check_1(int express_test, unsigned paged)
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
@@ -380,9 +382,9 @@ smoke_check_1(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 9 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -390,17 +392,17 @@ smoke_check_1(int express_test, unsigned paged)
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 11 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -440,10 +442,10 @@ smoke_check_1(int express_test, unsigned paged)
static unsigned
smoke_check_2(int express_test, unsigned paged)
{
- hbool_t show_progress = FALSE;
- int dirty_unprotects = TRUE;
- int dirty_destroys = TRUE;
- hbool_t display_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = true;
+ int dirty_destroys = true;
+ bool display_stats = false;
int32_t max_index = (10 * 1024) - 1;
int32_t lag = 10;
int mile_stone = 1;
@@ -480,7 +482,7 @@ smoke_check_2(int express_test, unsigned paged)
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -498,15 +500,15 @@ smoke_check_2(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ TRUE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ true,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -516,15 +518,15 @@ smoke_check_2(int express_test, unsigned paged)
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ FALSE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ TRUE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ false,
+ /* do_moves */ true,
+ /* move_to_main_addr */ true,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -534,15 +536,15 @@ smoke_check_2(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -552,9 +554,9 @@ smoke_check_2(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 7 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -562,11 +564,11 @@ smoke_check_2(int express_test, unsigned paged)
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
@@ -575,9 +577,9 @@ smoke_check_2(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 9 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -585,17 +587,17 @@ smoke_check_2(int express_test, unsigned paged)
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 11 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -634,10 +636,10 @@ smoke_check_2(int express_test, unsigned paged)
static unsigned
smoke_check_3(int express_test, unsigned paged)
{
- hbool_t show_progress = FALSE;
- int dirty_unprotects = FALSE;
- int dirty_destroys = FALSE;
- hbool_t display_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = false;
+ int dirty_destroys = false;
+ bool display_stats = false;
int32_t max_index = (10 * 1024) - 1;
int32_t lag = 10;
int mile_stone = 1;
@@ -674,7 +676,7 @@ smoke_check_3(int express_test, unsigned paged)
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -692,15 +694,15 @@ smoke_check_3(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ TRUE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ true,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -710,15 +712,15 @@ smoke_check_3(int express_test, unsigned paged)
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ FALSE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ TRUE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ false,
+ /* do_moves */ true,
+ /* move_to_main_addr */ true,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -728,15 +730,15 @@ smoke_check_3(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -746,9 +748,9 @@ smoke_check_3(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 7 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -756,11 +758,11 @@ smoke_check_3(int express_test, unsigned paged)
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
@@ -769,9 +771,9 @@ smoke_check_3(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 9 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -779,17 +781,17 @@ smoke_check_3(int express_test, unsigned paged)
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 11 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -829,10 +831,10 @@ smoke_check_3(int express_test, unsigned paged)
static unsigned
smoke_check_4(int express_test, unsigned paged)
{
- hbool_t show_progress = FALSE;
- int dirty_unprotects = TRUE;
- int dirty_destroys = TRUE;
- hbool_t display_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = true;
+ int dirty_destroys = true;
+ bool display_stats = false;
int32_t max_index = (10 * 1024) - 1;
int32_t lag = 10;
int mile_stone = 1;
@@ -869,7 +871,7 @@ smoke_check_4(int express_test, unsigned paged)
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -887,15 +889,15 @@ smoke_check_4(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ TRUE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ true,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -905,15 +907,15 @@ smoke_check_4(int express_test, unsigned paged)
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ FALSE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ TRUE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ false,
+ /* do_moves */ true,
+ /* move_to_main_addr */ true,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -923,15 +925,15 @@ smoke_check_4(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -941,9 +943,9 @@ smoke_check_4(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 7 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -951,11 +953,11 @@ smoke_check_4(int express_test, unsigned paged)
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
@@ -964,9 +966,9 @@ smoke_check_4(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 9 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -974,17 +976,17 @@ smoke_check_4(int express_test, unsigned paged)
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 11 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1025,9 +1027,9 @@ static unsigned
smoke_check_5(int express_test, unsigned paged)
{
herr_t result;
- hbool_t show_progress = FALSE;
- int dirty_unprotects = FALSE;
- hbool_t display_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = false;
+ bool display_stats = false;
int32_t max_index = 1024;
int mile_stone = 1;
H5F_t *file_ptr = NULL;
@@ -1035,7 +1037,7 @@ smoke_check_5(int express_test, unsigned paged)
H5C_auto_size_ctl_t auto_size_ctl = {
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ NULL,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (2 * 1024 * 1024),
/* double min_clean_fraction = */ 0.1,
@@ -1051,7 +1053,7 @@ smoke_check_5(int express_test, unsigned paged)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -1065,12 +1067,12 @@ smoke_check_5(int express_test, unsigned paged)
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.5};
if (paged)
@@ -1104,7 +1106,7 @@ smoke_check_5(int express_test, unsigned paged)
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1123,7 +1125,7 @@ smoke_check_5(int express_test, unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -1133,33 +1135,33 @@ smoke_check_5(int express_test, unsigned paged)
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ FALSE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ false);
if (show_progress) /* 4 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ FALSE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ false);
if (show_progress) /* 5 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true);
if (show_progress) /* 6 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1167,20 +1169,20 @@ smoke_check_5(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 7 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
@@ -1189,26 +1191,26 @@ smoke_check_5(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 9 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 11 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1249,9 +1251,9 @@ static unsigned
smoke_check_6(int express_test, unsigned paged)
{
herr_t result;
- hbool_t show_progress = FALSE;
- int dirty_unprotects = FALSE;
- hbool_t display_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = false;
+ bool display_stats = false;
int mile_stone = 1;
int32_t max_index = 1024;
H5F_t *file_ptr = NULL;
@@ -1259,7 +1261,7 @@ smoke_check_6(int express_test, unsigned paged)
H5C_auto_size_ctl_t auto_size_ctl = {
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ NULL,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (2 * 1024 * 1024),
/* double min_clean_fraction = */ 0.1,
@@ -1275,7 +1277,7 @@ smoke_check_6(int express_test, unsigned paged)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -1289,12 +1291,12 @@ smoke_check_6(int express_test, unsigned paged)
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05};
if (paged)
@@ -1308,7 +1310,7 @@ smoke_check_6(int express_test, unsigned paged)
return (0);
}
- pass = TRUE;
+ pass = true;
switch (express_test) {
case 0:
@@ -1347,7 +1349,7 @@ smoke_check_6(int express_test, unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -1357,33 +1359,33 @@ smoke_check_6(int express_test, unsigned paged)
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ FALSE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ false);
if (show_progress) /* 4 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ FALSE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ false);
if (show_progress) /* 5 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true);
if (show_progress) /* 6 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1391,20 +1393,20 @@ smoke_check_6(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 7 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
@@ -1413,26 +1415,26 @@ smoke_check_6(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 9 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 11 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1473,9 +1475,9 @@ static unsigned
smoke_check_7(int express_test, unsigned paged)
{
herr_t result;
- hbool_t show_progress = FALSE;
- int dirty_unprotects = FALSE;
- hbool_t display_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = false;
+ bool display_stats = false;
int mile_stone = 1;
int32_t max_index = 1024;
H5F_t *file_ptr = NULL;
@@ -1483,7 +1485,7 @@ smoke_check_7(int express_test, unsigned paged)
H5C_auto_size_ctl_t auto_size_ctl = {
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ NULL,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (2 * 1024 * 1024),
/* double min_clean_fraction = */ 0.1,
@@ -1499,7 +1501,7 @@ smoke_check_7(int express_test, unsigned paged)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (8 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -1514,12 +1516,12 @@ smoke_check_7(int express_test, unsigned paged)
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.1};
if (paged)
@@ -1553,7 +1555,7 @@ smoke_check_7(int express_test, unsigned paged)
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1572,7 +1574,7 @@ smoke_check_7(int express_test, unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -1582,33 +1584,33 @@ smoke_check_7(int express_test, unsigned paged)
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ FALSE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ false);
if (show_progress) /* 4 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ FALSE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ false);
if (show_progress) /* 5 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true);
if (show_progress) /* 6 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1616,20 +1618,20 @@ smoke_check_7(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 7 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
@@ -1638,26 +1640,26 @@ smoke_check_7(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 9 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 11 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1698,9 +1700,9 @@ static unsigned
smoke_check_8(int express_test, unsigned paged)
{
herr_t result;
- hbool_t show_progress = FALSE;
- int dirty_unprotects = FALSE;
- hbool_t display_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = false;
+ bool display_stats = false;
int mile_stone = 1;
int32_t max_index = 1024;
H5F_t *file_ptr = NULL;
@@ -1708,7 +1710,7 @@ smoke_check_8(int express_test, unsigned paged)
H5C_auto_size_ctl_t auto_size_ctl = {
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ NULL,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (2 * 1024 * 1024),
/* double min_clean_fraction = */ 0.1,
@@ -1724,7 +1726,7 @@ smoke_check_8(int express_test, unsigned paged)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -1739,12 +1741,12 @@ smoke_check_8(int express_test, unsigned paged)
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.1};
if (paged)
@@ -1778,7 +1780,7 @@ smoke_check_8(int express_test, unsigned paged)
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1797,7 +1799,7 @@ smoke_check_8(int express_test, unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -1807,33 +1809,33 @@ smoke_check_8(int express_test, unsigned paged)
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ FALSE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ false);
if (show_progress) /* 4 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ FALSE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ false);
if (show_progress) /* 5 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE);
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true);
if (show_progress) /* 6 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1841,20 +1843,20 @@ smoke_check_8(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 7 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 8 */
@@ -1863,26 +1865,26 @@ smoke_check_8(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 9 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ FALSE,
- /* do_inserts */ TRUE,
+ /* display_detailed_stats */ false,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 11 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1926,11 +1928,11 @@ static unsigned
smoke_check_9(int express_test, unsigned paged)
{
herr_t result;
- hbool_t show_progress = FALSE;
- int dirty_unprotects = FALSE;
- int dirty_destroys = FALSE;
- hbool_t display_stats = FALSE;
- hbool_t display_detailed_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = false;
+ int dirty_destroys = false;
+ bool display_stats = false;
+ bool display_detailed_stats = false;
int32_t max_index = (10 * 1024) - 1;
int32_t lag = 10;
int mile_stone = 1;
@@ -1968,7 +1970,7 @@ smoke_check_9(int express_test, unsigned paged)
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -1988,11 +1990,11 @@ smoke_check_9(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't disable evictions 1.\n";
}
}
@@ -2003,15 +2005,15 @@ smoke_check_9(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ TRUE,
- /* do_mult_ro_protects */ TRUE,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ true,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -2022,11 +2024,11 @@ smoke_check_9(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, TRUE);
+ result = H5C_set_evictions_enabled(cache_ptr, true);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't enable evictions 1.\n";
}
}
@@ -2037,15 +2039,15 @@ smoke_check_9(int express_test, unsigned paged)
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ FALSE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ TRUE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* do_inserts */ false,
+ /* do_moves */ true,
+ /* move_to_main_addr */ true,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -2054,11 +2056,11 @@ smoke_check_9(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't disable evictions 2.\n";
}
}
@@ -2070,15 +2072,15 @@ smoke_check_9(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -2087,11 +2089,11 @@ smoke_check_9(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, TRUE);
+ result = H5C_set_evictions_enabled(cache_ptr, true);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't enable evictions 2.\n";
}
}
@@ -2102,20 +2104,20 @@ smoke_check_9(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 11 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't disable evictions 3.\n";
}
}
@@ -2126,11 +2128,11 @@ smoke_check_9(int express_test, unsigned paged)
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ TRUE,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 13 */
@@ -2139,20 +2141,20 @@ smoke_check_9(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 14 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, TRUE);
+ result = H5C_set_evictions_enabled(cache_ptr, true);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't enable evictions 3.\n";
}
}
@@ -2163,11 +2165,11 @@ smoke_check_9(int express_test, unsigned paged)
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ TRUE,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 16 */
@@ -2175,11 +2177,11 @@ smoke_check_9(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't disable evictions 4.\n";
}
}
@@ -2187,7 +2189,7 @@ smoke_check_9(int express_test, unsigned paged)
if (show_progress) /* 17 */
fprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 18 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -2231,11 +2233,11 @@ static unsigned
smoke_check_10(int express_test, unsigned paged)
{
herr_t result;
- hbool_t show_progress = FALSE;
- int dirty_unprotects = TRUE;
- int dirty_destroys = TRUE;
- hbool_t display_stats = FALSE;
- hbool_t display_detailed_stats = FALSE;
+ bool show_progress = false;
+ int dirty_unprotects = true;
+ int dirty_destroys = true;
+ bool display_stats = false;
+ bool display_detailed_stats = false;
int32_t max_index = (10 * 1024) - 1;
int32_t lag = 10;
int mile_stone = 1;
@@ -2273,7 +2275,7 @@ smoke_check_10(int express_test, unsigned paged)
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -2292,15 +2294,15 @@ smoke_check_10(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ TRUE,
- /* do_mult_ro_protects */ TRUE,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ true,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -2309,11 +2311,11 @@ smoke_check_10(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't disable evictions 1.\n";
}
}
@@ -2324,15 +2326,15 @@ smoke_check_10(int express_test, unsigned paged)
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ FALSE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ TRUE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* do_inserts */ false,
+ /* do_moves */ true,
+ /* move_to_main_addr */ true,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -2341,11 +2343,11 @@ smoke_check_10(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, TRUE);
+ result = H5C_set_evictions_enabled(cache_ptr, true);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't enable evictions 1.\n";
}
}
@@ -2356,15 +2358,15 @@ smoke_check_10(int express_test, unsigned paged)
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
@@ -2373,11 +2375,11 @@ smoke_check_10(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't disable evictions 2.\n";
}
}
@@ -2388,20 +2390,20 @@ smoke_check_10(int express_test, unsigned paged)
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, TRUE);
+ result = H5C_set_evictions_enabled(cache_ptr, true);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't enable evictions 2.\n";
}
}
@@ -2412,11 +2414,11 @@ smoke_check_10(int express_test, unsigned paged)
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ TRUE,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 12 */
@@ -2424,11 +2426,11 @@ smoke_check_10(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't disable evictions 3.\n";
}
}
@@ -2439,20 +2441,20 @@ smoke_check_10(int express_test, unsigned paged)
/* flush all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ FALSE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ false,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 14 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, TRUE);
+ result = H5C_set_evictions_enabled(cache_ptr, true);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't enable evictions 3.\n";
}
}
@@ -2463,11 +2465,11 @@ smoke_check_10(int express_test, unsigned paged)
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
/* display_detailed_stats */ display_detailed_stats,
- /* do_inserts */ TRUE,
+ /* do_inserts */ true,
/* dirty_unprotects */ dirty_unprotects);
if (show_progress) /* 16 */
@@ -2475,11 +2477,11 @@ smoke_check_10(int express_test, unsigned paged)
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't disable evictions 4.\n";
}
}
@@ -2487,7 +2489,7 @@ smoke_check_10(int express_test, unsigned paged)
if (show_progress) /* 17 */
fprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 18 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -2516,9 +2518,9 @@ smoke_check_10(int express_test, unsigned paged)
*
* Purpose: A basic test of the write permitted function. In essence,
* we load the cache up with dirty entryies, set
- * write_permitted to FALSE, and then protect a bunch of
+ * write_permitted to false, and then protect a bunch of
* entries. If there are any writes while write_permitted is
- * FALSE, the test will fail.
+ * false, the test will fail.
*
* Return: void
*
@@ -2535,8 +2537,8 @@ write_permitted_check(int
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
- hbool_t show_progress = FALSE;
- hbool_t display_stats = FALSE;
+ bool show_progress = false;
+ bool display_stats = false;
int32_t max_index = (10 * 1024) - 1;
int32_t lag = 10;
int mile_stone = 1;
@@ -2571,7 +2573,7 @@ write_permitted_check(int
break;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -2589,57 +2591,57 @@ write_permitted_check(int
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ TRUE,
- /* do_mult_ro_protects */ TRUE,
- /* dirty_destroys */ TRUE,
- /* dirty_unprotects */ TRUE);
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ true,
+ /* do_mult_ro_protects */ true,
+ /* dirty_destroys */ true,
+ /* dirty_unprotects */ true);
if (show_progress) /* 4 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- write_permitted = FALSE;
+ write_permitted = false;
row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ FALSE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ TRUE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
- /* dirty_destroys */ FALSE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ false,
+ /* do_moves */ true,
+ /* move_to_main_addr */ true,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
+ /* dirty_destroys */ false,
/* dirty_unprotects */ NO_CHANGE);
if (show_progress) /* 5 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- write_permitted = TRUE;
+ write_permitted = true;
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
- /* do_moves */ TRUE,
- /* move_to_main_addr */ FALSE,
- /* do_destroys */ FALSE,
- /* do_mult_ro_protects */ TRUE,
- /* dirty_destroys */ TRUE,
- /* dirty_unprotects */ TRUE);
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
+ /* do_moves */ true,
+ /* move_to_main_addr */ false,
+ /* do_destroys */ false,
+ /* do_mult_ro_protects */ true,
+ /* dirty_destroys */ true,
+ /* dirty_unprotects */ true);
if (show_progress) /* 6 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -2647,9 +2649,9 @@ write_permitted_check(int
/* flush and destroy all entries in the cache: */
flush_cache(/* file_ptr */ file_ptr,
- /* destroy_entries */ TRUE,
- /* dump_stats */ FALSE,
- /* dump_detailed_stats */ FALSE);
+ /* destroy_entries */ true,
+ /* dump_stats */ false,
+ /* dump_detailed_stats */ false);
if (show_progress) /* 7 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -2657,34 +2659,34 @@ write_permitted_check(int
col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ TRUE,
- /* dirty_unprotects */ TRUE);
+ /* display_detailed_stats */ true,
+ /* do_inserts */ true,
+ /* dirty_unprotects */ true);
if (show_progress) /* 8 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- write_permitted = FALSE;
+ write_permitted = false;
col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
- /* verbose */ FALSE,
- /* reset_stats */ TRUE,
+ /* verbose */ false,
+ /* reset_stats */ true,
/* display_stats */ display_stats,
- /* display_detailed_stats */ TRUE,
- /* do_inserts */ FALSE,
+ /* display_detailed_stats */ true,
+ /* do_inserts */ false,
/* dirty_unprotects */ NO_CHANGE);
- write_permitted = TRUE;
+ write_permitted = true;
if (show_progress) /* 9 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
- takedown_cache(file_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, true);
if (show_progress) /* 10 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -2738,10 +2740,10 @@ check_insert_entry(unsigned paged)
int entry_type = PICO_ENTRY_TYPE;
int i;
herr_t result;
- hbool_t in_cache;
- hbool_t is_dirty;
- hbool_t is_protected;
- hbool_t is_pinned;
+ bool in_cache;
+ bool is_dirty;
+ bool is_protected;
+ bool is_pinned;
size_t entry_size;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
@@ -2754,7 +2756,7 @@ check_insert_entry(unsigned paged)
else
TESTING("H5C_insert_entry() functionality");
- pass = TRUE;
+ pass = true;
/* Allocate a cache, and insert entries into it using all
* combinations of flags. Verify that the entries are inserted,
@@ -2796,7 +2798,7 @@ check_insert_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_entry_status() reports failure.";
}
@@ -2805,7 +2807,7 @@ check_insert_entry(unsigned paged)
/* check the universals */
if ((!in_cache) || (!is_dirty) || (is_protected) || (entry_size != entry_sizes[entry_type])) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 1.";
}
}
@@ -2817,18 +2819,18 @@ check_insert_entry(unsigned paged)
if (!is_pinned) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 2.";
}
}
else if (is_pinned) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 3.";
}
else if (is_pinned != ((entry_ptr->header).is_pinned)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 4.";
}
}
@@ -2844,13 +2846,13 @@ check_insert_entry(unsigned paged)
if (!((entry_ptr->header).flush_marker)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 5.";
}
}
else if ((entry_ptr->header).flush_marker) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 6.";
}
}
@@ -2868,7 +2870,7 @@ check_insert_entry(unsigned paged)
if (search_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 7.";
}
}
@@ -2887,7 +2889,7 @@ check_insert_entry(unsigned paged)
if (search_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 8.";
}
}
@@ -2907,7 +2909,7 @@ check_insert_entry(unsigned paged)
if (search_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 9.";
}
}
@@ -2938,7 +2940,7 @@ check_insert_entry(unsigned paged)
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 10.";
}
}
@@ -2958,7 +2960,7 @@ check_insert_entry(unsigned paged)
(cache_ptr->max_pl_len != 0) || (cache_ptr->max_pl_size != (size_t)0) ||
(cache_ptr->max_pel_len != 2) || (cache_ptr->max_pel_size != 2 * entry_sizes[entry_type])) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected insert results 11.";
}
}
@@ -2974,7 +2976,7 @@ check_insert_entry(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -3014,7 +3016,7 @@ check_flush_cache(unsigned paged)
else
TESTING("H5C_flush_cache() functionality");
- pass = TRUE;
+ pass = true;
/* allocate a cache, and flush it under various circumstances.
* To the extent possible, verify that the desired actions took
@@ -3058,7 +3060,7 @@ check_flush_cache(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -3096,12 +3098,12 @@ check_flush_cache__empty_cache(H5F_t *file_ptr)
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache_ptr NULL on entry to empty cache case.";
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not empty at beginning of empty cache case.";
}
@@ -3154,12 +3156,12 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache_ptr NULL on entry to multi entry case.";
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not empty at beginning of multi entry case.";
}
@@ -3171,67 +3173,67 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false}};
check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3244,67 +3246,67 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true}};
check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3317,67 +3319,67 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false}};
check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3390,67 +3392,67 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false}};
check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3463,67 +3465,67 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true}};
check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3536,67 +3538,67 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true}};
check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3609,67 +3611,67 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false}};
check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3683,67 +3685,67 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true}};
check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3758,67 +3760,67 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false}};
check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3837,99 +3839,99 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 2,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, 75, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 3,
/* pin_type[MAX_PINS] = */
{PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, 75, 25, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 4,
/* pin_type[MAX_PINS] = */
{PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 5,
/* pin_type[MAX_PINS] = */
{PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, MONSTER_ENTRY_TYPE, -1, -1,
-1},
/* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, 10, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 6,
/* pin_type[MAX_PINS] = */
{PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, MONSTER_ENTRY_TYPE,
MONSTER_ENTRY_TYPE, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, 10, 20, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 7,
/* pin_type[MAX_PINS] = */
{PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, MONSTER_ENTRY_TYPE,
MONSTER_ENTRY_TYPE, MONSTER_ENTRY_TYPE, -1},
/* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, 10, 20, 30, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false}};
check_flush_cache__pe_multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -3942,93 +3944,93 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 2,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, 75, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 3,
/* pin_type[MAX_PINS] = */
{PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, 75, 25, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {MONSTER_ENTRY_TYPE, -1, -1, -1, -1 - 1, -1, -1},
/* pin_idx[MAX_PINS] = */ {10, -1, -1, -1 - 1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 2,
/* pin_type[MAX_PINS] = */ {MONSTER_ENTRY_TYPE, MONSTER_ENTRY_TYPE, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {10, 20, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 3,
/* pin_type[MAX_PINS] = */
{MONSTER_ENTRY_TYPE, MONSTER_ENTRY_TYPE, MONSTER_ENTRY_TYPE, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {10, 20, 30, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true}};
check_flush_cache__pe_multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -4041,91 +4043,91 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true}};
check_flush_cache__pe_multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -4138,93 +4140,93 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
/* num_pins = */ 4,
/* pin_type[MAX_PINS] = */
{PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 4,
/* pin_type[MAX_PINS] = */
{PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true}};
check_flush_cache__pe_multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -4238,91 +4240,91 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
{/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 0,
/* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 75,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 25,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 4,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 5,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 6,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 30,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true},
{/* entry_num = */ 7,
/* entry_type = */ MONSTER_ENTRY_TYPE,
/* entry_index = */ 40,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__SET_FLUSH_MARKER_FLAG,
/* num_pins = */ 1,
/* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1},
/* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE}};
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true}};
check_flush_cache__pe_multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
@@ -4352,21 +4354,21 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
if (cache_ptr == NULL) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "cache_ptr NULL on entry to single entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "cache_ptr NULL on entry to single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
- HDsnprintf(msg, (size_t)128, "cache not empty at beginning of multi entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "cache not empty at beginning of multi entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((spec_size < 1) || (spec == NULL)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "missing/bad test spec on entry to multi entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "missing/bad test spec on entry to multi entry test #%d.", test_num);
failure_mssg = msg;
}
@@ -4377,9 +4379,8 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
(spec[u].entry_type >= NUMBER_OF_ENTRY_TYPES) || (spec[u].entry_index < 0) ||
(spec[u].entry_index > max_indices[spec[u].entry_type])) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "bad data in spec[%u] on entry to multi entry test #%d.", u,
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "bad data in spec[%u] on entry to multi entry test #%d.", u, test_num);
failure_mssg = msg;
}
u++;
@@ -4410,8 +4411,8 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
if (!pass) {
- HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in multi entry test #%d.", flush_flags,
- test_num);
+ snprintf(msg, (size_t)128, "flush with flags 0x%x failed in multi entry test #%d.", flush_flags,
+ test_num);
failure_mssg = msg;
}
}
@@ -4425,9 +4426,9 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
(entry_ptr->serialized != spec[u].expected_serialized) ||
(entry_ptr->destroyed != spec[u].expected_destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Bad status on entry %u after flush in multi entry test #%d.", u,
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Bad status on entry %u after flush in multi entry test #%d.", u,
+ test_num);
failure_mssg = msg;
}
u++;
@@ -4440,9 +4441,9 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
(((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0) &&
((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size after flush in multi entry test #%d.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after flush in multi entry test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -4454,15 +4455,15 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
if (!pass) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in multi entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Flush failed on cleanup in multi entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size after cleanup in multi entry test #%d.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after cleanup in multi entry test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -4473,9 +4474,9 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
base_addr = entries[spec[u].entry_type];
entry_ptr = &(base_addr[spec[u].entry_index]);
- entry_ptr->deserialized = FALSE;
- entry_ptr->serialized = FALSE;
- entry_ptr->destroyed = FALSE;
+ entry_ptr->deserialized = false;
+ entry_ptr->serialized = false;
+ entry_ptr->destroyed = false;
u++;
}
@@ -4507,21 +4508,21 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
if (cache_ptr == NULL) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "cache_ptr NULL on entry to pe multi entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "cache_ptr NULL on entry to pe multi entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
- HDsnprintf(msg, (size_t)128, "cache not empty at beginning of pe multi entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "cache not empty at beginning of pe multi entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((spec_size < 1) || (spec == NULL)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "missing/bad test spec on entry to pe multi entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "missing/bad test spec on entry to pe multi entry test #%d.", test_num);
failure_mssg = msg;
}
@@ -4533,9 +4534,9 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
(spec[u].entry_index > max_indices[spec[u].entry_type]) || (spec[u].num_pins < 0) ||
(spec[u].num_pins > MAX_PINS)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "bad data in spec[%u] on entry to pe multi entry test #%d.", u,
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "bad data in spec[%u] on entry to pe multi entry test #%d.", u,
+ test_num);
failure_mssg = msg;
}
u++;
@@ -4571,8 +4572,8 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
if (!pass) {
- HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in pe multi entry test #%d.",
- flush_flags, test_num);
+ snprintf(msg, (size_t)128, "flush with flags 0x%x failed in pe multi entry test #%d.",
+ flush_flags, test_num);
failure_mssg = msg;
}
}
@@ -4587,9 +4588,9 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
(entry_ptr->serialized != spec[u].expected_serialized) ||
(entry_ptr->destroyed != spec[u].expected_destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Bad status on entry %u after flush in pe multi entry test #%d.", u,
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Bad status on entry %u after flush in pe multi entry test #%d.", u,
+ test_num);
failure_mssg = msg;
}
u++;
@@ -4602,9 +4603,9 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
(((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0) &&
((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size after flush in pe multi entry test #%d.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after flush in pe multi entry test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -4616,15 +4617,15 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
if (!pass) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in pe multi entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Flush failed on cleanup in pe multi entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128,
- "Unexpected cache len/size after cleanup in pe multi entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after cleanup in pe multi entry test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -4635,9 +4636,9 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
base_addr = entries[spec[u].entry_type];
entry_ptr = &(base_addr[spec[u].entry_index]);
- entry_ptr->deserialized = FALSE;
- entry_ptr->serialized = FALSE;
- entry_ptr->destroyed = FALSE;
+ entry_ptr->deserialized = false;
+ entry_ptr->serialized = false;
+ entry_ptr->destroyed = false;
u++;
}
@@ -4653,7 +4654,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
* the case in which the flush callback dirties, resizes,
* and/or moves entries.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -4671,26 +4672,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache_ptr NULL on entry to flush ops test.";
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not empty at beginning of flush ops test.";
}
spec = malloc((size_t)max_num_spec * sizeof(struct fo_flush_cache_test_spec));
if (spec == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't allocate flush ops test spec array";
}
checks = malloc((size_t)max_num_check * sizeof(struct fo_flush_entry_check));
if (checks == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't allocate flush ops test check array";
}
@@ -4716,9 +4717,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -4726,26 +4727,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ 0,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -4753,32 +4754,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -4810,9 +4811,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -4820,26 +4821,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -4847,32 +4848,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr*/
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -4901,9 +4902,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 4,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -4911,32 +4912,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr:*/
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -4967,9 +4968,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 4,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -4977,32 +4978,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5040,9 +5041,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5050,32 +5051,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 2,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5094,7 +5095,7 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
*/
if (pass) {
- spec[0].flush_ops[1].flag = TRUE;
+ spec[0].flush_ops[1].flag = true;
test_num = 6;
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
@@ -5137,9 +5138,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5147,32 +5148,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 2,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5196,8 +5197,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
expected_index_len = 0;
expected_index_size = 0;
- spec[0].flush_ops[1].flag = TRUE;
- spec[0].expected_destroyed = TRUE;
+ spec[0].flush_ops[1].flag = true;
+ spec[0].expected_destroyed = true;
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5230,9 +5231,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 2,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5240,32 +5241,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 2,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5284,7 +5285,7 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
*/
if (pass) {
- spec[0].flush_ops[1].flag = TRUE;
+ spec[0].flush_ops[1].flag = true;
test_num = 10;
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
@@ -5321,9 +5322,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 2,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5331,32 +5332,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 2,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5379,8 +5380,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
expected_index_len = 0;
expected_index_size = 0;
- spec[0].flush_ops[1].flag = TRUE;
- spec[0].expected_destroyed = TRUE;
+ spec[0].flush_ops[1].flag = true;
+ spec[0].expected_destroyed = true;
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5414,9 +5415,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5424,44 +5425,44 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 2,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, 0, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, 0, 0, false, 0, NULL},
+ {FLUSH_OP__DIRTY, 0, 2, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ PICO_ENTRY_SIZE,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ PICO_ENTRY_SIZE,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5496,9 +5497,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5506,44 +5507,44 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 2,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, 0, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, 0, 0, false, 0, NULL},
+ {FLUSH_OP__DIRTY, 0, 2, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ PICO_ENTRY_SIZE,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ PICO_ENTRY_SIZE,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5576,9 +5577,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5586,44 +5587,44 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 4,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5657,9 +5658,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5667,44 +5668,44 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 4,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5737,9 +5738,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5747,44 +5748,44 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 6,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5801,10 +5802,10 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
if (pass) {
test_num = 18;
- spec[0].flush_ops[2].flag = TRUE;
- spec[0].flush_ops[5].flag = TRUE;
- checks[0].at_main_addr = TRUE;
- checks[1].at_main_addr = TRUE;
+ spec[0].flush_ops[2].flag = true;
+ spec[0].flush_ops[5].flag = true;
+ checks[0].at_main_addr = true;
+ checks[1].at_main_addr = true;
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5841,9 +5842,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5851,44 +5852,44 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 6,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5908,15 +5909,15 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
expected_index_len = 0;
expected_index_size = (size_t)0;
- spec[0].expected_destroyed = TRUE;
- spec[0].flush_ops[2].flag = TRUE;
- spec[0].flush_ops[5].flag = TRUE;
- checks[0].at_main_addr = TRUE;
- checks[0].in_cache = FALSE;
- checks[0].expected_destroyed = TRUE;
- checks[1].at_main_addr = TRUE;
- checks[1].in_cache = FALSE;
- checks[1].expected_destroyed = TRUE;
+ spec[0].expected_destroyed = true;
+ spec[0].flush_ops[2].flag = true;
+ spec[0].flush_ops[5].flag = true;
+ checks[0].at_main_addr = true;
+ checks[0].in_cache = false;
+ checks[0].expected_destroyed = true;
+ checks[1].at_main_addr = true;
+ checks[1].in_cache = false;
+ checks[1].expected_destroyed = true;
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5956,9 +5957,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5966,26 +5967,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 6,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 11,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -5993,26 +5994,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 6,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
spec[2] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6020,26 +6021,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[3] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6047,68 +6048,68 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ TRUE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ true,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ TRUE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ true,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
checks[2] = (struct fo_flush_entry_check){/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 10,
/* expected_size = */ VARIABLE_ENTRY_SIZE,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
checks[3] = (struct fo_flush_entry_check){/* entry_num = */ 3,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 12,
/* expected_size = */ VARIABLE_ENTRY_SIZE,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -6144,9 +6145,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6154,26 +6155,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 6,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 11,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6181,26 +6182,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 6,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[2] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6208,26 +6209,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[3] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6235,26 +6236,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
spec[4] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 4,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6262,26 +6263,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[5] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 5,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6289,68 +6290,68 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[2] = (struct fo_flush_entry_check){/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 10,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[3] = (struct fo_flush_entry_check){/* entry_num = */ 3,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 12,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -6387,9 +6388,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6397,26 +6398,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 6,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 11,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6424,26 +6425,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 6,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[2] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 0,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6451,26 +6452,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[3] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 3,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 1,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6478,26 +6479,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ true};
spec[4] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 4,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 10,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6505,26 +6506,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[5] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 5,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 20,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6532,68 +6533,68 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[2] = (struct fo_flush_entry_check){/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 10,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[3] = (struct fo_flush_entry_check){/* entry_num = */ 3,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 12,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -6626,9 +6627,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6636,26 +6637,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 1,
/* pin_type = */ {PICO_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -6663,26 +6664,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[2] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 150,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 1,
/* pin_type = */ {PICO_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -6690,32 +6691,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__DIRTY, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -6745,9 +6746,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6755,26 +6756,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 50,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 1,
/* pin_type = */ {PICO_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -6782,26 +6783,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[2] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 2,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 150,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 1,
/* pin_type = */ {PICO_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -6809,32 +6810,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__DIRTY, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -6934,9 +6935,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 200,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6944,26 +6945,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6971,26 +6972,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[2] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2300,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -6998,26 +6999,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[3] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 3,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 1000,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7025,26 +7026,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 4,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 300, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[4] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 4,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2000,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7052,26 +7053,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2300, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2100, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2200, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2300, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[5] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 5,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 350,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 2,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
@@ -7079,26 +7080,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 350, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 350, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[6] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 6,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 450,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 2,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
@@ -7106,26 +7107,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 450, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 450, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[7] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 7,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 650,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 2,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
@@ -7133,26 +7134,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 650, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 650, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[8] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 8,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 750,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 2,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
@@ -7160,26 +7161,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 750, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 750, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[9] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 9,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 500,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7187,56 +7188,56 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 4,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 350, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 450, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 650, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 750, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 350, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 450, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 650, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 750, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 100,
/* expected_size = */ VARIABLE_ENTRY_SIZE,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 300,
/* expected_size = */ VARIABLE_ENTRY_SIZE,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[2] = (struct fo_flush_entry_check){/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2200,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ TRUE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ true,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -7342,9 +7343,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 200,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7352,26 +7353,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7379,26 +7380,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[2] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2300,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7406,26 +7407,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[3] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 3,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 1000,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7433,26 +7434,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 4,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 300, false, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[4] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 4,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2000,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7460,26 +7461,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2300, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2100, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2200, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2300, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[5] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 5,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 350,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 2,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
@@ -7487,26 +7488,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 350, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 350, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[6] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 6,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 450,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 2,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
@@ -7514,26 +7515,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 450, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 450, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[7] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 7,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 650,
- /* insert_flag = */ TRUE,
+ /* insert_flag = */ true,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 2,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
@@ -7541,26 +7542,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 650, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 650, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[8] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 8,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 750,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 2,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
@@ -7568,26 +7569,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 750, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 750, false, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[9] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 9,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 500,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7595,56 +7596,56 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 4,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 350, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 450, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 650, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 750, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 350, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 450, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 650, false, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 750, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 100,
/* expected_size = */ VARIABLE_ENTRY_SIZE,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 300,
/* expected_size = */ VARIABLE_ENTRY_SIZE,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[2] = (struct fo_flush_entry_check){/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2200,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ true,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -7675,9 +7676,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7685,26 +7686,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 200,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 2,
/* num_pins = */ 1,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -7712,26 +7713,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 200, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, false, VARIABLE_ENTRY_SIZE, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 200, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[2] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 300,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 4,
/* num_pins = */ 1,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -7739,26 +7740,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 400, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 300, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 400, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 300, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[3] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 3,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 400,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7766,26 +7767,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
spec[4] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 4,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 500,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 4,
/* num_pins = */ 1,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -7793,32 +7794,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 500, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 500, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 500, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 500, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ false};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ 0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -7851,9 +7852,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 100,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7861,26 +7862,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[1] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 200,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 2,
/* num_pins = */ 1,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -7888,26 +7889,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 200, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, false, VARIABLE_ENTRY_SIZE, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 200, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[2] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 300,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 4,
/* num_pins = */ 1,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -7915,26 +7916,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 400, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 300, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 400, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 300, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[3] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 3,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 400,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
+ /* resize_flag = */ false,
/* new_size = */ 0,
/* num_pins = */ 0,
/* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
@@ -7942,26 +7943,26 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 0,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
spec[4] = (struct fo_flush_cache_test_spec){
/* entry_num = */ 4,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 500,
- /* insert_flag = */ FALSE,
+ /* insert_flag = */ false,
/* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
+ /* resize_flag = */ true,
/* new_size = */ VARIABLE_ENTRY_SIZE / 4,
/* num_pins = */ 1,
/* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
@@ -7969,32 +7970,32 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* num_flush_ops = */ 3,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 500, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 500, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE};
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, false, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 500, false, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 500, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, false, 0, NULL}},
+ /* expected_deserialized = */ true,
+ /* expected_serialized = */ true,
+ /* expected_destroyed = */ true};
checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ 0,
- /* in_cache = */ FALSE,
- /* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
- /* is_protected = */ FALSE,
- /* is_pinned = */ FALSE,
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE};
+ /* in_cache = */ false,
+ /* at_main_addr = */ false,
+ /* is_dirty = */ false,
+ /* is_protected = */ false,
+ /* is_pinned = */ false,
+ /* expected_deserialized = */ false,
+ /* expected_serialized = */ false,
+ /* expected_destroyed = */ false};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -8038,21 +8039,21 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
if (cache_ptr == NULL) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "cache_ptr NULL on entry to flush op test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "cache_ptr NULL on entry to flush op test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
- HDsnprintf(msg, (size_t)128, "cache not empty at beginning of flush op test #%d.", test_num);
+ snprintf(msg, (size_t)128, "cache not empty at beginning of flush op test #%d.", test_num);
failure_mssg = msg;
}
else if ((spec_size < 1) || (spec == NULL)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "missing/bad test spec on entry to flush op test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "missing/bad test spec on entry to flush op test #%d.", test_num);
failure_mssg = msg;
}
@@ -8065,8 +8066,8 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
(spec[i].num_pins > MAX_PINS) || (spec[i].num_flush_ops < 0) ||
(spec[i].num_flush_ops > MAX_FLUSH_OPS)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "bad data in spec[%d] on entry to flush op test #%d.", i, test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "bad data in spec[%d] on entry to flush op test #%d.", i, test_num);
failure_mssg = msg;
}
i++;
@@ -8080,8 +8081,8 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
(check[i].entry_index > max_indices[check[i].entry_type]) ||
(check[i].expected_size <= (size_t)0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "bad data in check[%d] on entry to flush op test #%d.", i, test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "bad data in check[%d] on entry to flush op test #%d.", i, test_num);
failure_mssg = msg;
}
i++;
@@ -8099,7 +8100,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
protect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index);
if (spec[i].resize_flag)
- resize_entry(file_ptr, spec[i].entry_type, spec[i].entry_index, spec[i].new_size, TRUE);
+ resize_entry(file_ptr, spec[i].entry_type, spec[i].entry_index, spec[i].new_size, true);
unprotect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index, spec[i].flags);
}
@@ -8124,9 +8125,9 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
if ((cache_ptr->index_len != init_expected_index_len) ||
(cache_ptr->index_size != init_expected_index_size)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size before flush in flush op test #%d.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache len/size before flush in flush op test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -8137,9 +8138,9 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
if (!pass) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in flush op test #%d.", flush_flags,
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "flush with flags 0x%x failed in flush op test #%d.", flush_flags,
+ test_num);
failure_mssg = msg;
}
}
@@ -8154,8 +8155,8 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
(entry_ptr->serialized != spec[i].expected_serialized) ||
(entry_ptr->destroyed != spec[i].expected_destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Bad status on entry %d after flush op test #%d.", i, test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Bad status on entry %d after flush op test #%d.", i, test_num);
failure_mssg = msg;
}
i++;
@@ -8168,9 +8169,8 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
if (check[i].in_cache != entry_in_cache(cache_ptr, check[i].entry_type, check[i].entry_index)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Check1 failed on entry %d after flush op test #%d.", i,
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Check1 failed on entry %d after flush op test #%d.", i, test_num);
failure_mssg = msg;
}
@@ -8191,9 +8191,8 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
(entry_ptr->serialized != check[i].expected_serialized) ||
(entry_ptr->destroyed != check[i].expected_destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Check2 failed on entry %d after flush op test #%d.", i,
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Check2 failed on entry %d after flush op test #%d.", i, test_num);
failure_mssg = msg;
}
i++;
@@ -8208,9 +8207,9 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
(((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0) &&
((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size after flush in flush op test #%d.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after flush in flush op test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -8222,15 +8221,15 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
if (!pass) {
- HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in flush op test #%d.", test_num);
+ snprintf(msg, (size_t)128, "Flush failed on cleanup in flush op test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) ||
(cache_ptr->clean_index_size != 0) || (cache_ptr->dirty_index_size != 0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128,
- "Unexpected cache len/size/cs/ds after cleanup in flush op test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache len/size/cs/ds after cleanup in flush op test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -8243,9 +8242,9 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
entry_ptr->size = entry_sizes[spec[i].entry_type];
- entry_ptr->deserialized = FALSE;
- entry_ptr->serialized = FALSE;
- entry_ptr->destroyed = FALSE;
+ entry_ptr->deserialized = false;
+ entry_ptr->serialized = false;
+ entry_ptr->destroyed = false;
i++;
}
@@ -8258,9 +8257,9 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
entry_ptr->size = entry_sizes[check[i].entry_type];
- entry_ptr->deserialized = FALSE;
- entry_ptr->serialized = FALSE;
- entry_ptr->destroyed = FALSE;
+ entry_ptr->deserialized = false;
+ entry_ptr->serialized = false;
+ entry_ptr->destroyed = false;
i++;
}
@@ -8273,7 +8272,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
* Purpose: Verify that flush operations work as expected when an
* entry is evicted.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -8296,7 +8295,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
expected = malloc((size_t)num_total_entries * sizeof(struct expected_entry_status));
if (expected == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't allocate expected entry status array\n";
}
@@ -8310,14 +8309,14 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
expected[i].entry_type = VARIABLE_ENTRY_TYPE;
expected[i].entry_index = (int)(i);
expected[i].size = VARIABLE_ENTRY_SIZE;
- expected[i].in_cache = TRUE;
- expected[i].at_main_addr = TRUE;
- expected[i].is_dirty = TRUE;
- expected[i].is_protected = FALSE;
- expected[i].is_pinned = FALSE;
- expected[i].deserialized = TRUE;
- expected[i].serialized = FALSE;
- expected[i].destroyed = FALSE;
+ expected[i].in_cache = true;
+ expected[i].at_main_addr = true;
+ expected[i].is_dirty = true;
+ expected[i].is_protected = false;
+ expected[i].is_pinned = false;
+ expected[i].deserialized = true;
+ expected[i].serialized = false;
+ expected[i].destroyed = false;
memset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
memset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
@@ -8326,20 +8325,20 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
expected[i].flush_dep_nchd = 0;
expected[i].flush_dep_ndirty_chd = 0;
expected[i].flush_order = -1;
- expected[i].is_corked = FALSE;
+ expected[i].is_corked = false;
}
/* NOTE: special cases for particular variable entries */
expected[0].size = VARIABLE_ENTRY_SIZE / 4;
- expected[0].is_pinned = TRUE;
+ expected[0].is_pinned = true;
expected[1].size = VARIABLE_ENTRY_SIZE / 4;
- expected[2].is_dirty = FALSE;
+ expected[2].is_dirty = false;
expected[3].size = VARIABLE_ENTRY_SIZE / 4;
- expected[4].is_dirty = FALSE;
+ expected[4].is_dirty = false;
expected[5].size = VARIABLE_ENTRY_SIZE / 4;
@@ -8347,23 +8346,23 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
expected[7].size = VARIABLE_ENTRY_SIZE / 2;
- expected[8].is_dirty = FALSE;
+ expected[8].is_dirty = false;
- expected[9].is_dirty = FALSE;
- expected[9].is_pinned = TRUE;
+ expected[9].is_dirty = false;
+ expected[9].is_pinned = true;
for (; i < num_variable_entries + num_monster_entries; i++) {
expected[i].entry_type = MONSTER_ENTRY_TYPE;
expected[i].entry_index = (int)(i - num_variable_entries);
expected[i].size = MONSTER_ENTRY_SIZE;
- expected[i].in_cache = TRUE;
- expected[i].at_main_addr = TRUE;
- expected[i].is_dirty = TRUE;
- expected[i].is_protected = FALSE;
- expected[i].is_pinned = FALSE;
- expected[i].deserialized = TRUE;
- expected[i].serialized = FALSE;
- expected[i].destroyed = FALSE;
+ expected[i].in_cache = true;
+ expected[i].at_main_addr = true;
+ expected[i].is_dirty = true;
+ expected[i].is_protected = false;
+ expected[i].is_pinned = false;
+ expected[i].deserialized = true;
+ expected[i].serialized = false;
+ expected[i].destroyed = false;
memset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
memset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
@@ -8372,21 +8371,21 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
expected[i].flush_dep_nchd = 0;
expected[i].flush_dep_ndirty_chd = 0;
expected[i].flush_order = -1;
- expected[i].is_corked = FALSE;
+ expected[i].is_corked = false;
}
for (; i < num_total_entries; i++) {
expected[i].entry_type = LARGE_ENTRY_TYPE;
expected[i].entry_index = (int)(i - num_monster_entries - num_variable_entries);
expected[i].size = LARGE_ENTRY_SIZE;
- expected[i].in_cache = TRUE;
- expected[i].at_main_addr = TRUE;
- expected[i].is_dirty = TRUE;
- expected[i].is_protected = FALSE;
- expected[i].is_pinned = FALSE;
- expected[i].deserialized = TRUE;
- expected[i].serialized = FALSE;
- expected[i].destroyed = FALSE;
+ expected[i].in_cache = true;
+ expected[i].at_main_addr = true;
+ expected[i].is_dirty = true;
+ expected[i].is_protected = false;
+ expected[i].is_pinned = false;
+ expected[i].deserialized = true;
+ expected[i].serialized = false;
+ expected[i].destroyed = false;
memset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
memset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
@@ -8395,30 +8394,30 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
expected[i].flush_dep_nchd = 0;
expected[i].flush_dep_ndirty_chd = 0;
expected[i].flush_order = -1;
- expected[i].is_corked = FALSE;
+ expected[i].is_corked = false;
}
assert(i == num_total_entries);
- pass = TRUE;
+ pass = true;
}
if (pass) {
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache_ptr NULL on entry to flush ops test.";
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not empty at start of flush ops eviction test.";
}
else if ((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache config at start of flush op eviction test.";
}
else {
@@ -8453,33 +8452,33 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
*/
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 0);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 0, (VARIABLE_ENTRY_SIZE / 4), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 0, (VARIABLE_ENTRY_SIZE / 4), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 0, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 1);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 1, (VARIABLE_ENTRY_SIZE / 4), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 1, (VARIABLE_ENTRY_SIZE / 4), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 1, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 2);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 2, H5C__NO_FLAGS_SET);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 3);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 3, (VARIABLE_ENTRY_SIZE / 4), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 3, (VARIABLE_ENTRY_SIZE / 4), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 3, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 4);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 4, H5C__NO_FLAGS_SET);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 5);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 5, (VARIABLE_ENTRY_SIZE / 4), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 5, (VARIABLE_ENTRY_SIZE / 4), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 5, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 6);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 6, (VARIABLE_ENTRY_SIZE / 2), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 6, (VARIABLE_ENTRY_SIZE / 2), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 6, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 7);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 7, (VARIABLE_ENTRY_SIZE / 2), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 7, (VARIABLE_ENTRY_SIZE / 2), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 7, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 8);
@@ -8492,7 +8491,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->index_size !=
(4 * (VARIABLE_ENTRY_SIZE / 4)) + (2 * (VARIABLE_ENTRY_SIZE / 2)) + (4 * VARIABLE_ENTRY_SIZE))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 1.";
}
}
@@ -8526,22 +8525,22 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
*
* (VET, 9) dirties (VET, 8)
*/
- add_flush_op(VARIABLE_ENTRY_TYPE, 1, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0, NULL);
- add_flush_op(VARIABLE_ENTRY_TYPE, 1, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, TRUE,
+ add_flush_op(VARIABLE_ENTRY_TYPE, 1, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, (size_t)0, NULL);
+ add_flush_op(VARIABLE_ENTRY_TYPE, 1, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, true,
3 * VARIABLE_ENTRY_SIZE / 4, NULL);
- add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0, NULL);
- add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, TRUE,
+ add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, (size_t)0, NULL);
+ add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, true,
VARIABLE_ENTRY_SIZE, NULL);
- add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0, NULL);
+ add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, false, (size_t)0, NULL);
- add_flush_op(VARIABLE_ENTRY_TYPE, 5, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0, NULL);
- add_flush_op(VARIABLE_ENTRY_TYPE, 5, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 5, TRUE,
+ add_flush_op(VARIABLE_ENTRY_TYPE, 5, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, false, (size_t)0, NULL);
+ add_flush_op(VARIABLE_ENTRY_TYPE, 5, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 5, true,
VARIABLE_ENTRY_SIZE / 2, NULL);
- add_flush_op(VARIABLE_ENTRY_TYPE, 7, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 9, FALSE, (size_t)0, NULL);
+ add_flush_op(VARIABLE_ENTRY_TYPE, 7, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 9, false, (size_t)0, NULL);
- add_flush_op(VARIABLE_ENTRY_TYPE, 9, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 8, FALSE, (size_t)0, NULL);
+ add_flush_op(VARIABLE_ENTRY_TYPE, 9, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 8, false, (size_t)0, NULL);
}
if (pass) {
@@ -8600,7 +8599,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
((4 * VARIABLE_ENTRY_SIZE / 4) + (2 * VARIABLE_ENTRY_SIZE / 2) + (4 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) + (1 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 2.";
}
else {
@@ -8650,10 +8649,10 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
* Start by updating the expected table for the expected changes in entry status:
*/
expected[0].size = 3 * VARIABLE_ENTRY_SIZE / 4;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
- expected[2].in_cache = FALSE;
- expected[2].destroyed = TRUE;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
+ expected[2].in_cache = false;
+ expected[2].destroyed = true;
num_large_entries = 2;
@@ -8666,7 +8665,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->index_size != ((1 * (3 * VARIABLE_ENTRY_SIZE / 4)) + (3 * VARIABLE_ENTRY_SIZE / 4) +
(2 * VARIABLE_ENTRY_SIZE / 2) + (3 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) + (2 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 3.";
}
@@ -8712,11 +8711,11 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
* Start by updating the expected table for the expected changes in entry status:
*/
expected[0].size = VARIABLE_ENTRY_SIZE;
- expected[0].at_main_addr = FALSE;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
- expected[4].in_cache = FALSE;
- expected[4].destroyed = TRUE;
+ expected[0].at_main_addr = false;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
+ expected[4].in_cache = false;
+ expected[4].destroyed = true;
num_large_entries = 3;
@@ -8730,7 +8729,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
((3 * VARIABLE_ENTRY_SIZE / 4) + (2 * VARIABLE_ENTRY_SIZE / 2) + (3 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) + (3 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 4.";
}
@@ -8780,15 +8779,15 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
*/
expected[5].size = VARIABLE_ENTRY_SIZE / 2;
- expected[5].is_dirty = FALSE;
- expected[5].serialized = TRUE;
- expected[6].is_dirty = FALSE;
- expected[6].serialized = TRUE;
- expected[7].is_dirty = FALSE;
- expected[7].serialized = TRUE;
- expected[8].in_cache = FALSE;
- expected[8].destroyed = TRUE;
- expected[9].is_dirty = TRUE;
+ expected[5].is_dirty = false;
+ expected[5].serialized = true;
+ expected[6].is_dirty = false;
+ expected[6].serialized = true;
+ expected[7].is_dirty = false;
+ expected[7].serialized = true;
+ expected[8].in_cache = false;
+ expected[8].destroyed = true;
+ expected[9].is_dirty = true;
num_large_entries = 5;
@@ -8807,7 +8806,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
((2 * VARIABLE_ENTRY_SIZE / 4) + (3 * VARIABLE_ENTRY_SIZE / 2) + (2 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) + (5 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 5.";
}
@@ -8844,7 +8843,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
((2 * VARIABLE_ENTRY_SIZE / 4) + (3 * VARIABLE_ENTRY_SIZE / 2) + (2 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) + (5 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 6.";
}
@@ -8888,13 +8887,13 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
* Start by updating the expected table for the expected changes in entry status:
*/
- expected[0].is_pinned = FALSE;
- expected[1].in_cache = FALSE;
- expected[1].destroyed = TRUE;
- expected[3].in_cache = FALSE;
- expected[3].destroyed = TRUE;
- expected[5].in_cache = FALSE;
- expected[5].destroyed = TRUE;
+ expected[0].is_pinned = false;
+ expected[1].in_cache = false;
+ expected[1].destroyed = true;
+ expected[3].in_cache = false;
+ expected[3].destroyed = true;
+ expected[5].in_cache = false;
+ expected[5].destroyed = true;
num_large_entries = 8;
@@ -8911,7 +8910,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->index_size != ((2 * VARIABLE_ENTRY_SIZE / 2) + (2 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) + (8 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 7.";
}
@@ -8953,8 +8952,8 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
* Start by updating the expected table for the expected changes in entry status:
*/
- expected[6].in_cache = FALSE;
- expected[6].destroyed = TRUE;
+ expected[6].in_cache = false;
+ expected[6].destroyed = true;
num_large_entries = 9;
@@ -8970,7 +8969,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->index_size != ((1 * VARIABLE_ENTRY_SIZE / 2) + (2 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) + (9 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 8.";
}
@@ -9014,9 +9013,9 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
* Start by updating the expected table for the expected changes in entry status:
*/
- expected[7].in_cache = FALSE;
- expected[7].destroyed = TRUE;
- expected[9].is_pinned = FALSE;
+ expected[7].in_cache = false;
+ expected[7].destroyed = true;
+ expected[9].is_pinned = false;
num_large_entries = 10;
@@ -9032,7 +9031,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->index_size !=
((2 * VARIABLE_ENTRY_SIZE) + (31 * MONSTER_ENTRY_SIZE) + (10 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 9.";
}
@@ -9067,7 +9066,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->index_size !=
((2 * VARIABLE_ENTRY_SIZE) + (31 * MONSTER_ENTRY_SIZE) + (10 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 10.";
}
@@ -9175,35 +9174,35 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
*/
base_addr = entries[VARIABLE_ENTRY_TYPE];
entry_ptr = &(base_addr[8]);
- entry_ptr->deserialized = FALSE;
- entry_ptr->deserialized = FALSE;
- entry_ptr->destroyed = FALSE;
-
- expected[0].in_cache = FALSE;
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
- expected[0].destroyed = TRUE;
- expected[8].in_cache = TRUE;
- expected[8].is_dirty = FALSE;
- expected[8].deserialized = TRUE;
- expected[8].serialized = TRUE;
- expected[8].destroyed = FALSE;
- expected[9].in_cache = FALSE;
- expected[9].is_dirty = FALSE;
- expected[9].serialized = TRUE;
- expected[9].destroyed = TRUE;
-
- expected[10].in_cache = TRUE;
- expected[10].is_dirty = FALSE;
- expected[10].serialized = TRUE;
- expected[10].destroyed = FALSE;
+ entry_ptr->deserialized = false;
+ entry_ptr->deserialized = false;
+ entry_ptr->destroyed = false;
+
+ expected[0].in_cache = false;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
+ expected[0].destroyed = true;
+ expected[8].in_cache = true;
+ expected[8].is_dirty = false;
+ expected[8].deserialized = true;
+ expected[8].serialized = true;
+ expected[8].destroyed = false;
+ expected[9].in_cache = false;
+ expected[9].is_dirty = false;
+ expected[9].serialized = true;
+ expected[9].destroyed = true;
+
+ expected[10].in_cache = true;
+ expected[10].is_dirty = false;
+ expected[10].serialized = true;
+ expected[10].destroyed = false;
num_large_entries = 12;
for (i = num_variable_entries; i < num_variable_entries + num_monster_entries + num_large_entries - 1;
i++) {
- expected[i].is_dirty = FALSE;
- expected[i].serialized = TRUE;
+ expected[i].is_dirty = false;
+ expected[i].serialized = true;
}
for (i = 10; i < 12; i++) {
@@ -9217,7 +9216,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->index_size !=
((1 * VARIABLE_ENTRY_SIZE) + (31 * MONSTER_ENTRY_SIZE) + (12 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 11.";
}
@@ -9238,7 +9237,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
*/
base_addr = entries[VARIABLE_ENTRY_TYPE];
entry_ptr = &(base_addr[8]);
- entry_ptr->serialized = FALSE;
+ entry_ptr->serialized = false;
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 8);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 8, H5C__DIRTIED_FLAG);
@@ -9256,7 +9255,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
*/
base_addr = entries[MONSTER_ENTRY_TYPE];
entry_ptr = &(base_addr[0]);
- entry_ptr->destroyed = FALSE;
+ entry_ptr->destroyed = false;
for (i = 1; i < num_monster_entries; i++) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -9281,25 +9280,25 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
/* update the expected array to mark all these entries dirty again. */
for (i = num_variable_entries; i < num_variable_entries + num_monster_entries + num_large_entries - 1;
i++) {
- expected[i].is_dirty = TRUE;
+ expected[i].is_dirty = true;
}
/* update MET 0 to set its in cache flag, and reset
* its destroyed flag
*/
- expected[10].in_cache = TRUE;
+ expected[10].in_cache = true;
/* pass through non variable entries will flush VET 8, and evict VET 9.
* Update accordingly.
*/
- expected[8].in_cache = TRUE;
- expected[8].is_dirty = TRUE;
- expected[8].serialized = FALSE;
- expected[8].destroyed = FALSE;
- expected[9].in_cache = FALSE;
- expected[9].is_dirty = FALSE;
- expected[9].serialized = TRUE;
- expected[9].destroyed = TRUE;
+ expected[8].in_cache = true;
+ expected[8].is_dirty = true;
+ expected[8].serialized = false;
+ expected[8].destroyed = false;
+ expected[9].in_cache = false;
+ expected[9].is_dirty = false;
+ expected[9].serialized = true;
+ expected[9].destroyed = true;
/* verify cache size */
if ((cache_ptr->index_len != 44) ||
@@ -9308,7 +9307,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->index_size !=
((1 * VARIABLE_ENTRY_SIZE) + (31 * MONSTER_ENTRY_SIZE) + (12 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 12.";
}
@@ -9363,10 +9362,10 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
* entry status:
*/
- expected[8].in_cache = FALSE;
- expected[8].is_dirty = FALSE;
- expected[8].serialized = TRUE;
- expected[8].destroyed = TRUE;
+ expected[8].in_cache = false;
+ expected[8].is_dirty = false;
+ expected[8].serialized = true;
+ expected[8].destroyed = true;
num_large_entries = 14;
@@ -9375,8 +9374,8 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
*/
for (i = num_variable_entries; i < num_variable_entries + num_monster_entries + num_large_entries - 1;
i++) {
- expected[i].is_dirty = FALSE;
- expected[i].serialized = TRUE;
+ expected[i].is_dirty = false;
+ expected[i].serialized = true;
}
for (i = 12; i < 14; i++) {
@@ -9390,7 +9389,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(2 * 1024 * 1024) - (6 * VARIABLE_ENTRY_SIZE) + (13 * LARGE_ENTRY_SIZE)) ||
(cache_ptr->index_size != ((31 * MONSTER_ENTRY_SIZE) + (14 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in flush op eviction test 13.";
}
@@ -9418,7 +9417,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
if ((pass) && ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache len/size after cleanup of flush op eviction test";
}
}
@@ -9451,7 +9450,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[VARIABLE_ENTRY_TYPE] != 1) ||
(cache_ptr->cache_flush_size_changes[VARIABLE_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"Unexpected variable size entry stats in check_flush_cache__flush_op_eviction_test().";
}
@@ -9476,7 +9475,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[LARGE_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[LARGE_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected large entry stats in check_flush_cache__flush_op_eviction_test().";
}
}
@@ -9500,7 +9499,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster entry stats in check_flush_cache__flush_op_eviction_test().";
}
}
@@ -9533,12 +9532,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache_ptr NULL on entry to single entry case.";
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not empty at beginning of single entry case.";
}
@@ -9549,12 +9548,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 1,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__NO_FLAGS_SET,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9564,12 +9563,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 2,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG,
/* flush_flags */ H5C__NO_FLAGS_SET,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9579,12 +9578,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 3,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9594,12 +9593,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 4,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG,
/* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9609,12 +9608,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 5,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9624,12 +9623,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 6,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9639,12 +9638,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 7,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9654,12 +9653,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 8,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9669,12 +9668,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 9,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9684,12 +9683,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 10,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9699,12 +9698,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 11,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9714,12 +9713,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 12,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9729,12 +9728,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 13,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9744,12 +9743,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 14,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9759,13 +9758,13 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 15,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9775,13 +9774,13 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 16,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9791,12 +9790,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 17,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__NO_FLAGS_SET,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9806,12 +9805,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 18,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__NO_FLAGS_SET,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9821,12 +9820,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 19,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9836,12 +9835,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 20,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9851,12 +9850,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 21,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9866,12 +9865,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 22,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9881,12 +9880,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 23,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9896,12 +9895,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 24,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9911,12 +9910,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 25,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9926,12 +9925,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 26,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9941,12 +9940,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 27,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9956,12 +9955,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 28,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -9971,12 +9970,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 29,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -9986,12 +9985,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 30,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10001,13 +10000,13 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 31,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10017,13 +10016,13 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 32,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ FALSE,
+ /* insert_flag */ false,
/* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ TRUE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ true,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10033,12 +10032,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 33,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__NO_FLAGS_SET,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10048,12 +10047,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 34,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__NO_FLAGS_SET,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10063,12 +10062,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 35,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10078,12 +10077,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 36,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10093,12 +10092,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 37,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10108,12 +10107,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 38,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10123,12 +10122,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 39,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10138,12 +10137,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 40,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10153,12 +10152,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 41,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10168,12 +10167,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 42,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10183,12 +10182,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 43,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10198,12 +10197,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 44,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10213,12 +10212,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 45,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10228,12 +10227,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 46,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10243,13 +10242,13 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 47,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10259,13 +10258,13 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 48,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__NO_FLAGS_SET,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10275,12 +10274,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 49,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__NO_FLAGS_SET,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10290,12 +10289,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 50,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__NO_FLAGS_SET,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10305,12 +10304,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 51,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10320,12 +10319,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 52,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10335,12 +10334,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 53,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10350,12 +10349,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 54,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10365,12 +10364,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 55,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10380,12 +10379,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 56,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10395,12 +10394,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 57,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10410,12 +10409,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 58,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10425,12 +10424,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 59,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10440,12 +10439,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 60,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ FALSE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ false);
}
if (pass) {
@@ -10455,12 +10454,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 61,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10470,12 +10469,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 62,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ TRUE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ true,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10485,13 +10484,13 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 63,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
if (pass) {
@@ -10501,13 +10500,13 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* test_num */ 64,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
- /* insert_flag */ TRUE,
+ /* insert_flag */ true,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
/* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
- /* expected_deserialized */ FALSE,
- /* expected_serialized */ FALSE,
- /* expected_destroyed */ TRUE);
+ /* expected_deserialized */ false,
+ /* expected_serialized */ false,
+ /* expected_destroyed */ true);
}
/* Now run single entry tests for pinned entries. Test all combinations
@@ -10539,12 +10538,12 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
*
* In addition to simply checking to see if the test case runs,
* we also check to see if the desired operations take place on the
- * cache entry. Thus expected_serialized is set to TRUE if we
+ * cache entry. Thus expected_serialized is set to true if we
* we expect the entry to be flushed, and expected_destroyed is set
- * to TRUE if we expect the entry to be destroyed.
+ * to true if we expect the entry to be destroyed.
*
* In this test, we are working with pinned entries which can't be
- * evicted, so expected_destroyed is always FALSE. We could pull it
+ * evicted, so expected_destroyed is always false. We could pull it
* from the table, but it is a hold over from the code this test
* was adapted from, and it doesn't do any particular harm.
*
@@ -10577,7 +10576,7 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
spec = malloc(256 * sizeof(struct pinned_single_entry_test_spec));
if (spec == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't allocated pinned single entry test spec array";
}
@@ -10585,21 +10584,21 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
int test_num;
int entry_type;
int entry_idx;
- hbool_t dirty_flag;
- hbool_t mark_dirty;
- hbool_t pop_mark_dirty_prot;
- hbool_t pop_mark_dirty_pinned;
- hbool_t unprotect_unpin;
+ bool dirty_flag;
+ bool mark_dirty;
+ bool pop_mark_dirty_prot;
+ bool pop_mark_dirty_pinned;
+ bool unprotect_unpin;
unsigned int flags;
unsigned int flush_flags;
- hbool_t expected_serialized;
- hbool_t expected_destroyed;
+ bool expected_serialized;
+ bool expected_destroyed;
test_num = (int)(i + 1);
entry_type = PICO_ENTRY_TYPE;
entry_idx = 0;
- /* Generate alternating sequences of TRUE/FALSE */
+ /* Generate alternating sequences of true/false */
dirty_flag = (i / 16) % 2;
mark_dirty = (i / 8) % 2;
pop_mark_dirty_prot = (i / 4) % 2;
@@ -10637,25 +10636,25 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
break;
}
- expected_serialized = FALSE;
+ expected_serialized = false;
if (0 == (flush_flags & H5C__FLUSH_CLEAR_ONLY_FLAG)) {
if (flush_flags & H5C__FLUSH_MARKED_ENTRIES_FLAG) {
if (flags & H5C__SET_FLUSH_MARKER_FLAG) {
if (mark_dirty && pop_mark_dirty_prot) {
- expected_serialized = TRUE;
+ expected_serialized = true;
}
else if (dirty_flag || pop_mark_dirty_prot) {
- expected_serialized = TRUE;
+ expected_serialized = true;
}
}
}
else {
if (dirty_flag || mark_dirty || pop_mark_dirty_prot || pop_mark_dirty_pinned)
- expected_serialized = TRUE;
+ expected_serialized = true;
}
}
- expected_destroyed = FALSE;
+ expected_destroyed = false;
spec[i] = (struct pinned_single_entry_test_spec){
test_num,
@@ -10709,9 +10708,9 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
static void
check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_type, int entry_idx,
- hbool_t insert_flag, unsigned int flags, unsigned int flush_flags,
- hbool_t expected_deserialized, hbool_t expected_serialized,
- hbool_t expected_destroyed)
+ bool insert_flag, unsigned int flags, unsigned int flush_flags,
+ bool expected_deserialized, bool expected_serialized,
+ bool expected_destroyed)
{
H5C_t *cache_ptr = file_ptr->shared->cache;
static char msg[128];
@@ -10720,21 +10719,21 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
if (cache_ptr == NULL) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "cache_ptr NULL on entry to single entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "cache_ptr NULL on entry to single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "cache not empty at beginning of single entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "cache not empty at beginning of single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((entry_type < 0) || (entry_type >= NUMBER_OF_ENTRY_TYPES) || (entry_idx < 0) ||
(entry_idx > max_indices[entry_type])) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Bad parameters on entry to single entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Bad parameters on entry to single entry test #%d.", test_num);
failure_mssg = msg;
}
@@ -10761,8 +10760,8 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
if (!pass) { /* construct and set actual failure message */
- HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in single entry test #%d.",
- flush_flags, test_num);
+ snprintf(msg, (size_t)128, "flush with flags 0x%x failed in single entry test #%d.", flush_flags,
+ test_num);
failure_mssg = msg;
}
@@ -10770,9 +10769,9 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
(entry_ptr->serialized != expected_serialized) ||
(entry_ptr->destroyed != expected_destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry status after flush in single entry test #%d.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry status after flush in single entry test #%d.",
+ test_num);
failure_mssg = msg;
}
else if ((((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0) &&
@@ -10780,9 +10779,9 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
(((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0) &&
((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size after flush in single entry test #%d.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after flush in single entry test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -10794,21 +10793,21 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
if (!pass) { /* construct and set actual failure message */
- HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in single entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "Flush failed on cleanup in single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size after cleanup in single entry test #%d.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after cleanup in single entry test #%d.",
+ test_num);
failure_mssg = msg;
}
else {
- entry_ptr->deserialized = FALSE;
- entry_ptr->serialized = FALSE;
- entry_ptr->destroyed = FALSE;
+ entry_ptr->deserialized = false;
+ entry_ptr->serialized = false;
+ entry_ptr->destroyed = false;
}
}
@@ -10826,36 +10825,34 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
static void
check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int entry_type, int entry_idx,
- hbool_t unprot_dirty_flag, hbool_t mark_dirty,
- hbool_t pop_mark_dirty_prot, hbool_t pop_mark_dirty_pinned,
- hbool_t unprotect_unpin, unsigned int flags,
- unsigned int flush_flags, hbool_t expected_serialized,
- hbool_t expected_destroyed)
+ bool unprot_dirty_flag, bool mark_dirty, bool pop_mark_dirty_prot,
+ bool pop_mark_dirty_pinned, bool unprotect_unpin,
+ unsigned int flags, unsigned int flush_flags,
+ bool expected_serialized, bool expected_destroyed)
{
H5C_t *cache_ptr = file_ptr->shared->cache;
static char msg[128];
- hbool_t expected_deserialized = TRUE;
+ bool expected_deserialized = true;
test_entry_t *base_addr;
test_entry_t *entry_ptr = NULL;
if (cache_ptr == NULL) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "cache_ptr NULL on entry to pinned single entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "cache_ptr NULL on entry to pinned single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "cache not empty at beginning of pinned single entry test #%d.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "cache not empty at beginning of pinned single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((entry_type < 0) || (entry_type >= NUMBER_OF_ENTRY_TYPES) || (entry_idx < 0) ||
(entry_idx > max_indices[entry_type])) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Bad parameters on entry to pinned single entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Bad parameters on entry to pinned single entry test #%d.", test_num);
failure_mssg = msg;
}
@@ -10892,17 +10889,17 @@ check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int e
if (!pass) { /* construct and set the correct failure message */
- HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in pinned single entry test #%d.",
- flush_flags, test_num);
+ snprintf(msg, (size_t)128, "flush with flags 0x%x failed in pinned single entry test #%d.",
+ flush_flags, test_num);
failure_mssg = msg;
}
else if ((entry_ptr->deserialized != expected_deserialized) ||
(entry_ptr->serialized != expected_serialized) ||
(entry_ptr->destroyed != expected_destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128,
- "Unexpected entry status after flush in pinned single entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry status after flush in pinned single entry test #%d.",
+ test_num);
failure_mssg = msg;
}
else if ((((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0) &&
@@ -10910,9 +10907,9 @@ check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int e
(((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0) &&
((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128,
- "Unexpected cache len/size after flush in pinned single entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128,
+ "Unexpected cache len/size after flush in pinned single entry test #%d.", test_num);
failure_mssg = msg;
}
}
@@ -10940,22 +10937,21 @@ check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int e
if (!pass) {
- HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in pinned single entry test #%d.",
- test_num);
+ snprintf(msg, (size_t)128, "Flush failed on cleanup in pinned single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128,
- "Unexpected cache len/size after cleanup in pinned single entry test #%d.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128,
+ "Unexpected cache len/size after cleanup in pinned single entry test #%d.", test_num);
failure_mssg = msg;
}
else {
- entry_ptr->deserialized = FALSE;
- entry_ptr->serialized = FALSE;
- entry_ptr->destroyed = FALSE;
+ entry_ptr->deserialized = false;
+ entry_ptr->serialized = false;
+ entry_ptr->destroyed = false;
}
}
@@ -10976,10 +10972,10 @@ check_get_entry_status(unsigned paged)
{
static char msg[128];
herr_t result;
- hbool_t in_cache;
- hbool_t is_dirty;
- hbool_t is_protected;
- hbool_t is_pinned;
+ bool in_cache;
+ bool is_dirty;
+ bool is_protected;
+ bool is_pinned;
size_t entry_size;
H5F_t *file_ptr = NULL;
test_entry_t *base_addr = NULL;
@@ -10990,7 +10986,7 @@ check_get_entry_status(unsigned paged)
else
TESTING("H5C_get_entry_status() functionality");
- pass = TRUE;
+ pass = true;
if (pass) {
@@ -11000,7 +10996,7 @@ check_get_entry_status(unsigned paged)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "file_ptr NULL from setup_cache.";
}
else {
@@ -11021,14 +11017,14 @@ check_get_entry_status(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 1.");
failure_mssg = msg;
}
}
@@ -11047,14 +11043,14 @@ check_get_entry_status(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
}
else if (!in_cache || is_dirty || is_protected || is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 2.");
failure_mssg = msg;
}
}
@@ -11071,14 +11067,14 @@ check_get_entry_status(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
}
else if (!in_cache || is_dirty || !is_protected || is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 3.");
failure_mssg = msg;
}
}
@@ -11095,14 +11091,14 @@ check_get_entry_status(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
}
else if (!in_cache || is_dirty || is_protected || !is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 4.");
failure_mssg = msg;
}
}
@@ -11119,14 +11115,14 @@ check_get_entry_status(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || !is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 5.");
failure_mssg = msg;
}
}
@@ -11143,21 +11139,21 @@ check_get_entry_status(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 6.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 6.");
failure_mssg = msg;
}
}
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -11191,10 +11187,10 @@ check_expunge_entry(unsigned paged)
{
static char msg[128];
herr_t result;
- hbool_t in_cache;
- hbool_t is_dirty;
- hbool_t is_protected;
- hbool_t is_pinned;
+ bool in_cache;
+ bool is_dirty;
+ bool is_protected;
+ bool is_pinned;
size_t entry_size;
H5F_t *file_ptr = NULL;
test_entry_t *base_addr;
@@ -11205,7 +11201,7 @@ check_expunge_entry(unsigned paged)
else
TESTING("H5C_expunge_entry() functionality");
- pass = TRUE;
+ pass = true;
if (pass) {
@@ -11228,20 +11224,20 @@ check_expunge_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 1.");
failure_mssg = msg;
}
else if ((entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 1.");
failure_mssg = msg;
}
}
@@ -11264,20 +11260,20 @@ check_expunge_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
}
else if (!in_cache || is_dirty || is_protected || is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 2.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 2.");
failure_mssg = msg;
}
}
@@ -11302,20 +11298,20 @@ check_expunge_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 3.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 3.");
failure_mssg = msg;
}
}
@@ -11338,20 +11334,20 @@ check_expunge_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 4.");
failure_mssg = msg;
}
else if ((entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 4.");
failure_mssg = msg;
}
}
@@ -11374,20 +11370,20 @@ check_expunge_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 5.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 5.");
failure_mssg = msg;
}
}
@@ -11412,27 +11408,27 @@ check_expunge_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 6.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 6.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 6.");
failure_mssg = msg;
}
}
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -11475,7 +11471,7 @@ check_multiple_read_protect(unsigned paged)
else
TESTING("multiple read only protects on a single entry");
- pass = TRUE;
+ pass = true;
/* allocate a cache. Should succeed.
*
@@ -11512,7 +11508,7 @@ check_multiple_read_protect(unsigned paged)
if ((entry_ptr->header.is_protected) || (entry_ptr->header.is_read_only) ||
(entry_ptr->header.ro_ref_count != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 1.\n";
}
}
@@ -11521,7 +11517,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 0) || (cache_ptr->read_protects[0] != 0) ||
(cache_ptr->max_read_protects[0] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 1.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11532,7 +11528,7 @@ check_multiple_read_protect(unsigned paged)
if ((!(entry_ptr->header.is_protected)) || (!(entry_ptr->header.is_read_only)) ||
(entry_ptr->header.ro_ref_count != 1)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 2.\n";
}
}
@@ -11541,7 +11537,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 0) || (cache_ptr->read_protects[0] != 1) ||
(cache_ptr->max_read_protects[0] != 1)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 2.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11552,7 +11548,7 @@ check_multiple_read_protect(unsigned paged)
if ((!(entry_ptr->header.is_protected)) || (!(entry_ptr->header.is_read_only)) ||
(entry_ptr->header.ro_ref_count != 2)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 3.\n";
}
}
@@ -11561,7 +11557,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 0) || (cache_ptr->read_protects[0] != 2) ||
(cache_ptr->max_read_protects[0] != 2)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 3.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11572,7 +11568,7 @@ check_multiple_read_protect(unsigned paged)
if ((!(entry_ptr->header.is_protected)) || (!(entry_ptr->header.is_read_only)) ||
(entry_ptr->header.ro_ref_count != 1)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 4.\n";
}
}
@@ -11581,7 +11577,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 0) || (cache_ptr->read_protects[0] != 2) ||
(cache_ptr->max_read_protects[0] != 2)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 4.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11592,7 +11588,7 @@ check_multiple_read_protect(unsigned paged)
if ((!(entry_ptr->header.is_protected)) || (!(entry_ptr->header.is_read_only)) ||
(entry_ptr->header.ro_ref_count != 2)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 5.\n";
}
}
@@ -11601,7 +11597,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 0) || (cache_ptr->read_protects[0] != 3) ||
(cache_ptr->max_read_protects[0] != 2)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 5.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11612,7 +11608,7 @@ check_multiple_read_protect(unsigned paged)
if ((!(entry_ptr->header.is_protected)) || (!(entry_ptr->header.is_read_only)) ||
(entry_ptr->header.ro_ref_count != 3)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 6.\n";
}
}
@@ -11621,7 +11617,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 0) || (cache_ptr->read_protects[0] != 4) ||
(cache_ptr->max_read_protects[0] != 3)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 6.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11632,7 +11628,7 @@ check_multiple_read_protect(unsigned paged)
if ((!(entry_ptr->header.is_protected)) || (!(entry_ptr->header.is_read_only)) ||
(entry_ptr->header.ro_ref_count != 2)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 7.\n";
}
}
@@ -11641,7 +11637,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 0) || (cache_ptr->read_protects[0] != 4) ||
(cache_ptr->max_read_protects[0] != 3)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 7.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11652,7 +11648,7 @@ check_multiple_read_protect(unsigned paged)
if ((!(entry_ptr->header.is_protected)) || (!(entry_ptr->header.is_read_only)) ||
(entry_ptr->header.ro_ref_count != 1)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 8.\n";
}
}
@@ -11661,7 +11657,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 0) || (cache_ptr->read_protects[0] != 4) ||
(cache_ptr->max_read_protects[0] != 3)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 8.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11672,7 +11668,7 @@ check_multiple_read_protect(unsigned paged)
if ((entry_ptr->header.is_protected) || (entry_ptr->header.is_read_only) ||
(entry_ptr->header.ro_ref_count != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 9.\n";
}
}
@@ -11681,7 +11677,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 0) || (cache_ptr->read_protects[0] != 4) ||
(cache_ptr->max_read_protects[0] != 3)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 9.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11696,7 +11692,7 @@ check_multiple_read_protect(unsigned paged)
if ((!(entry_ptr->header.is_protected)) || (entry_ptr->header.is_read_only) ||
(entry_ptr->header.ro_ref_count != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 10.\n";
}
}
@@ -11705,7 +11701,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 1) || (cache_ptr->read_protects[0] != 4) ||
(cache_ptr->max_read_protects[0] != 3)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 10.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11716,7 +11712,7 @@ check_multiple_read_protect(unsigned paged)
if ((entry_ptr->header.is_protected) || (entry_ptr->header.is_read_only) ||
(entry_ptr->header.ro_ref_count != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected ro protected status 11.\n";
}
}
@@ -11725,7 +11721,7 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 1) || (cache_ptr->read_protects[0] != 4) ||
(cache_ptr->max_read_protects[0] != 3)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 11.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -11771,18 +11767,18 @@ check_multiple_read_protect(unsigned paged)
if (H5C_pin_protected_entry((void *)entry_ptr) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_pin_protected_entry() failed.\n";
}
else if (!(entry_ptr->header.is_pinned)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "entry (0,4) not pinned.\n";
}
else {
/* keep test bed sanity checks happy */
- entry_ptr->is_pinned = TRUE;
+ entry_ptr->is_pinned = true;
}
}
@@ -11793,7 +11789,7 @@ check_multiple_read_protect(unsigned paged)
if (pass && (entry_ptr->header.is_pinned)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "entry (0,4) still pinned.\n";
}
@@ -11809,14 +11805,14 @@ check_multiple_read_protect(unsigned paged)
if ((cache_ptr->write_protects[0] != 5) || (cache_ptr->read_protects[0] != 9) ||
(cache_ptr->max_read_protects[0] != 3)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected protect stats 11.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -11855,20 +11851,20 @@ check_move_entry(unsigned paged)
struct move_entry_test_spec test_specs[4] = {
{/* int entry_type = */ PICO_ENTRY_TYPE,
/* int entry_index = */ 10,
- /* hbool_t is_pinned = */ FALSE,
- /* hbool_t is_protected = */ FALSE},
+ /* bool is_pinned = */ false,
+ /* bool is_protected = */ false},
{/* int entry_type = */ PICO_ENTRY_TYPE,
/* int entry_index = */ 20,
- /* hbool_t is_pinned = */ TRUE,
- /* hbool_t is_protected = */ FALSE},
+ /* bool is_pinned = */ true,
+ /* bool is_protected = */ false},
{/* int entry_type = */ PICO_ENTRY_TYPE,
/* int entry_index = */ 30,
- /* hbool_t is_pinned = */ FALSE,
- /* hbool_t is_protected = */ TRUE},
+ /* bool is_pinned = */ false,
+ /* bool is_protected = */ true},
{/* int entry_type = */ PICO_ENTRY_TYPE,
/* int entry_index = */ 40,
- /* hbool_t is_pinned = */ TRUE,
- /* hbool_t is_protected = */ TRUE},
+ /* bool is_pinned = */ true,
+ /* bool is_protected = */ true},
};
if (paged)
@@ -11876,7 +11872,7 @@ check_move_entry(unsigned paged)
else
TESTING("H5C_move_entry() functionality");
- pass = TRUE;
+ pass = true;
/* allocate a cache, load entries into it, and then move
* them. To the extent possible, verify that the desired
@@ -11917,7 +11913,7 @@ check_move_entry(unsigned paged)
}
if (pass)
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
if (pass)
PASSED();
@@ -11935,7 +11931,7 @@ check_move_entry(unsigned paged)
*
* Purpose: Run a move entry test.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -11954,14 +11950,14 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
if (cache_ptr == NULL) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "cache_ptr NULL on entry to move test #%u.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "cache_ptr NULL on entry to move test #%u.", test_num);
failure_mssg = msg;
}
else if (spec_ptr == NULL) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "spec_ptr NULL on entry to move test #%u.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "spec_ptr NULL on entry to move test #%u.", test_num);
failure_mssg = msg;
}
@@ -11974,8 +11970,8 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
((entry_ptr->cache_ptr != cache_ptr) && (entry_ptr->cache_ptr != NULL)) ||
(!(entry_ptr->at_main_addr)) || (entry_ptr->addr != entry_ptr->main_addr)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "bad entry_ptr in move test #%u.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "bad entry_ptr in move test #%u.", test_num);
failure_mssg = msg;
}
}
@@ -11990,7 +11986,7 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
if (!spec_ptr->is_protected)
unprotect_entry(file_ptr, spec_ptr->entry_type, spec_ptr->entry_index, flags);
- move_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index, FALSE);
+ move_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index, false);
}
if (pass) {
@@ -12004,8 +12000,8 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
if (!(entry_ptr->header.is_pinned)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Pinned entry not pinned after move in test #%u.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Pinned entry not pinned after move in test #%u.", test_num);
failure_mssg = msg;
}
@@ -12021,9 +12017,9 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
if (test_ptr == NULL) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Pinned entry not in pel after move in test #%u.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Pinned entry not in pel after move in test #%u.",
+ test_num);
failure_mssg = msg;
}
} /* end else */
@@ -12035,8 +12031,8 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
if (entry_ptr->header.is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unpinned entry pinned after move in test #%u.", test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unpinned entry pinned after move in test #%u.", test_num);
failure_mssg = msg;
}
@@ -12045,9 +12041,8 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
else {
if ((entry_ptr->header.prev != NULL) ||
(cache_ptr->LRU_head_ptr != (H5C_cache_entry_t *)entry_ptr)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Entry not at head of LRU after move in test #%u.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Entry not at head of LRU after move in test #%u.", test_num);
failure_mssg = msg;
}
} /* end else */
@@ -12056,9 +12051,8 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
if (spec_ptr->is_protected) {
if (!(entry_ptr->header.is_protected)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Protected entry not protected after move in test #%u.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Protected entry not protected after move in test #%u.", test_num);
failure_mssg = msg;
}
@@ -12068,16 +12062,16 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
else {
if (entry_ptr->header.is_protected) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unprotected entry not unprotected after move in test #%u.",
- test_num);
+ pass = false;
+ snprintf(msg, (size_t)128, "Unprotected entry not unprotected after move in test #%u.",
+ test_num);
failure_mssg = msg;
}
} /* end else */
}
/* put the entry back where it started from */
- move_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index, TRUE);
+ move_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index, true);
} /* check_move_entry__run_test() */
@@ -12105,7 +12099,7 @@ check_pin_protected_entry(unsigned paged)
else
TESTING("H5C_pin_protected_entry() functionality");
- pass = TRUE;
+ pass = true;
/* Create a cache, protect an entry, and then use H5C_pin_protected_entry()
* to pin it. Verify that the entry is in fact pined. Unprotect the entry
@@ -12120,7 +12114,7 @@ check_pin_protected_entry(unsigned paged)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "file_ptr NULL from setup_cache.";
}
}
@@ -12139,19 +12133,19 @@ check_pin_protected_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_pin_protected_entry() reports failure.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_pin_protected_entry() reports failure.");
failure_mssg = msg;
}
else if (!(entry_ptr->header.is_pinned)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "entry not pinned when it should be.");
+ pass = false;
+ snprintf(msg, (size_t)128, "entry not pinned when it should be.");
failure_mssg = msg;
}
else {
- entry_ptr->is_pinned = TRUE;
+ entry_ptr->is_pinned = true;
}
}
@@ -12159,7 +12153,7 @@ check_pin_protected_entry(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -12194,10 +12188,10 @@ check_resize_entry(unsigned paged)
{
static char msg[128];
herr_t result;
- hbool_t in_cache;
- hbool_t is_dirty;
- hbool_t is_protected;
- hbool_t is_pinned;
+ bool in_cache;
+ bool is_dirty;
+ bool is_protected;
+ bool is_pinned;
size_t entry_size;
size_t reported_entry_size;
H5F_t *file_ptr = NULL;
@@ -12239,7 +12233,7 @@ check_resize_entry(unsigned paged)
* the cache.
*/
- pass = TRUE;
+ pass = true;
/* tests with only one entry in the cache: */
@@ -12251,7 +12245,7 @@ check_resize_entry(unsigned paged)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "file_ptr NULL from setup_cache.";
}
else {
@@ -12268,8 +12262,8 @@ check_resize_entry(unsigned paged)
if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) || (cache_ptr->slist_len != 0) ||
(cache_ptr->slist_size != 0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 1.");
failure_mssg = msg;
}
}
@@ -12284,8 +12278,8 @@ check_resize_entry(unsigned paged)
if ((cache_ptr->index_len != 1) || (cache_ptr->index_size != LARGE_ENTRY_SIZE) ||
(cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 2.");
failure_mssg = msg;
}
}
@@ -12297,20 +12291,20 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
}
else if (!in_cache || is_dirty || !is_protected || is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 1.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 1.");
failure_mssg = msg;
}
}
@@ -12321,8 +12315,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
+ pass = false;
+ snprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
failure_mssg = msg;
}
else {
@@ -12331,8 +12325,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_unprotect() reports failure 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_unprotect() reports failure 1.");
failure_mssg = msg;
}
else {
@@ -12340,8 +12334,8 @@ check_resize_entry(unsigned paged)
/* tidy up so we play nice with the standard protect / unprotect
* calls.
*/
- entry_ptr->is_protected = FALSE;
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_protected = false;
+ entry_ptr->is_dirty = true;
entry_ptr->size = LARGE_ENTRY_SIZE / 2;
}
}
@@ -12353,8 +12347,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != (LARGE_ENTRY_SIZE / 2))))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 3.");
failure_mssg = msg;
}
}
@@ -12366,21 +12360,21 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || is_pinned ||
(reported_entry_size != (LARGE_ENTRY_SIZE / 2))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 2.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 2.");
failure_mssg = msg;
}
}
@@ -12396,8 +12390,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
+ pass = false;
+ snprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
failure_mssg = msg;
}
else {
@@ -12406,8 +12400,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_unprotect() reports failure 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_unprotect() reports failure 2.");
failure_mssg = msg;
}
else {
@@ -12415,8 +12409,8 @@ check_resize_entry(unsigned paged)
/* tidy up so we play nice with the standard protect / unprotect
* calls.
*/
- entry_ptr->is_protected = FALSE;
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_protected = false;
+ entry_ptr->is_dirty = true;
entry_ptr->size = LARGE_ENTRY_SIZE;
}
}
@@ -12428,8 +12422,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 4.");
failure_mssg = msg;
}
}
@@ -12441,21 +12435,21 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || is_pinned ||
(reported_entry_size != LARGE_ENTRY_SIZE)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 3.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 3.");
failure_mssg = msg;
}
}
@@ -12473,8 +12467,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 1.");
failure_mssg = msg;
}
}
@@ -12485,8 +12479,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != (LARGE_ENTRY_SIZE / 4))))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 5.");
failure_mssg = msg;
}
}
@@ -12498,21 +12492,21 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || !is_pinned ||
(reported_entry_size != (LARGE_ENTRY_SIZE / 4))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 4.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 4.");
failure_mssg = msg;
}
}
@@ -12523,8 +12517,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 2.");
failure_mssg = msg;
}
}
@@ -12535,8 +12529,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 6.");
failure_mssg = msg;
}
}
@@ -12548,21 +12542,21 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || !is_pinned ||
(reported_entry_size != LARGE_ENTRY_SIZE)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 5.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 5.");
failure_mssg = msg;
}
}
@@ -12581,20 +12575,20 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 6.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 6.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 6.");
failure_mssg = msg;
}
}
@@ -12604,8 +12598,8 @@ check_resize_entry(unsigned paged)
if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) ||
((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 7.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 7.");
failure_mssg = msg;
}
}
@@ -12617,8 +12611,8 @@ check_resize_entry(unsigned paged)
if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) ||
((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 8.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 8.");
failure_mssg = msg;
}
@@ -12645,8 +12639,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 9.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 9.");
failure_mssg = msg;
}
}
@@ -12662,8 +12656,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 10.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 10.");
failure_mssg = msg;
}
}
@@ -12675,20 +12669,20 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 7.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 7.");
failure_mssg = msg;
}
else if (!in_cache || is_dirty || !is_protected || is_pinned) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 7.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 7.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 7.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 7.");
failure_mssg = msg;
}
}
@@ -12699,8 +12693,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
+ pass = false;
+ snprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
failure_mssg = msg;
}
else {
@@ -12709,8 +12703,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_unprotect() reports failure 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_unprotect() reports failure 3.");
failure_mssg = msg;
}
else {
@@ -12718,8 +12712,8 @@ check_resize_entry(unsigned paged)
/* tidy up so we play nice with the standard protect / unprotect
* calls.
*/
- entry_ptr->is_protected = FALSE;
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_protected = false;
+ entry_ptr->is_dirty = true;
entry_ptr->size = LARGE_ENTRY_SIZE / 2;
}
}
@@ -12733,8 +12727,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_len != 2) ||
(cache_ptr->slist_size != (LARGE_ENTRY_SIZE + (LARGE_ENTRY_SIZE / 2)))))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 11.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 11.");
failure_mssg = msg;
}
}
@@ -12746,21 +12740,21 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 8.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 8.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || is_pinned ||
(reported_entry_size != (LARGE_ENTRY_SIZE / 2))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 8.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 8.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 8.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 8.");
failure_mssg = msg;
}
}
@@ -12776,8 +12770,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
+ pass = false;
+ snprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
failure_mssg = msg;
}
else {
@@ -12786,8 +12780,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_unprotect() reports failure 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_unprotect() reports failure 4.");
failure_mssg = msg;
}
else {
@@ -12795,8 +12789,8 @@ check_resize_entry(unsigned paged)
/* tidy up so we play nice with the standard protect / unprotect
* calls.
*/
- entry_ptr->is_protected = FALSE;
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_protected = false;
+ entry_ptr->is_dirty = true;
entry_ptr->size = LARGE_ENTRY_SIZE;
}
}
@@ -12808,8 +12802,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 12.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 12.");
failure_mssg = msg;
}
}
@@ -12821,21 +12815,21 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 9.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 9.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || is_pinned ||
(reported_entry_size != LARGE_ENTRY_SIZE)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 9.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 9.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 9.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 9.");
failure_mssg = msg;
}
}
@@ -12853,8 +12847,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 3.");
failure_mssg = msg;
}
}
@@ -12867,8 +12861,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_len != 2) ||
(cache_ptr->slist_size != (LARGE_ENTRY_SIZE + (LARGE_ENTRY_SIZE / 4)))))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 13.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 13.");
failure_mssg = msg;
}
}
@@ -12880,21 +12874,21 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 10.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 10.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || !is_pinned ||
(reported_entry_size != (LARGE_ENTRY_SIZE / 4))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 10.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 10.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 10.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 10.");
failure_mssg = msg;
}
}
@@ -12905,8 +12899,8 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 4.");
failure_mssg = msg;
}
}
@@ -12917,8 +12911,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != (2 * LARGE_ENTRY_SIZE))))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 14.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 14.");
failure_mssg = msg;
}
}
@@ -12930,21 +12924,21 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 11.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 11.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || !is_pinned ||
(reported_entry_size != LARGE_ENTRY_SIZE)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 11.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 11.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 11.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 11.");
failure_mssg = msg;
}
}
@@ -12963,20 +12957,20 @@ check_resize_entry(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 12.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 12.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 12.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 12.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 12.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 12.");
failure_mssg = msg;
}
}
@@ -12987,8 +12981,8 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 15.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 15.");
failure_mssg = msg;
}
}
@@ -13010,15 +13004,15 @@ check_resize_entry(unsigned paged)
if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) ||
((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0)))) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 16.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 16.");
failure_mssg = msg;
}
}
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -13053,9 +13047,9 @@ check_evictions_enabled(unsigned paged)
{
static char msg[128];
herr_t result;
- hbool_t show_progress = FALSE;
- hbool_t evictions_enabled;
- hbool_t in_cache;
+ bool show_progress = false;
+ bool evictions_enabled;
+ bool in_cache;
int i;
int mile_stone = 1;
H5F_t *file_ptr = NULL;
@@ -13103,7 +13097,7 @@ check_evictions_enabled(unsigned paged)
* Now flush and discard the cache -- should succeed.
*/
- pass = TRUE;
+ pass = true;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -13117,7 +13111,7 @@ check_evictions_enabled(unsigned paged)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "file_ptr NULL from setup_cache.";
}
else {
@@ -13135,10 +13129,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) ||
((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0))) ||
- (cache_ptr->evictions_enabled != TRUE)) {
+ (cache_ptr->evictions_enabled != true)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 1.");
failure_mssg = msg;
}
}
@@ -13151,10 +13145,10 @@ check_evictions_enabled(unsigned paged)
result = H5C_get_evictions_enabled(cache_ptr, &evictions_enabled);
- if ((result != SUCCEED) || (evictions_enabled != TRUE)) {
+ if ((result != SUCCEED) || (evictions_enabled != true)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected evictions enabled 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected evictions enabled 1.");
failure_mssg = msg;
}
}
@@ -13179,10 +13173,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 16) || (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0))) ||
- (cache_ptr->evictions_enabled != TRUE)) {
+ (cache_ptr->evictions_enabled != true)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 2.");
failure_mssg = msg;
}
}
@@ -13205,10 +13199,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 16) || (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0))) ||
- (cache_ptr->evictions_enabled != TRUE)) {
+ (cache_ptr->evictions_enabled != true)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 3.");
failure_mssg = msg;
}
}
@@ -13225,20 +13219,20 @@ check_evictions_enabled(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 1.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 1.");
failure_mssg = msg;
}
}
@@ -13261,10 +13255,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 16) || (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != MONSTER_ENTRY_SIZE))) ||
- (cache_ptr->evictions_enabled != TRUE)) {
+ (cache_ptr->evictions_enabled != true)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 4.");
failure_mssg = msg;
}
}
@@ -13281,20 +13275,20 @@ check_evictions_enabled(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 2.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 2.");
failure_mssg = msg;
}
}
@@ -13305,12 +13299,12 @@ check_evictions_enabled(unsigned paged)
/* disable evictions */
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result != SUCCEED) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "can't disable evictions 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "can't disable evictions 1.");
failure_mssg = msg;
}
}
@@ -13324,10 +13318,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 16) || (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != MONSTER_ENTRY_SIZE))) ||
- (cache_ptr->evictions_enabled != FALSE)) {
+ (cache_ptr->evictions_enabled != false)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 5.");
failure_mssg = msg;
}
}
@@ -13351,10 +13345,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 17) || (cache_ptr->index_size != 17 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != MONSTER_ENTRY_SIZE))) ||
- (cache_ptr->evictions_enabled != FALSE)) {
+ (cache_ptr->evictions_enabled != false)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 6.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 6.");
failure_mssg = msg;
}
}
@@ -13377,10 +13371,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 18) || (cache_ptr->index_size != 18 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE))) ||
- (cache_ptr->evictions_enabled != FALSE)) {
+ (cache_ptr->evictions_enabled != false)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 7.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 7.");
failure_mssg = msg;
}
}
@@ -13391,12 +13385,12 @@ check_evictions_enabled(unsigned paged)
/* re-enable evictions */
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, TRUE);
+ result = H5C_set_evictions_enabled(cache_ptr, true);
if (result != SUCCEED) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "can't enable evictions 1.");
+ pass = false;
+ snprintf(msg, (size_t)128, "can't enable evictions 1.");
failure_mssg = msg;
}
}
@@ -13420,10 +13414,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 18) || (cache_ptr->index_size != 18 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE))) ||
- (cache_ptr->evictions_enabled != TRUE)) {
+ (cache_ptr->evictions_enabled != true)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 8.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 8.");
failure_mssg = msg;
}
}
@@ -13450,10 +13444,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 16) || (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE))) ||
- (cache_ptr->evictions_enabled != TRUE)) {
+ (cache_ptr->evictions_enabled != true)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 9.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 9.");
failure_mssg = msg;
}
}
@@ -13470,20 +13464,20 @@ check_evictions_enabled(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 3.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 3.");
failure_mssg = msg;
}
}
@@ -13500,20 +13494,20 @@ check_evictions_enabled(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 4.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 4.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 4.");
failure_mssg = msg;
}
}
@@ -13524,12 +13518,12 @@ check_evictions_enabled(unsigned paged)
/* disable evictions again */
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result != SUCCEED) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "can't disable evictions 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "can't disable evictions 2.");
failure_mssg = msg;
}
}
@@ -13555,10 +13549,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 17) || (cache_ptr->index_size != 17 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE))) ||
- (cache_ptr->evictions_enabled != FALSE)) {
+ (cache_ptr->evictions_enabled != false)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 10.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 10.");
failure_mssg = msg;
}
}
@@ -13569,12 +13563,12 @@ check_evictions_enabled(unsigned paged)
/* re-enable evictions again */
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, TRUE);
+ result = H5C_set_evictions_enabled(cache_ptr, true);
if (result != SUCCEED) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "can't enable evictions 2.");
+ pass = false;
+ snprintf(msg, (size_t)128, "can't enable evictions 2.");
failure_mssg = msg;
}
}
@@ -13597,10 +13591,10 @@ check_evictions_enabled(unsigned paged)
if ((cache_ptr->index_len != 16) || (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
((cache_ptr->slist_enabled) &&
((cache_ptr->slist_len != 3) || (cache_ptr->slist_size != 3 * MONSTER_ENTRY_SIZE))) ||
- (cache_ptr->evictions_enabled != TRUE)) {
+ (cache_ptr->evictions_enabled != true)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 11.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected cache status 11.");
failure_mssg = msg;
}
}
@@ -13617,20 +13611,20 @@ check_evictions_enabled(unsigned paged)
if (result < 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
}
else if (in_cache) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected status 5.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 5.");
+ pass = false;
+ snprintf(msg, (size_t)128, "Unexpected entry history 5.");
failure_mssg = msg;
}
}
@@ -13641,12 +13635,12 @@ check_evictions_enabled(unsigned paged)
/* disable evictions one last time before we shut down */
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_set_evictions_enabled(cache_ptr, false);
if (result != SUCCEED) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "can't disable evictions 3.");
+ pass = false;
+ snprintf(msg, (size_t)128, "can't disable evictions 3.");
failure_mssg = msg;
}
}
@@ -13656,7 +13650,7 @@ check_evictions_enabled(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (show_progress) /* 34 */
@@ -13700,7 +13694,7 @@ check_flush_protected_err(unsigned paged)
else
TESTING("flush cache with protected entry error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry, and try to flush. This
* should fail. Unprotect the entry and flush again -- should
@@ -13721,22 +13715,22 @@ check_flush_protected_err(unsigned paged)
protect_entry(file_ptr, 0, 0);
/* enable slist prior to flush */
- if ((pass) && (H5C_set_slist_enabled(cache_ptr, TRUE, FALSE) < 0)) {
+ if ((pass) && (H5C_set_slist_enabled(cache_ptr, true, false) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unable to enable slist prior to flush.\n";
}
if ((pass) && (H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET) >= 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "flush succeeded on cache with protected entry.\n";
}
/* disable the slist after the flush */
- if ((pass) && (H5C_set_slist_enabled(cache_ptr, FALSE, FALSE) < 0)) {
+ if ((pass) && (H5C_set_slist_enabled(cache_ptr, false, false) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unable to disable slist after flush.\n";
}
@@ -13747,7 +13741,7 @@ check_flush_protected_err(unsigned paged)
H5C_FLUSH_CACHE(file_ptr, H5C__NO_FLAGS_SET, "flush failed after unprotect.\n")
}
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -13787,7 +13781,7 @@ check_destroy_pinned_err(unsigned paged)
else
TESTING("destroy cache with permanently pinned entry error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, pin an entry, and try to flush destroy. This
* should fail. Unpin the entry and flush destroy again -- should
@@ -13803,19 +13797,19 @@ check_destroy_pinned_err(unsigned paged)
unprotect_entry(file_ptr, 0, 0, H5C__PIN_ENTRY_FLAG);
if (H5C_prep_for_file_close(file_ptr) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected failure of prep for file close.\n";
} /* end if */
if (H5C_dest(file_ptr) >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "destroy succeeded on cache with pinned entry.\n";
} /* end if */
else {
unpin_entry(0, 0);
if (H5C_dest(file_ptr) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "destroy failed after unpin.\n";
} /* end if */
else
@@ -13831,7 +13825,7 @@ check_destroy_pinned_err(unsigned paged)
* This causes the function to close and delete the file,
* while skipping the call to H5C_dest().
*/
- takedown_cache(NULL, FALSE, FALSE);
+ takedown_cache(NULL, false, false);
} /* end if */
if (pass) {
@@ -13869,7 +13863,7 @@ check_destroy_protected_err(unsigned paged)
else
TESTING("destroy cache with protected entry error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry, and try to flush. This
* should fail. Unprotect the entry and flush again -- should
@@ -13892,20 +13886,20 @@ check_destroy_protected_err(unsigned paged)
* prior to the final protect call.
*/
if (H5C_prep_for_file_close(file_ptr) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected failure of prep for file close.\n";
} /* end if */
protect_entry(file_ptr, 0, 0);
if (H5C_dest(file_ptr) >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "destroy succeeded on cache with protected entry.\n";
} /* end if */
else {
unprotect_entry(file_ptr, 0, 0, H5C__DIRTIED_FLAG);
if (H5C_dest(file_ptr) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "destroy failed after unprotect.\n";
} /* end if */
else {
@@ -13922,7 +13916,7 @@ check_destroy_protected_err(unsigned paged)
* This causes the function to close and delete the file,
* while skipping the call to H5C_dest().
*/
- takedown_cache(NULL, FALSE, FALSE);
+ takedown_cache(NULL, false, false);
} /* end if */
if (pass) {
@@ -13963,7 +13957,7 @@ check_duplicate_insert_err(unsigned paged)
else
TESTING("duplicate entry insertion error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry, and then try to insert
* the entry again. This should fail. Unprotect the entry and
@@ -13988,14 +13982,14 @@ check_duplicate_insert_err(unsigned paged)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "insert of duplicate entry succeeded.\n";
}
else {
unprotect_entry(file_ptr, 0, 0, H5C__DIRTIED_FLAG);
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
}
}
@@ -14039,7 +14033,7 @@ check_double_pin_err(unsigned paged)
else
TESTING("pin a pinned entry error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry, unprotect it with the pin flag,
* protect it again, and then try to unprotect it again with the pin
@@ -14068,7 +14062,7 @@ check_double_pin_err(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to pin a pinned entry succeeded.\n";
}
else {
@@ -14079,7 +14073,7 @@ check_double_pin_err(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -14121,7 +14115,7 @@ check_double_unpin_err(unsigned paged)
else
TESTING("unpin an unpinned entry error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry, unprotect it with the unpin flag.
* -- This should fail.
@@ -14148,7 +14142,7 @@ check_double_unpin_err(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to unpin an unpinned entry succeeded 1.\n";
}
else {
@@ -14163,14 +14157,14 @@ check_double_unpin_err(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to unpin an unpinned entry succeeded 2.\n";
}
}
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -14212,7 +14206,7 @@ check_pin_entry_errs(unsigned paged)
else
TESTING("pin entry related errors");
- pass = TRUE;
+ pass = true;
/* Allocate a cache, protect an entry, unprotect it with no flags,
* and then call H5C_pin_protected_entry() to pin it -- This should fail.
@@ -14245,7 +14239,7 @@ check_pin_entry_errs(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to pin an unprotected entry succeeded.\n";
}
else {
@@ -14264,7 +14258,7 @@ check_pin_entry_errs(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to pin a pinned, protected entry succeeded.\n";
}
else {
@@ -14275,7 +14269,7 @@ check_pin_entry_errs(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -14317,7 +14311,7 @@ check_double_protect_err(unsigned paged)
else
TESTING("protect a protected entry error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry, and then try to protect
* the entry again. This should fail. Unprotect the entry and
@@ -14342,7 +14336,7 @@ check_double_protect_err(unsigned paged)
if (cache_entry_ptr != NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to protect a protected entry succeeded.\n";
}
}
@@ -14354,7 +14348,7 @@ check_double_protect_err(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -14396,7 +14390,7 @@ check_double_unprotect_err(unsigned paged)
else
TESTING("unprotect an unprotected entry error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry, unprotect it, and then try to
* unprotect the entry again. This should fail. Destroy the cache
@@ -14422,14 +14416,14 @@ check_double_unprotect_err(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to unprotect an unprotected entry succeeded 1.\n";
}
}
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -14474,7 +14468,7 @@ check_mark_entry_dirty_errs(unsigned paged)
else
TESTING("mark entry dirty related errors");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry, unprotect the entry without
* pinning it, and try to mark it dirty -- this should fail.
@@ -14501,14 +14495,14 @@ check_mark_entry_dirty_errs(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to dirty a unpinned and unprotected entry succeeded.\n";
}
}
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -14550,7 +14544,7 @@ check_expunge_entry_errs(unsigned paged)
else
TESTING("expunge entry related errors");
- pass = TRUE;
+ pass = true;
/* Allocate a cache, protect an entry, and then call H5C_expunge_entry()
* to expunge it -- this should fail
@@ -14581,7 +14575,7 @@ check_expunge_entry_errs(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to expunge a protected entry succeeded.\n";
}
else {
@@ -14596,7 +14590,7 @@ check_expunge_entry_errs(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to expunge a pinned entry succeeded.\n";
}
else {
@@ -14611,14 +14605,14 @@ check_expunge_entry_errs(unsigned paged)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to expunge an unpinned and unprotected entry failed.\n";
}
}
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -14663,7 +14657,7 @@ check_move_entry_errs(unsigned paged)
else
TESTING("move entry related errors");
- pass = TRUE;
+ pass = true;
/* allocate a cache, and insert several entries. Try to move
* entries to other entries resident in the cache. This should
@@ -14689,7 +14683,7 @@ check_move_entry_errs(unsigned paged)
result = H5C_move_entry(cache_ptr, types[0], entry_0_0_ptr->addr, entry_0_1_ptr->addr);
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "move to addr of same type succeeded.\n";
} /* end if */
} /* end if */
@@ -14698,13 +14692,13 @@ check_move_entry_errs(unsigned paged)
result = H5C_move_entry(cache_ptr, types[0], entry_0_0_ptr->addr, entry_1_0_ptr->addr);
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "move to addr of different type succeeded.\n";
} /* end if */
} /* end if */
if (pass)
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
/* Allocate a cache, protect an entry R/O, and then call
* H5C_move_entry() to move it -- this should fail.
@@ -14729,7 +14723,7 @@ check_move_entry_errs(unsigned paged)
result = H5C_move_entry(cache_ptr, types[0], entry_ptr->header.addr, entry_ptr->header.addr + 10);
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Call to H5C_move_entry on a R/O protected entry succeeded.\n";
} /* end if */
else
@@ -14737,7 +14731,7 @@ check_move_entry_errs(unsigned paged)
} /* end if */
if (pass)
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
if (pass)
PASSED();
@@ -14773,7 +14767,7 @@ check_resize_entry_errs(unsigned paged)
else
TESTING("resize entry related errors");
- pass = TRUE;
+ pass = true;
/* Allocate a cache, protect an entry, and then call
* H5C_resize_entry() to resize it -- this should succeed.
@@ -14803,7 +14797,7 @@ check_resize_entry_errs(unsigned paged)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Call to H5C_resize_entry on a protected entry failed.\n";
}
else {
@@ -14818,7 +14812,7 @@ check_resize_entry_errs(unsigned paged)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Call to H5C_resize_entry with 0 new size succeeded.\n";
}
else {
@@ -14829,7 +14823,7 @@ check_resize_entry_errs(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -14871,7 +14865,7 @@ check_unprotect_ro_dirty_err(unsigned paged)
else
TESTING("unprotect a read only entry dirty error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry read only, and then unprotect it
* with the dirtied flag set. This should fail. Destroy the cache
@@ -14895,7 +14889,7 @@ check_unprotect_ro_dirty_err(unsigned paged)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to unprotect a ro entry dirty succeeded 1.\n";
}
}
@@ -14907,7 +14901,7 @@ check_unprotect_ro_dirty_err(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
/* allocate a another cache, protect an entry read only twice, and
@@ -14934,7 +14928,7 @@ check_unprotect_ro_dirty_err(unsigned paged)
if (result > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to unprotect a ro entry dirty succeeded 2.\n";
}
}
@@ -14947,7 +14941,7 @@ check_unprotect_ro_dirty_err(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -14989,7 +14983,7 @@ check_protect_ro_rw_err(unsigned paged)
else
TESTING("protect a read only entry rw error");
- pass = TRUE;
+ pass = true;
/* allocate a cache, protect an entry read only, and then try to protect
* it again rw. This should fail.
@@ -15015,7 +15009,7 @@ check_protect_ro_rw_err(unsigned paged)
if (thing_ptr != NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "attempt to protect a ro entry rw succeeded.\n";
}
}
@@ -15027,7 +15021,7 @@ check_protect_ro_rw_err(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -15072,7 +15066,7 @@ check_protect_retries(unsigned paged)
else
TESTING("protect an entry to verify retries");
- pass = TRUE;
+ pass = true;
/* Set up the cache */
if (pass) {
@@ -15098,7 +15092,7 @@ check_protect_retries(unsigned paged)
/* test case (1):
* --actual_len is smaller the initial length from get_load_size()
- * --verify_chksum() returns TRUE after max_verify_ct is reached
+ * --verify_chksum() returns true after max_verify_ct is reached
*
*/
entry_ptr->actual_len = entry_ptr->size / 2;
@@ -15114,7 +15108,7 @@ check_protect_retries(unsigned paged)
(entry_ptr->addr != entry_ptr->header.addr) ||
(entry_ptr->verify_ct != entry_ptr->max_verify_ct)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error from H5C_protect().";
}
else {
@@ -15123,8 +15117,8 @@ check_protect_retries(unsigned paged)
entry_ptr->cache_ptr = cache_ptr;
entry_ptr->file_ptr = file_ptr;
- entry_ptr->is_protected = TRUE;
- entry_ptr->is_read_only = TRUE;
+ entry_ptr->is_protected = true;
+ entry_ptr->is_read_only = true;
entry_ptr->ro_ref_count++;
}
@@ -15139,7 +15133,7 @@ check_protect_retries(unsigned paged)
/* test case (2):
* --actual_len is greater the initial length from get_load_size()
- * --verify_chksum() returns FALSE even after all tries is reached
+ * --verify_chksum() returns false even after all tries is reached
* (file_ptr->shared->read_attempts is smaller then max_verify_ct)
*/
entry_ptr->actual_len = entry_ptr->size * 2;
@@ -15151,10 +15145,10 @@ check_protect_retries(unsigned paged)
/* H5C_protect() should fail after all retries fail */
if (cache_entry_ptr != NULL)
- pass = FALSE;
+ pass = false;
}
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
reset_entries();
if (pass) {
@@ -15187,17 +15181,17 @@ check_protect_retries(unsigned paged)
static unsigned
check_check_evictions_enabled_err(unsigned paged)
{
- herr_t result;
- hbool_t evictions_enabled;
- H5F_t *file_ptr = NULL;
- H5C_t *cache_ptr = NULL;
+ herr_t result;
+ bool evictions_enabled;
+ H5F_t *file_ptr = NULL;
+ H5C_t *cache_ptr = NULL;
if (paged)
TESTING("get/set evictions enabled errors (paged aggregation)");
else
TESTING("get/set evictions enabled errors");
- pass = TRUE;
+ pass = true;
/* allocate a cache.
*
@@ -15226,7 +15220,7 @@ check_check_evictions_enabled_err(unsigned paged)
if (result == SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_evictions_enabled succeeded() 1.\n";
}
}
@@ -15237,18 +15231,18 @@ check_check_evictions_enabled_err(unsigned paged)
if (result == SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_evictions_enabled succeeded() 2.\n";
}
}
if (pass) {
- result = H5C_set_evictions_enabled(cache_ptr, TRUE);
+ result = H5C_set_evictions_enabled(cache_ptr, true);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_evictions_enabled failed().\n";
}
}
@@ -15257,14 +15251,14 @@ check_check_evictions_enabled_err(unsigned paged)
(cache_ptr->resize_ctl).incr_mode = H5C_incr__threshold;
- result = H5C_get_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_get_evictions_enabled(cache_ptr, false);
if (result == SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_evictions_enabled succeeded() 1.\n";
}
- else if (cache_ptr->evictions_enabled == TRUE) {
+ else if (cache_ptr->evictions_enabled == true) {
}
(cache_ptr->resize_ctl).incr_mode = H5C_incr__off;
@@ -15274,11 +15268,11 @@ check_check_evictions_enabled_err(unsigned paged)
(cache_ptr->resize_ctl).decr_mode = H5C_decr__threshold;
- result = H5C_get_evictions_enabled(cache_ptr, FALSE);
+ result = H5C_get_evictions_enabled(cache_ptr, false);
if (result == SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_evictions_enabled succeeded() 2.\n";
}
@@ -15287,7 +15281,7 @@ check_check_evictions_enabled_err(unsigned paged)
if (cache_ptr) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -15319,7 +15313,7 @@ check_check_evictions_enabled_err(unsigned paged)
*-------------------------------------------------------------------------
*/
-hbool_t rpt_fcn_called = FALSE;
+bool rpt_fcn_called = false;
enum H5C_resize_status rpt_status;
static void
@@ -15328,14 +15322,14 @@ test_rpt_fcn(H5_ATTR_UNUSED H5C_t *cache_ptr, H5_ATTR_UNUSED int32_t version, H5
H5_ATTR_UNUSED size_t new_max_cache_size, H5_ATTR_UNUSED size_t old_min_clean_size,
H5_ATTR_UNUSED size_t new_min_clean_size)
{
- rpt_fcn_called = TRUE;
+ rpt_fcn_called = true;
rpt_status = status;
}
static unsigned
-check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
+check_auto_cache_resize(bool cork_ageout, unsigned paged)
{
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
herr_t result;
int32_t i;
int32_t checkpoint = 0;
@@ -15345,7 +15339,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ test_rpt_fcn,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (512 * 1024),
/* double min_clean_fraction = */ 0.5,
@@ -15361,7 +15355,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -15375,12 +15369,12 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* double decrement = */ 0.1,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05};
if (paged)
@@ -15388,7 +15382,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
else
TESTING("automatic cache resizing");
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stderr, "check point %d\n", checkpoint++);
@@ -15408,7 +15402,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -15416,7 +15410,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
if ((cache_ptr->max_cache_size != (512 * 1024)) || (cache_ptr->min_clean_size != (256 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after initialization.\n";
}
}
@@ -15428,7 +15422,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
* full status.
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, PICO_ENTRY_TYPE, i);
@@ -15441,7 +15435,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != not_full) || (cache_ptr->max_cache_size != (512 * 1024)) ||
(cache_ptr->min_clean_size != (256 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 1.\n";
}
}
@@ -15454,7 +15448,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -15467,7 +15461,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != increase) ||
(cache_ptr->max_cache_size != (1 * 1024 * 1024)) || (cache_ptr->min_clean_size != (512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 2.\n";
}
}
@@ -15480,7 +15474,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, PICO_ENTRY_TYPE, i);
@@ -15493,7 +15487,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != not_full) ||
(cache_ptr->max_cache_size != (1 * 1024 * 1024)) || (cache_ptr->min_clean_size != (512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 3.\n";
}
}
@@ -15506,7 +15500,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -15520,7 +15514,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 4.\n";
}
}
@@ -15533,7 +15527,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -15547,7 +15541,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 5.\n";
}
}
@@ -15560,7 +15554,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -15574,7 +15568,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 6.\n";
}
}
@@ -15588,7 +15582,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -15602,7 +15596,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (12 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (6 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 7.\n";
}
}
@@ -15615,7 +15609,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -15629,7 +15623,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (14 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (7 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 8.\n";
}
}
@@ -15642,7 +15636,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -15656,7 +15650,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (14 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (7 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 9.\n";
}
}
@@ -15670,7 +15664,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -15684,7 +15678,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (13 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (6 * 1024 * 1024 + 512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 10.\n";
}
}
@@ -15702,7 +15696,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1000 * 1000 + 10;
auto_size_ctl.min_clean_fraction = 0.1;
@@ -15718,7 +15712,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1000 * 1000);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -15731,17 +15725,17 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1000 * 1000);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 2.\n";
}
}
@@ -15751,7 +15745,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1000 * 1000 + 10)) ||
(cache_ptr->min_clean_size != (400 * 1000 + 1))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 1.\n";
}
}
@@ -15764,7 +15758,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -15778,7 +15772,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (3 * 1000 * 1000 + 10)) ||
(cache_ptr->min_clean_size != (300 * 1000 + 1))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 11.\n";
}
}
@@ -15792,7 +15786,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -15806,7 +15800,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (2 * 1000 * 1000 + 10)) ||
(cache_ptr->min_clean_size != (200 * 1000 + 1))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 12.\n";
}
}
@@ -15820,7 +15814,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -15834,7 +15828,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (1 * 1000 * 1000 + 10)) ||
(cache_ptr->min_clean_size != (100 * 1000 + 1))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 13.\n";
}
}
@@ -15848,7 +15842,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -15861,7 +15855,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) ||
(cache_ptr->max_cache_size != (500 * 1000 + 5)) || (cache_ptr->min_clean_size != (50 * 1000))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 14.\n";
}
}
@@ -15874,7 +15868,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -15887,7 +15881,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) || (cache_ptr->max_cache_size != (500 * 1000)) ||
(cache_ptr->min_clean_size != (50 * 1000))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 15.\n";
}
}
@@ -15900,7 +15894,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -15913,7 +15907,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != at_min_size) || (cache_ptr->max_cache_size != (500 * 1000)) ||
(cache_ptr->min_clean_size != (50 * 1000))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 16.\n";
}
}
@@ -15926,7 +15920,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 900)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -15947,7 +15941,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->max_cache_size != (500 * 1000)) ||
(cache_ptr->min_clean_size != (50 * 1000))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 17.\n";
}
}
@@ -15960,7 +15954,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -15973,7 +15967,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != increase) ||
(cache_ptr->max_cache_size != (1 * 1000 * 1000)) || (cache_ptr->min_clean_size != (100 * 1000))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 18.\n";
}
}
@@ -15986,7 +15980,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -15999,7 +15993,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) || (cache_ptr->max_cache_size != (500 * 1000)) ||
(cache_ptr->min_clean_size != (50 * 1000))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 19.\n";
}
}
@@ -16017,7 +16011,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -16033,7 +16027,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.increment = 4.0;
- auto_size_ctl.apply_max_increment = FALSE;
+ auto_size_ctl.apply_max_increment = false;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -16046,17 +16040,17 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.decrement = 0.25;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 3.\n";
}
}
@@ -16066,7 +16060,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 2.\n";
}
}
@@ -16079,7 +16073,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -16092,7 +16086,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) ||
(cache_ptr->max_cache_size != (1 * 1024 * 1024)) || (cache_ptr->min_clean_size != (512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 20.\n";
}
}
@@ -16105,7 +16099,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -16119,7 +16113,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 21.\n";
}
}
@@ -16132,7 +16126,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -16146,7 +16140,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (16 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (8 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 22.\n";
}
}
@@ -16159,7 +16153,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -16173,7 +16167,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 23.\n";
}
}
@@ -16193,7 +16187,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -16209,7 +16203,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -16222,17 +16216,17 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = FALSE;
+ auto_size_ctl.apply_empty_reserve = false;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 4.\n";
}
}
@@ -16242,7 +16236,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 3.\n";
}
}
@@ -16261,7 +16255,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
* not be able to.
*/
if (pass) { /* first epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16275,7 +16269,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 24.\n";
}
}
@@ -16284,7 +16278,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* second epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1000;
while (pass && (i < 2000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16298,7 +16292,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 25.\n";
}
}
@@ -16307,7 +16301,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* third epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 2000;
while (pass && (i < 3000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16321,7 +16315,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 26.\n";
}
}
@@ -16334,7 +16328,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
* happen until we get the hit rate above the lower threshold.
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16348,7 +16342,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 27.\n";
}
}
@@ -16360,7 +16354,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
* reduction now.
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16373,7 +16367,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) || (cache_ptr->max_cache_size != (2001 * 1024)) ||
(cache_ptr->min_clean_size != (int)(2001 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 28.\n";
}
}
@@ -16384,7 +16378,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* sixth epoch -- force the hit rate to 100% again.
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16397,7 +16391,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) || (cache_ptr->max_cache_size != (1001 * 1024)) ||
(cache_ptr->min_clean_size != (int)(1001 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 29.\n";
}
}
@@ -16408,7 +16402,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* seventh epoch -- force the hit rate to 100% again.
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16421,7 +16415,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) || (cache_ptr->max_cache_size != (1000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(1000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 30.\n";
}
}
@@ -16433,7 +16427,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
* state.
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16446,7 +16440,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->max_cache_size != (1000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(1000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 31.\n";
}
}
@@ -16459,7 +16453,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
* should be decreased to the minimum.
*/
if (pass) { /* ninth epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -16472,7 +16466,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->max_cache_size != (1000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(1000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 32.\n";
}
}
@@ -16481,7 +16475,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* tenth epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -16494,7 +16488,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->max_cache_size != (1000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(1000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 33.\n";
}
}
@@ -16503,7 +16497,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* eleventh epoch -- cache size reduction */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -16517,7 +16511,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (256 * 1024)) || (cache_ptr->index_len != 2) ||
(cache_ptr->index_size != MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 34.\n";
}
}
@@ -16526,7 +16520,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
fprintf(stderr, "check point %d\n", checkpoint++);
if (pass) { /* twelfth epoch -- at minimum size so no more ageouts */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -16540,7 +16534,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (256 * 1024)) || (cache_ptr->index_len != 2) ||
(cache_ptr->index_size != MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 35.\n";
}
}
@@ -16561,7 +16555,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -16577,7 +16571,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -16590,19 +16584,19 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = FALSE;
+ auto_size_ctl.apply_empty_reserve = false;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 5.\n";
}
}
@@ -16612,7 +16606,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 4.\n";
}
}
@@ -16629,7 +16623,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) { /* first epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16643,7 +16637,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 36.\n";
}
}
@@ -16653,7 +16647,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* second epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1000;
while (pass && (i < 2000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16667,7 +16661,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 37.\n";
}
}
@@ -16677,7 +16671,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* third epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 2000;
while (pass && (i < 3000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16691,7 +16685,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 38.\n";
}
}
@@ -16705,7 +16699,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16719,7 +16713,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 39.\n";
}
}
@@ -16732,7 +16726,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16746,7 +16740,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (7 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (7 * 512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 40.\n";
}
}
@@ -16758,7 +16752,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 2000;
while (pass && (i < 3000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16772,7 +16766,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (6 * 512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 41.\n";
}
}
@@ -16784,7 +16778,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16798,7 +16792,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (5 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (5 * 512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 42.\n";
}
}
@@ -16810,7 +16804,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 2000;
while (pass && (i < 3000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16824,7 +16818,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 43.\n";
}
}
@@ -16836,7 +16830,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16850,7 +16844,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (3 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 44.\n";
}
}
@@ -16862,7 +16856,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 2000;
while (pass && (i < 3000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16876,7 +16870,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 45.\n";
}
}
@@ -16888,7 +16882,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16901,7 +16895,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) || (cache_ptr->max_cache_size != (2000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(2000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 46.\n";
}
}
@@ -16914,7 +16908,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 2000;
while (pass && (i < 3000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -16927,7 +16921,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->max_cache_size != (2000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(2000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 47.\n";
}
}
@@ -16941,7 +16935,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) { /* thirteenth epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -16954,7 +16948,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->max_cache_size != (2000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(2000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 48.\n";
}
}
@@ -16964,7 +16958,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* fourteenth epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -16978,7 +16972,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (1001 * 1024 + MONSTER_ENTRY_SIZE)) ||
(cache_ptr->min_clean_size != (1001 * 512 + MONSTER_ENTRY_SIZE / 2))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 49.\n";
}
}
@@ -16988,7 +16982,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* fifteenth epoch -- cache size reduction */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -17002,7 +16996,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (256 * 1024)) || (cache_ptr->index_len != 2) ||
(cache_ptr->index_size != MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 50.\n";
}
}
@@ -17012,7 +17006,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* sixteenth epoch -- at minimum size so no more ageouts */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -17026,7 +17020,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (256 * 1024)) || (cache_ptr->index_len != 2) ||
(cache_ptr->index_size != MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 51.\n";
}
}
@@ -17043,7 +17037,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -17059,7 +17053,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -17072,19 +17066,19 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.5; /* for ease of testing */
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 6.\n";
}
}
@@ -17094,7 +17088,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 5.\n";
}
}
@@ -17111,7 +17105,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) { /* first epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17125,7 +17119,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 52.\n";
}
}
@@ -17135,7 +17129,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* second epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1000;
while (pass && (i < 2000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17149,7 +17143,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 53.\n";
}
}
@@ -17159,7 +17153,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* third epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 2000;
while (pass && (i < 3000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17173,7 +17167,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 54.\n";
}
}
@@ -17187,7 +17181,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17201,7 +17195,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 55.\n";
}
}
@@ -17214,7 +17208,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17227,7 +17221,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) || (cache_ptr->max_cache_size != (4002 * 1024)) ||
(cache_ptr->min_clean_size != (int)(4002 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 56.\n";
}
}
@@ -17239,7 +17233,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17252,7 +17246,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) || (cache_ptr->max_cache_size != (2002 * 1024)) ||
(cache_ptr->min_clean_size != (int)(2002 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 57.\n";
}
}
@@ -17264,7 +17258,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17277,7 +17271,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != decrease) || (cache_ptr->max_cache_size != (2000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(2000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 58.\n";
}
}
@@ -17290,7 +17284,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 3000;
while (pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17303,7 +17297,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->max_cache_size != (2000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(2000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 59.\n";
}
}
@@ -17317,7 +17311,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) { /* ninth epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -17330,7 +17324,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->max_cache_size != (2000 * 1024)) ||
(cache_ptr->min_clean_size != (int)(2000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 60.\n";
}
}
@@ -17340,7 +17334,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* tenth epoch */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -17353,7 +17347,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->max_cache_size != (2000 * 1024)) ||
(cache_ptr->min_clean_size != (2000 * 512))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 61.\n";
}
}
@@ -17363,7 +17357,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* eleventh epoch -- cache size reduction */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -17377,7 +17371,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (256 * 1024)) || (cache_ptr->index_len != 2) ||
(cache_ptr->index_size != MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 62.\n";
}
}
@@ -17387,7 +17381,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* twelfth epoch -- at minimum size so no more ageouts */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -17401,7 +17395,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (256 * 1024)) || (cache_ptr->index_len != 2) ||
(cache_ptr->index_size != MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 63.\n";
}
}
@@ -17420,7 +17414,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -17436,7 +17430,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -17452,17 +17446,17 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 1; /* for ease of testing */
- auto_size_ctl.apply_empty_reserve = FALSE;
+ auto_size_ctl.apply_empty_reserve = false;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 7.\n";
}
}
@@ -17472,7 +17466,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 6.\n";
}
}
@@ -17486,7 +17480,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) { /* first epoch -- hit rate 0 */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17500,7 +17494,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 64.\n";
}
}
@@ -17510,7 +17504,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* second epoch -- hit rate 0 */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1000;
while (pass && (i < 2000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17524,7 +17518,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 65.\n";
}
}
@@ -17534,7 +17528,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* third epoch -- hit rate 1.0 -- should see decrease */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17548,7 +17542,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (1001 * LARGE_ENTRY_SIZE)) ||
(cache_ptr->min_clean_size != (1001 * LARGE_ENTRY_SIZE / 2))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 66.\n";
}
}
@@ -17559,7 +17553,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* fourth epoch -- load up the cache again -- hit rate 0 */
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17573,7 +17567,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (1001 * LARGE_ENTRY_SIZE)) ||
(cache_ptr->min_clean_size != (1001 * LARGE_ENTRY_SIZE / 2))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 67.\n";
}
}
@@ -17584,7 +17578,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* fifth epoch -- still loading up the cache -- hit rate 0 */
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1000;
while (pass && (i < 2000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17598,7 +17592,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (1001 * LARGE_ENTRY_SIZE)) ||
(cache_ptr->min_clean_size != (1001 * LARGE_ENTRY_SIZE / 2))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 68.\n";
}
}
@@ -17609,7 +17603,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* sixth epoch -- force hit rate to .998 -- should be no reduction */
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1002;
while (pass && (i < 2002)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17623,7 +17617,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (1001 * LARGE_ENTRY_SIZE)) ||
(cache_ptr->min_clean_size != (1001 * LARGE_ENTRY_SIZE / 2))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 69.\n";
}
}
@@ -17635,7 +17629,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1003;
while (pass && (i < 2003)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17649,7 +17643,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (1000 * MEDIUM_ENTRY_SIZE)) ||
(cache_ptr->min_clean_size != (1000 * MEDIUM_ENTRY_SIZE / 2))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 70.\n";
}
}
@@ -17667,7 +17661,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1000 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -17683,7 +17677,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -17696,17 +17690,17 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1000 * 1024);
auto_size_ctl.epochs_before_eviction = 1; /* for ease of testing */
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.5; /* for ease of testing */
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 8.\n";
}
}
@@ -17716,7 +17710,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((cache_ptr->max_cache_size != (8 * 1000 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 7.\n";
}
}
@@ -17730,7 +17724,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) { /* first epoch -- hit rate 0 */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17744,7 +17738,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1000 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 71.\n";
}
}
@@ -17754,7 +17748,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) { /* second epoch -- hit rate 0 */
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1000;
while (pass && (i < 2000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17768,7 +17762,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->max_cache_size != (8 * 1000 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 72.\n";
}
}
@@ -17786,7 +17780,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17801,7 +17795,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
(cache_ptr->index_size != (7 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 73.\n";
}
}
@@ -17814,7 +17808,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17829,7 +17823,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
(cache_ptr->index_size != (6 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 74.\n";
}
}
@@ -17842,7 +17836,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17857,7 +17851,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
(cache_ptr->index_size != (5 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 75.\n";
}
}
@@ -17871,7 +17865,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17886,7 +17880,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
(cache_ptr->index_size != (4 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 76.\n";
}
}
@@ -17898,7 +17892,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
@@ -17913,7 +17907,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
(cache_ptr->index_size != (4 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 77.\n";
}
}
@@ -17926,7 +17920,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17941,7 +17935,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
(cache_ptr->index_size != (5 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 78.\n";
}
}
@@ -17955,7 +17949,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17970,7 +17964,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
(cache_ptr->index_size != (4 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 79.\n";
}
}
@@ -17984,7 +17978,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -17999,7 +17993,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (7 * 1000 * 1024 / 2)) ||
(cache_ptr->index_size != (3 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 80.\n";
}
}
@@ -18013,7 +18007,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -18028,7 +18022,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (3 * 1000 * 1024)) ||
(cache_ptr->index_size != (2 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 81.\n";
}
}
@@ -18040,7 +18034,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -18055,7 +18049,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (5 * 1000 * 1024 / 2)) ||
(cache_ptr->index_size != (1 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 82.\n";
}
}
@@ -18067,7 +18061,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -18082,7 +18076,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (2 * 1000 * 1024)) ||
(cache_ptr->index_size != (1 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 83.\n";
}
}
@@ -18094,7 +18088,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -18109,7 +18103,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (3 * 1000 * 1024 / 2)) ||
(cache_ptr->index_size != (1 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 84.\n";
}
}
@@ -18121,7 +18115,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -18136,7 +18130,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (1 * 1000 * 1024)) ||
(cache_ptr->index_size != (1 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 85.\n";
}
}
@@ -18148,7 +18142,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -18163,7 +18157,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (1 * 1000 * 1024)) ||
(cache_ptr->index_size != (1 * 1000 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 86.\n";
}
}
@@ -18193,7 +18187,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- flush_cache(file_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, true, false, false);
reset_entries();
}
@@ -18209,7 +18203,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 64 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -18225,7 +18219,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (32 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space;
@@ -18238,17 +18232,17 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1000 * 1024);
auto_size_ctl.epochs_before_eviction = 1; /* for ease of testing */
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.5; /* for ease of testing */
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 12.\n";
}
}
@@ -18258,7 +18252,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((cache_ptr->max_cache_size != (64 * 1024)) || (cache_ptr->min_clean_size != (32 * 1024)) ||
(cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) || (cache_ptr->cache_accesses != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (0).\n";
}
}
@@ -18278,7 +18272,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (32 * 1024)) || (cache_ptr->index_len != 1) ||
(cache_ptr->index_size != HUGE_ENTRY_SIZE) || (cache_ptr->cache_accesses != 1)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (1).\n";
}
}
@@ -18303,7 +18297,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->index_size != (HUGE_ENTRY_SIZE + MONSTER_ENTRY_SIZE)) ||
(cache_ptr->cache_accesses != 1)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (2).\n";
}
}
@@ -18327,7 +18321,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->index_size != ((2 * MONSTER_ENTRY_SIZE) + HUGE_ENTRY_SIZE)) ||
(cache_ptr->cache_accesses != 1)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (3).\n";
}
}
@@ -18349,7 +18343,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->index_len != 2) || (cache_ptr->index_size != (2 * MONSTER_ENTRY_SIZE)) ||
(cache_ptr->cache_accesses != 2)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (4).\n";
}
}
@@ -18369,7 +18363,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 13.\n";
}
}
@@ -18378,7 +18372,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (32 * 1024)) || (cache_ptr->index_len != 0) ||
(cache_ptr->index_size != 0) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (5).\n";
}
}
@@ -18405,7 +18399,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (32 * 1024)) || (cache_ptr->index_len != 1) ||
(cache_ptr->index_size != HUGE_ENTRY_SIZE) || (cache_ptr->cache_accesses != 2)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (6).\n";
}
}
@@ -18427,7 +18421,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->index_size != HUGE_ENTRY_SIZE + MONSTER_ENTRY_SIZE) ||
(cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (7).\n";
}
}
@@ -18446,7 +18440,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->index_size != 2 * MONSTER_ENTRY_SIZE + HUGE_ENTRY_SIZE) ||
(cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (8).\n";
}
}
@@ -18468,7 +18462,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->index_len != 2) || (cache_ptr->index_size != (2 * MONSTER_ENTRY_SIZE)) ||
(cache_ptr->cache_accesses != 1)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (9).\n";
}
}
@@ -18487,22 +18481,22 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
expunge_entry(file_ptr, MONSTER_ENTRY_TYPE, 6);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 1024, true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 1024, true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 1024, true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13, 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13, 1024, true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13, H5C__DIRTIED_FLAG);
- flush_cache(file_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, true, false, false);
if (pass) {
@@ -18511,7 +18505,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 13.\n";
}
}
@@ -18520,7 +18514,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (3 * 1024)) || (cache_ptr->index_len != 0) ||
(cache_ptr->index_size != 0) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (10).\n";
}
}
@@ -18547,7 +18541,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (3 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 4 * 1024) || (cache_ptr->cache_accesses != 4)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (11).\n";
}
}
@@ -18561,14 +18555,14 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (3 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (3 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG);
if (pass && (((cache_ptr->max_cache_size != (6 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 6 * 1024) || (cache_ptr->cache_accesses != 5)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (12).\n";
}
}
@@ -18583,14 +18577,14 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (10 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (10 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG);
if (pass && (((cache_ptr->max_cache_size != (13 * 1024)) ||
(cache_ptr->min_clean_size != (13 * 512)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 13 * 1024) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (13).\n";
}
}
@@ -18604,14 +18598,14 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, (10 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, (10 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__DIRTIED_FLAG);
if (pass && (((cache_ptr->max_cache_size != (22 * 1024)) ||
(cache_ptr->min_clean_size != (11 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 22 * 1024) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (14).\n";
}
}
@@ -18625,14 +18619,14 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, (10 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, (10 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__DIRTIED_FLAG);
if (pass && (((cache_ptr->max_cache_size != (22 * 1024)) ||
(cache_ptr->min_clean_size != (11 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 31 * 1024) || (cache_ptr->cache_accesses != 1)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (15).\n";
}
}
@@ -18647,15 +18641,15 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (1 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (1 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, (1 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, (1 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, (1 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, (1 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__DIRTIED_FLAG);
if (pass) {
@@ -18665,7 +18659,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 14.\n";
}
}
@@ -18674,7 +18668,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (3 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 4 * 1024) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (16).\n";
}
}
@@ -18688,13 +18682,13 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__PIN_ENTRY_FLAG);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024, true);
if (pass && (((cache_ptr->max_cache_size != (6 * 1024)) || (cache_ptr->min_clean_size != (6 * 512)) ||
(cache_ptr->index_len != 4) || (cache_ptr->index_size != 5 * 1024) ||
(cache_ptr->cache_accesses != 1)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (17).\n";
}
}
@@ -18704,13 +18698,13 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 10 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 10 * 1024, true);
if (pass && (((cache_ptr->max_cache_size != (13 * 1024)) ||
(cache_ptr->min_clean_size != (13 * 512)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 13 * 1024) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (18).\n";
}
}
@@ -18722,13 +18716,13 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__PIN_ENTRY_FLAG);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024, true);
if (pass && (((cache_ptr->max_cache_size != (22 * 1024)) ||
(cache_ptr->min_clean_size != (11 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 22 * 1024) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (19).\n";
}
}
@@ -18740,13 +18734,13 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__PIN_ENTRY_FLAG);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024, true);
if (pass && (((cache_ptr->max_cache_size != (22 * 1024)) ||
(cache_ptr->min_clean_size != (11 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 31 * 1024) || (cache_ptr->cache_accesses != 1)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (20).\n";
}
}
@@ -18772,7 +18766,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (11 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 31 * 1024) || (cache_ptr->cache_accesses != 4)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (21).\n";
}
}
@@ -18787,15 +18781,15 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (1 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (1 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, (1 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, (1 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__DIRTIED_FLAG);
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, (1 * 1024), TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, (1 * 1024), true);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__DIRTIED_FLAG);
if (pass) {
@@ -18805,7 +18799,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 15.\n";
}
}
@@ -18814,7 +18808,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (3 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 4 * 1024) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (22).\n";
}
}
@@ -18823,13 +18817,13 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__PIN_ENTRY_FLAG);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024, true);
if (pass && (((cache_ptr->max_cache_size != (6 * 1024)) || (cache_ptr->min_clean_size != (6 * 512)) ||
(cache_ptr->index_len != 4) || (cache_ptr->index_size != 5 * 1024) ||
(cache_ptr->cache_accesses != 1)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (23).\n";
}
}
@@ -18839,13 +18833,13 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 10 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 10 * 1024, true);
if (pass && (((cache_ptr->max_cache_size != (13 * 1024)) ||
(cache_ptr->min_clean_size != (13 * 512)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 13 * 1024) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (24).\n";
}
}
@@ -18857,13 +18851,13 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__PIN_ENTRY_FLAG);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024, true);
if (pass && (((cache_ptr->max_cache_size != (22 * 1024)) ||
(cache_ptr->min_clean_size != (11 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 22 * 1024) || (cache_ptr->cache_accesses != 0)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (25).\n";
}
}
@@ -18875,13 +18869,13 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__PIN_ENTRY_FLAG);
- resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024, true);
if (pass && (((cache_ptr->max_cache_size != (22 * 1024)) ||
(cache_ptr->min_clean_size != (11 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 31 * 1024) || (cache_ptr->cache_accesses != 1)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (26).\n";
}
}
@@ -18907,7 +18901,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (11 * 1024)) || (cache_ptr->index_len != 4) ||
(cache_ptr->index_size != 31 * 1024) || (cache_ptr->cache_accesses != 4)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (27).\n";
}
}
@@ -18926,7 +18920,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
(cache_ptr->min_clean_size != (11 * 1024)) || (cache_ptr->index_len != 0) ||
(cache_ptr->index_size != 0) || (cache_ptr->cache_accesses != 4)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (28).\n";
}
}
@@ -18943,7 +18937,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -18959,7 +18953,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space;
@@ -18972,17 +18966,17 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (2 * 1024);
auto_size_ctl.epochs_before_eviction = 1; /* for ease of testing */
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.5; /* for ease of testing */
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 15.\n";
}
}
@@ -18995,7 +18989,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024)) || (cache_ptr->min_clean_size != (4 * 512)) ||
(cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) || (cache_ptr->cache_accesses != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache after initialization 15.\n";
}
}
@@ -19008,16 +19002,16 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
if (pass && (((cache_ptr->max_cache_size != (4 * 1024)) || (cache_ptr->min_clean_size != (4 * 512)) ||
(cache_ptr->index_len != 1) || (cache_ptr->index_size != LARGE_ENTRY_SIZE) ||
- (cache_ptr->cache_accesses != 1) || (rpt_fcn_called == TRUE)))) {
+ (cache_ptr->cache_accesses != 1) || (rpt_fcn_called == true)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (29).\n";
}
}
@@ -19031,7 +19025,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, H5C__NO_FLAGS_SET);
@@ -19039,9 +19033,9 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass &&
(((cache_ptr->max_cache_size != (12 * 1024)) || (cache_ptr->min_clean_size != (12 * 512)) ||
(cache_ptr->index_len != 2) || (cache_ptr->index_size != 2 * LARGE_ENTRY_SIZE) ||
- (cache_ptr->cache_accesses != 1) || (rpt_fcn_called != TRUE)))) {
+ (cache_ptr->cache_accesses != 1) || (rpt_fcn_called != true)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (30).\n";
}
}
@@ -19054,7 +19048,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, H5C__NO_FLAGS_SET);
@@ -19064,9 +19058,9 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass &&
(((cache_ptr->max_cache_size != (12 * 1024)) || (cache_ptr->min_clean_size != (12 * 512)) ||
(cache_ptr->index_len != 3) || (cache_ptr->index_size != 3 * LARGE_ENTRY_SIZE) ||
- (cache_ptr->cache_accesses != 3) || (rpt_fcn_called != FALSE)))) {
+ (cache_ptr->cache_accesses != 3) || (rpt_fcn_called != false)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (31).\n";
}
}
@@ -19079,7 +19073,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, TINY_ENTRY_TYPE, 0);
@@ -19092,7 +19086,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if ((!rpt_fcn_called) || (cache_ptr->max_cache_size != (4 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024)) || (cache_ptr->index_size != (1 * TINY_ENTRY_SIZE))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (32).\n";
}
}
@@ -19103,7 +19097,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* Force another flash increase */
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
@@ -19111,10 +19105,10 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass && (((cache_ptr->max_cache_size != (4 * 1024 + 128)) ||
(cache_ptr->min_clean_size != (2 * 1024 + 64)) || (cache_ptr->index_len != 2) ||
(cache_ptr->index_size != LARGE_ENTRY_SIZE + TINY_ENTRY_SIZE) ||
- (cache_ptr->cache_accesses != 1) || (rpt_fcn_called == FALSE) ||
+ (cache_ptr->cache_accesses != 1) || (rpt_fcn_called == false) ||
(rpt_status != flash_increase)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (33).\n";
}
}
@@ -19125,7 +19119,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* force regular size increase up to maximum */
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 500)) {
protect_entry(file_ptr, TINY_ENTRY_TYPE, i);
@@ -19136,9 +19130,9 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
}
if ((cache_ptr->max_cache_size != (20 * 1024)) || (cache_ptr->min_clean_size != (10 * 1024)) ||
- (rpt_fcn_called == FALSE) || (rpt_status != at_max_size)) {
+ (rpt_fcn_called == false) || (rpt_status != at_max_size)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache config (34).\n";
}
}
@@ -19148,7 +19142,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (show_progress)
@@ -19181,7 +19175,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
static unsigned
check_auto_cache_resize_disable(unsigned paged)
{
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
herr_t result;
int32_t i;
int32_t checkpoint = 0;
@@ -19191,7 +19185,7 @@ check_auto_cache_resize_disable(unsigned paged)
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ test_rpt_fcn,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (512 * 1024),
/* double min_clean_fraction = */ 0.5,
@@ -19207,7 +19201,7 @@ check_auto_cache_resize_disable(unsigned paged)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -19221,12 +19215,12 @@ check_auto_cache_resize_disable(unsigned paged)
/* double decrement = */ 0.1,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05};
if (paged)
@@ -19234,7 +19228,7 @@ check_auto_cache_resize_disable(unsigned paged)
else
TESTING("automatic cache resize disable");
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stderr, "check point %d\n", checkpoint++);
@@ -19252,7 +19246,7 @@ check_auto_cache_resize_disable(unsigned paged)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "file_ptr NULL from setup_cache.";
}
else {
@@ -19267,7 +19261,7 @@ check_auto_cache_resize_disable(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -19276,7 +19270,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (512 * 1024)) || (cache_ptr->min_clean_size != (256 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after initialization.\n";
}
}
@@ -19296,7 +19290,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -19312,7 +19306,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 1.0; /* disable size increases */
- auto_size_ctl.apply_max_increment = FALSE;
+ auto_size_ctl.apply_max_increment = false;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -19325,19 +19319,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 2.\n";
}
}
@@ -19347,7 +19341,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 1.\n";
}
}
@@ -19360,7 +19354,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -19375,7 +19369,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 1.\n";
}
}
@@ -19388,7 +19382,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -19403,7 +19397,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 2.\n";
}
}
@@ -19416,7 +19410,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -19431,7 +19425,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 3.\n";
}
}
@@ -19448,7 +19442,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -19464,7 +19458,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = FALSE;
+ auto_size_ctl.apply_max_increment = false;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -19476,19 +19470,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.upper_hr_threshold = 0.995;
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 3.\n";
}
}
@@ -19498,7 +19492,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 2.\n";
}
}
@@ -19511,7 +19505,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -19526,7 +19520,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 4.\n";
}
}
@@ -19539,7 +19533,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -19554,7 +19548,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 5.\n";
}
}
@@ -19567,7 +19561,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -19582,7 +19576,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 6.\n";
}
}
@@ -19599,7 +19593,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -19615,7 +19609,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = FALSE;
+ auto_size_ctl.apply_max_increment = false;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -19628,19 +19622,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 4.\n";
}
}
@@ -19650,7 +19644,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 3.\n";
}
}
@@ -19663,7 +19657,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -19678,7 +19672,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 7.\n";
}
}
@@ -19691,7 +19685,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -19706,7 +19700,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 8.\n";
}
}
@@ -19719,7 +19713,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -19734,7 +19728,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 9.\n";
}
}
@@ -19750,7 +19744,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -19766,7 +19760,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -19779,19 +19773,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 1.0; /* disable size decreases */
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 5.\n";
}
}
@@ -19804,7 +19798,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 4.\n";
}
}
@@ -19817,7 +19811,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -19832,7 +19826,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 10.\n";
}
}
@@ -19844,7 +19838,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -19859,7 +19853,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 11.\n";
}
}
@@ -19872,7 +19866,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -19887,7 +19881,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 12.\n";
}
}
@@ -19904,7 +19898,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -19920,7 +19914,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -19933,19 +19927,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 6.\n";
}
}
@@ -19955,7 +19949,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 5.\n";
}
}
@@ -19968,7 +19962,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -19983,7 +19977,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 13.\n";
}
}
@@ -19995,7 +19989,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -20010,7 +20004,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 14.\n";
}
}
@@ -20023,7 +20017,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -20038,7 +20032,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 15.\n";
}
}
@@ -20054,7 +20048,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -20070,7 +20064,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -20083,19 +20077,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 7.\n";
}
}
@@ -20105,7 +20099,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 6.\n";
}
}
@@ -20118,7 +20112,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -20133,7 +20127,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 16.\n";
}
}
@@ -20145,7 +20139,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -20160,7 +20154,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 17.\n";
}
}
@@ -20173,7 +20167,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -20188,7 +20182,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 18.\n";
}
}
@@ -20206,7 +20200,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -20222,7 +20216,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -20235,19 +20229,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = 0; /* disable decrement */
auto_size_ctl.epochs_before_eviction = 1;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 8.\n";
}
}
@@ -20257,7 +20251,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 7.\n";
}
}
@@ -20268,7 +20262,7 @@ check_auto_cache_resize_disable(unsigned paged)
if (pass) {
/* flush the cache and destroy all entries so we start from a known point */
- flush_cache(file_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, true, false, false);
}
if (show_progress)
@@ -20279,7 +20273,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -20294,7 +20288,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 19.\n";
}
}
@@ -20306,7 +20300,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1000;
while (pass && (i < 2000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -20321,7 +20315,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 20.\n";
}
}
@@ -20335,7 +20329,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -20350,7 +20344,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 21.\n";
}
}
@@ -20362,7 +20356,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -20377,7 +20371,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 22.\n";
}
}
@@ -20392,7 +20386,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -20407,7 +20401,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 23.\n";
}
}
@@ -20423,7 +20417,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -20439,7 +20433,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -20452,19 +20446,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 1;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 1.0; /* disable decrement */
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 9.\n";
}
}
@@ -20474,7 +20468,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 8.\n";
}
}
@@ -20485,7 +20479,7 @@ check_auto_cache_resize_disable(unsigned paged)
if (pass) {
/* flush the cache and destroy all entries so we start from a known point */
- flush_cache(file_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, true, false, false);
}
if (show_progress)
@@ -20496,7 +20490,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -20511,7 +20505,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 24.\n";
}
}
@@ -20523,7 +20517,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1000;
while (pass && (i < 2000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -20538,7 +20532,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 25.\n";
}
}
@@ -20552,7 +20546,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -20567,7 +20561,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 26.\n";
}
}
@@ -20579,7 +20573,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -20594,7 +20588,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 27.\n";
}
}
@@ -20609,7 +20603,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -20624,7 +20618,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 28.\n";
}
}
@@ -20647,7 +20641,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -20663,7 +20657,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -20676,19 +20670,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 1;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 10.\n";
}
}
@@ -20698,7 +20692,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 9.\n";
}
}
@@ -20709,7 +20703,7 @@ check_auto_cache_resize_disable(unsigned paged)
if (pass) {
/* flush the cache and destroy all entries so we start from a known point */
- flush_cache(file_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, true, false, false);
}
if (show_progress)
@@ -20720,7 +20714,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -20735,7 +20729,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 29.\n";
}
}
@@ -20747,7 +20741,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 1000;
while (pass && (i < 2000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -20762,7 +20756,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 30.\n";
}
}
@@ -20778,7 +20772,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -20794,7 +20788,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->min_clean_size != (2 * 1024 * 1024)) || (cache_ptr->index_len != 2000) ||
(cache_ptr->index_size != 2000 * SMALL_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 31.\n";
}
}
@@ -20806,7 +20800,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -20821,7 +20815,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 32.\n";
}
}
@@ -20838,7 +20832,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 999);
@@ -20853,7 +20847,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 33.\n";
}
}
@@ -20873,7 +20867,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 2 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -20889,7 +20883,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -20902,19 +20896,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 11.\n";
}
}
@@ -20924,7 +20918,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 10.\n";
}
}
@@ -20937,7 +20931,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -20952,7 +20946,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 34.\n";
}
}
@@ -20965,7 +20959,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -20980,7 +20974,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 35.\n";
}
}
@@ -20993,7 +20987,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.25;
@@ -21009,7 +21003,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 1.0; /* disable size increment */
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -21022,19 +21016,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 1.0; /* disable size decrement */
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 12.\n";
}
}
@@ -21044,7 +21038,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 11.\n";
}
}
@@ -21057,7 +21051,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -21072,7 +21066,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 36.\n";
}
}
@@ -21085,7 +21079,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -21100,7 +21094,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 37.\n";
}
}
@@ -21113,7 +21107,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = FALSE;
+ auto_size_ctl.set_initial_size = false;
auto_size_ctl.initial_size = 2 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -21129,7 +21123,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -21142,19 +21136,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 13.\n";
}
}
@@ -21164,7 +21158,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 12.\n";
}
}
@@ -21177,7 +21171,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -21192,7 +21186,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 38.\n";
}
}
@@ -21205,7 +21199,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -21220,7 +21214,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 39.\n";
}
}
@@ -21233,7 +21227,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.25;
@@ -21249,7 +21243,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 1.0; /* disable size increment */
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -21262,19 +21256,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 14.\n";
}
}
@@ -21284,7 +21278,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 13.\n";
}
}
@@ -21297,7 +21291,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -21312,7 +21306,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 40.\n";
}
}
@@ -21325,7 +21319,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -21340,7 +21334,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 41.\n";
}
}
@@ -21353,7 +21347,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -21369,7 +21363,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -21382,19 +21376,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 1.0; /* disable size decrement */
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 15.\n";
}
}
@@ -21404,7 +21398,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 14.\n";
}
}
@@ -21417,7 +21411,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -21432,7 +21426,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 42.\n";
}
}
@@ -21445,7 +21439,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -21460,7 +21454,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 43.\n";
}
}
@@ -21473,7 +21467,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 4 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -21489,7 +21483,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -21502,19 +21496,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 16.\n";
}
}
@@ -21524,7 +21518,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 15.\n";
}
}
@@ -21537,7 +21531,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
@@ -21552,7 +21546,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 44.\n";
}
}
@@ -21565,7 +21559,7 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
@@ -21580,7 +21574,7 @@ check_auto_cache_resize_disable(unsigned paged)
(cache_ptr->size_decrease_possible) || (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 45.\n";
}
}
@@ -21620,7 +21614,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 64 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -21636,7 +21630,7 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (2 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -21649,19 +21643,19 @@ check_auto_cache_resize_disable(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = TRUE;
+ auto_size_ctl.apply_max_decrement = true;
auto_size_ctl.max_decrement = (1 * 1024);
auto_size_ctl.epochs_before_eviction = 3;
- auto_size_ctl.apply_empty_reserve = TRUE;
+ auto_size_ctl.apply_empty_reserve = true;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 17.\n";
}
}
@@ -21670,7 +21664,7 @@ check_auto_cache_resize_disable(unsigned paged)
if ((cache_ptr->max_cache_size != (64 * 1024)) || (cache_ptr->min_clean_size != (32 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 16.\n";
}
}
@@ -21681,14 +21675,14 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
if (pass && (((cache_ptr->max_cache_size != (64 * 1024)) ||
(cache_ptr->min_clean_size != (32 * 1024)) || (cache_ptr->index_len != 1) ||
- (cache_ptr->index_size != LARGE_ENTRY_SIZE) || (rpt_fcn_called != FALSE)))) {
+ (cache_ptr->index_size != LARGE_ENTRY_SIZE) || (rpt_fcn_called != false)))) {
fprintf(stdout, "\nmax_cache_size = %ld.\n", (long)(cache_ptr->max_cache_size));
fprintf(stdout, "min_clean_size = %ld.\n", (long)(cache_ptr->min_clean_size));
@@ -21696,7 +21690,7 @@ check_auto_cache_resize_disable(unsigned paged)
fprintf(stdout, "index_size = %ld.\n", (long)(cache_ptr->index_size));
fprintf(stdout, "rpt_fcn_called = %ld.\n", (long)(rpt_fcn_called));
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 46.\n";
}
}
@@ -21713,14 +21707,14 @@ check_auto_cache_resize_disable(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
if (pass && (((cache_ptr->max_cache_size != (64 * 1024)) ||
(cache_ptr->min_clean_size != (32 * 1024)) || (cache_ptr->index_len != 1) ||
- (cache_ptr->index_size != MONSTER_ENTRY_SIZE) || (rpt_fcn_called != FALSE)))) {
+ (cache_ptr->index_size != MONSTER_ENTRY_SIZE) || (rpt_fcn_called != false)))) {
fprintf(stdout, "\nmax_cache_size = %ld.\n", (long)(cache_ptr->max_cache_size));
fprintf(stdout, "min_clean_size = %ld.\n", (long)(cache_ptr->min_clean_size));
@@ -21728,7 +21722,7 @@ check_auto_cache_resize_disable(unsigned paged)
fprintf(stdout, "index_size = %ld.\n", (long)(cache_ptr->index_size));
fprintf(stdout, "rpt_fcn_called = %ld.\n", (long)(rpt_fcn_called));
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 47.\n";
}
}
@@ -21738,7 +21732,7 @@ check_auto_cache_resize_disable(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (show_progress)
@@ -21774,7 +21768,7 @@ check_auto_cache_resize_disable(unsigned paged)
static unsigned
check_auto_cache_resize_epoch_markers(unsigned paged)
{
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
herr_t result;
int32_t i;
int32_t j;
@@ -21785,7 +21779,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ test_rpt_fcn,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (512 * 1024),
/* double min_clean_fraction = */ 0.5,
@@ -21801,7 +21795,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -21815,12 +21809,12 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
/* double decrement = */ 0.1,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05};
if (paged)
@@ -21828,7 +21822,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
else
TESTING("automatic cache resize epoch marker management");
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stderr, "check point %d\n", checkpoint++);
@@ -21847,7 +21841,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -21856,7 +21850,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if ((cache_ptr->max_cache_size != (512 * 1024)) || (cache_ptr->min_clean_size != (256 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after initialization.\n";
}
}
@@ -21872,7 +21866,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -21888,7 +21882,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -21901,19 +21895,19 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 10;
- auto_size_ctl.apply_empty_reserve = FALSE;
+ auto_size_ctl.apply_empty_reserve = false;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 2.\n";
}
}
@@ -21923,7 +21917,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if ((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 1.\n";
}
}
@@ -21939,14 +21933,14 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if (cache_ptr->epoch_markers_active != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected # of epoch markers 1.\n";
}
}
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
@@ -21962,7 +21956,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
(cache_ptr->min_clean_size != (4 * 1024 * 1024)) ||
(cache_ptr->index_size != (1 * 1000 * MEDIUM_ENTRY_SIZE))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 0.\n";
}
}
@@ -21975,7 +21969,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
j = 2;
while (pass && (j <= 10)) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = (j - 2) * 1000;
while (pass && (i < (j - 1) * 1000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -21988,7 +21982,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->epoch_markers_active != j)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected # of epoch markers 2.\n";
}
@@ -22004,7 +21998,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 9000;
while (pass && (i < 10000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -22020,7 +22014,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
(cache_ptr->min_clean_size != ((10 * 1000 * SMALL_ENTRY_SIZE + MEDIUM_ENTRY_SIZE) / 2)) ||
(cache_ptr->index_size != (10 * 1000 * SMALL_ENTRY_SIZE + MEDIUM_ENTRY_SIZE))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 1.\n";
}
}
@@ -22036,7 +22030,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -22052,7 +22046,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22065,19 +22059,19 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 1;
- auto_size_ctl.apply_empty_reserve = FALSE;
+ auto_size_ctl.apply_empty_reserve = false;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 3.\n";
}
}
@@ -22087,7 +22081,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if ((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 2.\n";
}
}
@@ -22101,7 +22095,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if (cache_ptr->epoch_markers_active != 1) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected # of epoch markers 3.\n";
}
}
@@ -22112,7 +22106,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
*/
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 9000;
while (pass && (i < 10000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -22127,7 +22121,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
(cache_ptr->min_clean_size != (256 * 1024)) ||
(cache_ptr->index_size != (1 * 1000 * SMALL_ENTRY_SIZE))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 2.\n";
}
}
@@ -22141,7 +22135,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if (cache_ptr->epoch_markers_active != 1) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected # of epoch markers 4.\n";
}
}
@@ -22154,7 +22148,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -22170,7 +22164,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22183,19 +22177,19 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 1;
- auto_size_ctl.apply_empty_reserve = FALSE;
+ auto_size_ctl.apply_empty_reserve = false;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 4.\n";
}
}
@@ -22205,7 +22199,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if ((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after set resize re-config 3.\n";
}
}
@@ -22216,7 +22210,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if (cache_ptr->epoch_markers_active != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected # of epoch markers 5.\n";
}
}
@@ -22232,7 +22226,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -22248,7 +22242,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22261,19 +22255,19 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 10;
- auto_size_ctl.apply_empty_reserve = FALSE;
+ auto_size_ctl.apply_empty_reserve = false;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 5.\n";
}
}
@@ -22284,7 +22278,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if (cache_ptr->epoch_markers_active != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected # of epoch markers 6.\n";
}
}
@@ -22298,7 +22292,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
j = 1;
while (pass && (j <= 10)) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = (j - 1) * 1000;
while (pass && (i < j * 1000)) {
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
@@ -22311,7 +22305,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if ((!rpt_fcn_called) || (rpt_status != in_spec) || (cache_ptr->epoch_markers_active != j)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected # of epoch markers 7.\n";
}
@@ -22328,7 +22322,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if (cache_ptr->epoch_markers_active != 10) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected # of epoch markers 8.\n";
}
}
@@ -22341,7 +22335,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
- auto_size_ctl.set_initial_size = TRUE;
+ auto_size_ctl.set_initial_size = true;
auto_size_ctl.initial_size = 8 * 1024 * 1024;
auto_size_ctl.min_clean_fraction = 0.5;
@@ -22357,7 +22351,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.increment = 2.0;
- auto_size_ctl.apply_max_increment = TRUE;
+ auto_size_ctl.apply_max_increment = true;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22370,19 +22364,19 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
auto_size_ctl.decrement = 0.5;
- auto_size_ctl.apply_max_decrement = FALSE;
+ auto_size_ctl.apply_max_decrement = false;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
auto_size_ctl.epochs_before_eviction = 10;
- auto_size_ctl.apply_empty_reserve = FALSE;
+ auto_size_ctl.apply_empty_reserve = false;
auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 6.\n";
}
}
@@ -22393,7 +22387,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if (cache_ptr->epoch_markers_active != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected # of epoch markers 9.\n";
}
}
@@ -22410,7 +22404,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
(cache_ptr->min_clean_size != (4 * 1024 * 1024)) ||
(cache_ptr->index_size != (10 * 1000 * SMALL_ENTRY_SIZE)) || (cache_ptr->index_len != 10000)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache size change results 3.\n";
}
}
@@ -22420,7 +22414,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (show_progress)
@@ -22463,7 +22457,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ test_rpt_fcn,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (512 * 1024),
/* double min_clean_fraction = */ 0.5,
@@ -22479,7 +22473,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -22493,12 +22487,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
/* double decrement = */ 0.1,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05};
H5C_auto_size_ctl_t invalid_auto_size_ctl;
@@ -22509,7 +22503,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
else
TESTING("automatic cache resize input errors");
- pass = TRUE;
+ pass = true;
/* allocate a cache, and set a reference automatic cache control
* configuration. Then feed H5C_set_cache_auto_resize_config()
@@ -22531,7 +22525,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -22540,7 +22534,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
if ((cache_ptr->max_cache_size != (512 * 1024)) || (cache_ptr->min_clean_size != (256 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after initialization.\n";
}
}
@@ -22551,12 +22545,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 1.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 1.";
}
}
@@ -22566,7 +22560,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.5;
@@ -22582,7 +22576,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22595,19 +22589,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(NULL, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted NULL cache_ptr.\n";
}
}
@@ -22618,12 +22612,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 2.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 2.";
}
}
@@ -22635,7 +22629,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = -1; /* INVALID */
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.5;
@@ -22651,7 +22645,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22664,19 +22658,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad version.\n";
}
}
@@ -22687,12 +22681,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 3.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 3.";
}
}
@@ -22704,7 +22698,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 16 * 1024 * 1024 + 1;
/* INVALID */
@@ -22721,7 +22715,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22734,19 +22728,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad init size 1.\n";
}
}
@@ -22757,12 +22751,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 4.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 4.";
}
}
@@ -22772,7 +22766,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 1 * 1024 * 1024 - 1;
/* INVALID */
@@ -22789,7 +22783,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22802,19 +22796,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad init size 2.\n";
}
}
@@ -22825,12 +22819,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 5.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 5.";
}
}
@@ -22842,7 +22836,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 1.00001; /* INVALID */
@@ -22858,7 +22852,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22871,19 +22865,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad min clean frac 1.\n";
}
}
@@ -22894,12 +22888,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 6.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 6.";
}
}
@@ -22909,7 +22903,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = -0.00001; /* INVALID */
@@ -22925,7 +22919,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -22938,19 +22932,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad min clean frac 2.\n";
}
}
@@ -22961,12 +22955,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 7.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 7.";
}
}
@@ -22978,7 +22972,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.5;
@@ -22995,7 +22989,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23008,19 +23002,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad max_size.\n";
}
}
@@ -23031,12 +23025,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 8.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 8.";
}
}
@@ -23046,7 +23040,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.5;
@@ -23062,7 +23056,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23075,19 +23069,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad size pair.\n";
}
}
@@ -23098,12 +23092,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 9.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 9.";
}
}
@@ -23113,7 +23107,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.5;
@@ -23129,7 +23123,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23142,19 +23136,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad min_size.\n";
}
}
@@ -23165,12 +23159,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 10.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 10.";
}
}
@@ -23182,7 +23176,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -23199,7 +23193,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23212,19 +23206,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad epoch len 1.\n";
}
}
@@ -23235,12 +23229,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 11.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 11.";
}
}
@@ -23250,7 +23244,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -23267,7 +23261,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23280,19 +23274,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad epoch len 2.\n";
}
}
@@ -23303,12 +23297,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 12.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 12.";
}
}
@@ -23320,7 +23314,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -23336,7 +23330,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23349,19 +23343,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad incr_mode 1.\n";
}
}
@@ -23372,12 +23366,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 13.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 13.";
}
}
@@ -23387,7 +23381,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -23403,7 +23397,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23416,19 +23410,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad incr_mode 2.\n";
}
}
@@ -23439,12 +23433,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 14.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 14.";
}
}
@@ -23456,7 +23450,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.5;
@@ -23472,7 +23466,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23485,19 +23479,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad upper threshold.\n";
}
}
@@ -23508,12 +23502,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 15.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 15.";
}
}
@@ -23523,7 +23517,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.5;
@@ -23539,7 +23533,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23552,19 +23546,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad threshold pair.\n";
}
}
@@ -23575,12 +23569,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 16.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 16.";
}
}
@@ -23590,7 +23584,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.5;
@@ -23606,7 +23600,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23619,19 +23613,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad lower threshold.\n";
}
}
@@ -23642,12 +23636,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 17.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 17.";
}
}
@@ -23659,7 +23653,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -23675,7 +23669,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 0.99999; /* INVALID */
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -23688,19 +23682,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.5;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad increment.\n";
}
}
@@ -23711,12 +23705,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 18.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 18.";
}
}
@@ -23728,7 +23722,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -23744,7 +23738,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = (enum H5C_cache_flash_incr_mode) - 1; /* INVALID */
@@ -23757,19 +23751,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad flash_incr_mode.\n";
}
}
@@ -23780,12 +23774,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 19.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 19.";
}
}
@@ -23797,7 +23791,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -23813,7 +23807,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space;
@@ -23826,19 +23820,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad flash_multiple(1).\n";
}
}
@@ -23849,12 +23843,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 20.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 20.";
}
}
@@ -23864,7 +23858,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -23880,7 +23874,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space;
@@ -23893,19 +23887,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad flash_multiple(2).\n";
}
}
@@ -23916,12 +23910,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 21.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 21.";
}
}
@@ -23933,7 +23927,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -23949,7 +23943,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space;
@@ -23962,19 +23956,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad flash_threshold(1).\n";
}
}
@@ -23985,12 +23979,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 22.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 22.";
}
}
@@ -24000,7 +23994,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -24016,7 +24010,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space;
@@ -24029,19 +24023,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad flash_threshold(2).\n";
}
}
@@ -24052,12 +24046,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 23.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 23.";
}
}
@@ -24069,7 +24063,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -24085,7 +24079,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -24098,19 +24092,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad decr_mode 1.\n";
}
}
@@ -24121,12 +24115,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 24.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 24.";
}
}
@@ -24136,7 +24130,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -24152,7 +24146,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -24165,19 +24159,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad decr_mode 2.\n";
}
}
@@ -24188,12 +24182,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 25.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 25.";
}
}
@@ -24205,7 +24199,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -24221,7 +24215,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -24234,19 +24228,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 1.000001; /* INVALID */
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad decrement 1.\n";
}
}
@@ -24257,12 +24251,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 26.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 26.";
}
}
@@ -24272,7 +24266,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -24288,7 +24282,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -24301,19 +24295,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = -0.000001; /* INVALID */
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad decrement 2.\n";
}
}
@@ -24324,12 +24318,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 27.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 27.";
}
}
@@ -24341,7 +24335,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -24357,7 +24351,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -24370,19 +24364,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 0; /* INVALID */
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad epochs_before_eviction 1.\n";
}
}
@@ -24393,12 +24387,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 28.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 28.";
}
}
@@ -24408,7 +24402,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -24424,7 +24418,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -24437,19 +24431,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = H5C__MAX_EPOCH_MARKERS + 1; /* INVALID */
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad epochs_before_eviction 2.\n";
}
}
@@ -24460,12 +24454,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 29.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 29.";
}
}
@@ -24477,7 +24471,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -24493,7 +24487,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -24506,19 +24500,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = 3;
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = -0.0000001; /* INVALID */
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad empty_reserve 1.\n";
}
}
@@ -24529,12 +24523,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 30.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 30.";
}
}
@@ -24544,7 +24538,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
- invalid_auto_size_ctl.set_initial_size = TRUE;
+ invalid_auto_size_ctl.set_initial_size = true;
invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024;
invalid_auto_size_ctl.min_clean_fraction = 0.1;
@@ -24560,7 +24554,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.increment = 2.0;
- invalid_auto_size_ctl.apply_max_increment = TRUE;
+ invalid_auto_size_ctl.apply_max_increment = true;
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off;
@@ -24573,19 +24567,19 @@ check_auto_cache_resize_input_errs(unsigned paged)
invalid_auto_size_ctl.decrement = 0.9;
- invalid_auto_size_ctl.apply_max_decrement = TRUE;
+ invalid_auto_size_ctl.apply_max_decrement = true;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
invalid_auto_size_ctl.epochs_before_eviction = H5C__MAX_EPOCH_MARKERS + 1; /* INVALID */
- invalid_auto_size_ctl.apply_empty_reserve = TRUE;
+ invalid_auto_size_ctl.apply_empty_reserve = true;
invalid_auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad empty_reserve 2.\n";
}
}
@@ -24596,12 +24590,12 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed 31.";
}
- else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, FALSE)) {
+ else if (!resize_configs_are_equal(&test_auto_size_ctl, &ref_auto_size_ctl, false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected auto resize config 31.";
}
}
@@ -24616,7 +24610,7 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config accepted NULL cache_ptr.\n";
}
}
@@ -24627,14 +24621,14 @@ check_auto_cache_resize_input_errs(unsigned paged)
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config accepted NULL config ptr.\n";
}
}
if (cache_ptr) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -24684,7 +24678,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
H5C_auto_size_ctl_t auto_size_ctl = {
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ NULL,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (1 * 1024 * 1024),
/* double min_clean_fraction = */ 0.5,
@@ -24700,7 +24694,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -24714,12 +24708,12 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.5};
if (paged)
@@ -24727,7 +24721,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
else
TESTING("automatic cache resize auxiliary functions");
- pass = TRUE;
+ pass = true;
/* allocate a cache, and then test the various auxiliary functions.
*/
@@ -24746,7 +24740,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -24755,7 +24749,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if ((cache_ptr->max_cache_size != (1 * 1024 * 1024)) || (cache_ptr->min_clean_size != (512 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad cache size after initialization.\n";
}
}
@@ -24769,7 +24763,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if ((H5C_get_cache_hit_rate(NULL, &hit_rate) != FAIL) ||
(H5C_get_cache_hit_rate(cache_ptr, NULL) != FAIL)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_hit_rate accepts bad params.\n";
}
}
@@ -24780,19 +24774,19 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
}
else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.0)) { /* i.e. hit_rate != 0.0 */
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 1.\n";
}
}
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, PICO_ENTRY_TYPE, i);
@@ -24811,29 +24805,29 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
}
else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.0)) { /* i.e. hit_rate != 0.0 */
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 2.\n";
}
else if ((cache_ptr->cache_accesses != 1000) || (cache_ptr->cache_hits != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache hit rate stats.\n";
}
else if (rpt_fcn_called) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Report function called?.\n";
}
}
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, PICO_ENTRY_TYPE, 0);
@@ -24852,22 +24846,22 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
}
else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.5)) { /* i.e. hit_rate != 0.5 */
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 3.\n";
}
else if ((cache_ptr->cache_accesses != 2000) || (cache_ptr->cache_hits != 1000)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache hit rate stats.\n";
}
else if (rpt_fcn_called) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Report function called?.\n";
}
}
@@ -24878,12 +24872,12 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_reset_cache_hit_rate_stats accepted NULL cache_ptr.\n";
}
else if ((cache_ptr->cache_accesses != 2000) || (cache_ptr->cache_hits != 1000)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Failed call to H5C_reset_cache_hit_rate_stats altered stats?\n";
}
}
@@ -24894,19 +24888,19 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_reset_cache_hit_rate_stats failed.\n";
}
else if ((cache_ptr->cache_accesses != 0) || (cache_ptr->cache_hits != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache hit rate stats.\n";
}
}
if (pass) {
- rpt_fcn_called = FALSE;
+ rpt_fcn_called = false;
i = 0;
while (pass && (i < 1000)) {
protect_entry(file_ptr, PICO_ENTRY_TYPE, i + 500);
@@ -24925,22 +24919,22 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
}
else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.5)) { /* i.e. hit_rate != 0.5 */
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 4.\n";
}
else if ((cache_ptr->cache_accesses != 1000) || (cache_ptr->cache_hits != 500)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache hit rate stats.\n";
}
else if (rpt_fcn_called) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Report function called?.\n";
}
}
@@ -24957,7 +24951,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size accepted NULL cache_ptr.\n";
}
}
@@ -24973,27 +24967,27 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size failed 1.\n";
}
else if (max_size != (1 * 1024 * 1024)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected max_size 1.\n";
}
else if (min_clean_size != (512 * 1024)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected min_clean_size 1.\n";
}
else if (cur_size != (1500 * PICO_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected cur_size 1.\n";
}
else if (cur_num_entries != 1500) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected cur_num_entries 1.\n";
}
}
@@ -25021,27 +25015,27 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size failed 2.\n";
}
else if (max_size != (1 * 1024 * 1024)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected max_size 2.\n";
}
else if (min_clean_size != (512 * 1024)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected min_clean_size 2.\n";
}
else if (cur_size != ((1500 * PICO_ENTRY_SIZE) + MONSTER_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected cur_size 2.\n";
}
else if (cur_num_entries != 1501) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected cur_num_entries 2.\n";
}
}
@@ -25054,12 +25048,12 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size failed 3.\n";
}
else if (max_size != (1 * 1024 * 1024)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected max_size 3.\n";
}
}
@@ -25072,12 +25066,12 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size failed 4.\n";
}
else if (min_clean_size != (512 * 1024)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected min_clean_size 4.\n";
}
}
@@ -25090,12 +25084,12 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size failed 5.\n";
}
else if (cur_size != ((1500 * PICO_ENTRY_SIZE) + MONSTER_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected cur_size 5.\n";
}
}
@@ -25108,19 +25102,19 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size failed 6.\n";
}
else if (cur_num_entries != 1501) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_size reports unexpected cur_num_entries 2.\n";
}
}
if (cache_ptr) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -25162,14 +25156,14 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
*/
static unsigned
-check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
+check_metadata_blizzard_absence(bool fill_via_insertion, unsigned paged)
{
struct expected_entry_status *expected = NULL;
int entry_type = HUGE_ENTRY_TYPE;
size_t entry_size = HUGE_ENTRY_SIZE; /* 16 KB */
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
int32_t checkpoint = 0;
int32_t entry_idx = 0;
int32_t i;
@@ -25177,12 +25171,12 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
/* Expected deserialized status of entries depends on how they get into
* the cache. Insertions = not deserialized, protect/unprotect = deserialized.
*/
- hbool_t deserialized = (hbool_t) !(fill_via_insertion);
+ bool deserialized = (bool)!(fill_via_insertion);
expected = malloc(150 * sizeof(struct expected_entry_status));
if (expected == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't allocate expected entry status array\n";
}
@@ -25194,14 +25188,14 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
expected[i].entry_type = HUGE_ENTRY_TYPE;
expected[i].entry_index = (int)i;
expected[i].size = HUGE_ENTRY_SIZE;
- expected[i].in_cache = FALSE;
- expected[i].at_main_addr = TRUE;
- expected[i].is_dirty = FALSE;
- expected[i].is_protected = FALSE;
- expected[i].is_pinned = FALSE;
- expected[i].deserialized = FALSE;
- expected[i].serialized = FALSE;
- expected[i].destroyed = FALSE;
+ expected[i].in_cache = false;
+ expected[i].at_main_addr = true;
+ expected[i].is_dirty = false;
+ expected[i].is_protected = false;
+ expected[i].is_pinned = false;
+ expected[i].deserialized = false;
+ expected[i].serialized = false;
+ expected[i].destroyed = false;
memset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
memset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
@@ -25210,10 +25204,10 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
expected[i].flush_dep_nchd = 0;
expected[i].flush_dep_ndirty_chd = 0;
expected[i].flush_order = -1;
- expected[i].is_corked = FALSE;
+ expected[i].is_corked = false;
}
- pass = TRUE;
+ pass = true;
}
reset_entries();
@@ -25245,7 +25239,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad return from cache initialization.\n";
}
else
@@ -25304,8 +25298,8 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
/* Change expected values, and verify the status of the entries
* after each insertion
*/
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -25370,12 +25364,12 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
*/
/* entry w/ index 0 has now been flushed and is now clean. */
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
/* entry w/ index 26 is now in the cache and dirty. */
- expected[26].in_cache = TRUE;
- expected[26].is_dirty = TRUE;
+ expected[26].in_cache = true;
+ expected[26].is_dirty = true;
expected[26].deserialized = (unsigned char)deserialized;
/* verify the status */
@@ -25424,12 +25418,12 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
*/
/* entry w/ index 1 has now been flushed and is now clean. */
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
/* entry w/ index 27 is now in the cache and dirty. */
- expected[27].in_cache = TRUE;
- expected[27].is_dirty = TRUE;
+ expected[27].in_cache = true;
+ expected[27].is_dirty = true;
expected[27].deserialized = (unsigned char)deserialized;
/* verify the status */
@@ -25470,11 +25464,11 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
* entry currently getting inserted is now in the cache and
* dirty.
*/
- expected[entry_idx - 26].is_dirty = FALSE;
- expected[entry_idx - 26].serialized = TRUE;
+ expected[entry_idx - 26].is_dirty = false;
+ expected[entry_idx - 26].serialized = true;
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
/* verify the status */
@@ -25485,9 +25479,9 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
/* Verify that the cache is now full */
- if (cache_ptr->cache_full != TRUE) {
+ if (cache_ptr->cache_full != true) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not completely filled.\n";
}
}
@@ -25546,18 +25540,18 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
*/
/* entry w/ index 0 has been evicted. */
- expected[0].in_cache = FALSE;
- expected[0].destroyed = TRUE;
+ expected[0].in_cache = false;
+ expected[0].destroyed = true;
/* entries w/ indices 24,25 have now been flushed and are clean. */
- expected[24].is_dirty = FALSE;
- expected[24].serialized = TRUE;
- expected[25].is_dirty = FALSE;
- expected[25].serialized = TRUE;
+ expected[24].is_dirty = false;
+ expected[24].serialized = true;
+ expected[25].is_dirty = false;
+ expected[25].serialized = true;
/* entry w/ index 50 is now in the cache and dirty */
- expected[50].in_cache = TRUE;
- expected[50].is_dirty = TRUE;
+ expected[50].in_cache = true;
+ expected[50].is_dirty = true;
expected[50].deserialized = (unsigned char)deserialized;
/* verify the status */
@@ -25600,13 +25594,13 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
/* This past inserted entry is now in the cache and dirty */
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
/* The entry inserted 50 insertions ago has been evicted */
- expected[entry_idx - 50].in_cache = FALSE;
- expected[entry_idx - 50].destroyed = TRUE;
+ expected[entry_idx - 50].in_cache = false;
+ expected[entry_idx - 50].destroyed = true;
/* If the newly inserted entry is among the first 24
* insertions in this loop, then the insertion will
@@ -25614,8 +25608,8 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
* 25 insertions ago. */
if (entry_idx < 75) {
- expected[entry_idx - 25].is_dirty = FALSE;
- expected[entry_idx - 25].serialized = TRUE;
+ expected[entry_idx - 25].is_dirty = false;
+ expected[entry_idx - 25].serialized = true;
}
/* If the newly inserted entry is among the last
* 25 insertions in this loop, then the insertion will
@@ -25626,8 +25620,8 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
* flush-then-evict, it switches to evict-then-flush. */
else {
- expected[entry_idx - 26].is_dirty = FALSE;
- expected[entry_idx - 26].serialized = TRUE;
+ expected[entry_idx - 26].is_dirty = false;
+ expected[entry_idx - 26].serialized = true;
}
/* Verify this expected status */
@@ -25672,9 +25666,9 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
*/
flush_cache(file_ptr, /* H5F_t * file_ptr */
- FALSE, /* hbool_t destory_entries */
- FALSE, /* hbool_t dump_stats */
- FALSE); /* hbool_t dump_detailed_stats */
+ false, /* bool destory_entries */
+ false, /* bool dump_stats */
+ false); /* bool dump_detailed_stats */
/* Verify that the cache is clean */
verify_clean();
@@ -25688,8 +25682,8 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
/* entries w/ indices 74-99 have been flushed. */
for (i = 74; i < 100; i++) {
- expected[i].is_dirty = FALSE;
- expected[i].serialized = TRUE;
+ expected[i].is_dirty = false;
+ expected[i].serialized = true;
}
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
0, /* int tag */
@@ -25729,13 +25723,13 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
/* This past inserted entry is now in the cache and dirty */
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
/* The entry with ID minus 50 will have been evicted */
- expected[entry_idx - 50].in_cache = FALSE;
- expected[entry_idx - 50].destroyed = TRUE;
+ expected[entry_idx - 50].in_cache = false;
+ expected[entry_idx - 50].destroyed = true;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -25777,16 +25771,16 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
*/
/* entry w/ index 76 has been evicted. */
- expected[76].in_cache = FALSE;
- expected[76].destroyed = TRUE;
+ expected[76].in_cache = false;
+ expected[76].destroyed = true;
/* entry w/ index 100 has now been flushed and is now clean. */
- expected[100].is_dirty = FALSE;
- expected[100].serialized = TRUE;
+ expected[100].is_dirty = false;
+ expected[100].serialized = true;
/* entry w/ index 26 is now in the cache and dirty. */
- expected[126].in_cache = TRUE;
- expected[126].is_dirty = TRUE;
+ expected[126].in_cache = true;
+ expected[126].is_dirty = true;
expected[126].deserialized = (unsigned char)deserialized;
/* verify the status */
@@ -25822,17 +25816,17 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
}
/* This past inserted entry is now in the cache and dirty */
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
/* The entry with ID minus 50 will have been evicted */
- expected[entry_idx - 50].in_cache = FALSE;
- expected[entry_idx - 50].destroyed = TRUE;
+ expected[entry_idx - 50].in_cache = false;
+ expected[entry_idx - 50].destroyed = true;
/* The entry with ID minus 26 will now be clean */
- expected[entry_idx - 26].is_dirty = FALSE;
- expected[entry_idx - 26].serialized = TRUE;
+ expected[entry_idx - 26].is_dirty = false;
+ expected[entry_idx - 26].serialized = true;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -25848,7 +25842,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
if (cache_ptr) {
/* We're done with testing. We can take down the cache. */
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
reset_entries();
}
@@ -25892,11 +25886,11 @@ check_flush_deps(unsigned paged)
{
/* entry entry in at main flush dep flush dep child flush flush flush */
/* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- { PICO_ENTRY_TYPE, 0, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { PICO_ENTRY_TYPE, 1, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { PICO_ENTRY_TYPE, 2, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { PICO_ENTRY_TYPE, 3, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { PICO_ENTRY_TYPE, 4, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}
+ { PICO_ENTRY_TYPE, 0, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { PICO_ENTRY_TYPE, 1, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { PICO_ENTRY_TYPE, 2, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { PICO_ENTRY_TYPE, 3, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { PICO_ENTRY_TYPE, 4, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false}
};
/* clang-format on */
@@ -25905,7 +25899,7 @@ check_flush_deps(unsigned paged)
else
TESTING("flush dependencies");
- pass = TRUE;
+ pass = true;
/* allocate a cache, build up flush dependency hierarchy and tear it down.
* Verify that all performs as expected.
@@ -25928,8 +25922,8 @@ check_flush_deps(unsigned paged)
/* Change expected values, and verify the status of the entries
* after each insertion
*/
- expected[u].in_cache = TRUE;
- expected[u].is_dirty = TRUE;
+ expected[u].in_cache = true;
+ expected[u].is_dirty = true;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -25944,7 +25938,7 @@ check_flush_deps(unsigned paged)
/* Create flush dependency between entries 0 (child) & 1 (parent) */
{
- hbool_t in_cache, is_flush_dep_parent, is_flush_dep_child;
+ bool in_cache, is_flush_dep_parent, is_flush_dep_child;
test_entry_t *entry_ptr;
protect_entry(file_ptr, entry_type, 1);
@@ -25993,8 +25987,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -26024,8 +26018,8 @@ check_flush_deps(unsigned paged)
* after destroy flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -26063,8 +26057,8 @@ check_flush_deps(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 2;
expected[2].flush_dep_ndirty_chd = 2;
@@ -26099,8 +26093,8 @@ check_flush_deps(unsigned paged)
*/
expected[0].flush_dep_npar = 0;
expected[1].flush_dep_npar = 0;
- expected[2].is_protected = FALSE;
- expected[2].is_pinned = FALSE;
+ expected[2].is_protected = false;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
expected[2].flush_dep_ndirty_chd = 0;
@@ -26133,8 +26127,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -26160,8 +26154,8 @@ check_flush_deps(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
expected[2].flush_dep_ndirty_chd = 1;
@@ -26187,8 +26181,8 @@ check_flush_deps(unsigned paged)
expected[2].flush_dep_par_type[0] = entry_type;
expected[2].flush_dep_par_idx[0] = 3;
expected[2].flush_dep_npar = 1;
- expected[3].is_protected = TRUE;
- expected[3].is_pinned = TRUE;
+ expected[3].is_protected = true;
+ expected[3].is_pinned = true;
expected[3].flush_dep_nchd = 1;
expected[3].flush_dep_ndirty_chd = 1;
@@ -26218,8 +26212,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[2].flush_dep_npar = 0;
- expected[3].is_protected = FALSE;
- expected[3].is_pinned = FALSE;
+ expected[3].is_protected = false;
+ expected[3].is_pinned = false;
expected[3].flush_dep_nchd = 0;
expected[3].flush_dep_ndirty_chd = 0;
@@ -26246,8 +26240,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[1].flush_dep_npar = 0;
- expected[2].is_protected = FALSE;
- expected[2].is_pinned = FALSE;
+ expected[2].is_protected = false;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
expected[2].flush_dep_ndirty_chd = 0;
@@ -26274,8 +26268,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -26308,8 +26302,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -26335,8 +26329,8 @@ check_flush_deps(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
expected[2].flush_dep_ndirty_chd = 1;
@@ -26362,8 +26356,8 @@ check_flush_deps(unsigned paged)
expected[2].flush_dep_par_type[0] = entry_type;
expected[2].flush_dep_par_idx[0] = 3;
expected[2].flush_dep_npar = 1;
- expected[3].is_protected = TRUE;
- expected[3].is_pinned = TRUE;
+ expected[3].is_protected = true;
+ expected[3].is_pinned = true;
expected[3].flush_dep_nchd = 1;
expected[3].flush_dep_ndirty_chd = 1;
@@ -26393,8 +26387,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -26421,8 +26415,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[1].flush_dep_npar = 0;
- expected[2].is_protected = FALSE;
- expected[2].is_pinned = FALSE;
+ expected[2].is_protected = false;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
expected[2].flush_dep_ndirty_chd = 0;
@@ -26449,8 +26443,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[2].flush_dep_npar = 0;
- expected[3].is_protected = FALSE;
- expected[3].is_pinned = FALSE;
+ expected[3].is_protected = false;
+ expected[3].is_pinned = false;
expected[3].flush_dep_nchd = 0;
expected[3].flush_dep_ndirty_chd = 0;
@@ -26483,8 +26477,8 @@ check_flush_deps(unsigned paged)
expected[2].flush_dep_par_type[0] = entry_type;
expected[2].flush_dep_par_idx[0] = 3;
expected[2].flush_dep_npar = 1;
- expected[3].is_protected = TRUE;
- expected[3].is_pinned = TRUE;
+ expected[3].is_protected = true;
+ expected[3].is_pinned = true;
expected[3].flush_dep_nchd = 1;
expected[3].flush_dep_ndirty_chd = 1;
@@ -26510,8 +26504,8 @@ check_flush_deps(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
expected[2].flush_dep_ndirty_chd = 1;
@@ -26537,8 +26531,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -26568,8 +26562,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[2].flush_dep_npar = 0;
- expected[3].is_protected = FALSE;
- expected[3].is_pinned = FALSE;
+ expected[3].is_protected = false;
+ expected[3].is_pinned = false;
expected[3].flush_dep_nchd = 0;
expected[3].flush_dep_ndirty_chd = 0;
@@ -26596,8 +26590,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[1].flush_dep_npar = 0;
- expected[2].is_protected = FALSE;
- expected[2].is_pinned = FALSE;
+ expected[2].is_protected = false;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
expected[2].flush_dep_ndirty_chd = 0;
@@ -26624,8 +26618,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -26658,8 +26652,8 @@ check_flush_deps(unsigned paged)
expected[2].flush_dep_par_type[0] = entry_type;
expected[2].flush_dep_par_idx[0] = 3;
expected[2].flush_dep_npar = 1;
- expected[3].is_protected = TRUE;
- expected[3].is_pinned = TRUE;
+ expected[3].is_protected = true;
+ expected[3].is_pinned = true;
expected[3].flush_dep_nchd = 1;
expected[3].flush_dep_ndirty_chd = 1;
@@ -26685,8 +26679,8 @@ check_flush_deps(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
expected[2].flush_dep_ndirty_chd = 1;
@@ -26712,8 +26706,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -26743,8 +26737,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -26771,8 +26765,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[1].flush_dep_npar = 0;
- expected[2].is_protected = FALSE;
- expected[2].is_pinned = FALSE;
+ expected[2].is_protected = false;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
expected[2].flush_dep_ndirty_chd = 0;
@@ -26799,8 +26793,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[2].flush_dep_npar = 0;
- expected[3].is_protected = FALSE;
- expected[3].is_pinned = FALSE;
+ expected[3].is_protected = false;
+ expected[3].is_pinned = false;
expected[3].flush_dep_nchd = 0;
expected[3].flush_dep_ndirty_chd = 0;
@@ -26832,8 +26826,8 @@ check_flush_deps(unsigned paged)
expected[u].flush_dep_par_type[0] = entry_type;
expected[u].flush_dep_par_idx[0] = 4;
expected[u].flush_dep_npar = 1;
- expected[4].is_protected = TRUE;
- expected[4].is_pinned = TRUE;
+ expected[4].is_protected = true;
+ expected[4].is_pinned = true;
expected[4].flush_dep_nchd++;
expected[4].flush_dep_ndirty_chd++;
@@ -26873,8 +26867,8 @@ check_flush_deps(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
*/
- expected[4].is_protected = FALSE;
- expected[4].is_pinned = FALSE;
+ expected[4].is_protected = false;
+ expected[4].is_pinned = false;
} /* end if */
/* Verify the status */
@@ -26909,8 +26903,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -26936,8 +26930,8 @@ check_flush_deps(unsigned paged)
expected[3].flush_dep_par_type[0] = entry_type;
expected[3].flush_dep_par_idx[0] = 4;
expected[3].flush_dep_npar = 1;
- expected[4].is_protected = TRUE;
- expected[4].is_pinned = TRUE;
+ expected[4].is_protected = true;
+ expected[4].is_pinned = true;
expected[4].flush_dep_nchd = 1;
expected[4].flush_dep_ndirty_chd = 1;
@@ -26963,8 +26957,8 @@ check_flush_deps(unsigned paged)
expected[4].flush_dep_par_type[0] = entry_type;
expected[4].flush_dep_par_idx[0] = 0;
expected[4].flush_dep_npar = 1;
- expected[0].is_protected = TRUE;
- expected[0].is_pinned = TRUE;
+ expected[0].is_protected = true;
+ expected[0].is_pinned = true;
expected[0].flush_dep_nchd = 1;
expected[0].flush_dep_ndirty_chd = 1;
@@ -26994,8 +26988,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[4].flush_dep_npar = 0;
- expected[0].is_protected = FALSE;
- expected[0].is_pinned = FALSE;
+ expected[0].is_protected = false;
+ expected[0].is_pinned = false;
expected[0].flush_dep_nchd = 0;
expected[0].flush_dep_ndirty_chd = 0;
@@ -27022,8 +27016,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[3].flush_dep_npar = 0;
- expected[4].is_protected = FALSE;
- expected[4].is_pinned = FALSE;
+ expected[4].is_protected = false;
+ expected[4].is_pinned = false;
expected[4].flush_dep_nchd = 0;
expected[4].flush_dep_ndirty_chd = 0;
@@ -27050,8 +27044,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -27086,8 +27080,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -27113,8 +27107,8 @@ check_flush_deps(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
expected[2].flush_dep_ndirty_chd = 1;
@@ -27140,8 +27134,8 @@ check_flush_deps(unsigned paged)
expected[3].flush_dep_par_type[0] = entry_type;
expected[3].flush_dep_par_idx[0] = 4;
expected[3].flush_dep_npar = 1;
- expected[4].is_protected = TRUE;
- expected[4].is_pinned = TRUE;
+ expected[4].is_protected = true;
+ expected[4].is_pinned = true;
expected[4].flush_dep_nchd = 1;
expected[4].flush_dep_ndirty_chd = 1;
@@ -27211,8 +27205,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[3].flush_dep_npar = 0;
- expected[4].is_protected = FALSE;
- expected[4].is_pinned = FALSE;
+ expected[4].is_protected = false;
+ expected[4].is_pinned = false;
expected[4].flush_dep_nchd = 0;
expected[4].flush_dep_ndirty_chd = 0;
@@ -27239,8 +27233,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[1].flush_dep_npar = 0;
- expected[2].is_protected = FALSE;
- expected[2].is_pinned = FALSE;
+ expected[2].is_protected = false;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
expected[2].flush_dep_ndirty_chd = 0;
@@ -27267,8 +27261,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -27303,8 +27297,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -27330,8 +27324,8 @@ check_flush_deps(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
expected[2].flush_dep_ndirty_chd = 1;
@@ -27357,8 +27351,8 @@ check_flush_deps(unsigned paged)
expected[3].flush_dep_par_type[0] = entry_type;
expected[3].flush_dep_par_idx[0] = 4;
expected[3].flush_dep_npar = 1;
- expected[4].is_protected = TRUE;
- expected[4].is_pinned = TRUE;
+ expected[4].is_protected = true;
+ expected[4].is_pinned = true;
expected[4].flush_dep_nchd = 1;
expected[4].flush_dep_ndirty_chd = 1;
@@ -27428,8 +27422,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[3].flush_dep_npar = 0;
- expected[4].is_protected = FALSE;
- expected[4].is_pinned = FALSE;
+ expected[4].is_protected = false;
+ expected[4].is_pinned = false;
expected[4].flush_dep_nchd = 0;
expected[4].flush_dep_ndirty_chd = 0;
@@ -27456,8 +27450,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[1].flush_dep_npar = 0;
- expected[2].is_protected = FALSE;
- expected[2].is_pinned = FALSE;
+ expected[2].is_protected = false;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
expected[2].flush_dep_ndirty_chd = 0;
@@ -27484,8 +27478,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -27522,8 +27516,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -27557,8 +27551,8 @@ check_flush_deps(unsigned paged)
* after destroy flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -27595,8 +27589,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -27638,8 +27632,8 @@ check_flush_deps(unsigned paged)
* after destroy flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -27672,8 +27666,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -27699,8 +27693,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[1] = entry_type;
expected[0].flush_dep_par_idx[1] = 2;
expected[0].flush_dep_npar = 2;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
expected[2].flush_dep_ndirty_chd = 1;
@@ -27732,8 +27726,8 @@ check_flush_deps(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 2;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = FALSE;
- expected[1].is_pinned = FALSE;
+ expected[1].is_protected = false;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[1].flush_dep_ndirty_chd = 0;
@@ -27760,8 +27754,8 @@ check_flush_deps(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[2].is_protected = FALSE;
- expected[2].is_pinned = FALSE;
+ expected[2].is_protected = false;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
expected[2].flush_dep_ndirty_chd = 0;
@@ -27776,7 +27770,7 @@ check_flush_deps(unsigned paged)
done:
if (file_ptr)
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
if (pass)
PASSED();
@@ -27810,7 +27804,7 @@ check_flush_deps_err(unsigned paged)
else
TESTING("flush dependency errors");
- pass = TRUE;
+ pass = true;
/* Loop over test cases, check for various errors in configuring flush
* dependencies. Verify that all performs as expected.
@@ -28031,7 +28025,7 @@ check_flush_deps_err(unsigned paged)
CACHE_ERROR("Unknown test case!")
} /* end switch */
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
if (!pass)
CACHE_ERROR("takedown_cache failed")
file_ptr = NULL;
@@ -28039,7 +28033,7 @@ check_flush_deps_err(unsigned paged)
done:
if (file_ptr)
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
if (pass)
PASSED();
@@ -28075,11 +28069,11 @@ check_flush_deps_order(unsigned paged)
{
/* entry entry in at main flush dep flush dep child flush flush flush */
/* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- { PICO_ENTRY_TYPE, 0, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { PICO_ENTRY_TYPE, 1, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { PICO_ENTRY_TYPE, 2, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { PICO_ENTRY_TYPE, 3, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { PICO_ENTRY_TYPE, 4, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}
+ { PICO_ENTRY_TYPE, 0, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { PICO_ENTRY_TYPE, 1, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { PICO_ENTRY_TYPE, 2, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { PICO_ENTRY_TYPE, 3, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { PICO_ENTRY_TYPE, 4, PICO_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false}
};
/* clang-format on */
@@ -28088,7 +28082,7 @@ check_flush_deps_order(unsigned paged)
else
TESTING("flush dependencies flush order");
- pass = TRUE;
+ pass = true;
/* allocate a cache, build up flush dependency hierarchy and tear it down.
* Verify that all performs as expected.
@@ -28110,8 +28104,8 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after each insertion
*/
- expected[u].in_cache = TRUE;
- expected[u].is_dirty = TRUE;
+ expected[u].in_cache = true;
+ expected[u].is_dirty = true;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -28140,8 +28134,8 @@ check_flush_deps_order(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[1].flush_dep_ndirty_chd = 1;
@@ -28156,8 +28150,8 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -28176,20 +28170,20 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 0;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 1;
- expected[1].is_protected = FALSE;
+ expected[1].is_protected = false;
expected[1].flush_dep_ndirty_chd = 0;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
- expected[4].is_dirty = FALSE;
- expected[4].serialized = TRUE;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
+ expected[4].is_dirty = false;
+ expected[4].serialized = true;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -28210,7 +28204,7 @@ check_flush_deps_order(unsigned paged)
* after destroy flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_pinned = FALSE;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
/* Verify the status */
@@ -28237,8 +28231,8 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after creating flush dependency
*/
- expected[0].is_protected = TRUE;
- expected[0].is_pinned = TRUE;
+ expected[0].is_protected = true;
+ expected[0].is_pinned = true;
expected[0].flush_dep_nchd = 1;
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 0;
@@ -28255,8 +28249,8 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -28266,15 +28260,15 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0 & 1 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, TRUE);
- dirty_entry(file_ptr, entry_type, 1, FALSE);
+ dirty_entry(file_ptr, entry_type, 0, true);
+ dirty_entry(file_ptr, entry_type, 1, false);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
/* Reset index for tracking flush order */
@@ -28287,12 +28281,12 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 1;
- expected[0].is_protected = FALSE;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[0].is_protected = false;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 0;
/* Verify the status */
@@ -28313,7 +28307,7 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_pinned = FALSE;
+ expected[0].is_pinned = false;
expected[0].flush_dep_nchd = 0;
expected[1].flush_dep_npar = 0;
@@ -28353,8 +28347,8 @@ check_flush_deps_order(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 2;
/* Verify the status */
@@ -28368,9 +28362,9 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -28380,18 +28374,18 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0, 1 & 2 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, FALSE);
- dirty_entry(file_ptr, entry_type, 1, FALSE);
- dirty_entry(file_ptr, entry_type, 2, TRUE);
+ dirty_entry(file_ptr, entry_type, 0, false);
+ dirty_entry(file_ptr, entry_type, 1, false);
+ dirty_entry(file_ptr, entry_type, 2, true);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
/* Reset index for tracking flush order */
@@ -28404,16 +28398,16 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 0;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 1;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 2;
- expected[2].is_protected = FALSE;
+ expected[2].is_protected = false;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -28439,7 +28433,7 @@ check_flush_deps_order(unsigned paged)
*/
expected[0].flush_dep_npar = 0;
expected[1].flush_dep_npar = 0;
- expected[2].is_pinned = FALSE;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
/* Verify the status */
@@ -28472,8 +28466,8 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after creating flush dependency
*/
- expected[0].is_protected = TRUE;
- expected[0].is_pinned = TRUE;
+ expected[0].is_protected = true;
+ expected[0].is_pinned = true;
expected[0].flush_dep_nchd = 2;
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 0;
@@ -28493,9 +28487,9 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -28505,18 +28499,18 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0, 1 & 2 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, TRUE);
- dirty_entry(file_ptr, entry_type, 1, FALSE);
- dirty_entry(file_ptr, entry_type, 2, FALSE);
+ dirty_entry(file_ptr, entry_type, 0, true);
+ dirty_entry(file_ptr, entry_type, 1, false);
+ dirty_entry(file_ptr, entry_type, 2, false);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
/* Reset index for tracking flush order */
@@ -28529,15 +28523,15 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 2;
- expected[0].is_protected = FALSE;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[0].is_protected = false;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 0;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 1;
/* Verify the status */
@@ -28562,7 +28556,7 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_pinned = FALSE;
+ expected[0].is_pinned = false;
expected[0].flush_dep_nchd = 0;
expected[1].flush_dep_npar = 0;
expected[2].flush_dep_npar = 0;
@@ -28596,8 +28590,8 @@ check_flush_deps_order(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
/* Verify the status */
@@ -28622,8 +28616,8 @@ check_flush_deps_order(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
/* Verify the status */
@@ -28648,8 +28642,8 @@ check_flush_deps_order(unsigned paged)
expected[2].flush_dep_par_type[0] = entry_type;
expected[2].flush_dep_par_idx[0] = 3;
expected[2].flush_dep_npar = 1;
- expected[3].is_protected = TRUE;
- expected[3].is_pinned = TRUE;
+ expected[3].is_protected = true;
+ expected[3].is_pinned = true;
expected[3].flush_dep_nchd = 1;
/* Verify the status */
@@ -28663,10 +28657,10 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -28690,21 +28684,21 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-3 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, FALSE);
- dirty_entry(file_ptr, entry_type, 1, TRUE);
- dirty_entry(file_ptr, entry_type, 2, TRUE);
- dirty_entry(file_ptr, entry_type, 3, TRUE);
+ dirty_entry(file_ptr, entry_type, 0, false);
+ dirty_entry(file_ptr, entry_type, 1, true);
+ dirty_entry(file_ptr, entry_type, 2, true);
+ dirty_entry(file_ptr, entry_type, 3, true);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
- expected[3].serialized = FALSE;
+ expected[3].serialized = false;
expected[3].flush_order = -1;
/* Reset index for tracking flush order */
@@ -28717,20 +28711,20 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 0;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 1;
- expected[1].is_protected = FALSE;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[1].is_protected = false;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 2;
- expected[2].is_protected = FALSE;
- expected[3].serialized = TRUE;
+ expected[2].is_protected = false;
+ expected[3].serialized = true;
expected[3].flush_order = 3;
- expected[3].is_protected = FALSE;
+ expected[3].is_protected = false;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -28751,7 +28745,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[2].flush_dep_npar = 0;
- expected[3].is_pinned = FALSE;
+ expected[3].is_pinned = false;
expected[3].flush_dep_nchd = 0;
/* Verify the status */
@@ -28770,7 +28764,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[1].flush_dep_npar = 0;
- expected[2].is_pinned = FALSE;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
/* Verify the status */
@@ -28789,7 +28783,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_pinned = FALSE;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
/* Verify the status */
@@ -28818,8 +28812,8 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after creating flush dependency
*/
- expected[0].is_protected = TRUE;
- expected[0].is_pinned = TRUE;
+ expected[0].is_protected = true;
+ expected[0].is_pinned = true;
expected[0].flush_dep_nchd = 1;
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 0;
@@ -28844,8 +28838,8 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after creating flush dependency
*/
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
expected[2].flush_dep_par_type[0] = entry_type;
expected[2].flush_dep_par_idx[0] = 1;
@@ -28870,8 +28864,8 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after creating flush dependency
*/
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
expected[3].flush_dep_par_type[0] = entry_type;
expected[3].flush_dep_par_idx[0] = 2;
@@ -28888,10 +28882,10 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -28915,21 +28909,21 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-3 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, TRUE);
- dirty_entry(file_ptr, entry_type, 1, TRUE);
- dirty_entry(file_ptr, entry_type, 2, TRUE);
- dirty_entry(file_ptr, entry_type, 3, FALSE);
+ dirty_entry(file_ptr, entry_type, 0, true);
+ dirty_entry(file_ptr, entry_type, 1, true);
+ dirty_entry(file_ptr, entry_type, 2, true);
+ dirty_entry(file_ptr, entry_type, 3, false);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
- expected[3].serialized = FALSE;
+ expected[3].serialized = false;
expected[3].flush_order = -1;
/* Reset index for tracking flush order */
@@ -28942,20 +28936,20 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 3;
- expected[0].is_protected = FALSE;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[0].is_protected = false;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 2;
- expected[1].is_protected = FALSE;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[1].is_protected = false;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 1;
- expected[2].is_protected = FALSE;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
+ expected[2].is_protected = false;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
expected[3].flush_order = 0;
/* Verify the status */
@@ -28976,7 +28970,7 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
*/
- expected[2].is_pinned = FALSE;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
expected[3].flush_dep_npar = 0;
@@ -28995,7 +28989,7 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
*/
- expected[1].is_pinned = FALSE;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
expected[2].flush_dep_npar = 0;
@@ -29014,7 +29008,7 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
*/
- expected[0].is_pinned = FALSE;
+ expected[0].is_pinned = false;
expected[0].flush_dep_nchd = 0;
expected[1].flush_dep_npar = 0;
@@ -29046,8 +29040,8 @@ check_flush_deps_order(unsigned paged)
expected[u].flush_dep_par_type[0] = entry_type;
expected[u].flush_dep_par_idx[0] = 4;
expected[u].flush_dep_npar = 1;
- expected[4].is_protected = TRUE;
- expected[4].is_pinned = TRUE;
+ expected[4].is_protected = true;
+ expected[4].is_pinned = true;
expected[4].flush_dep_nchd = u + 1;
/* Verify the status */
@@ -29062,11 +29056,11 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -29076,24 +29070,24 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-4 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, FALSE);
- dirty_entry(file_ptr, entry_type, 1, FALSE);
- dirty_entry(file_ptr, entry_type, 2, FALSE);
- dirty_entry(file_ptr, entry_type, 3, FALSE);
- dirty_entry(file_ptr, entry_type, 4, TRUE);
+ dirty_entry(file_ptr, entry_type, 0, false);
+ dirty_entry(file_ptr, entry_type, 1, false);
+ dirty_entry(file_ptr, entry_type, 2, false);
+ dirty_entry(file_ptr, entry_type, 3, false);
+ dirty_entry(file_ptr, entry_type, 4, true);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
- expected[3].serialized = FALSE;
+ expected[3].serialized = false;
expected[3].flush_order = -1;
- expected[4].serialized = FALSE;
+ expected[4].serialized = false;
expected[4].flush_order = -1;
/* Reset index for tracking flush order */
@@ -29106,22 +29100,22 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 0;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 1;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 2;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
expected[3].flush_order = 3;
- expected[4].is_dirty = FALSE;
- expected[4].serialized = TRUE;
+ expected[4].is_dirty = false;
+ expected[4].serialized = true;
expected[4].flush_order = 4;
- expected[4].is_protected = FALSE;
+ expected[4].is_protected = false;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -29150,7 +29144,7 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
*/
- expected[4].is_pinned = FALSE;
+ expected[4].is_pinned = false;
} /* end if */
/* Verify the status */
@@ -29182,8 +29176,8 @@ check_flush_deps_order(unsigned paged)
expected[u].flush_dep_par_type[0] = entry_type;
expected[u].flush_dep_par_idx[0] = 0;
expected[u].flush_dep_npar = 1;
- expected[0].is_protected = TRUE;
- expected[0].is_pinned = TRUE;
+ expected[0].is_protected = true;
+ expected[0].is_pinned = true;
expected[0].flush_dep_nchd = u;
/* Verify the status */
@@ -29198,11 +29192,11 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -29212,24 +29206,24 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-4 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, TRUE);
- dirty_entry(file_ptr, entry_type, 1, FALSE);
- dirty_entry(file_ptr, entry_type, 2, FALSE);
- dirty_entry(file_ptr, entry_type, 3, FALSE);
- dirty_entry(file_ptr, entry_type, 4, FALSE);
+ dirty_entry(file_ptr, entry_type, 0, true);
+ dirty_entry(file_ptr, entry_type, 1, false);
+ dirty_entry(file_ptr, entry_type, 2, false);
+ dirty_entry(file_ptr, entry_type, 3, false);
+ dirty_entry(file_ptr, entry_type, 4, false);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
- expected[3].serialized = FALSE;
+ expected[3].serialized = false;
expected[3].flush_order = -1;
- expected[4].serialized = FALSE;
+ expected[4].serialized = false;
expected[4].flush_order = -1;
/* Reset index for tracking flush order */
@@ -29242,21 +29236,21 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 4;
- expected[0].is_protected = FALSE;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[0].is_protected = false;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 0;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 1;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
expected[3].flush_order = 2;
- expected[4].is_dirty = FALSE;
- expected[4].serialized = TRUE;
+ expected[4].is_dirty = false;
+ expected[4].serialized = true;
expected[4].flush_order = 3;
/* Verify the status */
@@ -29286,7 +29280,7 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
*/
- expected[0].is_pinned = FALSE;
+ expected[0].is_pinned = false;
} /* end if */
/* Verify the status */
@@ -29321,8 +29315,8 @@ check_flush_deps_order(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
/* Verify the status */
@@ -29347,8 +29341,8 @@ check_flush_deps_order(unsigned paged)
expected[3].flush_dep_par_type[0] = entry_type;
expected[3].flush_dep_par_idx[0] = 4;
expected[3].flush_dep_npar = 1;
- expected[4].is_protected = TRUE;
- expected[4].is_pinned = TRUE;
+ expected[4].is_protected = true;
+ expected[4].is_pinned = true;
expected[4].flush_dep_nchd = 1;
/* Verify the status */
@@ -29373,8 +29367,8 @@ check_flush_deps_order(unsigned paged)
expected[4].flush_dep_par_type[0] = entry_type;
expected[4].flush_dep_par_idx[0] = 0;
expected[4].flush_dep_npar = 1;
- expected[0].is_protected = TRUE;
- expected[0].is_pinned = TRUE;
+ expected[0].is_protected = true;
+ expected[0].is_pinned = true;
expected[0].flush_dep_nchd = 1;
/* Verify the status */
@@ -29388,11 +29382,11 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
- add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -29416,23 +29410,23 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0 & 1, 3 & 4 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, TRUE);
- dirty_entry(file_ptr, entry_type, 1, TRUE);
- dirty_entry(file_ptr, entry_type, 3, FALSE);
- dirty_entry(file_ptr, entry_type, 4, TRUE);
+ dirty_entry(file_ptr, entry_type, 0, true);
+ dirty_entry(file_ptr, entry_type, 1, true);
+ dirty_entry(file_ptr, entry_type, 3, false);
+ dirty_entry(file_ptr, entry_type, 4, true);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
- expected[3].serialized = FALSE;
+ expected[3].serialized = false;
expected[3].flush_order = -1;
- expected[4].serialized = FALSE;
+ expected[4].serialized = false;
expected[4].flush_order = -1;
/* Reset index for tracking flush order */
@@ -29445,23 +29439,23 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 2;
- expected[0].is_protected = FALSE;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[0].is_protected = false;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 3;
- expected[1].is_protected = FALSE;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
+ expected[1].is_protected = false;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
expected[3].flush_order = 0;
- expected[4].is_dirty = FALSE;
- expected[4].serialized = TRUE;
+ expected[4].is_dirty = false;
+ expected[4].serialized = true;
expected[4].flush_order = 1;
- expected[4].is_protected = FALSE;
+ expected[4].is_protected = false;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -29482,7 +29476,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[4].flush_dep_npar = 0;
- expected[0].is_pinned = FALSE;
+ expected[0].is_pinned = false;
expected[0].flush_dep_nchd = 0;
/* Verify the status */
@@ -29501,7 +29495,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[3].flush_dep_npar = 0;
- expected[4].is_pinned = FALSE;
+ expected[4].is_pinned = false;
expected[4].flush_dep_nchd = 0;
/* Verify the status */
@@ -29520,7 +29514,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_pinned = FALSE;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
/* Verify the status */
@@ -29554,8 +29548,8 @@ check_flush_deps_order(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
/* Verify the status */
@@ -29580,8 +29574,8 @@ check_flush_deps_order(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
/* Verify the status */
@@ -29606,8 +29600,8 @@ check_flush_deps_order(unsigned paged)
expected[3].flush_dep_par_type[0] = entry_type;
expected[3].flush_dep_par_idx[0] = 4;
expected[3].flush_dep_npar = 1;
- expected[4].is_protected = TRUE;
- expected[4].is_pinned = TRUE;
+ expected[4].is_protected = true;
+ expected[4].is_pinned = true;
expected[4].flush_dep_nchd = 1;
/* Verify the status */
@@ -29641,11 +29635,11 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -29669,24 +29663,24 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-4 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, FALSE);
- dirty_entry(file_ptr, entry_type, 1, TRUE);
- dirty_entry(file_ptr, entry_type, 2, TRUE);
- dirty_entry(file_ptr, entry_type, 3, FALSE);
- dirty_entry(file_ptr, entry_type, 4, TRUE);
+ dirty_entry(file_ptr, entry_type, 0, false);
+ dirty_entry(file_ptr, entry_type, 1, true);
+ dirty_entry(file_ptr, entry_type, 2, true);
+ dirty_entry(file_ptr, entry_type, 3, false);
+ dirty_entry(file_ptr, entry_type, 4, true);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
- expected[3].serialized = FALSE;
+ expected[3].serialized = false;
expected[3].flush_order = -1;
- expected[4].serialized = FALSE;
+ expected[4].serialized = false;
expected[4].flush_order = -1;
/* Reset index for tracking flush order */
@@ -29699,25 +29693,25 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 0;
- expected[0].is_protected = FALSE;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[0].is_protected = false;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 3;
- expected[1].is_protected = FALSE;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[1].is_protected = false;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 4;
- expected[2].is_protected = FALSE;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
+ expected[2].is_protected = false;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
expected[3].flush_order = 1;
- expected[4].is_dirty = FALSE;
- expected[4].serialized = TRUE;
+ expected[4].is_dirty = false;
+ expected[4].serialized = true;
expected[4].flush_order = 2;
- expected[4].is_protected = FALSE;
+ expected[4].is_protected = false;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -29756,7 +29750,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[3].flush_dep_npar = 0;
- expected[4].is_pinned = FALSE;
+ expected[4].is_pinned = false;
expected[4].flush_dep_nchd = 0;
/* Verify the status */
@@ -29775,7 +29769,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[1].flush_dep_npar = 0;
- expected[2].is_pinned = FALSE;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
/* Verify the status */
@@ -29794,7 +29788,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_pinned = FALSE;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
/* Verify the status */
@@ -29828,8 +29822,8 @@ check_flush_deps_order(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
/* Verify the status */
@@ -29854,8 +29848,8 @@ check_flush_deps_order(unsigned paged)
expected[1].flush_dep_par_type[0] = entry_type;
expected[1].flush_dep_par_idx[0] = 2;
expected[1].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
/* Verify the status */
@@ -29880,8 +29874,8 @@ check_flush_deps_order(unsigned paged)
expected[3].flush_dep_par_type[0] = entry_type;
expected[3].flush_dep_par_idx[0] = 4;
expected[3].flush_dep_npar = 1;
- expected[4].is_protected = TRUE;
- expected[4].is_pinned = TRUE;
+ expected[4].is_protected = true;
+ expected[4].is_pinned = true;
expected[4].flush_dep_nchd = 1;
/* Verify the status */
@@ -29915,11 +29909,11 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 4, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -29943,24 +29937,24 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-4 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, FALSE);
- dirty_entry(file_ptr, entry_type, 1, TRUE);
- dirty_entry(file_ptr, entry_type, 2, TRUE);
- dirty_entry(file_ptr, entry_type, 3, FALSE);
- dirty_entry(file_ptr, entry_type, 4, TRUE);
+ dirty_entry(file_ptr, entry_type, 0, false);
+ dirty_entry(file_ptr, entry_type, 1, true);
+ dirty_entry(file_ptr, entry_type, 2, true);
+ dirty_entry(file_ptr, entry_type, 3, false);
+ dirty_entry(file_ptr, entry_type, 4, true);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
- expected[3].serialized = FALSE;
+ expected[3].serialized = false;
expected[3].flush_order = -1;
- expected[4].serialized = FALSE;
+ expected[4].serialized = false;
expected[4].flush_order = -1;
/* Reset index for tracking flush order */
@@ -29973,25 +29967,25 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 0;
- expected[0].is_protected = FALSE;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[0].is_protected = false;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 1;
- expected[1].is_protected = FALSE;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[1].is_protected = false;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 4;
- expected[2].is_protected = FALSE;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
+ expected[2].is_protected = false;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
expected[3].flush_order = 2;
- expected[4].is_dirty = FALSE;
- expected[4].serialized = TRUE;
+ expected[4].is_dirty = false;
+ expected[4].serialized = true;
expected[4].flush_order = 3;
- expected[4].is_protected = FALSE;
+ expected[4].is_protected = false;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -30030,7 +30024,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[3].flush_dep_npar = 0;
- expected[4].is_pinned = FALSE;
+ expected[4].is_pinned = false;
expected[4].flush_dep_nchd = 0;
/* Verify the status */
@@ -30049,7 +30043,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[1].flush_dep_npar = 0;
- expected[2].is_pinned = FALSE;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
/* Verify the status */
@@ -30068,7 +30062,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_pinned = FALSE;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
/* Verify the status */
@@ -30101,8 +30095,8 @@ check_flush_deps_order(unsigned paged)
expected[0].flush_dep_par_type[0] = entry_type;
expected[0].flush_dep_par_idx[0] = 1;
expected[0].flush_dep_npar = 1;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
/* Verify the status */
@@ -30127,8 +30121,8 @@ check_flush_deps_order(unsigned paged)
expected[0].flush_dep_par_type[1] = entry_type;
expected[0].flush_dep_par_idx[1] = 2;
expected[0].flush_dep_npar = 2;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
/* Verify the status */
@@ -30173,8 +30167,8 @@ check_flush_deps_order(unsigned paged)
expected[0].flush_dep_par_type[2] = entry_type;
expected[0].flush_dep_par_idx[2] = 3;
expected[0].flush_dep_npar = 3;
- expected[3].is_protected = TRUE;
- expected[3].is_pinned = TRUE;
+ expected[3].is_protected = true;
+ expected[3].is_pinned = true;
expected[3].flush_dep_nchd = 1;
/* Verify the status */
@@ -30228,10 +30222,10 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -30255,21 +30249,21 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-3 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, FALSE);
- dirty_entry(file_ptr, entry_type, 1, TRUE);
- dirty_entry(file_ptr, entry_type, 2, TRUE);
- dirty_entry(file_ptr, entry_type, 3, FALSE);
+ dirty_entry(file_ptr, entry_type, 0, false);
+ dirty_entry(file_ptr, entry_type, 1, true);
+ dirty_entry(file_ptr, entry_type, 2, true);
+ dirty_entry(file_ptr, entry_type, 3, false);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'flushed' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
- expected[3].serialized = FALSE;
+ expected[3].serialized = false;
expected[3].flush_order = -1;
/* Reset index for tracking flush order */
@@ -30282,22 +30276,22 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 0;
- expected[0].is_protected = FALSE;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[0].is_protected = false;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 1;
- expected[1].is_protected = FALSE;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[1].is_protected = false;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 2;
- expected[2].is_protected = FALSE;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
+ expected[2].is_protected = false;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
expected[3].flush_order = 3;
- expected[3].is_protected = FALSE;
+ expected[3].is_protected = false;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -30354,7 +30348,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 2;
- expected[3].is_pinned = FALSE;
+ expected[3].is_pinned = false;
expected[3].flush_dep_nchd = 0;
/* Verify the status */
@@ -30391,7 +30385,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 1;
- expected[2].is_pinned = FALSE;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
/* Verify the status */
@@ -30410,7 +30404,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[0].flush_dep_npar = 0;
- expected[1].is_pinned = FALSE;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
/* Verify the status */
@@ -30443,8 +30437,8 @@ check_flush_deps_order(unsigned paged)
expected[3].flush_dep_par_type[0] = entry_type;
expected[3].flush_dep_par_idx[0] = 2;
expected[3].flush_dep_npar = 1;
- expected[2].is_protected = TRUE;
- expected[2].is_pinned = TRUE;
+ expected[2].is_protected = true;
+ expected[2].is_pinned = true;
expected[2].flush_dep_nchd = 1;
/* Verify the status */
@@ -30469,8 +30463,8 @@ check_flush_deps_order(unsigned paged)
expected[3].flush_dep_par_type[1] = entry_type;
expected[3].flush_dep_par_idx[1] = 1;
expected[3].flush_dep_npar = 2;
- expected[1].is_protected = TRUE;
- expected[1].is_pinned = TRUE;
+ expected[1].is_protected = true;
+ expected[1].is_pinned = true;
expected[1].flush_dep_nchd = 1;
/* Verify the status */
@@ -30515,8 +30509,8 @@ check_flush_deps_order(unsigned paged)
expected[3].flush_dep_par_type[2] = entry_type;
expected[3].flush_dep_par_idx[2] = 0;
expected[3].flush_dep_npar = 3;
- expected[0].is_protected = TRUE;
- expected[0].is_pinned = TRUE;
+ expected[0].is_protected = true;
+ expected[0].is_pinned = true;
expected[0].flush_dep_nchd = 1;
/* Verify the status */
@@ -30570,10 +30564,10 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
- add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
+ add_flush_op(entry_type, 3, FLUSH_OP__ORDER, entry_type, 0, false, (size_t)0, &flush_order);
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
@@ -30597,21 +30591,21 @@ check_flush_deps_order(unsigned paged)
CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-3 dirty, so they are flushed */
- dirty_entry(file_ptr, entry_type, 0, FALSE);
- dirty_entry(file_ptr, entry_type, 1, TRUE);
- dirty_entry(file_ptr, entry_type, 2, TRUE);
- dirty_entry(file_ptr, entry_type, 3, FALSE);
+ dirty_entry(file_ptr, entry_type, 0, false);
+ dirty_entry(file_ptr, entry_type, 1, true);
+ dirty_entry(file_ptr, entry_type, 2, true);
+ dirty_entry(file_ptr, entry_type, 3, false);
if (!pass)
CACHE_ERROR("dirty_entry failed")
/* Reset 'flushed' flag & 'flush_order' value in expected array */
- expected[0].serialized = FALSE;
+ expected[0].serialized = false;
expected[0].flush_order = -1;
- expected[1].serialized = FALSE;
+ expected[1].serialized = false;
expected[1].flush_order = -1;
- expected[2].serialized = FALSE;
+ expected[2].serialized = false;
expected[2].flush_order = -1;
- expected[3].serialized = FALSE;
+ expected[3].serialized = false;
expected[3].flush_order = -1;
/* Reset index for tracking flush order */
@@ -30624,22 +30618,22 @@ check_flush_deps_order(unsigned paged)
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
expected[0].flush_order = 3;
- expected[0].is_protected = FALSE;
- expected[1].is_dirty = FALSE;
- expected[1].serialized = TRUE;
+ expected[0].is_protected = false;
+ expected[1].is_dirty = false;
+ expected[1].serialized = true;
expected[1].flush_order = 2;
- expected[1].is_protected = FALSE;
- expected[2].is_dirty = FALSE;
- expected[2].serialized = TRUE;
+ expected[1].is_protected = false;
+ expected[2].is_dirty = false;
+ expected[2].serialized = true;
expected[2].flush_order = 1;
- expected[2].is_protected = FALSE;
- expected[3].is_dirty = FALSE;
- expected[3].serialized = TRUE;
+ expected[2].is_protected = false;
+ expected[3].is_dirty = false;
+ expected[3].serialized = true;
expected[3].flush_order = 0;
- expected[3].is_protected = FALSE;
+ expected[3].is_protected = false;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -30696,7 +30690,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[3].flush_dep_npar = 2;
- expected[0].is_pinned = FALSE;
+ expected[0].is_pinned = false;
expected[0].flush_dep_nchd = 0;
/* Verify the status */
@@ -30733,7 +30727,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[3].flush_dep_npar = 1;
- expected[1].is_pinned = FALSE;
+ expected[1].is_pinned = false;
expected[1].flush_dep_nchd = 0;
/* Verify the status */
@@ -30752,7 +30746,7 @@ check_flush_deps_order(unsigned paged)
* after destroying flush dependency
*/
expected[3].flush_dep_npar = 0;
- expected[2].is_pinned = FALSE;
+ expected[2].is_pinned = false;
expected[2].flush_dep_nchd = 0;
/* Verify the status */
@@ -30766,7 +30760,7 @@ check_flush_deps_order(unsigned paged)
done:
if (file_ptr)
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
if (pass)
PASSED();
@@ -30802,11 +30796,11 @@ check_notify_cb(unsigned paged)
{
/* entry entry in at main flush dep flush dep child flush flush flush */
/* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- { NOTIFY_ENTRY_TYPE, 0, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { NOTIFY_ENTRY_TYPE, 1, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { NOTIFY_ENTRY_TYPE, 2, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { NOTIFY_ENTRY_TYPE, 3, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { NOTIFY_ENTRY_TYPE, 4, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}
+ { NOTIFY_ENTRY_TYPE, 0, NOTIFY_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { NOTIFY_ENTRY_TYPE, 1, NOTIFY_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { NOTIFY_ENTRY_TYPE, 2, NOTIFY_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { NOTIFY_ENTRY_TYPE, 3, NOTIFY_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { NOTIFY_ENTRY_TYPE, 4, NOTIFY_ENTRY_SIZE, false, true, false, false, false, false, false, false, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, false}
};
/* clang-format on */
@@ -30815,7 +30809,7 @@ check_notify_cb(unsigned paged)
else
TESTING("'notify' callback");
- pass = TRUE;
+ pass = true;
/* Allocate a cache, insert & remove entries, triggering 'notify' callback.
* Verify that all performs as expected.
@@ -30840,8 +30834,8 @@ check_notify_cb(unsigned paged)
/* Change expected values, and verify the status of the entries
* after each insertion
*/
- expected[u].in_cache = TRUE;
- expected[u].is_dirty = TRUE;
+ expected[u].in_cache = true;
+ expected[u].is_dirty = true;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -30868,10 +30862,10 @@ check_notify_cb(unsigned paged)
/* Change expected values, and verify the status of the entries
* after each expunge
*/
- expected[u].in_cache = FALSE;
- expected[u].is_dirty = TRUE;
- expected[u].serialized = FALSE;
- expected[u].destroyed = TRUE;
+ expected[u].in_cache = false;
+ expected[u].is_dirty = true;
+ expected[u].serialized = false;
+ expected[u].destroyed = true;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -30898,10 +30892,10 @@ check_notify_cb(unsigned paged)
/* Change expected values, and verify the status of the entries
* after each insertion
*/
- expected[u].in_cache = TRUE;
- expected[u].is_dirty = FALSE;
- expected[u].is_protected = TRUE;
- expected[u].deserialized = TRUE;
+ expected[u].in_cache = true;
+ expected[u].is_dirty = false;
+ expected[u].is_protected = true;
+ expected[u].deserialized = true;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -30928,9 +30922,9 @@ check_notify_cb(unsigned paged)
/* Change expected values, and verify the status of the entries
* after each insertion
*/
- expected[u].in_cache = TRUE;
- expected[u].is_dirty = TRUE;
- expected[u].is_protected = FALSE;
+ expected[u].in_cache = true;
+ expected[u].is_dirty = true;
+ expected[u].is_protected = false;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -30957,10 +30951,10 @@ check_notify_cb(unsigned paged)
/* Change expected values, and verify the status of the entries
* after each expunge
*/
- expected[u].in_cache = FALSE;
- expected[u].is_dirty = TRUE;
- expected[u].serialized = FALSE;
- expected[u].destroyed = TRUE;
+ expected[u].in_cache = false;
+ expected[u].is_dirty = true;
+ expected[u].serialized = false;
+ expected[u].destroyed = true;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -30979,7 +30973,7 @@ check_notify_cb(unsigned paged)
} /* end for */
done:
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
if (pass)
PASSED();
@@ -31004,7 +30998,7 @@ done:
*-------------------------------------------------------------------------
*/
static unsigned
-check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
+check_metadata_cork(bool fill_via_insertion, unsigned paged)
{
struct expected_entry_status *expected = NULL;
const char *fcn_name = "check_metadata_cork";
@@ -31012,7 +31006,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
size_t entry_size = HUGE_ENTRY_SIZE; /* 16 KB */
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
int32_t checkpoint = 0;
int32_t entry_idx = 0;
int32_t i;
@@ -31020,12 +31014,12 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
/* Expected deserialized status of entries depends on how they get into
* the cache. Insertions = not deserialized, protect/unprotect = deserialized.
*/
- hbool_t deserialized = (hbool_t) !(fill_via_insertion);
+ bool deserialized = (bool)!(fill_via_insertion);
expected = malloc(150 * sizeof(struct expected_entry_status));
if (expected == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't allocate expected entry status array\n";
}
@@ -31037,14 +31031,14 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
expected[i].entry_type = HUGE_ENTRY_TYPE;
expected[i].entry_index = (int)i;
expected[i].size = HUGE_ENTRY_SIZE;
- expected[i].in_cache = FALSE;
- expected[i].at_main_addr = TRUE;
- expected[i].is_dirty = FALSE;
- expected[i].is_protected = FALSE;
- expected[i].is_pinned = FALSE;
- expected[i].deserialized = FALSE;
- expected[i].serialized = FALSE;
- expected[i].destroyed = FALSE;
+ expected[i].in_cache = false;
+ expected[i].at_main_addr = true;
+ expected[i].is_dirty = false;
+ expected[i].is_protected = false;
+ expected[i].is_pinned = false;
+ expected[i].deserialized = false;
+ expected[i].serialized = false;
+ expected[i].destroyed = false;
memset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
memset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
@@ -31053,10 +31047,10 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
expected[i].flush_dep_nchd = 0;
expected[i].flush_dep_ndirty_chd = 0;
expected[i].flush_order = -1;
- expected[i].is_corked = FALSE;
+ expected[i].is_corked = false;
}
- pass = TRUE;
+ pass = true;
}
reset_entries();
@@ -31080,7 +31074,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad return from cache initialization.\n";
}
else
@@ -31131,10 +31125,10 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
/* Change expected values, and verify the status of the entries
* after each insertion
*/
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
- expected[entry_idx].is_corked = TRUE;
+ expected[entry_idx].is_corked = true;
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
entry_idx, /* int tag */
@@ -31187,10 +31181,10 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
*/
/* entry w/ index 26 is now in the cache and dirty. */
- expected[26].in_cache = TRUE;
- expected[26].is_dirty = TRUE;
+ expected[26].in_cache = true;
+ expected[26].is_dirty = true;
expected[26].deserialized = (unsigned char)deserialized;
- expected[26].is_corked = TRUE;
+ expected[26].is_corked = true;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -31228,10 +31222,10 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
* all entries are dirty corked entries.
*
*/
- expected[27].in_cache = TRUE;
- expected[27].is_dirty = TRUE;
+ expected[27].in_cache = true;
+ expected[27].is_dirty = true;
expected[27].deserialized = (unsigned char)deserialized;
- expected[27].is_corked = TRUE;
+ expected[27].is_corked = true;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -31269,10 +31263,10 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
/*
* Expected status: all entries are dirty corked entries.
*/
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
- expected[entry_idx].is_corked = TRUE;
+ expected[entry_idx].is_corked = true;
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -31282,9 +31276,9 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
/* Verify that the cache is now full */
- if (cache_ptr->cache_full != TRUE) {
+ if (cache_ptr->cache_full != true) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not completely filled.\n";
}
}
@@ -31328,10 +31322,10 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
/* This past inserted entry is now in the cache: dirty and corked */
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
- expected[entry_idx].is_corked = TRUE;
+ expected[entry_idx].is_corked = true;
/* Verify this expected status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -31365,9 +31359,9 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
*/
flush_cache(file_ptr, /* H5F_t * file_ptr */
- FALSE, /* hbool_t destory_entries */
- FALSE, /* hbool_t dump_stats */
- FALSE); /* hbool_t dump_detailed_stats */
+ false, /* bool destory_entries */
+ false, /* bool dump_stats */
+ false); /* bool dump_detailed_stats */
/* Verify that the cache is clean */
verify_clean();
@@ -31375,9 +31369,9 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
/* Verify the status of the entries. */
/* All entries are flushed, clean but still corked */
for (i = 0; i < 100; i++) {
- expected[i].serialized = TRUE;
- expected[i].is_dirty = FALSE;
- expected[i].is_corked = TRUE;
+ expected[i].serialized = true;
+ expected[i].is_dirty = false;
+ expected[i].is_corked = true;
}
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
0, /* int tag */
@@ -31392,9 +31386,9 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
/* Will evict 50 clean "corked" entries all at once when inserting the 100th entry */
for (i = 0; i < 51; i++) {
- expected[i].in_cache = FALSE;
- expected[i].destroyed = TRUE;
- expected[i].is_corked = TRUE;
+ expected[i].in_cache = false;
+ expected[i].destroyed = true;
+ expected[i].is_corked = true;
}
/* Insert the 100th entry */
@@ -31416,10 +31410,10 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
/* The 100th inserted entry is now in the cache and dirty */
- expected[100].in_cache = TRUE;
- expected[100].is_dirty = TRUE;
+ expected[100].in_cache = true;
+ expected[100].is_dirty = true;
expected[100].deserialized = (unsigned char)deserialized;
- expected[100].is_corked = TRUE;
+ expected[100].is_corked = true;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -31455,14 +31449,14 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
/* The inserted entry is now in the cache and dirty */
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
- expected[entry_idx].is_corked = TRUE;
+ expected[entry_idx].is_corked = true;
- expected[entry_idx - 50].in_cache = FALSE;
- expected[entry_idx - 50].destroyed = TRUE;
- expected[entry_idx - 50].is_corked = TRUE;
+ expected[entry_idx - 50].in_cache = false;
+ expected[entry_idx - 50].destroyed = true;
+ expected[entry_idx - 50].is_corked = true;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -31496,14 +31490,14 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
/* Verify the status of the entries. */
- expected[126].in_cache = TRUE;
- expected[126].is_dirty = TRUE;
+ expected[126].in_cache = true;
+ expected[126].is_dirty = true;
expected[126].deserialized = (unsigned char)deserialized;
- expected[126].is_corked = TRUE;
+ expected[126].is_corked = true;
- expected[126 - 50].in_cache = FALSE;
- expected[126 - 50].destroyed = TRUE;
- expected[126 - 50].is_corked = TRUE;
+ expected[126 - 50].in_cache = false;
+ expected[126 - 50].destroyed = true;
+ expected[126 - 50].is_corked = true;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -31538,15 +31532,15 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
}
/* This past inserted entry is now in the cache, dirty and corked */
- expected[entry_idx].in_cache = TRUE;
- expected[entry_idx].is_dirty = TRUE;
+ expected[entry_idx].in_cache = true;
+ expected[entry_idx].is_dirty = true;
expected[entry_idx].deserialized = (unsigned char)deserialized;
- expected[entry_idx].is_corked = TRUE;
+ expected[entry_idx].is_corked = true;
/* Entry that is 50 entries away will be evicted since it is clean even though corked */
- expected[entry_idx - 50].in_cache = FALSE;
- expected[entry_idx - 50].destroyed = TRUE;
- expected[entry_idx - 50].is_corked = TRUE;
+ expected[entry_idx - 50].in_cache = false;
+ expected[entry_idx - 50].destroyed = true;
+ expected[entry_idx - 50].is_corked = true;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -31560,7 +31554,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
fprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
/* We're done with testing. We can take down the cache. */
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
reset_entries();
if (show_progress) /* 13 */
@@ -31596,7 +31590,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
* This function contains tests for correct handling on this
* situation.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -31612,7 +31606,7 @@ check_entry_deletions_during_scans(unsigned paged)
else
TESTING("entry deletion during list scan detection and adaption");
- pass = TRUE;
+ pass = true;
/* allocate a cache, and flush it under various circumstances.
* To the extent possible, verify that the desired actions took
@@ -31652,7 +31646,7 @@ check_entry_deletions_during_scans(unsigned paged)
cedds__H5C_flush_invalidate_cache__bucket_scan(file_ptr);
}
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
if (pass) {
PASSED();
@@ -31686,7 +31680,7 @@ check_entry_deletions_during_scans(unsigned paged)
*
* H5C_flush_cache() should handle this deletion gracefully.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -31703,7 +31697,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
expected = malloc(36 * sizeof(struct expected_entry_status));
if (expected == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't allocate expected entry status array\n";
}
@@ -31717,14 +31711,14 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
expected[i].entry_type = HUGE_ENTRY_TYPE;
expected[i].entry_index = (int)i;
expected[i].size = HUGE_ENTRY_SIZE;
- expected[i].in_cache = TRUE;
- expected[i].at_main_addr = TRUE;
- expected[i].is_dirty = TRUE;
- expected[i].is_protected = FALSE;
- expected[i].is_pinned = FALSE;
- expected[i].deserialized = TRUE;
- expected[i].serialized = FALSE;
- expected[i].destroyed = FALSE;
+ expected[i].in_cache = true;
+ expected[i].at_main_addr = true;
+ expected[i].is_dirty = true;
+ expected[i].is_protected = false;
+ expected[i].is_pinned = false;
+ expected[i].deserialized = true;
+ expected[i].serialized = false;
+ expected[i].destroyed = false;
for (size_t j = 0; j < MAX_FLUSH_DEP_PARS; j++) {
expected[i].flush_dep_par_type[j] = -1;
@@ -31735,28 +31729,28 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
expected[i].flush_dep_nchd = 0;
expected[i].flush_dep_ndirty_chd = 0;
expected[i].flush_order = -1;
- expected[i].is_corked = FALSE;
+ expected[i].is_corked = false;
}
- pass = TRUE;
+ pass = true;
}
if (pass) {
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache_ptr NULL on entry to cedds expunge dirty entry in flush test.";
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not empty on entry to cedds expunge dirty entry in flush test.";
}
else if ((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache config at start of cedds expunge dirty entry in flush test.";
}
else {
@@ -31800,7 +31794,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
if ((cache_ptr->index_len != 4) || (cache_ptr->index_size != (4 * HUGE_ENTRY_SIZE))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in cedds expunge dirty entry in flush test (1)";
}
@@ -31813,7 +31807,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
* (HET, 0) expunges (HET, 1)
*
*/
- add_flush_op(HUGE_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, HUGE_ENTRY_TYPE, 1, FALSE, (size_t)0, NULL);
+ add_flush_op(HUGE_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, HUGE_ENTRY_TYPE, 1, false, (size_t)0, NULL);
}
if (pass) {
@@ -31850,7 +31844,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
if ((pass) && ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache len/size after cedds expunge dirty entry in flush test";
}
}
@@ -31875,14 +31869,14 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[HUGE_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[HUGE_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected huge size entry stats in cedds__expunge_dirty_entry_in_flush_test().";
} /* end if */
if (pass)
if ((cache_ptr->slist_scan_restarts != 1) || (cache_ptr->LRU_scan_restarts != 0) ||
(cache_ptr->index_scan_restarts != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected scan restart stats in cedds__expunge_dirty_entry_in_flush_test().";
} /* end if */
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -31915,7 +31909,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
* restart its scan of the LRU from the tail, instead of
* examining the now deleted next item up on the LRU.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -31934,7 +31928,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
expected = malloc(36 * sizeof(struct expected_entry_status));
if (expected == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't allocate expected entry status array\n";
}
@@ -31956,14 +31950,14 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
expected[i].size = MONSTER_ENTRY_SIZE;
}
- expected[i].in_cache = TRUE;
- expected[i].at_main_addr = TRUE;
- expected[i].is_dirty = TRUE;
- expected[i].is_protected = FALSE;
- expected[i].is_pinned = FALSE;
- expected[i].deserialized = TRUE;
- expected[i].serialized = FALSE;
- expected[i].destroyed = FALSE;
+ expected[i].in_cache = true;
+ expected[i].at_main_addr = true;
+ expected[i].is_dirty = true;
+ expected[i].is_protected = false;
+ expected[i].is_pinned = false;
+ expected[i].deserialized = true;
+ expected[i].serialized = false;
+ expected[i].destroyed = false;
for (size_t j = 0; j < MAX_FLUSH_DEP_PARS; j++) {
expected[i].flush_dep_par_type[j] = -1;
@@ -31974,28 +31968,28 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
expected[i].flush_dep_nchd = 0;
expected[i].flush_dep_ndirty_chd = 0;
expected[i].flush_order = -1;
- expected[i].is_corked = FALSE;
+ expected[i].is_corked = false;
}
- pass = TRUE;
+ pass = true;
}
if (pass) {
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache_ptr NULL on entry to cedds for H5C__make_space_in_cache() test.";
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not empty at start of flush ops eviction test.";
}
else if ((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache config at start of cedds H5C__make_space_in_cache() test.";
}
else {
@@ -32043,7 +32037,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
if ((cache_ptr->index_len != 4) || (cache_ptr->index_size != (4 * HUGE_ENTRY_SIZE))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in H5C__make_space_in_cache() test (1)";
}
@@ -32056,7 +32050,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
* (HET, 0) expunges (HET, 1)
*
*/
- add_flush_op(HUGE_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, HUGE_ENTRY_TYPE, 1, FALSE, (size_t)0, NULL);
+ add_flush_op(HUGE_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, HUGE_ENTRY_TYPE, 1, false, (size_t)0, NULL);
}
if (pass) {
@@ -32092,7 +32086,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
if ((cache_ptr->index_len != 35) || (cache_ptr->index_size != 2 * 1024 * 1024) ||
(cache_ptr->index_size != ((4 * HUGE_ENTRY_SIZE) + (31 * MONSTER_ENTRY_SIZE)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in H5C__make_space_in_cache() test (2)";
}
else {
@@ -32136,7 +32130,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
if ((cache_ptr->index_len != 32) || (cache_ptr->index_size != 2 * 1024 * 1024) ||
(cache_ptr->index_size != (32 * MONSTER_ENTRY_SIZE))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected size/len in H5C__make_space_in_cache() test (3)";
}
else {
@@ -32145,19 +32139,19 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
* then call verify_entry_status().
*/
for (i = 0; i < num_huge_entries; i++) {
- expected[i].in_cache = FALSE;
- expected[i].is_dirty = FALSE;
- expected[i].serialized = TRUE;
- expected[i].destroyed = TRUE;
+ expected[i].in_cache = false;
+ expected[i].is_dirty = false;
+ expected[i].serialized = true;
+ expected[i].destroyed = true;
}
/* (HET, 1) was expunged, so touch its entry up accordingly */
- expected[1].is_dirty = TRUE;
- expected[1].serialized = FALSE;
+ expected[1].is_dirty = true;
+ expected[1].serialized = false;
for (i = num_huge_entries; i < num_huge_entries + num_monster_entries - 1; i++) {
- expected[i].is_dirty = FALSE;
- expected[i].serialized = TRUE;
+ expected[i].is_dirty = false;
+ expected[i].serialized = true;
}
/* verify the expected status of all entries: */
@@ -32174,7 +32168,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
if ((pass) && ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache len/size after cleanup of flush op eviction test";
}
}
@@ -32201,7 +32195,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[HUGE_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[HUGE_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected large entry stats in cedds__H5C_make_space_in_cache().";
}
}
@@ -32224,7 +32218,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster entry stats in cedds__H5C_make_space_in_cache().";
} /* end if */
@@ -32232,7 +32226,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
if ((cache_ptr->slist_scan_restarts != 0) || (cache_ptr->LRU_scan_restarts != 1) ||
(cache_ptr->index_scan_restarts != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected scan restart stats in cedds__H5C_make_space_in_cache().";
} /* end if */
@@ -32266,7 +32260,7 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
* restart its scan of the LRU from the tail, instead of
* examining the now deleted next item up on the LRU.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -32285,7 +32279,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ test_rpt_fcn,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (2 * 1024 * 1024),
/* double min_clean_fraction = */ 0.5,
@@ -32301,7 +32295,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -32315,18 +32309,18 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
/* double decrement = */ 0.5,
- /* hbool_t apply_max_decrement = */ FALSE,
+ /* bool apply_max_decrement = */ false,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int32_t epochs_before_eviction = */ 1,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05};
expected = malloc(36 * sizeof(struct expected_entry_status));
if (expected == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't allocate expected entry status array\n";
}
@@ -32340,17 +32334,17 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
expected[i].entry_type = MONSTER_ENTRY_TYPE;
expected[i].entry_index = (int)i;
expected[i].size = MONSTER_ENTRY_SIZE;
- expected[i].in_cache = TRUE;
- expected[i].at_main_addr = TRUE;
+ expected[i].in_cache = true;
+ expected[i].at_main_addr = true;
/* NOTE: special case for first entry */
expected[i].is_dirty = (i == 0);
- expected[i].is_protected = FALSE;
- expected[i].is_pinned = FALSE;
- expected[i].deserialized = TRUE;
- expected[i].serialized = FALSE;
- expected[i].destroyed = FALSE;
+ expected[i].is_protected = false;
+ expected[i].is_pinned = false;
+ expected[i].deserialized = true;
+ expected[i].serialized = false;
+ expected[i].destroyed = false;
for (size_t j = 0; j < MAX_FLUSH_DEP_PARS; j++) {
expected[i].flush_dep_par_type[j] = -1;
@@ -32361,30 +32355,30 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
expected[i].flush_dep_nchd = 0;
expected[i].flush_dep_ndirty_chd = 0;
expected[i].flush_order = -1;
- expected[i].is_corked = FALSE;
+ expected[i].is_corked = false;
}
- pass = TRUE;
+ pass = true;
}
if (pass) {
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache_ptr NULL on entry to cedds for "
"H5C__autoadjust__ageout__evict_aged_out_entries() test.";
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"cache not empty at start cedds for H5C__autoadjust__ageout__evict_aged_out_entries() test.";
}
else if ((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache config at start of cedds "
"H5C__autoadjust__ageout__evict_aged_out_entries() test.";
}
@@ -32407,7 +32401,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_get_cache_auto_resize_config failed.";
}
}
@@ -32419,7 +32413,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
@@ -32467,7 +32461,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
* (MET, 0) expunges (MET, 1)
*
*/
- add_flush_op(MONSTER_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, MONSTER_ENTRY_TYPE, 1, FALSE, (size_t)0, NULL);
+ add_flush_op(MONSTER_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, MONSTER_ENTRY_TYPE, 1, false, (size_t)0, NULL);
}
if (pass) {
@@ -32491,7 +32485,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
if ((cache_ptr->index_len != 32) || (cache_ptr->index_size != 2 * 1024 * 1024) ||
(cache_ptr->index_size != (32 * MONSTER_ENTRY_SIZE))) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"unexpected size/len in H5C__autoadjust__ageout__evict_aged_out_entries() test (1)";
}
@@ -32535,7 +32529,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
if ((cache_ptr->index_len != 2) || (cache_ptr->index_size != 2 * MONSTER_ENTRY_SIZE)) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"unexpected size/len in H5C__autoadjust__ageout__evict_aged_out_entries() test (2)";
}
@@ -32545,13 +32539,13 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
* this point, and then verify.
*/
- expected[0].is_dirty = FALSE;
- expected[0].serialized = TRUE;
+ expected[0].is_dirty = false;
+ expected[0].serialized = true;
for (i = 1; i < 31; i++) {
- expected[i].in_cache = FALSE;
- expected[i].is_dirty = FALSE;
- expected[i].destroyed = TRUE;
+ expected[i].in_cache = false;
+ expected[i].is_dirty = false;
+ expected[i].destroyed = true;
}
verify_entry_status(cache_ptr, 0, 32, expected);
@@ -32561,14 +32555,14 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
/* restore the initial resize configuration */
if (pass) {
- saved_auto_size_ctl.set_initial_size = TRUE;
+ saved_auto_size_ctl.set_initial_size = true;
saved_auto_size_ctl.initial_size = 2 * 1024 * 1024;
result = H5C_set_cache_auto_resize_config(cache_ptr, &saved_auto_size_ctl);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_set_cache_auto_resize_config failed 2.\n";
}
}
@@ -32582,7 +32576,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
if ((pass) && ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache len/size after cleanup of flush op eviction test";
}
}
@@ -32610,7 +32604,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"Unexpected monster entry stats in cedds__H5C__autoadjust__ageout__evict_aged_out_entries().";
} /* end if */
@@ -32619,7 +32613,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
if ((cache_ptr->slist_scan_restarts != 0) || (cache_ptr->LRU_scan_restarts != 1) ||
(cache_ptr->index_scan_restarts != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"unexpected scan restart stats in cedds__H5C__autoadjust__ageout__evict_aged_out_entries().";
} /* end if */
@@ -32715,7 +32709,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
* it will attempt to continue its scan of the bucket with
* an entry that has been deleted from the cache.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -32742,11 +32736,11 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
*/
/* entry entry in at main flush dep flush dep child flush flush flush */
/* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- { MONSTER_ENTRY_TYPE, 0, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 1, 1, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 8, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 16, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 24, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {MONSTER_ENTRY_TYPE,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 1, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 0, MONSTER_ENTRY_SIZE, true, true, true, false, true, true, false, false, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 1, 1, -1, false},
+ { MONSTER_ENTRY_TYPE, 8, MONSTER_ENTRY_SIZE, true, true, false, false, false, true, false, false, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { MONSTER_ENTRY_TYPE, 16, MONSTER_ENTRY_SIZE, true, true, false, false, false, true, false, false, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { MONSTER_ENTRY_TYPE, 24, MONSTER_ENTRY_SIZE, true, true, false, false, false, true, false, false, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 0, 0, -1, false},
+ { MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, true, true, true, false, false, true, false, false, {MONSTER_ENTRY_TYPE,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 1, 0, 0, -1, false},
};
/* clang-format on */
@@ -32754,20 +32748,20 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"cache_ptr NULL on entry to cedds for cedds__H5C_flush_invalidate_cache__bucket_scan() test.";
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"cache not empty at start cedds for cedds__H5C_flush_invalidate_cache__bucket_scan() test.";
}
else if ((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache config at start of cedds "
"cedds__H5C_flush_invalidate_cache__bucket_scan() test.";
}
@@ -32820,7 +32814,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
if (expected_hash_bucket != H5C__HASH_FCN(entry_addr)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Test entries don't map to same bucket -- hash table size or hash fcn change?";
}
}
@@ -32833,7 +32827,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
* (MET, 0) expunges (MET, 8)
*
*/
- add_flush_op(MONSTER_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, MONSTER_ENTRY_TYPE, 8, FALSE, (size_t)0, NULL);
+ add_flush_op(MONSTER_ENTRY_TYPE, 0, FLUSH_OP__EXPUNGE, MONSTER_ENTRY_TYPE, 8, false, (size_t)0, NULL);
}
if (pass) {
@@ -32858,7 +32852,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
if (expected_hash_bucket == H5C__HASH_FCN(entry_addr)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Dirty entry maps to same hash bucket as clean entries?!?!";
}
}
@@ -32882,7 +32876,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
* (MET, 31) destroys flush dependency with (MET, 8)
*
*/
- add_flush_op(MONSTER_ENTRY_TYPE, 31, FLUSH_OP__DEST_FLUSH_DEP, MONSTER_ENTRY_TYPE, 0, FALSE,
+ add_flush_op(MONSTER_ENTRY_TYPE, 31, FLUSH_OP__DEST_FLUSH_DEP, MONSTER_ENTRY_TYPE, 0, false,
(size_t)0, NULL);
}
@@ -32920,12 +32914,12 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
if (scan_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "premature end of hash bucket list?!?!";
}
else if ((scan_ptr == NULL) || (scan_ptr != &(entry_ptr->header))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "bad test hash bucket setup?!?!";
}
@@ -32946,7 +32940,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
if ((pass) && ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache len/size after cleanup of flush op eviction test";
}
}
@@ -32974,7 +32968,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"Unexpected monster entry stats in cedds__H5C_flush_invalidate_cache__bucket_scan().";
} /* end if */
@@ -32986,7 +32980,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
*/
if ((cache_ptr->slist_scan_restarts != 0) || (cache_ptr->LRU_scan_restarts != 0) ||
(cache_ptr->index_scan_restarts != 1)) {
- pass = FALSE;
+ pass = false;
failure_mssg =
"unexpected scan restart stats in cedds__H5C_flush_invalidate_cache__bucket_scan().";
}
@@ -33035,7 +33029,7 @@ check_stats(unsigned paged)
#if H5C_COLLECT_CACHE_STATS
- pass = TRUE;
+ pass = true;
reset_entries();
@@ -33048,7 +33042,7 @@ check_stats(unsigned paged)
if (pass) {
- takedown_cache(file_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, false, false);
}
if (pass) {
@@ -33088,7 +33082,7 @@ check_stats(unsigned paged)
* check that will serve as a place holder until more complete
* tests are implemented.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -33104,18 +33098,18 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
if (pass) {
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache_ptr NULL on entry to check_stats__smoke_check_1().";
} /* end if */
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache not empty on entry to check_stats__smoke_check_1().";
} /* end else-if */
else if ((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache config at start of check_stats__smoke_check_1().";
} /* end else-if */
@@ -33155,7 +33149,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(1).";
} /* end if */
@@ -33176,7 +33170,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->entries_scanned_to_make_space != 0) || (cache_ptr->slist_scan_restarts != 0) ||
(cache_ptr->LRU_scan_restarts != 0) || (cache_ptr->index_scan_restarts != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(1).";
} /* end if */
}
@@ -33191,7 +33185,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024) ||
(cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(1).";
} /* end if */
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
@@ -33228,7 +33222,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(2).";
} /* end if */
@@ -33250,7 +33244,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->entries_scanned_to_make_space != 0) || (cache_ptr->slist_scan_restarts != 0) ||
(cache_ptr->LRU_scan_restarts != 0) || (cache_ptr->index_scan_restarts != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(2).";
} /* end if */
}
@@ -33265,7 +33259,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024) ||
(cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(2).";
} /* end if */
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
@@ -33302,7 +33296,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(3).";
} /* end if */
@@ -33325,7 +33319,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->entries_scanned_to_make_space != 33) || (cache_ptr->slist_scan_restarts != 0) ||
(cache_ptr->LRU_scan_restarts != 0) || (cache_ptr->index_scan_restarts != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(3).";
} /* end if */
}
@@ -33340,7 +33334,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024) ||
(cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(3).";
} /* end if */
@@ -33363,7 +33357,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
if ((pass) && ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache len/size after check_stats__smoke_check_1()";
} /* end else-if */
@@ -33391,7 +33385,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
(cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(4).";
} /* end if */
@@ -33414,7 +33408,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->entries_scanned_to_make_space != 33) || (cache_ptr->slist_scan_restarts != 0) ||
(cache_ptr->LRU_scan_restarts != 0) || (cache_ptr->index_scan_restarts != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(4).";
} /* end if */
}
@@ -33429,7 +33423,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
(cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024) ||
(cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(4).";
} /* end if */
@@ -33466,7 +33460,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
*-------------------------------------------------------------------------
*/
static herr_t
-check_write_permitted(const H5F_t H5_ATTR_UNUSED *f, hbool_t *write_permitted_ptr)
+check_write_permitted(const H5F_t H5_ATTR_UNUSED *f, bool *write_permitted_ptr)
{
assert(write_permitted_ptr);
@@ -33509,10 +33503,10 @@ H5F_t *
setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
{
char filename[512];
- hbool_t show_progress = FALSE;
- hbool_t verbose = TRUE;
+ bool show_progress = false;
+ bool verbose = true;
int mile_stone = 1;
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
H5F_t *ret_val = NULL;
@@ -33527,7 +33521,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
if (pass) {
if ((fcpl_id = H5Pcreate(H5P_FILE_CREATE)) == FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_FILE_CREATE) failed.\n";
}
}
@@ -33535,7 +33529,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
if (pass && paged) {
/* Set up paged aggregation strategy */
if (H5Pset_file_space_strategy(fcpl_id, H5F_FSPACE_STRATEGY_PAGE, 1, (hsize_t)1) == FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_file_space_strategy() failed.\n";
H5Pclose(fcpl_id);
fcpl_id = H5P_DEFAULT;
@@ -33545,7 +33539,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
if (pass && paged) {
/* Set up file space page size to BASE_ADDR */
if (H5Pset_file_space_page_size(fcpl_id, (hsize_t)BASE_ADDR) == FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_file_space_page_size() failed.\n";
H5Pclose(fcpl_id);
fcpl_id = H5P_DEFAULT;
@@ -33558,7 +33552,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
/* setup the file name */
if (pass) {
if (NULL == h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -33568,17 +33562,17 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
if (pass && try_core_file_driver) {
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) == FAIL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_FILE_ACCESS) failed.\n";
}
- else if (H5Pset_fapl_core(fapl_id, MAX_ADDR, FALSE) < 0) {
+ else if (H5Pset_fapl_core(fapl_id, MAX_ADDR, false) < 0) {
H5Pclose(fapl_id);
fapl_id = H5P_DEFAULT;
- pass = FALSE;
+ pass = false;
failure_mssg = "H5P_set_fapl_core() failed.\n";
}
else if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl_id, fapl_id)) < 0) {
- core_file_driver_failed = TRUE;
+ core_file_driver_failed = true;
if (verbose)
fprintf(stdout, "%s: H5Fcreate() with CFD failed.\n", __func__);
@@ -33600,7 +33594,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
saved_fid = fid;
if (fid < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fcreate() failed.";
if (verbose)
@@ -33618,7 +33612,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
assert(fid >= 0);
saved_fid = fid;
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fflush() failed.";
if (verbose)
@@ -33627,7 +33621,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
else {
file_ptr = (H5F_t *)H5VL_object_verify(fid, H5I_FILE);
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get file_ptr.";
if (verbose)
@@ -33674,7 +33668,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
file_ptr->shared->cache = NULL;
cache_ptr = H5C_create(max_cache_size, min_clean_size, (NUMBER_OF_ENTRY_TYPES - 1), types,
- check_write_permitted, TRUE, NULL, NULL);
+ check_write_permitted, true, NULL, NULL);
file_ptr->shared->cache = cache_ptr;
}
@@ -33684,7 +33678,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
if (pass) {
if (cache_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_create() failed.";
if (verbose)
@@ -33699,7 +33693,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
actual_base_addr = H5MF_alloc(file_ptr, H5FD_MEM_DEFAULT, (hsize_t)(ADDR_SPACE_SIZE + BASE_ADDR));
if (actual_base_addr == HADDR_UNDEF) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5MF_alloc() failed.";
if (verbose)
@@ -33710,7 +33704,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
* actual_base_addr is <= BASE_ADDR. This should only happen
* if the size of the superblock is increase.
*/
- pass = FALSE;
+ pass = false;
failure_mssg = "actual_base_addr > BASE_ADDR";
if (verbose)
@@ -33725,7 +33719,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
if (pass) {
/* Need to set this else all cache tests will fail */
- cache_ptr->ignore_tags = TRUE;
+ cache_ptr->ignore_tags = true;
H5C_stats__reset(cache_ptr);
ret_val = file_ptr;
@@ -33744,7 +33738,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
* dump stats first. Then close and delete the associate
* file.
*
- * If pass is FALSE, do nothing.
+ * If pass is false, do nothing.
*
* Return: void
*
@@ -33752,7 +33746,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
*/
void
-takedown_cache(H5F_t *file_ptr, hbool_t dump_stats, hbool_t dump_detailed_stats)
+takedown_cache(H5F_t *file_ptr, bool dump_stats, bool dump_detailed_stats)
{
char filename[512];
@@ -33766,11 +33760,11 @@ takedown_cache(H5F_t *file_ptr, hbool_t dump_stats, hbool_t dump_detailed_stats)
if (H5C_prep_for_file_close(file_ptr) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected failure of prep for file close.\n";
}
- flush_cache(file_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, true, false, false);
H5C_dest(file_ptr);
@@ -33808,7 +33802,7 @@ takedown_cache(H5F_t *file_ptr, hbool_t dump_stats, hbool_t dump_detailed_stats)
if (H5Fclose(saved_fid) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't close test file.";
}
else {
@@ -33817,19 +33811,19 @@ takedown_cache(H5F_t *file_ptr, hbool_t dump_stats, hbool_t dump_detailed_stats)
}
/* Pop API context */
- H5CX_pop(FALSE);
+ H5CX_pop(false);
if ((!try_core_file_driver) || (core_file_driver_failed)) {
if (h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "couldn't delete test file.";
}
}
@@ -33862,7 +33856,7 @@ main(void)
printf("=========================================\n");
if (!h5_using_default_driver(NULL)) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ puts(" -- SKIPPED for incompatible VFD --");
exit(EXIT_SUCCESS);
}
@@ -33874,7 +33868,7 @@ main(void)
/* Test with paged aggregation enabled or not */
/* Each test will call setup_cache() which set up the file space strategy according to "paged" */
- for (paged = FALSE; paged <= TRUE; paged++) {
+ for (paged = false; paged <= true; paged++) {
if (paged) {
@@ -33923,20 +33917,20 @@ main(void)
nerrs += check_protect_ro_rw_err(paged);
nerrs += check_protect_retries(paged);
nerrs += check_check_evictions_enabled_err(paged);
- nerrs += check_auto_cache_resize(FALSE, paged);
- nerrs += check_auto_cache_resize(TRUE, paged);
+ nerrs += check_auto_cache_resize(false, paged);
+ nerrs += check_auto_cache_resize(true, paged);
nerrs += check_auto_cache_resize_disable(paged);
nerrs += check_auto_cache_resize_epoch_markers(paged);
nerrs += check_auto_cache_resize_input_errs(paged);
nerrs += check_auto_cache_resize_aux_fcns(paged);
- nerrs += check_metadata_blizzard_absence(TRUE, paged);
- nerrs += check_metadata_blizzard_absence(FALSE, paged);
+ nerrs += check_metadata_blizzard_absence(true, paged);
+ nerrs += check_metadata_blizzard_absence(false, paged);
nerrs += check_flush_deps(paged);
nerrs += check_flush_deps_err(paged);
nerrs += check_flush_deps_order(paged);
nerrs += check_notify_cb(paged);
- nerrs += check_metadata_cork(TRUE, paged);
- nerrs += check_metadata_cork(FALSE, paged);
+ nerrs += check_metadata_cork(true, paged);
+ nerrs += check_metadata_cork(false, paged);
nerrs += check_entry_deletions_during_scans(paged);
nerrs += check_stats(paged);
} /* end for */
diff --git a/test/cache_api.c b/test/cache_api.c
index 0f5a5dd..de636cf 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -27,12 +27,12 @@ static const char *FILENAME[] = {"cache_api_test", NULL};
/* private function declarations: */
-static hbool_t check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id);
-static hbool_t check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id);
-static hbool_t mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id);
+static bool check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id);
+static bool check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id);
+static bool mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id);
static H5AC_cache_config_t *init_invalid_configs(void);
-static hbool_t check_fapl_mdc_api_errs(void);
-static hbool_t check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id);
+static bool check_fapl_mdc_api_errs(void);
+static bool check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id);
/**************************************************************************/
/**************************************************************************/
@@ -51,29 +51,29 @@ static hbool_t check_file_mdc_api_errs(unsigned paged, hid_t fcpl_i
* be sufficient to verify that the desired configuration
* data is getting to the cache.
*
- * Return: Test pass status (TRUE/FALSE)
+ * Return: Test pass status (true/false)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
{
char filename[512];
herr_t result;
- hid_t fapl_id = -1;
- hid_t test_fapl_id = -1;
- hid_t file_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t test_fapl_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
H5AC_cache_config_t default_config = H5AC__DEFAULT_CACHE_CONFIG;
H5AC_cache_config_t mod_config = {
/* int version = */ H5AC__CURR_CACHE_CONFIG_VERSION,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
+ /* bool rpt_fcn_enabled = */ false,
+ /* bool open_trace_file = */ false,
+ /* bool close_trace_file = */ false,
/* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool evictions_enabled = */ true,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (1 * 1024 * 1024 + 1),
/* double min_clean_fraction = */ 0.2,
/* size_t max_size = */ (16 * 1024 * 1024 + 1),
@@ -82,7 +82,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
/* double lower_hr_threshold = */ 0.91,
/* double increment = */ 2.1,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024 + 1),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
@@ -91,10 +91,10 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out,
/* double upper_hr_threshold = */ 0.998,
/* double decrement = */ 0.91,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024 - 1),
/* int epochs_before_eviction = */ 4,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
@@ -108,7 +108,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
else
TESTING("MDC/FAPL related API calls");
- pass = TRUE;
+ pass = true;
XLATE_EXT_TO_INT_MDC_CONFIG(default_auto_size_ctl, default_config)
XLATE_EXT_TO_INT_MDC_CONFIG(mod_auto_size_ctl, mod_config)
@@ -123,7 +123,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (fapl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_FILE_ACCESS) failed.\n";
}
}
@@ -136,12 +136,12 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget_mdc_config() failed.\n";
}
- else if (!CACHE_CONFIGS_EQUAL(default_config, scratch, TRUE, TRUE)) {
+ else if (!CACHE_CONFIGS_EQUAL(default_config, scratch, true, true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "retrieved config doesn't match default.";
}
}
@@ -156,7 +156,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_mdc_config() failed.\n";
}
}
@@ -169,12 +169,12 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget_mdc_config() failed.\n";
}
- else if (!CACHE_CONFIGS_EQUAL(mod_config, scratch, TRUE, TRUE)) {
+ else if (!CACHE_CONFIGS_EQUAL(mod_config, scratch, true, true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "retrieved config doesn't match mod config.";
}
}
@@ -183,7 +183,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (H5Pclose(fapl_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pclose() failed.\n";
}
}
@@ -200,7 +200,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -212,7 +212,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (file_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fcreate() failed.\n";
}
}
@@ -224,7 +224,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get file_ptr.\n";
}
else {
@@ -238,7 +238,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (cache_ptr == NULL || cache_ptr->resize_ctl.version != H5C__CURR_AUTO_SIZE_CTL_VER) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't access cache resize_ctl.\n";
}
}
@@ -246,9 +246,9 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* compare the cache's internal configuration with the expected value */
if (pass) {
- if (!resize_configs_are_equal(&default_auto_size_ctl, &cache_ptr->resize_ctl, TRUE)) {
+ if (!resize_configs_are_equal(&default_auto_size_ctl, &cache_ptr->resize_ctl, true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected value(s) in cache resize_ctl 1.\n";
}
}
@@ -260,7 +260,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (fapl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_access_plist() failed.\n";
}
}
@@ -276,17 +276,17 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget_mdc_config() failed.\n";
}
- else if (!CACHE_CONFIGS_EQUAL(default_config, scratch, TRUE, TRUE)) {
+ else if (!CACHE_CONFIGS_EQUAL(default_config, scratch, true, true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "config retrieved from file doesn't match default.";
}
else if (H5Pclose(fapl_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pclose() failed.\n";
}
}
@@ -296,12 +296,12 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
else if (H5Fdelete(filename, H5P_DEFAULT) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fdelete() failed.\n";
}
}
@@ -320,7 +320,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (fapl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_FILE_ACCESS) failed.\n";
}
}
@@ -333,7 +333,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_mdc_config() failed.\n";
}
}
@@ -343,7 +343,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -355,7 +355,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (file_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fcreate() failed.\n";
}
}
@@ -367,7 +367,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get file_ptr.\n";
}
else {
@@ -381,7 +381,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (cache_ptr == NULL || cache_ptr->resize_ctl.version != H5C__CURR_AUTO_SIZE_CTL_VER) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't access cache resize_ctl.\n";
}
}
@@ -389,9 +389,9 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* compare the cache's internal configuration with the expected value */
if (pass) {
- if (!resize_configs_are_equal(&mod_auto_size_ctl, &cache_ptr->resize_ctl, TRUE)) {
+ if (!resize_configs_are_equal(&mod_auto_size_ctl, &cache_ptr->resize_ctl, true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected value(s) in cache resize_ctl 2.\n";
}
}
@@ -403,7 +403,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (test_fapl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_access_plist() failed.\n";
}
}
@@ -419,17 +419,17 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget_mdc_config() failed.\n";
}
- else if (!CACHE_CONFIGS_EQUAL(mod_config, scratch, TRUE, TRUE)) {
+ else if (!CACHE_CONFIGS_EQUAL(mod_config, scratch, true, true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "config retrieved from file doesn't match.";
}
else if (H5Pclose(test_fapl_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pclose() failed.\n";
}
}
@@ -439,12 +439,12 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
else if (H5Fdelete(filename, fapl_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fdelete() failed.\n";
}
}
@@ -454,7 +454,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (H5Pclose(fapl_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pclose() failed.\n";
}
}
@@ -491,15 +491,15 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
* We shouldn't need to verify data correctness beyond that
* point.
*
- * Return: Test pass status (TRUE/FALSE)
+ * Return: Test pass status (true/false)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
{
char filename[512];
- hid_t file_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
size_t max_size;
size_t min_clean_size;
size_t cur_size;
@@ -508,12 +508,12 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
H5AC_cache_config_t default_config = H5AC__DEFAULT_CACHE_CONFIG;
H5AC_cache_config_t mod_config_1 = {
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
+ /* bool rpt_fcn_enabled = */ false,
+ /* bool open_trace_file = */ false,
+ /* bool close_trace_file = */ false,
/* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool evictions_enabled = */ true,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (1 * 1024 * 1024 + 1),
/* double min_clean_fraction = */ 0.2,
/* size_t max_size = */ (16 * 1024 * 1024 + 1),
@@ -522,7 +522,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
/* double lower_hr_threshold = */ 0.91,
/* double increment = */ 2.1,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024 + 1),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
@@ -531,22 +531,22 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out,
/* double upper_hr_threshold = */ 0.998,
/* double decrement = */ 0.91,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024 - 1),
/* int epochs_before_eviction = */ 4,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
H5AC_cache_config_t mod_config_2 = {
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ TRUE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
+ /* bool rpt_fcn_enabled = */ true,
+ /* bool open_trace_file = */ false,
+ /* bool close_trace_file = */ false,
/* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool evictions_enabled = */ true,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (512 * 1024),
/* double min_clean_fraction = */ 0.1,
/* size_t max_size = */ (8 * 1024 * 1024),
@@ -555,7 +555,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
/* double lower_hr_threshold = */ 0.9,
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (2 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
@@ -564,22 +564,22 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold,
/* double upper_hr_threshold = */ 0.9995,
/* double decrement = */ 0.95,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (512 * 1024),
/* int epochs_before_eviction = */ 4,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
H5AC_cache_config_t mod_config_3 = {
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
+ /* bool rpt_fcn_enabled = */ false,
+ /* bool open_trace_file = */ false,
+ /* bool close_trace_file = */ false,
/* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool evictions_enabled = */ true,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (1 * 1024 * 1024),
/* double min_clean_fraction = */ 0.2,
/* size_t max_size = */ (16 * 1024 * 1024),
@@ -588,7 +588,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off,
/* double lower_hr_threshold = */ 0.90,
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
@@ -597,22 +597,22 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off,
/* double upper_hr_threshold = */ 0.999,
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ FALSE,
+ /* bool apply_max_decrement = */ false,
/* size_t max_decrement = */ (1 * 1024 * 1024 - 1),
/* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ FALSE,
+ /* bool apply_empty_reserve = */ false,
/* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
H5AC_cache_config_t mod_config_4 = {
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
+ /* bool rpt_fcn_enabled = */ false,
+ /* bool open_trace_file = */ false,
+ /* bool close_trace_file = */ false,
/* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool evictions_enabled = */ true,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ (1 * 1024 * 1024),
/* double min_clean_fraction = */ 0.15,
/* size_t max_size = */ (20 * 1024 * 1024),
@@ -621,7 +621,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
/* double lower_hr_threshold = */ 0.9,
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ TRUE,
+ /* bool apply_max_increment = */ true,
/* size_t max_increment = */ (2 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
@@ -631,10 +631,10 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
H5C_decr__age_out_with_threshold,
/* double upper_hr_threshold = */ 0.999,
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ TRUE,
+ /* bool apply_max_decrement = */ true,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.1,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
@@ -645,7 +645,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
else
TESTING("MDC/FILE related API calls");
- pass = TRUE;
+ pass = true;
/* Open a file with the default FAPL. Verify that the cache is
* configured as per the default both by looking at its internal
@@ -660,7 +660,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -672,65 +672,65 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (file_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fcreate() failed.\n";
}
}
/* verify that the cache is set to the default config */
- validate_mdc_config(file_id, &default_config, TRUE, 1);
+ validate_mdc_config(file_id, &default_config, true, 1);
/* set alternate config 1 */
if (pass) {
if (H5Fset_mdc_config(file_id, &mod_config_1) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fset_mdc_config() failed 1.\n";
}
}
/* verify that the cache is now set to the alternate config */
- validate_mdc_config(file_id, &mod_config_1, TRUE, 2);
+ validate_mdc_config(file_id, &mod_config_1, true, 2);
/* set alternate config 2 */
if (pass) {
if (H5Fset_mdc_config(file_id, &mod_config_2) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fset_mdc_config() failed 2.\n";
}
}
/* verify that the cache is now set to the alternate config */
- validate_mdc_config(file_id, &mod_config_2, TRUE, 3);
+ validate_mdc_config(file_id, &mod_config_2, true, 3);
/* set alternate config 3 */
if (pass) {
if (H5Fset_mdc_config(file_id, &mod_config_3) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fset_mdc_config() failed 3.\n";
}
}
/* verify that the cache is now set to the alternate config */
- validate_mdc_config(file_id, &mod_config_3, TRUE, 4);
+ validate_mdc_config(file_id, &mod_config_3, true, 4);
/* set alternate config 4 */
if (pass) {
if (H5Fset_mdc_config(file_id, &mod_config_4) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fset_mdc_config() failed 4.\n";
}
}
/* verify that the cache is now set to the alternate config */
- validate_mdc_config(file_id, &mod_config_4, TRUE, 5);
+ validate_mdc_config(file_id, &mod_config_4, true, 5);
/* Run some quick smoke checks on the cache status monitoring
* calls -- no interesting data as the cache hasn't had a
@@ -741,12 +741,12 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (H5Fget_mdc_hit_rate(file_id, &hit_rate) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_hit_rate() failed 1.\n";
}
else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_hit_rate() returned unexpected hit rate.\n";
}
}
@@ -755,13 +755,13 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (H5Fget_mdc_size(file_id, &max_size, &min_clean_size, &cur_size, &cur_num_entries) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_size() failed 1.\n";
}
else if ((mod_config_4.initial_size != max_size) ||
(min_clean_size != (size_t)((double)max_size * mod_config_4.min_clean_fraction))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_size() returned unexpected value(s).\n";
}
}
@@ -771,12 +771,12 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
else if (H5Fdelete(filename, H5P_DEFAULT) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fdelete() failed.\n";
}
}
@@ -808,7 +808,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
* NOTE: This test takes some time to run and checks the
* testing express level value.
*
- * Return: Test pass status (TRUE/FALSE)
+ * Return: Test pass status (true/false)
*
*-------------------------------------------------------------------------
*/
@@ -818,21 +818,21 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
#define NUM_DSETS 6
#define NUM_RANDOM_ACCESSES 200000
-static hbool_t
+static bool
mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
{
char filename[512];
- hbool_t valid_chunk;
- hbool_t dump_hit_rate = FALSE;
+ bool valid_chunk;
+ bool dump_hit_rate = false;
int64_t min_accesses = 1000;
double min_hit_rate = 0.90;
- hbool_t dump_cache_size = FALSE;
- hid_t file_id = -1;
- hid_t dataspace_id = -1;
+ bool dump_cache_size = false;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dataspace_id = H5I_INVALID_HID;
hid_t filespace_ids[NUM_DSETS];
- hid_t memspace_id = -1;
+ hid_t memspace_id = H5I_INVALID_HID;
hid_t dataset_ids[NUM_DSETS];
- hid_t properties = -1;
+ hid_t properties = H5I_INVALID_HID;
char dset_name[64];
int i, j, k, l, m, n;
herr_t status;
@@ -844,12 +844,12 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
H5AC_cache_config_t default_config = H5AC__DEFAULT_CACHE_CONFIG;
H5AC_cache_config_t mod_config_1 = {
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
+ /* bool rpt_fcn_enabled = */ false,
+ /* bool open_trace_file = */ false,
+ /* bool close_trace_file = */ false,
/* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool evictions_enabled = */ true,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ 500000,
/* double min_clean_fraction = */ 0.1,
/* size_t max_size = */ 16000000,
@@ -858,7 +858,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off,
/* double lower_hr_threshold = */ 0.95,
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ FALSE,
+ /* bool apply_max_increment = */ false,
/* size_t max_increment = */ 4000000,
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
@@ -867,22 +867,22 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off,
/* double upper_hr_threshold = */ 0.999,
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ FALSE,
+ /* bool apply_max_decrement = */ false,
/* size_t max_decrement = */ 1000000,
/* int epochs_before_eviction = */ 2,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
H5AC_cache_config_t mod_config_2 = {
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
+ /* bool rpt_fcn_enabled = */ false,
+ /* bool open_trace_file = */ false,
+ /* bool close_trace_file = */ false,
/* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool evictions_enabled = */ true,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ 12000000,
/* double min_clean_fraction = */ 0.1,
/* size_t max_size = */ 16000000,
@@ -891,7 +891,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off,
/* double lower_hr_threshold = */ 0.95,
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ FALSE,
+ /* bool apply_max_increment = */ false,
/* size_t max_increment = */ 4000000,
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
@@ -900,22 +900,22 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off,
/* double upper_hr_threshold = */ 0.999,
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ FALSE,
+ /* bool apply_max_decrement = */ false,
/* size_t max_decrement = */ 1000000,
/* int epochs_before_eviction = */ 2,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
H5AC_cache_config_t mod_config_3 = {
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
+ /* bool rpt_fcn_enabled = */ false,
+ /* bool open_trace_file = */ false,
+ /* bool close_trace_file = */ false,
/* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
+ /* bool evictions_enabled = */ true,
+ /* bool set_initial_size = */ true,
/* size_t initial_size = */ 2000000,
/* double min_clean_fraction = */ 0.1,
/* size_t max_size = */ 16000000,
@@ -924,7 +924,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off,
/* double lower_hr_threshold = */ 0.95,
/* double increment = */ 2.0,
- /* hbool_t apply_max_increment = */ FALSE,
+ /* bool apply_max_increment = */ false,
/* size_t max_increment = */ 4000000,
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
@@ -933,10 +933,10 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off,
/* double upper_hr_threshold = */ 0.999,
/* double decrement = */ 0.9,
- /* hbool_t apply_max_decrement = */ FALSE,
+ /* bool apply_max_decrement = */ false,
/* size_t max_decrement = */ 1000000,
/* int epochs_before_eviction = */ 2,
- /* hbool_t apply_empty_reserve = */ TRUE,
+ /* bool apply_empty_reserve = */ true,
/* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
@@ -947,7 +947,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
else
TESTING("MDC API smoke check");
- pass = TRUE;
+ pass = true;
if (express_test > 0) {
@@ -971,7 +971,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -983,26 +983,26 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (file_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fcreate() failed.\n";
}
}
/* verify that the cache is set to the default config */
- validate_mdc_config(file_id, &default_config, TRUE, 1);
+ validate_mdc_config(file_id, &default_config, true, 1);
/* set alternate config 1 */
if (pass) {
if (H5Fset_mdc_config(file_id, &mod_config_1) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fset_mdc_config() failed 1.\n";
}
}
/* verify that the cache is now set to the alternate config */
- validate_mdc_config(file_id, &mod_config_1, TRUE, 2);
+ validate_mdc_config(file_id, &mod_config_1, true, 2);
/* create the datasets */
if (pass) {
@@ -1017,7 +1017,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (dataspace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple() failed.";
}
@@ -1033,7 +1033,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (properties < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate() failed.";
}
}
@@ -1042,7 +1042,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (H5Pset_chunk(properties, 2, chunk_size) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_chunk() failed.";
}
}
@@ -1050,13 +1050,13 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* create the dataset */
if (pass) {
- HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
+ snprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
dataset_ids[i] = H5Dcreate2(file_id, dset_name, H5T_STD_I32BE, dataspace_id, H5P_DEFAULT,
properties, H5P_DEFAULT);
if (dataset_ids[i] < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dcreate2() failed.";
}
}
@@ -1068,7 +1068,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (filespace_ids[i] < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dget_space() failed.";
}
}
@@ -1086,7 +1086,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (memspace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple() failed.";
}
}
@@ -1102,7 +1102,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sselect_hyperslab() failed.";
}
}
@@ -1131,7 +1131,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk H5Sselect_hyperslab() failed.";
}
@@ -1141,7 +1141,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dwrite() failed.";
}
m++;
@@ -1173,13 +1173,13 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (H5Fset_mdc_config(file_id, &mod_config_2) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fset_mdc_config() failed 2.\n";
}
}
/* verify that the cache is now set to the alternate config */
- validate_mdc_config(file_id, &mod_config_2, TRUE, 3);
+ validate_mdc_config(file_id, &mod_config_2, true, 3);
/* do random reads on all datasets */
n = 0;
@@ -1197,7 +1197,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
@@ -1209,7 +1209,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
}
@@ -1217,18 +1217,18 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* validate the slab */
if (pass) {
- valid_chunk = TRUE;
+ valid_chunk = true;
for (k = 0; k < CHUNK_SIZE; k++) {
for (l = 0; l < CHUNK_SIZE; l++) {
if (data_chunk[k][l] != ((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l)) {
- valid_chunk = FALSE;
+ valid_chunk = false;
}
}
}
if (!valid_chunk) {
- pass = FALSE;
+ pass = false;
failure_mssg = "slab validation failed.";
}
}
@@ -1248,7 +1248,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
while ((pass) && (i < NUM_DSETS)) {
if (H5Sclose(filespace_ids[i]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose() failed.";
}
i++;
@@ -1259,7 +1259,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
while ((pass) && (i < NUM_DSETS)) {
if (H5Dclose(dataset_ids[i]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dclose() failed.";
}
i++;
@@ -1270,13 +1270,13 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (H5Fset_mdc_config(file_id, &mod_config_3) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fset_mdc_config() failed 3.\n";
}
}
/* verify that the cache is now set to the alternate config */
- validate_mdc_config(file_id, &mod_config_3, TRUE, 4);
+ validate_mdc_config(file_id, &mod_config_3, true, 4);
/* do random reads on data set 0 only */
m = 0;
@@ -1294,7 +1294,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
@@ -1306,7 +1306,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
}
@@ -1314,19 +1314,19 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* validate the slab */
if (pass) {
- valid_chunk = TRUE;
+ valid_chunk = true;
for (k = 0; k < CHUNK_SIZE; k++) {
for (l = 0; l < CHUNK_SIZE; l++) {
if (data_chunk[k][l] != ((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l)) {
- valid_chunk = FALSE;
+ valid_chunk = false;
}
}
}
if (!valid_chunk) {
- pass = FALSE;
+ pass = false;
failure_mssg = "slab validation failed.";
}
}
@@ -1346,7 +1346,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (H5Sclose(filespace_ids[0]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(filespace_ids[0]) failed.";
}
}
@@ -1356,7 +1356,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (H5Sclose(dataspace_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(dataspace) failed.";
}
}
@@ -1366,7 +1366,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (H5Sclose(memspace_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(memspace_id) failed.";
}
}
@@ -1376,7 +1376,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (H5Dclose(dataset_ids[0]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dclose(dataset_ids[0]) failed.";
}
}
@@ -1386,12 +1386,12 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
else if (H5Fdelete(filename, H5P_DEFAULT) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fdelete() failed.\n";
}
}
@@ -1422,7 +1422,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
* related API calls.
*
* Note: It is assumed that boolean parameters are only set
- * to TRUE/FALSE.
+ * to true/false.
*
* Return: Success: Pointer to an array of cache configurations.
* Failure: NULL
@@ -1450,12 +1450,12 @@ init_invalid_configs(void)
for (i = 0; i < NUM_INVALID_CONFIGS; i++) {
configs[i].version = H5C__CURR_AUTO_SIZE_CTL_VER;
- configs[i].rpt_fcn_enabled = FALSE;
- configs[i].open_trace_file = FALSE;
- configs[i].close_trace_file = FALSE;
+ configs[i].rpt_fcn_enabled = false;
+ configs[i].open_trace_file = false;
+ configs[i].close_trace_file = false;
/* trace file name set to all ASCII NUL by calloc() */
- configs[i].evictions_enabled = TRUE;
- configs[i].set_initial_size = TRUE;
+ configs[i].evictions_enabled = true;
+ configs[i].set_initial_size = true;
configs[i].initial_size = (1 * 1024 * 1024);
configs[i].min_clean_fraction = 0.25;
configs[i].max_size = (16 * 1024 * 1024);
@@ -1464,7 +1464,7 @@ init_invalid_configs(void)
configs[i].incr_mode = H5C_incr__threshold;
configs[i].lower_hr_threshold = 0.9;
configs[i].increment = 2.0;
- configs[i].apply_max_increment = TRUE;
+ configs[i].apply_max_increment = true;
configs[i].max_increment = (4 * 1024 * 1024);
configs[i].flash_incr_mode = H5C_flash_incr__off;
configs[i].flash_multiple = 2.0;
@@ -1472,10 +1472,10 @@ init_invalid_configs(void)
configs[i].decr_mode = H5C_decr__age_out_with_threshold;
configs[i].upper_hr_threshold = 0.999;
configs[i].decrement = 0.9;
- configs[i].apply_max_decrement = TRUE;
+ configs[i].apply_max_decrement = true;
configs[i].max_decrement = (1 * 1024 * 1024);
configs[i].epochs_before_eviction = 3;
- configs[i].apply_empty_reserve = TRUE;
+ configs[i].apply_empty_reserve = true;
configs[i].empty_reserve = 0.1;
configs[i].dirty_bytes_threshold = (256 * 1024);
configs[i].metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY;
@@ -1486,8 +1486,8 @@ init_invalid_configs(void)
/* 0 -- bad version */
configs[0].version = -1;
- /* 1 -- open_trace_file == TRUE and empty trace_file_name */
- configs[1].open_trace_file = TRUE;
+ /* 1 -- open_trace_file == true and empty trace_file_name */
+ configs[1].open_trace_file = true;
/* trace file name set to all ASCII NUL by calloc() */
/* 2 -- max_size too big */
@@ -1592,11 +1592,11 @@ init_invalid_configs(void)
configs[32].dirty_bytes_threshold = (H5C__MAX_MAX_CACHE_SIZE / 4) + 1;
/* 33 -- attempt to disable evictions when auto incr enabled */
- configs[33].evictions_enabled = FALSE;
+ configs[33].evictions_enabled = false;
configs[33].decr_mode = H5C_decr__off;
/* 34 -- attempt to disable evictions when auto decr enabled */
- configs[34].evictions_enabled = FALSE;
+ configs[34].evictions_enabled = false;
configs[34].decr_mode = H5C_decr__age_out;
/* 35 -- unknown metadata write strategy */
@@ -1612,23 +1612,23 @@ init_invalid_configs(void)
* Purpose: Verify that the FAPL related MDC API calls reject input
* errors gracefully.
*
- * Return: Test pass status (TRUE/FALSE)
+ * Return: Test pass status (true/false)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
check_fapl_mdc_api_errs(void)
{
static char msg[128];
int i;
herr_t result;
- hid_t fapl_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
H5AC_cache_config_t default_config = H5AC__DEFAULT_CACHE_CONFIG;
H5AC_cache_config_t scratch;
TESTING("MDC/FAPL related API input errors");
- pass = TRUE;
+ pass = true;
/* first test H5Pget_mdc_config().
*/
@@ -1638,13 +1638,13 @@ check_fapl_mdc_api_errs(void)
H5E_BEGIN_TRY
{
- result = H5Pget_mdc_config((hid_t)-1, &scratch);
+ result = H5Pget_mdc_config((hid_t)H5I_INVALID_HID, &scratch);
}
H5E_END_TRY
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget_mdc_config() accepted invalid plist_id.";
}
}
@@ -1659,16 +1659,16 @@ check_fapl_mdc_api_errs(void)
if (fapl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_FILE_ACCESS) failed.\n";
}
}
scratch.version = H5C__CURR_AUTO_SIZE_CTL_VER;
if ((pass) && ((H5Pget_mdc_config(fapl_id, &scratch) < 0) ||
- (!CACHE_CONFIGS_EQUAL(default_config, scratch, TRUE, TRUE)))) {
+ (!CACHE_CONFIGS_EQUAL(default_config, scratch, true, true)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "New FAPL has unexpected metadata cache config?!?!?.\n";
}
@@ -1682,7 +1682,7 @@ check_fapl_mdc_api_errs(void)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget_mdc_config() accepted NULL config_ptr.";
}
}
@@ -1700,7 +1700,7 @@ check_fapl_mdc_api_errs(void)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget_mdc_config() accepted bad config version.";
}
}
@@ -1713,13 +1713,13 @@ check_fapl_mdc_api_errs(void)
H5E_BEGIN_TRY
{
- result = H5Pset_mdc_config((hid_t)-1, &default_config);
+ result = H5Pset_mdc_config((hid_t)H5I_INVALID_HID, &default_config);
}
H5E_END_TRY
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_mdc_config() accepted bad invalid plist_id.";
}
}
@@ -1734,7 +1734,7 @@ check_fapl_mdc_api_errs(void)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_mdc_config() accepted NULL config_ptr.";
}
}
@@ -1749,8 +1749,8 @@ check_fapl_mdc_api_errs(void)
if (result >= 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5Pset_mdc_config() accepted invalid_configs[%d].", i);
+ pass = false;
+ snprintf(msg, (size_t)128, "H5Pset_mdc_config() accepted invalid_configs[%d].", i);
failure_mssg = msg;
}
i++;
@@ -1761,9 +1761,9 @@ check_fapl_mdc_api_errs(void)
*/
scratch.version = H5C__CURR_AUTO_SIZE_CTL_VER;
if ((pass) && ((H5Pget_mdc_config(fapl_id, &scratch) < 0) ||
- (!CACHE_CONFIGS_EQUAL(default_config, scratch, TRUE, TRUE)))) {
+ (!CACHE_CONFIGS_EQUAL(default_config, scratch, true, true)))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "FAPL metadata cache config changed???.\n";
}
@@ -1791,19 +1791,19 @@ check_fapl_mdc_api_errs(void)
* Purpose: Verify that the file related MDC API calls reject input
* errors gracefully.
*
- * Return: Test pass status (TRUE/FALSE)
+ * Return: Test pass status (true/false)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
{
char filename[512];
static char msg[128];
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
int i;
herr_t result;
- hid_t file_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
size_t max_size;
size_t min_clean_size;
size_t cur_size;
@@ -1817,7 +1817,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
else
TESTING("MDC/FILE related API input errors");
- pass = TRUE;
+ pass = true;
/* Create a file for test purposes, and verify that its metadata cache
* set to the default MDC configuration.
@@ -1833,7 +1833,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -1849,12 +1849,12 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (file_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fcreate() failed.\n";
}
}
- validate_mdc_config(file_id, &default_config, TRUE, 1);
+ validate_mdc_config(file_id, &default_config, true, 1);
/* test H5Fget_mdc_config(). */
@@ -1868,13 +1868,13 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
H5E_BEGIN_TRY
{
- result = H5Fget_mdc_config((hid_t)-1, &scratch);
+ result = H5Fget_mdc_config((hid_t)H5I_INVALID_HID, &scratch);
}
H5E_END_TRY
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_config() accepted invalid file_id.";
}
}
@@ -1894,7 +1894,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_config() accepted NULL config_ptr.";
}
}
@@ -1915,7 +1915,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_config() accepted bad config version.";
}
}
@@ -1932,13 +1932,13 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
H5E_BEGIN_TRY
{
- result = H5Fset_mdc_config((hid_t)-1, &default_config);
+ result = H5Fset_mdc_config((hid_t)H5I_INVALID_HID, &default_config);
}
H5E_END_TRY
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fset_mdc_config() accepted bad invalid file_id.";
}
}
@@ -1958,7 +1958,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fset_mdc_config() accepted NULL config_ptr.";
}
}
@@ -1978,8 +1978,8 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (result >= 0) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "H5Fset_mdc_config() accepted invalid_configs[%d].", i);
+ pass = false;
+ snprintf(msg, (size_t)128, "H5Fset_mdc_config() accepted invalid_configs[%d].", i);
failure_mssg = msg;
}
i++;
@@ -1988,7 +1988,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
/* verify that none of the above calls to H5Fset_mdc_config() changed
* the configuration in the FAPL.
*/
- validate_mdc_config(file_id, &default_config, TRUE, 2);
+ validate_mdc_config(file_id, &default_config, true, 2);
/* test H5Fget_mdc_hit_rate() */
if (pass) {
@@ -2000,13 +2000,13 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
H5E_BEGIN_TRY
{
- result = H5Fget_mdc_hit_rate((hid_t)-1, &hit_rate);
+ result = H5Fget_mdc_hit_rate((hid_t)H5I_INVALID_HID, &hit_rate);
}
H5E_END_TRY
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_hit_rate() accepted bad file_id.";
}
}
@@ -2026,7 +2026,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_hit_rate() accepted NULL hit_rate_ptr.";
}
}
@@ -2041,13 +2041,13 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
H5E_BEGIN_TRY
{
- result = H5Freset_mdc_hit_rate_stats((hid_t)-1);
+ result = H5Freset_mdc_hit_rate_stats((hid_t)H5I_INVALID_HID);
}
H5E_END_TRY
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Freset_mdc_hit_rate_stats() accepted bad file_id.";
}
}
@@ -2062,13 +2062,14 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
H5E_BEGIN_TRY
{
- result = H5Fget_mdc_size((hid_t)-1, &max_size, &min_clean_size, &cur_size, &cur_num_entries);
+ result = H5Fget_mdc_size((hid_t)H5I_INVALID_HID, &max_size, &min_clean_size, &cur_size,
+ &cur_num_entries);
}
H5E_END_TRY
if (result >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_size() accepted bad file_id.";
}
}
@@ -2086,7 +2087,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
(H5Fget_mdc_size(file_id, NULL, NULL, NULL, &cur_num_entries) < 0) ||
(H5Fget_mdc_size(file_id, NULL, NULL, NULL, NULL) < 0)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_size() failed to handle NULL params.";
}
}
@@ -2101,12 +2102,12 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
else if (H5Fdelete(filename, H5P_DEFAULT) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fdelete() failed.\n";
}
}
@@ -2143,8 +2144,8 @@ main(void)
{
unsigned nerrs = 0;
int express_test;
- hid_t fcpl_id = -1;
- hid_t fcpl2_id = -1;
+ hid_t fcpl_id = H5I_INVALID_HID;
+ hid_t fcpl2_id = H5I_INVALID_HID;
unsigned paged;
H5open();
@@ -2186,7 +2187,7 @@ main(void)
/* Test with paged aggregation enabled or not */
/* The "my_fcpl" passed to each test has the paged or non-paged strategy set up accordingly */
- for (paged = FALSE; paged <= TRUE; paged++) {
+ for (paged = false; paged <= true; paged++) {
hid_t my_fcpl = fcpl_id;
if (paged) {
diff --git a/test/cache_common.c b/test/cache_common.c
index b406ff4..02a216b 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -20,7 +20,7 @@
#include "cache_common.h"
-hbool_t pass = TRUE; /* set to false on error */
+bool pass = true; /* set to false on error */
const char *failure_mssg = NULL;
static char tmp_msg_buf[256];
@@ -36,7 +36,7 @@ static test_entry_t *monster_entries = NULL, *orig_monster_entries = NULL;
static test_entry_t *variable_entries = NULL, *orig_variable_entries = NULL;
static test_entry_t *notify_entries = NULL, *orig_notify_entries = NULL;
-hbool_t orig_entry_arrays_init = FALSE;
+bool orig_entry_arrays_init = false;
static herr_t pico_get_initial_load_size(void *udata_ptr, size_t *image_len_ptr);
static herr_t nano_get_initial_load_size(void *udata_ptr, size_t *image_len_ptr);
@@ -55,17 +55,17 @@ static herr_t variable_get_final_load_size(const void *image, size_t image_len,
static htri_t variable_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *pico_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *nano_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *micro_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *tiny_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *small_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *medium_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *large_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *huge_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *monster_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *variable_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
-static void *notify_deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr);
+static void *pico_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *nano_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *micro_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *tiny_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *small_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *medium_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *large_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *huge_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *monster_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *variable_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
+static void *notify_deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr);
static herr_t pico_image_len(const void *thing, size_t *image_len_ptr);
static herr_t nano_image_len(const void *thing, size_t *image_len_ptr);
@@ -135,7 +135,7 @@ static void mark_flush_dep_clean(test_entry_t *entry_ptr);
static herr_t get_initial_load_size(void *udata_ptr, size_t *image_len_ptr, int32_t entry_type);
static herr_t get_final_load_size(const void *image, size_t image_len, void *udata, size_t *actual_len,
int32_t entry_type);
-static void *deserialize(const void *image_ptr, size_t len, void *udata_ptr, hbool_t *dirty_ptr,
+static void *deserialize(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr,
int32_t entry_type);
static herr_t image_len(const void *thing, size_t *image_len_ptr, int32_t entry_type);
static herr_t pre_serialize(H5F_t *f, void *thing, haddr_t addr, size_t len, haddr_t *new_addr_ptr,
@@ -599,8 +599,8 @@ variable_get_final_load_size(const void *image, size_t image_len, void *udata, s
* --check is ok only after 'max_verify_ct' is reached
* --otherwise check is not ok
*
- * Return: TRUE: checksum is ok
- * FALSE: checksum is not ok
+ * Return: true: checksum is ok
+ * false: checksum is not ok
*
*-------------------------------------------------------------------------
*/
@@ -632,9 +632,9 @@ verify_chksum(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED len, void
assert(entry->addr == addr);
if (++entry->verify_ct >= entry->max_verify_ct)
- return (TRUE);
+ return (true);
else
- return (FALSE);
+ return (false);
} /* verify_chksum() */
@@ -656,7 +656,7 @@ variable_verify_chksum(const void *image, size_t len, void *udata)
*-------------------------------------------------------------------------
*/
static void *
-deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *udata, hbool_t *dirty,
+deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *udata, bool *dirty,
int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
{
test_entry_t *entry;
@@ -685,8 +685,8 @@ deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *udata, hb
assert(entry->flush_dep_npar == 0);
assert(entry->flush_dep_nchd == 0);
- /* for now *dirty will always be FALSE */
- *dirty = FALSE;
+ /* for now *dirty will always be false */
+ *dirty = false;
/* verify that the image contains the expected data. */
assert(image != NULL);
@@ -715,76 +715,76 @@ deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *udata, hb
} /* end else */
} /* end if */
- entry->deserialized = TRUE;
- entry->header.is_dirty = FALSE;
- entry->is_dirty = FALSE;
+ entry->deserialized = true;
+ entry->header.is_dirty = false;
+ entry->is_dirty = false;
(entry->deserializes)++;
return ((void *)entry);
} /* deserialize() */
void *
-pico_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+pico_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, PICO_ENTRY_TYPE);
}
void *
-nano_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+nano_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, NANO_ENTRY_TYPE);
}
void *
-micro_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+micro_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, MICRO_ENTRY_TYPE);
}
void *
-tiny_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+tiny_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, TINY_ENTRY_TYPE);
}
void *
-small_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+small_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, SMALL_ENTRY_TYPE);
}
void *
-medium_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+medium_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, MEDIUM_ENTRY_TYPE);
}
void *
-large_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+large_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, LARGE_ENTRY_TYPE);
}
void *
-huge_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+huge_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, HUGE_ENTRY_TYPE);
}
void *
-monster_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+monster_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, MONSTER_ENTRY_TYPE);
}
void *
-variable_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+variable_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, VARIABLE_ENTRY_TYPE);
}
void *
-notify_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
+notify_deserialize(const void *image, size_t len, void *udata, bool *dirty)
{
return deserialize(image, len, udata, dirty, NOTIFY_ENTRY_TYPE);
}
@@ -953,7 +953,7 @@ pre_serialize(H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *thing, haddr_t H5_ATTR_NDEBU
execute_flush_op(entry->file_ptr, entry, &((entry->flush_ops)[i]), flags_ptr);
} /* end for */
entry->num_flush_ops = 0;
- entry->flush_op_self_resize_in_progress = FALSE;
+ entry->flush_op_self_resize_in_progress = false;
/* This looks wrong, but it isn't -- *flags_ptr will be modified
* by execute_flush_op() only if the target is this entry --
@@ -1122,7 +1122,7 @@ serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thin
* as close to that callback as we will get. Hence mark the entry
* clean here. If all goes well, it will be flushed shortly.
*/
- entry->is_dirty = FALSE;
+ entry->is_dirty = false;
if (entry->flush_dep_npar > 0) {
assert(entry->flush_dep_ndirty_chd == 0);
@@ -1133,13 +1133,13 @@ serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thin
* as initialized.
*/
if (entry->at_main_addr)
- entry->written_to_main_addr = TRUE;
+ entry->written_to_main_addr = true;
else
- entry->written_to_alt_addr = TRUE;
+ entry->written_to_alt_addr = true;
/* do book keeping */
(entry->serializes)++;
- entry->serialized = TRUE;
+ entry->serialized = true;
return (SUCCEED);
} /* serialize() */
@@ -1345,7 +1345,7 @@ free_icr(test_entry_t *entry, int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
entry->num_pins = 0;
} /* end if */
- entry->destroyed = TRUE;
+ entry->destroyed = true;
entry->cache_ptr = NULL;
return (SUCCEED);
@@ -1426,7 +1426,7 @@ notify_free_icr(void *thing)
/*-------------------------------------------------------------------------
* Function: add_flush_op
*
- * Purpose: Do nothing if pass is FALSE on entry.
+ * Purpose: Do nothing if pass is false on entry.
*
* Otherwise, add the specified flush operation to the
* target instance of test_entry_t.
@@ -1437,7 +1437,7 @@ notify_free_icr(void *thing)
*/
void
-add_flush_op(int target_type, int target_idx, int op_code, int type, int idx, hbool_t flag, size_t new_size,
+add_flush_op(int target_type, int target_idx, int op_code, int type, int idx, bool flag, size_t new_size,
unsigned *order_ptr)
{
int i;
@@ -1476,7 +1476,7 @@ add_flush_op(int target_type, int target_idx, int op_code, int type, int idx, hb
/*-------------------------------------------------------------------------
* Function: create_pinned_entry_dependency
*
- * Purpose: Do nothing if pass is FALSE on entry.
+ * Purpose: Do nothing if pass is false on entry.
*
* Otherwise, set up a pinned entry dependency so we can
* test the pinned entry modifications to the flush routine.
@@ -1558,7 +1558,7 @@ create_pinned_entry_dependency(H5F_t *file_ptr, int pinning_type, int pinning_id
*/
void
-dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, hbool_t dirty_pin)
+dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, bool dirty_pin)
{
test_entry_t *base_addr;
test_entry_t *entry_ptr;
@@ -1576,7 +1576,7 @@ dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, hbool_t dirty_pin)
if (!entry_in_cache(cache_ptr, type, idx)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "entry to be dirty pinned is not in cache.";
}
else {
@@ -1590,7 +1590,7 @@ dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, hbool_t dirty_pin)
if (!((entry_ptr->header).is_pinned)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "entry to be dirty pinned is not pinned.";
}
else {
@@ -1667,7 +1667,7 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
(*flags_ptr) |= H5C__SERIALIZE_RESIZED_FLAG;
- entry_ptr->flush_op_self_resize_in_progress = TRUE;
+ entry_ptr->flush_op_self_resize_in_progress = true;
}
else {
@@ -1690,12 +1690,12 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
if (op_ptr->flag) {
assert(entry_ptr->addr == entry_ptr->alt_addr);
entry_ptr->addr = entry_ptr->main_addr;
- entry_ptr->at_main_addr = TRUE;
+ entry_ptr->at_main_addr = true;
} /* end if */
else {
assert(entry_ptr->addr == entry_ptr->main_addr);
entry_ptr->addr = entry_ptr->alt_addr;
- entry_ptr->at_main_addr = FALSE;
+ entry_ptr->at_main_addr = false;
} /* end else */
} /* end if */
else
@@ -1733,7 +1733,7 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
break;
default:
- pass = FALSE;
+ pass = false;
failure_mssg = "Undefined flush op code.";
break;
}
@@ -1747,15 +1747,15 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
* Purpose: Given a pointer to a cache, an entry type, and an index,
* determine if the entry is currently in the cache.
*
- * Return: TRUE if the entry is in the cache, and FALSE otherwise.
+ * Return: true if the entry is in the cache, and false otherwise.
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
entry_in_cache(H5C_t *cache_ptr, int32_t type, int32_t idx)
{
- hbool_t in_cache = FALSE; /* will set to TRUE if necessary */
+ bool in_cache = false; /* will set to true if necessary */
test_entry_t *base_addr;
test_entry_t *entry_ptr;
H5C_cache_entry_t *test_ptr = NULL;
@@ -1775,7 +1775,7 @@ entry_in_cache(H5C_t *cache_ptr, int32_t type, int32_t idx)
if (test_ptr != NULL) {
- in_cache = TRUE;
+ in_cache = true;
assert(test_ptr == (H5C_cache_entry_t *)entry_ptr);
assert(entry_ptr->addr == entry_ptr->header.addr);
}
@@ -2003,10 +2003,10 @@ reset_entries(void)
base_addr[j].header.addr = (haddr_t)0;
base_addr[j].header.size = (size_t)0;
base_addr[j].header.type = NULL;
- base_addr[j].header.is_dirty = FALSE;
- base_addr[j].header.is_protected = FALSE;
- base_addr[j].header.is_read_only = FALSE;
- base_addr[j].header.ro_ref_count = FALSE;
+ base_addr[j].header.is_dirty = false;
+ base_addr[j].header.is_protected = false;
+ base_addr[j].header.is_read_only = false;
+ base_addr[j].header.ro_ref_count = false;
base_addr[j].header.next = NULL;
base_addr[j].header.prev = NULL;
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
@@ -2016,10 +2016,10 @@ reset_entries(void)
base_addr[j].self = &(base_addr[j]);
base_addr[j].cache_ptr = NULL;
- base_addr[j].written_to_main_addr = FALSE;
- base_addr[j].written_to_alt_addr = FALSE;
+ base_addr[j].written_to_main_addr = false;
+ base_addr[j].written_to_alt_addr = false;
base_addr[j].addr = addr;
- base_addr[j].at_main_addr = TRUE;
+ base_addr[j].at_main_addr = true;
base_addr[j].main_addr = addr;
base_addr[j].alt_addr = alt_addr;
base_addr[j].size = entry_size;
@@ -2027,14 +2027,14 @@ reset_entries(void)
base_addr[j].index = j;
base_addr[j].serializes = 0;
base_addr[j].deserializes = 0;
- base_addr[j].is_dirty = FALSE;
- base_addr[j].is_protected = FALSE;
- base_addr[j].is_read_only = FALSE;
- base_addr[j].ro_ref_count = FALSE;
+ base_addr[j].is_dirty = false;
+ base_addr[j].is_protected = false;
+ base_addr[j].is_read_only = false;
+ base_addr[j].ro_ref_count = false;
- base_addr[j].is_corked = FALSE;
+ base_addr[j].is_corked = false;
- base_addr[j].is_pinned = FALSE;
+ base_addr[j].is_pinned = false;
base_addr[j].pinning_ref_count = 0;
base_addr[j].num_pins = 0;
for (k = 0; k < MAX_PINS; k++) {
@@ -2047,21 +2047,21 @@ reset_entries(void)
base_addr[j].flush_ops[k].op_code = FLUSH_OP__NO_OP;
base_addr[j].flush_ops[k].type = -1;
base_addr[j].flush_ops[k].idx = -1;
- base_addr[j].flush_ops[k].flag = FALSE;
+ base_addr[j].flush_ops[k].flag = false;
base_addr[j].flush_ops[k].size = 0;
}
- base_addr[j].flush_op_self_resize_in_progress = FALSE;
+ base_addr[j].flush_op_self_resize_in_progress = false;
- base_addr[j].deserialized = FALSE;
- base_addr[j].serialized = FALSE;
- base_addr[j].destroyed = FALSE;
- base_addr[j].expunged = FALSE;
+ base_addr[j].deserialized = false;
+ base_addr[j].serialized = false;
+ base_addr[j].destroyed = false;
+ base_addr[j].expunged = false;
base_addr[j].flush_dep_npar = 0;
base_addr[j].flush_dep_nchd = 0;
base_addr[j].flush_dep_ndirty_chd = 0;
- base_addr[j].pinned_from_client = FALSE;
- base_addr[j].pinned_from_cache = FALSE;
+ base_addr[j].pinned_from_client = false;
+ base_addr[j].pinned_from_cache = false;
base_addr[j].flush_order = 0;
@@ -2081,7 +2081,7 @@ reset_entries(void)
} /* end for */
/* Indicate that we've made a copy for later */
- orig_entry_arrays_init = TRUE;
+ orig_entry_arrays_init = true;
} /* end if */
else {
for (i = 0; i < NUMBER_OF_ENTRY_TYPES; i++) {
@@ -2113,7 +2113,7 @@ reset_entries(void)
*/
void
-resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_t in_cache)
+resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, bool in_cache)
{
test_entry_t *base_addr;
test_entry_t *entry_ptr;
@@ -2133,7 +2133,7 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_
if (!entry_in_cache(cache_ptr, type, idx)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "entry to be resized pinned is not in cache.";
}
else {
@@ -2148,23 +2148,23 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_
if (!(entry_ptr->header.is_pinned || entry_ptr->header.is_protected)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "entry to be resized is not pinned or protected.";
}
else {
- hbool_t was_dirty = entry_ptr->is_dirty;
+ bool was_dirty = entry_ptr->is_dirty;
entry_ptr->size = new_size;
result = H5C_resize_entry((void *)entry_ptr, new_size);
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_dirty = true;
if (entry_ptr->flush_dep_npar > 0 && !was_dirty)
mark_flush_dep_dirty(entry_ptr);
if (result != SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error(s) in H5C_resize_entry().";
}
else {
@@ -2177,7 +2177,7 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_
else {
protect_entry(file_ptr, type, idx);
- resize_entry(file_ptr, type, idx, new_size, TRUE);
+ resize_entry(file_ptr, type, idx, new_size, true);
unprotect_entry(file_ptr, type, idx, H5C__DIRTIED_FLAG);
}
}
@@ -2188,9 +2188,9 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_
* Function: verify_clean
*
* Purpose: Verify that all cache entries are marked as clean. If any
- * are not, set pass to FALSE.
+ * are not, set pass to false.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -2225,7 +2225,7 @@ verify_clean(void)
if (dirty_count > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "verify_clean() found dirty entry(s).";
}
}
@@ -2237,9 +2237,9 @@ verify_clean(void)
*
* Purpose: Verify that a list of entries have the expected status.
* If any discrepancies are found, set the failure message
- * and set pass to FALSE.
+ * and set pass to false.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -2255,21 +2255,21 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
while ((pass) && (i < num_entries)) {
test_entry_t *base_addr = entries[expected[i].entry_type];
test_entry_t *entry_ptr = &(base_addr[expected[i].entry_index]);
- hbool_t in_cache = FALSE; /* will set to TRUE if necessary */
+ bool in_cache = false; /* will set to true if necessary */
unsigned u; /* Local index variable */
if ((!expected[i].in_cache) && ((expected[i].is_protected) || (expected[i].is_pinned))) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "%d: Contradictory data in expected[%d].\n", tag, i);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "%d: Contradictory data in expected[%d].\n", tag, i);
failure_mssg = tmp_msg_buf;
}
if ((!expected[i].in_cache) && (expected[i].is_dirty) && (!entry_ptr->expunged)) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d: expected[%d] specs non-expunged, dirty, non-resident.\n", tag, i);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d: expected[%d] specs non-expunged, dirty, non-resident.\n", tag, i);
failure_mssg = tmp_msg_buf;
}
@@ -2279,11 +2279,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (in_cache != expected[i].in_cache) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) in cache actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index, (int)in_cache,
- (int)expected[i].in_cache);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) in cache actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index, (int)in_cache,
+ (int)expected[i].in_cache);
failure_mssg = tmp_msg_buf;
}
}
@@ -2292,11 +2292,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->size != expected[i].size) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) size actual/expected = %ld/%ld.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index, (long)(entry_ptr->size),
- (long)expected[i].size);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) size actual/expected = %ld/%ld.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index, (long)(entry_ptr->size),
+ (long)expected[i].size);
failure_mssg = tmp_msg_buf;
}
}
@@ -2305,11 +2305,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->header.size != expected[i].size) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header size actual/expected = %ld/%ld.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (long)(entry_ptr->header.size), (long)expected[i].size);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header size actual/expected = %ld/%ld.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (long)(entry_ptr->header.size), (long)expected[i].size);
failure_mssg = tmp_msg_buf;
}
}
@@ -2318,11 +2318,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->at_main_addr != expected[i].at_main_addr) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) at main addr actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->at_main_addr), (int)expected[i].at_main_addr);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) at main addr actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->at_main_addr), (int)expected[i].at_main_addr);
failure_mssg = tmp_msg_buf;
}
}
@@ -2331,11 +2331,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->is_dirty != expected[i].is_dirty) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) is_dirty actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->is_dirty), (int)expected[i].is_dirty);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) is_dirty actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->is_dirty), (int)expected[i].is_dirty);
failure_mssg = tmp_msg_buf;
}
}
@@ -2344,11 +2344,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->header.is_dirty != expected[i].is_dirty) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header is_dirty actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->header.is_dirty), (int)expected[i].is_dirty);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header is_dirty actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->header.is_dirty), (int)expected[i].is_dirty);
failure_mssg = tmp_msg_buf;
}
}
@@ -2357,11 +2357,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->is_protected != expected[i].is_protected) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) is_protected actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->is_protected), (int)expected[i].is_protected);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) is_protected actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->is_protected), (int)expected[i].is_protected);
failure_mssg = tmp_msg_buf;
}
}
@@ -2370,11 +2370,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->header.is_protected != expected[i].is_protected) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header is_protected actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->header.is_protected), (int)expected[i].is_protected);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header is_protected actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->header.is_protected), (int)expected[i].is_protected);
failure_mssg = tmp_msg_buf;
}
}
@@ -2383,11 +2383,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->is_pinned != expected[i].is_pinned) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) is_pinned actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->is_pinned), (int)expected[i].is_pinned);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) is_pinned actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->is_pinned), (int)expected[i].is_pinned);
failure_mssg = tmp_msg_buf;
}
}
@@ -2396,11 +2396,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->is_corked != expected[i].is_corked) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) is_corked actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->is_corked), (int)expected[i].is_corked);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) is_corked actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->is_corked), (int)expected[i].is_corked);
failure_mssg = tmp_msg_buf;
}
}
@@ -2409,11 +2409,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->header.is_pinned != expected[i].is_pinned) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header is_pinned actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->header.is_pinned), (int)expected[i].is_pinned);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header is_pinned actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->header.is_pinned), (int)expected[i].is_pinned);
failure_mssg = tmp_msg_buf;
}
}
@@ -2424,13 +2424,13 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
(entry_ptr->serialized != expected[i].serialized) ||
(entry_ptr->destroyed != expected[i].destroyed)) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d,%d) deserialized = %d(%d), serialized = %d(%d), dest = %d(%d)\n",
- tag, (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->deserialized), (int)(expected[i].deserialized),
- (int)(entry_ptr->serialized), (int)(expected[i].serialized),
- (int)(entry_ptr->destroyed), (int)(expected[i].destroyed));
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d,%d) deserialized = %d(%d), serialized = %d(%d), dest = %d(%d)\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->deserialized), (int)(expected[i].deserialized),
+ (int)(entry_ptr->serialized), (int)(expected[i].serialized),
+ (int)(entry_ptr->destroyed), (int)(expected[i].destroyed));
failure_mssg = tmp_msg_buf;
}
}
@@ -2440,21 +2440,21 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
/* # of flush dependency parents */
if (pass) {
if (entry_ptr->flush_dep_npar != expected[i].flush_dep_npar) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) flush_dep_npar actual/expected = %u/%u.\n", tag,
- expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_dep_npar,
- expected[i].flush_dep_npar);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) flush_dep_npar actual/expected = %u/%u.\n", tag,
+ expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_dep_npar,
+ expected[i].flush_dep_npar);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
if ((pass) && (in_cache)) {
if (entry_ptr->header.flush_dep_nparents != expected[i].flush_dep_npar) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header flush_dep_nparents actual/expected = %u/%u.\n", tag,
- expected[i].entry_type, expected[i].entry_index,
- entry_ptr->header.flush_dep_nparents, expected[i].flush_dep_npar);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header flush_dep_nparents actual/expected = %u/%u.\n", tag,
+ expected[i].entry_type, expected[i].entry_index,
+ entry_ptr->header.flush_dep_nparents, expected[i].flush_dep_npar);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
@@ -2464,11 +2464,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (pass) {
for (u = 0; u < entry_ptr->flush_dep_npar; u++) {
if (entry_ptr->flush_dep_par_type[u] != expected[i].flush_dep_par_type[u]) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) flush_dep_par_type[%u] actual/expected = %d/%d.\n", tag,
- expected[i].entry_type, expected[i].entry_index, u,
- entry_ptr->flush_dep_par_type[u], expected[i].flush_dep_par_type[u]);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) flush_dep_par_type[%u] actual/expected = %d/%d.\n", tag,
+ expected[i].entry_type, expected[i].entry_index, u,
+ entry_ptr->flush_dep_par_type[u], expected[i].flush_dep_par_type[u]);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end for */
@@ -2476,11 +2476,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (pass) {
for (u = 0; u < entry_ptr->flush_dep_npar; u++) {
if (entry_ptr->flush_dep_par_idx[u] != expected[i].flush_dep_par_idx[u]) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) flush_dep_par_idx[%u] actual/expected = %d/%d.\n", tag,
- expected[i].entry_type, expected[i].entry_index, u,
- entry_ptr->flush_dep_par_idx[u], expected[i].flush_dep_par_idx[u]);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) flush_dep_par_idx[%u] actual/expected = %d/%d.\n", tag,
+ expected[i].entry_type, expected[i].entry_index, u,
+ entry_ptr->flush_dep_par_idx[u], expected[i].flush_dep_par_idx[u]);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end for */
@@ -2489,41 +2489,41 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
/* # of flush dependency children and dirty children */
if (pass) {
if (entry_ptr->flush_dep_nchd != expected[i].flush_dep_nchd) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) flush_dep_nchd actual/expected = %u/%u.\n", tag,
- expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_dep_nchd,
- expected[i].flush_dep_nchd);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) flush_dep_nchd actual/expected = %u/%u.\n", tag,
+ expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_dep_nchd,
+ expected[i].flush_dep_nchd);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
if ((pass) && (in_cache)) {
if (entry_ptr->header.flush_dep_nchildren != expected[i].flush_dep_nchd) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header flush_dep_nchildren actual/expected = %u/%u.\n", tag,
- expected[i].entry_type, expected[i].entry_index,
- entry_ptr->header.flush_dep_nchildren, expected[i].flush_dep_nchd);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header flush_dep_nchildren actual/expected = %u/%u.\n", tag,
+ expected[i].entry_type, expected[i].entry_index,
+ entry_ptr->header.flush_dep_nchildren, expected[i].flush_dep_nchd);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
if (pass) {
if (entry_ptr->flush_dep_ndirty_chd != expected[i].flush_dep_ndirty_chd) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) flush_dep_ndirty_chd actual/expected = %u/%u.\n", tag,
- expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_dep_ndirty_chd,
- expected[i].flush_dep_ndirty_chd);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) flush_dep_ndirty_chd actual/expected = %u/%u.\n", tag,
+ expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_dep_ndirty_chd,
+ expected[i].flush_dep_ndirty_chd);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
if ((pass) && (in_cache)) {
if (entry_ptr->header.flush_dep_ndirty_children != expected[i].flush_dep_ndirty_chd) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header flush_dep_ndirty_children actual/expected = %u/%u.\n",
- tag, expected[i].entry_type, expected[i].entry_index,
- entry_ptr->header.flush_dep_ndirty_children, expected[i].flush_dep_ndirty_chd);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header flush_dep_ndirty_children actual/expected = %u/%u.\n", tag,
+ expected[i].entry_type, expected[i].entry_index,
+ entry_ptr->header.flush_dep_ndirty_children, expected[i].flush_dep_ndirty_chd);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
@@ -2531,11 +2531,11 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
/* Flush dependency flush order */
if (pass) {
if (expected[i].flush_order >= 0 && entry_ptr->flush_order != (unsigned)expected[i].flush_order) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) flush_order actual/expected = %u/%d.\n", tag,
- expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_order,
- expected[i].flush_order);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) flush_order actual/expected = %u/%d.\n", tag,
+ expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_order,
+ expected[i].flush_order);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
@@ -2549,9 +2549,9 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
* Function: verify_unprotected
*
* Purpose: Verify that no cache entries are marked as protected. If
- * any are, set pass to FALSE.
+ * any are, set pass to false.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -2588,7 +2588,7 @@ verify_unprotected(void)
if (protected_count > 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "verify_unprotected() found protected entry(s).";
}
}
@@ -2639,12 +2639,12 @@ expunge_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_expunge_entry().";
}
else {
- entry_ptr->expunged = TRUE;
+ entry_ptr->expunged = true;
}
}
@@ -2662,9 +2662,9 @@ expunge_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
*/
void
-flush_cache(H5F_t *file_ptr, hbool_t destroy_entries, hbool_t dump_stats, hbool_t dump_detailed_stats)
+flush_cache(H5F_t *file_ptr, bool destroy_entries, bool dump_stats, bool dump_detailed_stats)
{
- hbool_t verbose = FALSE;
+ bool verbose = false;
verify_unprotected();
@@ -2699,7 +2699,7 @@ flush_cache(H5F_t *file_ptr, hbool_t destroy_entries, hbool_t dump_stats, hbool_
(long long)(cache_ptr->index_len), (long long)(cache_ptr->index_size),
(long long)(cache_ptr->clean_index_size), (long long)(cache_ptr->dirty_index_size));
}
- pass = FALSE;
+ pass = false;
failure_mssg = "non zero index len/sizes after H5C_flush_cache() with invalidate.";
}
}
@@ -2731,7 +2731,7 @@ cork_entry_type(H5F_t *file_ptr, int32_t type)
baddrs = base_addrs[type];
if (H5C_cork(cache_ptr, baddrs, H5C__SET_CORK, NULL) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_cork().";
} /* end if */
} /* end if */
@@ -2763,7 +2763,7 @@ uncork_entry_type(H5F_t *file_ptr, int32_t type)
baddrs = base_addrs[type];
if (H5C_cork(cache_ptr, baddrs, H5C__UNCORK, NULL) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_cork().";
} /* end if */
} /* end if */
@@ -2787,7 +2787,7 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
{
H5C_t *cache_ptr;
herr_t result;
- hbool_t insert_pinned;
+ bool insert_pinned;
test_entry_t *base_addr;
test_entry_t *entry_ptr;
haddr_t baddrs;
@@ -2811,9 +2811,9 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
assert(entry_ptr->flush_dep_npar == 0);
assert(entry_ptr->flush_dep_nchd == 0);
- insert_pinned = (hbool_t)((flags & H5C__PIN_ENTRY_FLAG) != 0);
+ insert_pinned = (bool)((flags & H5C__PIN_ENTRY_FLAG) != 0);
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_dirty = true;
/* Set the base address of the entry type into the property list as tag */
/* Use to cork entries for the object */
@@ -2824,7 +2824,7 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
if ((result < 0) || (entry_ptr->header.is_protected) || (entry_ptr->header.type != types[type]) ||
(entry_ptr->size != entry_ptr->header.size) || (entry_ptr->addr != entry_ptr->header.addr)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_insert().";
#if 0 /* This is useful debugging code. Lets keep it around. */
@@ -2856,7 +2856,7 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
entry_ptr->pinned_from_client = insert_pinned;
if (entry_ptr->header.tag_info && entry_ptr->header.tag_info->corked)
- entry_ptr->is_corked = TRUE;
+ entry_ptr->is_corked = true;
assert(entry_ptr->header.is_dirty);
assert(((entry_ptr->header).type)->id == type);
@@ -2869,7 +2869,7 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
*
* Purpose: Mark the specified entry as dirty.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -2882,7 +2882,7 @@ mark_entry_dirty(int32_t type, int32_t idx)
herr_t result;
test_entry_t *base_addr;
test_entry_t *entry_ptr;
- hbool_t was_dirty;
+ bool was_dirty;
if (pass) {
@@ -2898,7 +2898,7 @@ mark_entry_dirty(int32_t type, int32_t idx)
assert(entry_ptr->header.is_protected || entry_ptr->header.is_pinned);
was_dirty = entry_ptr->is_dirty;
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_dirty = true;
if (entry_ptr->flush_dep_npar > 0 && !was_dirty)
mark_flush_dep_dirty(entry_ptr);
@@ -2911,7 +2911,7 @@ mark_entry_dirty(int32_t type, int32_t idx)
(entry_ptr->header.type != types[type]) || (entry_ptr->size != entry_ptr->header.size) ||
(entry_ptr->addr != entry_ptr->header.addr)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_mark_entry_dirty().";
}
@@ -2933,10 +2933,10 @@ mark_entry_dirty(int32_t type, int32_t idx)
*/
void
-move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr)
+move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, bool main_addr)
{
herr_t result = 0;
- hbool_t done = TRUE; /* will set to FALSE if we have work to do */
+ bool done = true; /* will set to false if we have work to do */
haddr_t old_addr = HADDR_UNDEF;
haddr_t new_addr = HADDR_UNDEF;
test_entry_t *base_addr;
@@ -2964,7 +2964,7 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr)
assert(entry_ptr->addr == entry_ptr->main_addr);
- done = FALSE;
+ done = false;
old_addr = entry_ptr->addr;
new_addr = entry_ptr->alt_addr;
}
@@ -2974,15 +2974,15 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr)
assert(entry_ptr->addr == entry_ptr->alt_addr);
- done = FALSE;
+ done = false;
old_addr = entry_ptr->addr;
new_addr = entry_ptr->main_addr;
}
if (!done) {
- hbool_t was_dirty = entry_ptr->is_dirty;
+ bool was_dirty = entry_ptr->is_dirty;
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_dirty = true;
if (entry_ptr->flush_dep_npar > 0 && !was_dirty)
mark_flush_dep_dirty(entry_ptr);
@@ -2997,7 +2997,7 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr)
if ((result < 0) ||
((!(entry_ptr->header.destroy_in_progress)) && (entry_ptr->header.addr != new_addr))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_move_entry().";
}
else {
@@ -3020,7 +3020,7 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr)
*
* Purpose: Protect the entry indicated by the type and index.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -3088,7 +3088,7 @@ protect_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
entry_ptr->verify_ct, entry_ptr->max_verify_ct);
H5Eprint2(H5E_DEFAULT, stdout);
#endif
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_protect().";
} /* end if */
@@ -3098,12 +3098,12 @@ protect_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
entry_ptr->cache_ptr = cache_ptr;
entry_ptr->file_ptr = file_ptr;
- entry_ptr->is_protected = TRUE;
+ entry_ptr->is_protected = true;
} /* end else */
if (entry_ptr->header.tag_info && entry_ptr->header.tag_info->corked)
- entry_ptr->is_corked = TRUE;
+ entry_ptr->is_corked = true;
assert(((entry_ptr->header).type)->id == type);
} /* end if */
@@ -3116,7 +3116,7 @@ protect_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
* Purpose: Do a read only protect the entry indicated by the type
* and index.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -3155,7 +3155,7 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx)
(entry_ptr->header.type != types[type]) || (entry_ptr->size != entry_ptr->header.size) ||
(entry_ptr->addr != entry_ptr->header.addr)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in read only H5C_protect().";
}
else {
@@ -3164,8 +3164,8 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx)
entry_ptr->cache_ptr = cache_ptr;
entry_ptr->file_ptr = file_ptr;
- entry_ptr->is_protected = TRUE;
- entry_ptr->is_read_only = TRUE;
+ entry_ptr->is_protected = true;
+ entry_ptr->is_read_only = true;
entry_ptr->ro_ref_count++;
}
@@ -3179,7 +3179,7 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx)
*
* Purpose: Pin the entry indicated by the type and index.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -3210,18 +3210,18 @@ pin_entry(int32_t type, int32_t idx)
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5C_pin_protected_entry() reports failure.";
}
else if (!(entry_ptr->header.is_pinned)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "entry not pinned when it should be.";
}
else {
- entry_ptr->pinned_from_client = TRUE;
- entry_ptr->is_pinned = TRUE;
+ entry_ptr->pinned_from_client = true;
+ entry_ptr->is_pinned = true;
}
} /* end if */
@@ -3232,7 +3232,7 @@ pin_entry(int32_t type, int32_t idx)
*
* Purpose: Unpin the entry indicated by the type and index.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -3268,11 +3268,11 @@ unpin_entry(int32_t type, int32_t idx)
(entry_ptr->header.type != types[type]) || (entry_ptr->size != entry_ptr->header.size) ||
(entry_ptr->addr != entry_ptr->header.addr)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_unpin().";
}
- entry_ptr->pinned_from_client = FALSE;
+ entry_ptr->pinned_from_client = false;
entry_ptr->is_pinned = entry_ptr->pinned_from_cache;
@@ -3286,7 +3286,7 @@ unpin_entry(int32_t type, int32_t idx)
*
* Purpose: Unprotect the entry indicated by the type and index.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -3297,8 +3297,8 @@ void
unprotect_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
{
herr_t result;
- hbool_t pin_flag_set;
- hbool_t unpin_flag_set;
+ bool pin_flag_set;
+ bool unpin_flag_set;
test_entry_t *base_addr;
test_entry_t *entry_ptr;
@@ -3315,17 +3315,17 @@ unprotect_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
assert(entry_ptr->header.is_protected);
assert(entry_ptr->is_protected);
- pin_flag_set = (hbool_t)((flags & H5C__PIN_ENTRY_FLAG) != 0);
- unpin_flag_set = (hbool_t)((flags & H5C__UNPIN_ENTRY_FLAG) != 0);
+ pin_flag_set = (bool)((flags & H5C__PIN_ENTRY_FLAG) != 0);
+ unpin_flag_set = (bool)((flags & H5C__UNPIN_ENTRY_FLAG) != 0);
assert(!(pin_flag_set && unpin_flag_set));
assert((!pin_flag_set) || (!(entry_ptr->is_pinned)));
assert((!unpin_flag_set) || (entry_ptr->is_pinned));
if (flags & H5C__DIRTIED_FLAG) {
- hbool_t was_dirty = entry_ptr->is_dirty;
+ bool was_dirty = entry_ptr->is_dirty;
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_dirty = true;
if (entry_ptr->flush_dep_npar > 0 && !was_dirty)
mark_flush_dep_dirty(entry_ptr);
@@ -3339,7 +3339,7 @@ unprotect_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
(entry_ptr->header.type != types[type]) || (entry_ptr->size != entry_ptr->header.size) ||
(entry_ptr->addr != entry_ptr->header.addr)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_unprotect().";
}
else {
@@ -3349,25 +3349,25 @@ unprotect_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
}
else if (entry_ptr->ro_ref_count == 1) {
- entry_ptr->is_protected = FALSE;
- entry_ptr->is_read_only = FALSE;
+ entry_ptr->is_protected = false;
+ entry_ptr->is_read_only = false;
entry_ptr->ro_ref_count = 0;
}
else {
- entry_ptr->is_protected = FALSE;
+ entry_ptr->is_protected = false;
}
if (pin_flag_set) {
assert(entry_ptr->header.is_pinned);
- entry_ptr->pinned_from_client = TRUE;
- entry_ptr->is_pinned = TRUE;
+ entry_ptr->pinned_from_client = true;
+ entry_ptr->is_pinned = true;
}
else if (unpin_flag_set) {
assert(entry_ptr->header.is_pinned == entry_ptr->header.pinned_from_cache);
- entry_ptr->pinned_from_client = FALSE;
+ entry_ptr->pinned_from_client = false;
entry_ptr->is_pinned = entry_ptr->pinned_from_cache;
}
}
@@ -3399,10 +3399,10 @@ unprotect_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
*-------------------------------------------------------------------------
*/
void
-row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t verbose, hbool_t reset_stats,
- hbool_t display_stats, hbool_t display_detailed_stats, hbool_t do_inserts,
- hbool_t do_moves, hbool_t move_to_main_addr, hbool_t do_destroys,
- hbool_t do_mult_ro_protects, int dirty_destroys, int dirty_unprotects)
+row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts, bool do_moves,
+ bool move_to_main_addr, bool do_destroys, bool do_mult_ro_protects, int dirty_destroys,
+ int dirty_unprotects)
{
H5C_t *cache_ptr = NULL;
int32_t type = 0;
@@ -3719,8 +3719,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
*/
void
-hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, hbool_t reset_stats,
- hbool_t display_stats, hbool_t display_detailed_stats, hbool_t do_inserts)
+hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts)
{
H5C_t *cache_ptr = NULL;
int32_t type = 0;
@@ -3808,10 +3808,10 @@ hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
*/
void
-row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t verbose, hbool_t reset_stats,
- hbool_t display_stats, hbool_t display_detailed_stats, hbool_t do_inserts,
- hbool_t do_moves, hbool_t move_to_main_addr, hbool_t do_destroys,
- hbool_t do_mult_ro_protects, int dirty_destroys, int dirty_unprotects)
+row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts, bool do_moves,
+ bool move_to_main_addr, bool do_destroys, bool do_mult_ro_protects,
+ int dirty_destroys, int dirty_unprotects)
{
H5C_t *cache_ptr = NULL;
int32_t type = NUMBER_OF_ENTRY_TYPES - 1;
@@ -4065,8 +4065,8 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
*/
void
-hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, hbool_t reset_stats,
- hbool_t display_stats, hbool_t display_detailed_stats, hbool_t do_inserts)
+hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts)
{
H5C_t *cache_ptr = NULL;
int32_t type = NUMBER_OF_ENTRY_TYPES - 1;
@@ -4154,9 +4154,8 @@ hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
*/
void
-col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t verbose, hbool_t reset_stats,
- hbool_t display_stats, hbool_t display_detailed_stats, hbool_t do_inserts,
- int dirty_unprotects)
+col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts, int dirty_unprotects)
{
H5C_t *cache_ptr = NULL;
int32_t type = 0;
@@ -4243,8 +4242,8 @@ col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
*/
void
-hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, hbool_t reset_stats,
- hbool_t display_stats, hbool_t display_detailed_stats, hbool_t do_inserts,
+hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts,
int dirty_unprotects)
{
H5C_t *cache_ptr = NULL;
@@ -4343,8 +4342,8 @@ hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
*/
void
-col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t verbose, hbool_t reset_stats,
- hbool_t display_stats, hbool_t display_detailed_stats, hbool_t do_inserts,
+col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts,
int dirty_unprotects)
{
H5C_t *cache_ptr = NULL;
@@ -4444,8 +4443,8 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
*/
void
-hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, hbool_t reset_stats,
- hbool_t display_stats, hbool_t display_detailed_stats, hbool_t do_inserts,
+hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts,
int dirty_unprotects)
{
H5C_t *cache_ptr = NULL;
@@ -4556,7 +4555,7 @@ create_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int
test_entry_t *par_entry_ptr; /* Parent entry */
test_entry_t *chd_base_addr; /* Base entry of child's entry array */
test_entry_t *chd_entry_ptr; /* Child entry */
- hbool_t par_is_pinned; /* Whether parent is already pinned */
+ bool par_is_pinned; /* Whether parent is already pinned */
herr_t result; /* API routine status */
/* Get parent entry */
@@ -4584,7 +4583,7 @@ create_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int
if ((result < 0) || (!par_entry_ptr->header.is_pinned) ||
(!(par_entry_ptr->header.flush_dep_nchildren > 0))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_create_flush_dependency().";
} /* end if */
@@ -4598,9 +4597,9 @@ create_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int
assert(par_entry_ptr->flush_dep_ndirty_chd < par_entry_ptr->flush_dep_nchd);
par_entry_ptr->flush_dep_ndirty_chd++;
} /* end if */
- par_entry_ptr->pinned_from_cache = TRUE;
+ par_entry_ptr->pinned_from_cache = true;
if (!par_is_pinned)
- par_entry_ptr->is_pinned = TRUE;
+ par_entry_ptr->is_pinned = true;
} /* end if */
} /* create_flush_dependency() */
@@ -4652,7 +4651,7 @@ destroy_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, in
assert(chd_entry_ptr == chd_entry_ptr->self);
if (H5C_destroy_flush_dependency(par_entry_ptr, chd_entry_ptr) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error in H5C_destroy_flush_dependency().";
} /* end if */
@@ -4671,7 +4670,7 @@ destroy_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, in
chd_entry_ptr->flush_dep_npar--;
par_entry_ptr->flush_dep_nchd--;
if (par_entry_ptr->flush_dep_nchd == 0) {
- par_entry_ptr->pinned_from_cache = FALSE;
+ par_entry_ptr->pinned_from_cache = false;
par_entry_ptr->is_pinned = par_entry_ptr->pinned_from_client;
} /* end if */
if (chd_entry_ptr->is_dirty || chd_entry_ptr->flush_dep_ndirty_chd > 0) {
@@ -4771,13 +4770,13 @@ mark_flush_dep_clean(test_entry_t *entry_ptr)
*
* If the number of cache accesses exceeds the value provided
* in the min_accesses parameter, and the hit rate is less than
- * min_hit_rate, set pass to FALSE, and set failure_mssg to
+ * min_hit_rate, set pass to false, and set failure_mssg to
* a string indicating that hit rate was unexpectedly low.
*
* Return hit rate in *hit_rate_ptr, and print the data to
* stdout if requested.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to an appropriate value.
*
* Return: void
@@ -4786,8 +4785,8 @@ mark_flush_dep_clean(test_entry_t *entry_ptr)
*/
void
-check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t dump_data,
- int64_t min_accesses, double min_hit_rate)
+check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, bool dump_data, int64_t min_accesses,
+ double min_hit_rate)
{
herr_t result;
int64_t cache_hits = 0;
@@ -4804,14 +4803,14 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get file_ptr.";
}
else {
cache_ptr = file_ptr->shared->cache;
if (NULL == cache_ptr) {
- pass = FALSE;
+ pass = false;
failure_mssg = "NULL cache pointer";
}
}
@@ -4836,12 +4835,12 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_hit_rate() failed.";
}
else if (!H5_DBL_ABS_EQUAL(hit_rate, expected_hit_rate)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected hit rate.";
}
}
@@ -4852,7 +4851,7 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Freset_mdc_hit_rate_stats() failed.";
}
}
@@ -4872,7 +4871,7 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d
if ((pass) && (cache_accesses > min_accesses) && (hit_rate < min_hit_rate)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpectedly low hit rate.";
}
@@ -4889,7 +4888,7 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d
* parameters if these parameters are not NULL. Print the
* data to stdout if requested.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to an appropriate value.
*
* Return: void
@@ -4899,7 +4898,7 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d
void
check_and_validate_cache_size(hid_t file_id, size_t *max_size_ptr, size_t *min_clean_size_ptr,
- size_t *cur_size_ptr, int32_t *cur_num_entries_ptr, hbool_t dump_data)
+ size_t *cur_size_ptr, int32_t *cur_num_entries_ptr, bool dump_data)
{
herr_t result;
size_t expected_max_size;
@@ -4920,14 +4919,14 @@ check_and_validate_cache_size(hid_t file_id, size_t *max_size_ptr, size_t *min_c
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get file_ptr.";
}
else {
cache_ptr = file_ptr->shared->cache;
if (NULL == cache_ptr) {
- pass = FALSE;
+ pass = false;
failure_mssg = "NULL cache pointer";
}
}
@@ -4945,13 +4944,13 @@ check_and_validate_cache_size(hid_t file_id, size_t *max_size_ptr, size_t *min_c
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_size() failed.";
}
else if ((max_size != expected_max_size) || (min_clean_size != expected_min_clean_size) ||
(cur_size != expected_cur_size) || (cur_num_entries != (int)expected_cur_num_entries)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_mdc_size() returned unexpected value(s).";
}
}
@@ -4986,58 +4985,58 @@ check_and_validate_cache_size(hid_t file_id, size_t *max_size_ptr, size_t *min_c
} /* check_and_validate_cache_size() */
-H5_ATTR_PURE hbool_t
-resize_configs_are_equal(const H5C_auto_size_ctl_t *a, const H5C_auto_size_ctl_t *b, hbool_t compare_init)
+H5_ATTR_PURE bool
+resize_configs_are_equal(const H5C_auto_size_ctl_t *a, const H5C_auto_size_ctl_t *b, bool compare_init)
{
if (a->version != b->version)
- return (FALSE);
+ return (false);
else if (a->rpt_fcn != b->rpt_fcn)
- return (FALSE);
+ return (false);
else if (compare_init && (a->set_initial_size != b->set_initial_size))
- return (FALSE);
+ return (false);
else if (compare_init && (a->initial_size != b->initial_size))
- return (FALSE);
+ return (false);
else if (!H5_DBL_ABS_EQUAL(a->min_clean_fraction, b->min_clean_fraction))
- return (FALSE);
+ return (false);
else if (a->max_size != b->max_size)
- return (FALSE);
+ return (false);
else if (a->min_size != b->min_size)
- return (FALSE);
+ return (false);
else if (a->epoch_length != b->epoch_length)
- return (FALSE);
+ return (false);
else if (a->incr_mode != b->incr_mode)
- return (FALSE);
+ return (false);
else if (!H5_DBL_ABS_EQUAL(a->lower_hr_threshold, b->lower_hr_threshold))
- return (FALSE);
+ return (false);
else if (!H5_DBL_ABS_EQUAL(a->increment, b->increment))
- return (FALSE);
+ return (false);
else if (a->apply_max_increment != b->apply_max_increment)
- return (FALSE);
+ return (false);
else if (a->max_increment != b->max_increment)
- return (FALSE);
+ return (false);
else if (a->flash_incr_mode != b->flash_incr_mode)
- return (FALSE);
+ return (false);
else if (!H5_DBL_ABS_EQUAL(a->flash_multiple, b->flash_multiple))
- return (FALSE);
+ return (false);
else if (!H5_DBL_ABS_EQUAL(a->flash_threshold, b->flash_threshold))
- return (FALSE);
+ return (false);
else if (a->decr_mode != b->decr_mode)
- return (FALSE);
+ return (false);
else if (!H5_DBL_ABS_EQUAL(a->upper_hr_threshold, b->upper_hr_threshold))
- return (FALSE);
+ return (false);
else if (!H5_DBL_ABS_EQUAL(a->decrement, b->decrement))
- return (FALSE);
+ return (false);
else if (a->apply_max_decrement != b->apply_max_decrement)
- return (FALSE);
+ return (false);
else if (a->max_decrement != b->max_decrement)
- return (FALSE);
+ return (false);
else if (a->epochs_before_eviction != b->epochs_before_eviction)
- return (FALSE);
+ return (false);
else if (a->apply_empty_reserve != b->apply_empty_reserve)
- return (FALSE);
+ return (false);
else if (!H5_DBL_ABS_EQUAL(a->empty_reserve, b->empty_reserve))
- return (FALSE);
- return (TRUE);
+ return (false);
+ return (true);
}
/*-------------------------------------------------------------------------
@@ -5047,7 +5046,7 @@ resize_configs_are_equal(const H5C_auto_size_ctl_t *a, const H5C_auto_size_ctl_t
* has both internal and external configuration matching
* *config_ptr.
*
- * Do nothing on success. On failure, set pass to FALSE, and
+ * Do nothing on success. On failure, set pass to false, and
* load an error message into failue_mssg. Note that
* failure_msg is assumed to be at least 128 bytes in length.
*
@@ -5057,7 +5056,7 @@ resize_configs_are_equal(const H5C_auto_size_ctl_t *a, const H5C_auto_size_ctl_t
*/
void
-validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t compare_init, int test_num)
+validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, bool compare_init, int test_num)
{
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
@@ -5073,8 +5072,8 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t
if (file_ptr == NULL) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Can't get file_ptr #%d.", test_num);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Can't get file_ptr #%d.", test_num);
failure_mssg = tmp_msg_buf;
}
else {
@@ -5088,8 +5087,8 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t
if (cache_ptr == NULL || cache_ptr->resize_ctl.version != H5C__CURR_AUTO_SIZE_CTL_VER) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Can't access cache resize_ctl #%d.", test_num);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Can't access cache resize_ctl #%d.", test_num);
failure_mssg = tmp_msg_buf;
}
}
@@ -5099,8 +5098,8 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t
if (!resize_configs_are_equal(&int_config, &cache_ptr->resize_ctl, compare_init)) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Unexpected internal config #%d.", test_num);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Unexpected internal config #%d.", test_num);
failure_mssg = tmp_msg_buf;
}
}
@@ -5112,8 +5111,8 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t
if (H5Fget_mdc_config(file_id, &scratch) < 0) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "H5Fget_mdc_config() failed #%d.", test_num);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "H5Fget_mdc_config() failed #%d.", test_num);
failure_mssg = tmp_msg_buf;
}
}
@@ -5122,7 +5121,7 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t
/* Recall that in any configuration supplied by the cache
* at run time, the set_initial_size field will always
- * be FALSE, regardless of the value passed in. Thus we
+ * be false, regardless of the value passed in. Thus we
* always presume that this field need not match that of
* the supplied external configuration.
*
@@ -5131,10 +5130,10 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t
* Depending on circumstances, this may or may not match
* the original. Hence the compare_init parameter.
*/
- if (!CACHE_CONFIGS_EQUAL((*ext_config_ptr), scratch, FALSE, compare_init)) {
+ if (!CACHE_CONFIGS_EQUAL((*ext_config_ptr), scratch, false, compare_init)) {
- pass = FALSE;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Unexpected external config #%d.", test_num);
+ pass = false;
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Unexpected external config #%d.", test_num);
failure_mssg = tmp_msg_buf;
}
}
diff --git a/test/cache_common.h b/test/cache_common.h
index 8c54b5c..a9a8dbb 100644
--- a/test/cache_common.h
+++ b/test/cache_common.h
@@ -35,7 +35,7 @@
#define CACHE_ERROR(s) \
{ \
failure_mssg = "Line #" H5_TOSTRING(__LINE__) ": " s; \
- pass = FALSE; \
+ pass = false; \
goto done; \
}
@@ -131,7 +131,7 @@
* H5C__FLUSH_MARKED_ENTRIES_FLAG). Compute clear_slist
* and pass it into H5C_set_slist_enabled as appropriate.
*
- * On error, set pass to FALSE, and set failure_mssg
+ * On error, set pass to false, and set failure_mssg
* to the supplied error message.
*
* Return: N/A
@@ -140,12 +140,12 @@
#define H5C_FLUSH_CACHE(file, flags, fail_mssg) \
{ \
- hbool_t clear_slist; \
- herr_t rslt; \
+ bool clear_slist; \
+ herr_t rslt; \
\
clear_slist = ((flags & H5C__FLUSH_MARKED_ENTRIES_FLAG) != 0); \
\
- rslt = H5C_set_slist_enabled((file)->shared->cache, TRUE, FALSE); \
+ rslt = H5C_set_slist_enabled((file)->shared->cache, true, false); \
\
if (rslt >= 0) { \
\
@@ -154,12 +154,12 @@
\
if (rslt >= 0) { \
\
- rslt = H5C_set_slist_enabled((file)->shared->cache, FALSE, clear_slist); \
+ rslt = H5C_set_slist_enabled((file)->shared->cache, false, clear_slist); \
} \
\
if (rslt < 0) { \
\
- pass = FALSE; \
+ pass = false; \
failure_mssg = (fail_mssg); \
} \
} /* H5C_FLUSH_CACHE */
@@ -211,25 +211,25 @@ typedef struct flush_op {
* function implementing the flush
* operation.
*/
- hbool_t flag; /* boolean flag passed into the
+ bool flag; /* boolean flag passed into the
* function implementing the flush
* operation. The meaning of the
* flag is dependent upon the flush
* operation:
*
- * FLUSH_OP__DIRTY: TRUE iff the
+ * FLUSH_OP__DIRTY: true iff the
* target is pinned, and is to
* be dirtied via the
* H5C_mark_entry_dirty()
* call.
*
- * FLUSH_OP__RESIZE: TRUE iff the
+ * FLUSH_OP__RESIZE: true iff the
* target is pinned, and is to
* be resized via the
* H5C_resize_entry()
* call.
*
- * FLUSH_OP__MOVE: TRUE iff the
+ * FLUSH_OP__MOVE: true iff the
* target is to be moved to
* its main address.
*/
@@ -264,7 +264,7 @@ typedef struct test_entry_t {
* the entry resides, or NULL if the
* entry is not in cache.
*/
- hbool_t written_to_main_addr;
+ bool written_to_main_addr;
/* Flag indicating whether an image
* of the entry has been written to
* its main address. Since we no
@@ -273,7 +273,7 @@ typedef struct test_entry_t {
* entry is serialized while at its
* main address.
*/
- hbool_t written_to_alt_addr;
+ bool written_to_alt_addr;
/* Flag indicating whether an image
* of the entry has been written to
* its alternate address. Since we no
@@ -285,7 +285,7 @@ typedef struct test_entry_t {
haddr_t addr; /* where the cache thinks this entry
* is located
*/
- hbool_t at_main_addr; /* boolean flag indicating whether
+ bool at_main_addr; /* boolean flag indicating whether
* the entry is supposed to be at
* either its main or alternate
* address.
@@ -309,23 +309,23 @@ typedef struct test_entry_t {
int32_t deserializes; /* number of times this entry has
* been deserialized
*/
- hbool_t is_dirty; /* entry has been modified since
+ bool is_dirty; /* entry has been modified since
* last write
*/
- hbool_t is_protected; /* entry should currently be on
+ bool is_protected; /* entry should currently be on
* the cache's protected list.
*/
- hbool_t is_read_only; /* TRUE iff the entry should be
+ bool is_read_only; /* true iff the entry should be
* protected read only.
*/
int ro_ref_count; /* Number of outstanding read only
* protects on the entry.
*/
- hbool_t is_pinned; /* entry is currently pinned in
+ bool is_pinned; /* entry is currently pinned in
* the cache.
*/
haddr_t tag; /* the base_addr as tag for corking entries */
- hbool_t is_corked; /* entry is currently corked or not */
+ bool is_corked; /* entry is currently corked or not */
int pinning_ref_count; /* Number of entries that
* pin this entry in the cache.
* When this count drops to zero,
@@ -358,8 +358,8 @@ typedef struct test_entry_t {
* num_flush_ops contains the number
* of valid entries in this array.
*/
- hbool_t flush_op_self_resize_in_progress; /* Boolean flag
- * that is set to TRUE iff this
+ bool flush_op_self_resize_in_progress; /* Boolean flag
+ * that is set to true iff this
* entry is being flushed, it has
* been resized by a resize flush
* op, and the flush function has
@@ -368,16 +368,16 @@ typedef struct test_entry_t {
* checking code that would otherwise
* cause a false test failure.
*/
- hbool_t deserialized; /* entry has been deserialized since
+ bool deserialized; /* entry has been deserialized since
* the last time it was reset.
*/
- hbool_t serialized; /* entry has been serialized since the
+ bool serialized; /* entry has been serialized since the
* last time it was reset.
*/
- hbool_t destroyed; /* entry has been destroyed since the
+ bool destroyed; /* entry has been destroyed since the
* last time it was reset.
*/
- hbool_t expunged; /* entry has been expunged since the
+ bool expunged; /* entry has been expunged since the
* last time it was reset.
*/
int flush_dep_par_type[MAX_FLUSH_DEP_PARS]; /* Entry types of flush dependency parents */
@@ -385,10 +385,10 @@ typedef struct test_entry_t {
unsigned flush_dep_npar; /* Number of flush dependency parents */
unsigned flush_dep_nchd; /* Number of flush dependency children */
unsigned
- flush_dep_ndirty_chd; /* Number of dirty flush dependency children (including grandchildren, etc.) */
- hbool_t pinned_from_client; /* entry was pinned by client call */
- hbool_t pinned_from_cache; /* entry was pinned by cache internally */
- unsigned flush_order; /* Order that entry was flushed in */
+ flush_dep_ndirty_chd; /* Number of dirty flush dependency children (including grandchildren, etc.) */
+ bool pinned_from_client; /* entry was pinned by client call */
+ bool pinned_from_cache; /* entry was pinned by cache internally */
+ unsigned flush_order; /* Order that entry was flushed in */
unsigned notify_after_insert_count; /* Count of times that entry was inserted in cache */
unsigned notify_before_evict_count; /* Count of times that entry was removed in cache */
@@ -443,7 +443,7 @@ typedef struct test_entry_t {
#define CACHE_CONFIGS_EQUAL(a, b, cmp_set_init, cmp_init_size) \
(((a).version == (b).version) && ((a).rpt_fcn_enabled == (b).rpt_fcn_enabled) && \
((a).open_trace_file == (b).open_trace_file) && ((a).close_trace_file == (b).close_trace_file) && \
- (((a).open_trace_file == FALSE) || (strcmp((a).trace_file_name, (b).trace_file_name) == 0)) && \
+ (((a).open_trace_file == false) || (strcmp((a).trace_file_name, (b).trace_file_name) == 0)) && \
((a).evictions_enabled == (b).evictions_enabled) && \
((!cmp_set_init) || ((a).set_initial_size == (b).set_initial_size)) && \
((!cmp_init_size) || ((a).initial_size == (b).initial_size)) && \
@@ -502,14 +502,14 @@ struct expected_entry_status {
int entry_type;
int entry_index;
size_t size;
- hbool_t in_cache;
- hbool_t at_main_addr;
- hbool_t is_dirty;
- hbool_t is_protected;
- hbool_t is_pinned;
- hbool_t deserialized;
- hbool_t serialized;
- hbool_t destroyed;
+ bool in_cache;
+ bool at_main_addr;
+ bool is_dirty;
+ bool is_protected;
+ bool is_pinned;
+ bool deserialized;
+ bool serialized;
+ bool destroyed;
int flush_dep_par_type[MAX_FLUSH_DEP_PARS]; /* Entry types of flush dependency parents */
int flush_dep_par_idx[MAX_FLUSH_DEP_PARS]; /* Indices of flush dependency parents */
unsigned flush_dep_npar; /* Number of flush dependency parents */
@@ -520,7 +520,7 @@ struct expected_entry_status {
};
/* global variable externs: */
-H5TEST_DLLVAR hbool_t pass; /* set to false on error */
+H5TEST_DLLVAR bool pass; /* set to false on error */
H5TEST_DLLVAR const char *failure_mssg;
H5TEST_DLLVAR test_entry_t *entries[NUMBER_OF_ENTRY_TYPES];
@@ -539,12 +539,12 @@ extern "C" {
/* function declarations: */
-H5TEST_DLL void add_flush_op(int target_type, int target_idx, int op_code, int type, int idx, hbool_t flag,
+H5TEST_DLL void add_flush_op(int target_type, int target_idx, int op_code, int type, int idx, bool flag,
size_t size, unsigned *order);
H5TEST_DLL void addr_to_type_and_index(haddr_t addr, int32_t *type_ptr, int32_t *index_ptr);
-H5TEST_DLL void dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, hbool_t dirty_pin);
+H5TEST_DLL void dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, bool dirty_pin);
H5TEST_DLL void expunge_entry(H5F_t *file_ptr, int32_t type, int32_t idx);
@@ -552,7 +552,7 @@ H5TEST_DLL void insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigne
H5TEST_DLL void mark_entry_dirty(int32_t type, int32_t idx);
-H5TEST_DLL void move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr);
+H5TEST_DLL void move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, bool main_addr);
H5TEST_DLL void protect_entry(H5F_t *file_ptr, int32_t type, int32_t idx);
@@ -560,7 +560,7 @@ H5TEST_DLL void protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx);
H5TEST_DLL void pin_entry(int32_t type, int32_t idx);
-H5TEST_DLL hbool_t entry_in_cache(H5C_t *cache_ptr, int32_t type, int32_t idx);
+H5TEST_DLL bool entry_in_cache(H5C_t *cache_ptr, int32_t type, int32_t idx);
H5TEST_DLL void create_pinned_entry_dependency(H5F_t *file_ptr, int pinning_type, int pinning_idx,
int pinned_type, int pinned_idx);
@@ -575,51 +575,43 @@ H5TEST_DLL void cork_entry_type(H5F_t *file_ptr, int32_t type);
H5TEST_DLL void uncork_entry_type(H5F_t *file_ptr, int32_t type);
-H5TEST_DLL void resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_t in_cache);
+H5TEST_DLL void resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, bool in_cache);
-H5TEST_DLL void row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t verbose,
- hbool_t reset_stats, hbool_t display_stats,
- hbool_t display_detailed_stats, hbool_t do_inserts, hbool_t do_moves,
- hbool_t move_to_main_addr, hbool_t do_destroys,
- hbool_t do_mult_ro_protects, int dirty_destroys, int dirty_unprotects);
+H5TEST_DLL void row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, bool verbose,
+ bool reset_stats, bool display_stats, bool display_detailed_stats,
+ bool do_inserts, bool do_moves, bool move_to_main_addr,
+ bool do_destroys, bool do_mult_ro_protects, int dirty_destroys,
+ int dirty_unprotects);
-H5TEST_DLL void hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
- hbool_t reset_stats, hbool_t display_stats,
- hbool_t display_detailed_stats, hbool_t do_inserts);
+H5TEST_DLL void hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts);
-H5TEST_DLL void row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t verbose,
- hbool_t reset_stats, hbool_t display_stats,
- hbool_t display_detailed_stats, hbool_t do_inserts, hbool_t do_moves,
- hbool_t move_to_main_addr, hbool_t do_destroys,
- hbool_t do_mult_ro_protects, int dirty_destroys,
+H5TEST_DLL void row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, bool verbose,
+ bool reset_stats, bool display_stats, bool display_detailed_stats,
+ bool do_inserts, bool do_moves, bool move_to_main_addr,
+ bool do_destroys, bool do_mult_ro_protects, int dirty_destroys,
int dirty_unprotects);
-H5TEST_DLL void hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
- hbool_t reset_stats, hbool_t display_stats,
- hbool_t display_detailed_stats, hbool_t do_inserts);
+H5TEST_DLL void hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts);
-H5TEST_DLL void col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t verbose,
- hbool_t reset_stats, hbool_t display_stats,
- hbool_t display_detailed_stats, hbool_t do_inserts,
- int dirty_unprotects);
+H5TEST_DLL void col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, bool verbose,
+ bool reset_stats, bool display_stats, bool display_detailed_stats,
+ bool do_inserts, int dirty_unprotects);
-H5TEST_DLL void hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
- hbool_t reset_stats, hbool_t display_stats,
- hbool_t display_detailed_stats, hbool_t do_inserts,
+H5TEST_DLL void hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts,
int dirty_unprotects);
-H5TEST_DLL void col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t verbose,
- hbool_t reset_stats, hbool_t display_stats,
- hbool_t display_detailed_stats, hbool_t do_inserts,
- int dirty_unprotects);
+H5TEST_DLL void col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, bool verbose,
+ bool reset_stats, bool display_stats, bool display_detailed_stats,
+ bool do_inserts, int dirty_unprotects);
-H5TEST_DLL void hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
- hbool_t reset_stats, hbool_t display_stats,
- hbool_t display_detailed_stats, hbool_t do_inserts,
+H5TEST_DLL void hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, bool verbose, bool reset_stats,
+ bool display_stats, bool display_detailed_stats, bool do_inserts,
int dirty_unprotects);
-H5TEST_DLL void flush_cache(H5F_t *file_ptr, hbool_t destroy_entries, hbool_t dump_stats,
- hbool_t dump_detailed_stats);
+H5TEST_DLL void flush_cache(H5F_t *file_ptr, bool destroy_entries, bool dump_stats, bool dump_detailed_stats);
H5TEST_DLL void unpin_entry(int32_t type, int32_t idx);
@@ -640,17 +632,17 @@ H5TEST_DLL void destroy_flush_dependency(int32_t parent_type, int32_t parent_idx
/*** H5AC level utility functions ***/
-H5TEST_DLL hbool_t resize_configs_are_equal(const H5C_auto_size_ctl_t *a, const H5C_auto_size_ctl_t *b,
- hbool_t compare_init);
+H5TEST_DLL bool resize_configs_are_equal(const H5C_auto_size_ctl_t *a, const H5C_auto_size_ctl_t *b,
+ bool compare_init);
-H5TEST_DLL void check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t dump_data,
+H5TEST_DLL void check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, bool dump_data,
int64_t min_accesses, double min_hit_rate);
H5TEST_DLL void check_and_validate_cache_size(hid_t file_id, size_t *max_size_ptr, size_t *min_clean_size_ptr,
size_t *cur_size_ptr, int32_t *cur_num_entries_ptr,
- hbool_t dump_data);
+ bool dump_data);
-H5TEST_DLL void validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t compare_init,
+H5TEST_DLL void validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, bool compare_init,
int test_num);
/** Debugging functions -- normally commented out ***/
diff --git a/test/cache_image.c b/test/cache_image.c
index 2e95a97..60e2398 100644
--- a/test/cache_image.c
+++ b/test/cache_image.c
@@ -24,36 +24,35 @@ static const char *FILENAMES[] = {"cache_image_test", NULL};
/* local utility function declarations */
static void create_datasets(hid_t file_id, int min_dset, int max_dset);
static void delete_datasets(hid_t file_id, int min_dset, int max_dset);
-static void open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_only,
- hbool_t set_mdci_fapl, hbool_t config_fsm, hbool_t set_eoc,
- const char *hdf_file_name, unsigned cache_image_flags, hid_t *file_id_ptr,
- H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr);
-static void attempt_swmr_open_hdf5_file(hbool_t create_file, hbool_t set_mdci_fapl,
- const char *hdf_file_name);
+static void open_hdf5_file(bool create_file, bool mdci_sbem_expected, bool read_only, bool set_mdci_fapl,
+ bool config_fsm, bool set_eoc, const char *hdf_file_name,
+ unsigned cache_image_flags, hid_t *file_id_ptr, H5F_t **file_ptr_ptr,
+ H5C_t **cache_ptr_ptr);
+static void attempt_swmr_open_hdf5_file(bool create_file, bool set_mdci_fapl, const char *hdf_file_name);
static void verify_datasets(hid_t file_id, int min_dset, int max_dset);
/* local test function declarations */
-static unsigned check_cache_image_ctl_flow_1(hbool_t single_file_vfd);
-static unsigned check_cache_image_ctl_flow_2(hbool_t single_file_vfd);
-static unsigned check_cache_image_ctl_flow_3(hbool_t single_file_vfd);
-static unsigned check_cache_image_ctl_flow_4(hbool_t single_file_vfd);
-static unsigned check_cache_image_ctl_flow_5(hbool_t single_file_vfd);
-static unsigned check_cache_image_ctl_flow_6(hbool_t single_file_vfd);
-
-static unsigned cache_image_smoke_check_1(hbool_t single_file_vfd);
-static unsigned cache_image_smoke_check_2(hbool_t single_file_vfd);
-static unsigned cache_image_smoke_check_3(hbool_t single_file_vfd);
-static unsigned cache_image_smoke_check_4(hbool_t single_file_vfd);
-static unsigned cache_image_smoke_check_5(hbool_t single_file_vfd);
-static unsigned cache_image_smoke_check_6(hbool_t single_file_vfd);
-
-static unsigned cache_image_api_error_check_1(hbool_t single_file_vfd);
-static unsigned cache_image_api_error_check_2(hbool_t single_file_vfd);
-static unsigned cache_image_api_error_check_3(hbool_t single_file_vfd);
-static unsigned cache_image_api_error_check_4(hbool_t single_file_vfd);
-
-static unsigned get_free_sections_test(hbool_t single_file_vfd);
-static unsigned evict_on_close_test(hbool_t single_file_vfd);
+static unsigned check_cache_image_ctl_flow_1(bool single_file_vfd);
+static unsigned check_cache_image_ctl_flow_2(bool single_file_vfd);
+static unsigned check_cache_image_ctl_flow_3(bool single_file_vfd);
+static unsigned check_cache_image_ctl_flow_4(bool single_file_vfd);
+static unsigned check_cache_image_ctl_flow_5(bool single_file_vfd);
+static unsigned check_cache_image_ctl_flow_6(bool single_file_vfd);
+
+static unsigned cache_image_smoke_check_1(bool single_file_vfd);
+static unsigned cache_image_smoke_check_2(bool single_file_vfd);
+static unsigned cache_image_smoke_check_3(bool single_file_vfd);
+static unsigned cache_image_smoke_check_4(bool single_file_vfd);
+static unsigned cache_image_smoke_check_5(bool single_file_vfd);
+static unsigned cache_image_smoke_check_6(bool single_file_vfd);
+
+static unsigned cache_image_api_error_check_1(bool single_file_vfd);
+static unsigned cache_image_api_error_check_2(bool single_file_vfd);
+static unsigned cache_image_api_error_check_3(bool single_file_vfd);
+static unsigned cache_image_api_error_check_4(bool single_file_vfd);
+
+static unsigned get_free_sections_test(bool single_file_vfd);
+static unsigned evict_on_close_test(bool single_file_vfd);
/****************************************************************************/
/***************************** Utility Functions ****************************/
@@ -62,16 +61,16 @@ static unsigned evict_on_close_test(hbool_t single_file_vfd);
/*-------------------------------------------------------------------------
* Function: create_datasets()
*
- * Purpose: If pass is TRUE on entry, create the specified datasets
+ * Purpose: If pass is true on entry, create the specified datasets
* in the indicated file.
*
* Datasets and their contents must be well known, as we
* will verify that they contain the expected data later.
*
- * On failure, set pass to FALSE, and set failure_mssg
+ * On failure, set pass to false, and set failure_mssg
* to point to an appropriate failure message.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -87,18 +86,18 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
{
const char *fcn_name = "create_datasets()";
char dset_name[64];
- hbool_t show_progress = FALSE;
- hbool_t valid_chunk;
- hbool_t verbose = FALSE;
+ bool show_progress = false;
+ bool valid_chunk;
+ bool verbose = false;
int cp = 0;
int i, j, k, l, m;
int data_chunk[CHUNK_SIZE][CHUNK_SIZE];
herr_t status;
- hid_t dataspace_id = -1;
+ hid_t dataspace_id = H5I_INVALID_HID;
hid_t filespace_ids[MAX_NUM_DSETS];
- hid_t memspace_id = -1;
+ hid_t memspace_id = H5I_INVALID_HID;
hid_t dataset_ids[MAX_NUM_DSETS];
- hid_t properties = -1;
+ hid_t properties = H5I_INVALID_HID;
hsize_t dims[2];
hsize_t a_size[2];
hsize_t offset[2];
@@ -125,7 +124,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (dataspace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple() failed.";
}
@@ -141,7 +140,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (properties < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate() failed.";
}
}
@@ -150,7 +149,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (H5Pset_chunk(properties, 2, chunk_size) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_chunk() failed.";
}
}
@@ -158,13 +157,13 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
/* create the dataset */
if (pass) {
- HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
+ snprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
dataset_ids[i] = H5Dcreate2(file_id, dset_name, H5T_STD_I32BE, dataspace_id, H5P_DEFAULT,
properties, H5P_DEFAULT);
if (dataset_ids[i] < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dcreate() failed.";
}
}
@@ -176,7 +175,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (filespace_ids[i] < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dget_space() failed.";
}
}
@@ -197,7 +196,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (memspace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple() failed.";
}
}
@@ -216,7 +215,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sselect_hyperslab() failed.";
}
}
@@ -247,7 +246,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk H5Sselect_hyperslab() failed.";
}
@@ -257,7 +256,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dwrite() failed.";
}
m++;
@@ -288,7 +287,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
@@ -300,7 +299,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
}
@@ -308,13 +307,13 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
/* validate the slab */
if (pass) {
- valid_chunk = TRUE;
+ valid_chunk = true;
for (k = 0; k < CHUNK_SIZE; k++) {
for (l = 0; l < CHUNK_SIZE; l++) {
if (data_chunk[k][l] !=
((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l)) {
- valid_chunk = FALSE;
+ valid_chunk = false;
if (verbose) {
@@ -330,7 +329,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (!valid_chunk) {
- pass = FALSE;
+ pass = false;
failure_mssg = "slab validation failed.";
if (verbose) {
@@ -354,7 +353,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
while ((pass) && (i <= max_dset)) {
if (H5Sclose(filespace_ids[i]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose() failed.";
}
i++;
@@ -365,7 +364,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
while ((pass) && (i <= max_dset)) {
if (H5Dclose(dataset_ids[i]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dclose() failed.";
}
i++;
@@ -376,7 +375,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
if (H5Sclose(memspace_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(memspace_id) failed.";
}
}
@@ -386,17 +385,17 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
/*-------------------------------------------------------------------------
* Function: delete_datasets()
*
- * Purpose: If pass is TRUE on entry, verify and then delete the
+ * Purpose: If pass is true on entry, verify and then delete the
* dataset(s) indicated by min_dset and max_dset in the
* indicated file.
*
* Datasets and their contents must be well know, as we
* will verify that they contain the expected data later.
*
- * On failure, set pass to FALSE, and set failure_mssg
+ * On failure, set pass to false, and set failure_mssg
* to point to an appropriate failure message.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -408,7 +407,7 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset)
{
const char *fcn_name = "delete_datasets()";
char dset_name[64];
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
int cp = 0;
int i;
@@ -434,11 +433,11 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset)
i = min_dset;
while ((pass) && (i <= max_dset)) {
- HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
+ snprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
if (H5Ldelete(file_id, dset_name, H5P_DEFAULT) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Ldelete() failed.";
}
@@ -458,32 +457,32 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset)
* and test to see if it has a metadata cache image superblock
* extension message.
*
- * Set pass to FALSE and issue a suitable failure
+ * Set pass to false and issue a suitable failure
* message if either the file contains a metadata cache image
- * superblock extension and mdci_sbem_expected is TRUE, or
+ * superblock extension and mdci_sbem_expected is true, or
* vice versa.
*
- * If mdci_sbem_expected is TRUE, also verify that the metadata
+ * If mdci_sbem_expected is true, also verify that the metadata
* cache has been advised of this.
*
- * If read_only is TRUE, open the file read only. Otherwise
+ * If read_only is true, open the file read only. Otherwise
* open the file read/write.
*
- * If set_mdci_fapl is TRUE, set the metadata cache image
+ * If set_mdci_fapl is true, set the metadata cache image
* FAPL entry when opening the file, and verify that the
* metadata cache is notified.
*
- * If config_fsm is TRUE, setup the persistent free space
+ * If config_fsm is true, setup the persistent free space
* manager. Note that this flag may only be set if
- * create_file is also TRUE.
+ * create_file is also true.
*
* Return pointers to the cache data structure and file data
* structures.
*
- * On failure, set pass to FALSE, and set failure_mssg
+ * On failure, set pass to false, and set failure_mssg
* to point to an appropriate failure message.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -491,22 +490,22 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset)
*/
static void
-open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_only, hbool_t set_mdci_fapl,
- hbool_t config_fsm, hbool_t set_eoc, const char *hdf_file_name, unsigned cache_image_flags,
- hid_t *file_id_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr)
+open_hdf5_file(bool create_file, bool mdci_sbem_expected, bool read_only, bool set_mdci_fapl, bool config_fsm,
+ bool set_eoc, const char *hdf_file_name, unsigned cache_image_flags, hid_t *file_id_ptr,
+ H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr)
{
const char *fcn_name = "open_hdf5_file()";
- hbool_t show_progress = FALSE;
- hbool_t verbose = FALSE;
+ bool show_progress = false;
+ bool verbose = false;
int cp = 0;
- hid_t fapl_id = -1;
- hid_t fcpl_id = -1;
- hid_t file_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t fcpl_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
herr_t result;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
H5C_cache_image_ctl_t image_ctl;
- H5AC_cache_image_config_t cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, TRUE, FALSE,
+ H5AC_cache_image_config_t cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, true, false,
H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE};
if (pass) {
@@ -521,7 +520,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
(file_ptr_ptr == NULL) || (cache_ptr_ptr == NULL)) {
failure_mssg = "Bad param(s) on entry to open_hdf5_file().\n";
- pass = FALSE;
+ pass = false;
}
else if (verbose) {
@@ -539,7 +538,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (fapl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fileaccess() failed.\n";
}
}
@@ -552,7 +551,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_libver_bounds() failed.\n";
}
}
@@ -567,16 +566,16 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pget_mdc_image_config() failed.\n";
}
if ((cache_image_config.version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION) ||
- (cache_image_config.generate_image != FALSE) ||
- (cache_image_config.save_resize_status != FALSE) ||
+ (cache_image_config.generate_image != false) ||
+ (cache_image_config.save_resize_status != false) ||
(cache_image_config.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected default cache image config.\n";
}
}
@@ -588,15 +587,15 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if ((pass) && (set_mdci_fapl)) {
/* set cache image config fields to taste */
- cache_image_config.generate_image = TRUE;
- cache_image_config.save_resize_status = FALSE;
+ cache_image_config.generate_image = true;
+ cache_image_config.save_resize_status = false;
cache_image_config.entry_ageout = H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE;
result = H5Pset_mdc_image_config(fapl_id, &cache_image_config);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_mdc_image_config() failed.\n";
}
}
@@ -611,14 +610,14 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (fcpl_id <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pcreate(H5P_FILE_CREATE) failed.";
}
}
if ((pass) && (config_fsm)) {
- if (H5Pset_file_space_strategy(fcpl_id, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0) {
- pass = FALSE;
+ if (H5Pset_file_space_strategy(fcpl_id, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1) < 0) {
+ pass = false;
failure_mssg = "H5Pset_file_space_strategy() failed.";
}
}
@@ -629,9 +628,9 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
/* set evict on close if indicated */
if ((pass) && (set_eoc)) {
- if (H5Pset_evict_on_close(fapl_id, TRUE) < 0) {
+ if (H5Pset_evict_on_close(fapl_id, true) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_evict_on_close() failed.";
}
}
@@ -667,7 +666,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (file_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fcreate() or H5Fopen() failed.\n";
}
else {
@@ -676,7 +675,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get file_ptr.";
if (verbose) {
@@ -696,7 +695,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (file_ptr->shared->cache == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't get cache pointer(1).\n";
}
else {
@@ -719,7 +718,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (H5C__get_cache_image_config(cache_ptr, &image_ctl) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error returned by H5C__get_cache_image_config().";
}
}
@@ -734,22 +733,22 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (read_only) {
if ((image_ctl.version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION) ||
- (image_ctl.generate_image != FALSE) || (image_ctl.save_resize_status != FALSE) ||
+ (image_ctl.generate_image != false) || (image_ctl.save_resize_status != false) ||
(image_ctl.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE) ||
(image_ctl.flags != H5C_CI__ALL_FLAGS)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected image_ctl values(1).\n";
}
}
else {
if ((image_ctl.version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION) ||
- (image_ctl.generate_image != TRUE) || (image_ctl.save_resize_status != FALSE) ||
+ (image_ctl.generate_image != true) || (image_ctl.save_resize_status != false) ||
(image_ctl.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE) ||
(image_ctl.flags != H5C_CI__ALL_FLAGS)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected image_ctl values(2).\n";
}
}
@@ -757,11 +756,11 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
else {
if ((image_ctl.version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION) ||
- (image_ctl.generate_image != FALSE) || (image_ctl.save_resize_status != FALSE) ||
+ (image_ctl.generate_image != false) || (image_ctl.save_resize_status != false) ||
(image_ctl.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE) ||
(image_ctl.flags != H5C_CI__ALL_FLAGS)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected image_ctl values(3).\n";
}
}
@@ -776,7 +775,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (H5C_set_cache_image_config(file_ptr, cache_ptr, &image_ctl) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "error returned by H5C_set_cache_image_config().";
}
}
@@ -786,9 +785,9 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (pass) {
- if (cache_ptr->close_warning_received == TRUE) {
+ if (cache_ptr->close_warning_received == true) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Unexpected value of close_warning_received.\n";
}
@@ -796,26 +795,26 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (read_only) {
- if ((cache_ptr->load_image != TRUE) || (cache_ptr->delete_image != FALSE)) {
+ if ((cache_ptr->load_image != true) || (cache_ptr->delete_image != false)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "mdci sb extension message not present?\n";
}
}
else {
- if ((cache_ptr->load_image != TRUE) || (cache_ptr->delete_image != TRUE)) {
+ if ((cache_ptr->load_image != true) || (cache_ptr->delete_image != true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "mdci sb extension message not present?\n";
}
}
}
else {
- if ((cache_ptr->load_image == TRUE) || (cache_ptr->delete_image == TRUE)) {
+ if ((cache_ptr->load_image == true) || (cache_ptr->delete_image == true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "mdci sb extension message present?\n";
}
}
@@ -845,7 +844,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
*
* In all cases, the attempted open or create should fail.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -853,15 +852,15 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
*/
static void
-attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fapl, const char *hdf_file_name)
+attempt_swmr_open_hdf5_file(const bool create_file, const bool set_mdci_fapl, const char *hdf_file_name)
{
const char *fcn_name = "attempt_swmr_open_hdf5_file()";
- hbool_t show_progress = FALSE;
+ bool show_progress = false;
int cp = 0;
- hid_t fapl_id = -1;
- hid_t file_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
herr_t result;
- H5AC_cache_image_config_t cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, TRUE, FALSE,
+ H5AC_cache_image_config_t cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, true, false,
H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE};
/* create a file access property list. */
@@ -871,7 +870,7 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa
if (fapl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fileaccess() failed.\n";
}
}
@@ -884,7 +883,7 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa
if (H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_libver_bounds() failed.\n";
}
}
@@ -896,15 +895,15 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa
if ((pass) && (set_mdci_fapl)) {
/* set cache image config fields to taste */
- cache_image_config.generate_image = TRUE;
- cache_image_config.save_resize_status = FALSE;
+ cache_image_config.generate_image = true;
+ cache_image_config.save_resize_status = false;
cache_image_config.entry_ageout = H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE;
result = H5Pset_mdc_image_config(fapl_id, &cache_image_config);
if (result < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_mdc_image_config() failed.\n";
}
}
@@ -934,7 +933,7 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa
if (file_id >= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "SWMR H5Fcreate() or H5Fopen() succeeded.\n";
}
}
@@ -947,7 +946,7 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa
/*-------------------------------------------------------------------------
* Function: verify_datasets()
*
- * Purpose: If pass is TRUE on entry, verify that the datasets in the
+ * Purpose: If pass is true on entry, verify that the datasets in the
* file exist and contain the expected data.
*
* Note that these datasets were created by
@@ -955,10 +954,10 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa
* function must be reflected in this function, and
* vise-versa.
*
- * On failure, set pass to FALSE, and set failure_mssg
+ * On failure, set pass to false, and set failure_mssg
* to point to an appropriate failure message.
*
- * Do nothing if pass is FALSE on entry.
+ * Do nothing if pass is false on entry.
*
* Return: void
*
@@ -970,15 +969,15 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
{
const char *fcn_name = "verify_datasets()";
char dset_name[64];
- hbool_t show_progress = FALSE;
- hbool_t valid_chunk;
- hbool_t verbose = FALSE;
+ bool show_progress = false;
+ bool valid_chunk;
+ bool verbose = false;
int cp = 0;
int i, j, k, l, m;
int data_chunk[CHUNK_SIZE][CHUNK_SIZE];
herr_t status;
hid_t filespace_ids[MAX_NUM_DSETS];
- hid_t memspace_id = -1;
+ hid_t memspace_id = H5I_INVALID_HID;
hid_t dataset_ids[MAX_NUM_DSETS];
hsize_t dims[2];
hsize_t a_size[2];
@@ -1001,12 +1000,12 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
/* open the dataset */
if (pass) {
- HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
+ snprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
dataset_ids[i] = H5Dopen2(file_id, dset_name, H5P_DEFAULT);
if (dataset_ids[i] < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dopen2() failed.";
}
}
@@ -1018,7 +1017,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
if (filespace_ids[i] < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dget_space() failed.";
}
}
@@ -1039,7 +1038,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
if (memspace_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Screate_simple() failed.";
}
}
@@ -1058,7 +1057,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sselect_hyperslab() failed.";
}
}
@@ -1083,7 +1082,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
@@ -1095,7 +1094,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
if (status < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "disk hyperslab create failed.";
}
}
@@ -1103,13 +1102,13 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
/* validate the slab */
if (pass) {
- valid_chunk = TRUE;
+ valid_chunk = true;
for (k = 0; k < CHUNK_SIZE; k++) {
for (l = 0; l < CHUNK_SIZE; l++) {
if (data_chunk[k][l] !=
((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l)) {
- valid_chunk = FALSE;
+ valid_chunk = false;
if (verbose) {
@@ -1125,7 +1124,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
if (!valid_chunk) {
- pass = FALSE;
+ pass = false;
failure_mssg = "slab validation failed.";
if (verbose) {
@@ -1149,7 +1148,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
while ((pass) && (i <= max_dset)) {
if (H5Sclose(filespace_ids[i]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose() failed.";
}
i++;
@@ -1160,7 +1159,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
while ((pass) && (i <= max_dset)) {
if (H5Dclose(dataset_ids[i]) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Dclose() failed.";
}
i++;
@@ -1171,7 +1170,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
if (H5Sclose(memspace_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Sclose(memspace_id) failed.";
}
}
@@ -1247,12 +1246,12 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
*/
static unsigned
-check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
+check_cache_image_ctl_flow_1(bool single_file_vfd)
{
const char *fcn_name = "check_cache_image_ctl_flow_1()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -1262,11 +1261,11 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -1276,7 +1275,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -1294,12 +1293,12 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -1326,7 +1325,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -1344,12 +1343,12 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -1387,7 +1386,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -1403,12 +1402,12 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -1425,7 +1424,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -1439,7 +1438,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -1521,12 +1520,12 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd)
*/
static unsigned
-check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
+check_cache_image_ctl_flow_2(bool single_file_vfd)
{
const char *fcn_name = "check_cache_image_ctl_flow_2()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -1536,11 +1535,11 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -1550,7 +1549,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -1568,12 +1567,12 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -1590,7 +1589,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -1608,12 +1607,12 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -1630,7 +1629,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -1646,12 +1645,12 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -1668,7 +1667,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -1682,7 +1681,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -1782,12 +1781,12 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd)
*/
static unsigned
-check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
+check_cache_image_ctl_flow_3(bool single_file_vfd)
{
const char *fcn_name = "check_cache_image_ctl_flow_3()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -1797,11 +1796,11 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 0 */
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -1811,7 +1810,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -1827,12 +1826,12 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -1849,7 +1848,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -1867,12 +1866,12 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -1899,7 +1898,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -1918,12 +1917,12 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -1950,7 +1949,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -1969,12 +1968,12 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2001,7 +2000,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2017,12 +2016,12 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2039,7 +2038,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2053,7 +2052,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -2145,12 +2144,12 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd)
*/
static unsigned
-check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
+check_cache_image_ctl_flow_4(bool single_file_vfd)
{
const char *fcn_name = "check_cache_image_ctl_flow_4()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -2160,11 +2159,11 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 0 */
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -2174,7 +2173,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -2190,12 +2189,12 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2212,7 +2211,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2230,12 +2229,12 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -2252,7 +2251,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2271,12 +2270,12 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2293,7 +2292,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2312,12 +2311,12 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2334,7 +2333,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2350,12 +2349,12 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2372,7 +2371,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2386,7 +2385,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -2471,12 +2470,12 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd)
*/
static unsigned
-check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
+check_cache_image_ctl_flow_5(bool single_file_vfd)
{
const char *fcn_name = "check_cache_image_ctl_flow_5()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -2486,11 +2485,11 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 0 */
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -2500,7 +2499,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -2518,12 +2517,12 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -2550,7 +2549,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2575,12 +2574,12 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -2607,7 +2606,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2626,12 +2625,12 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2658,7 +2657,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2672,7 +2671,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -2749,12 +2748,12 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd)
*/
static unsigned
-check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
+check_cache_image_ctl_flow_6(bool single_file_vfd)
{
const char *fcn_name = "check_cache_image_ctl_flow_6()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -2764,11 +2763,11 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress) /* 0 */
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -2778,7 +2777,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -2796,12 +2795,12 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -2818,7 +2817,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2843,12 +2842,12 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__GEN_MDCI_SBE_MESG,
/* file_id_ptr */ &file_id,
@@ -2865,7 +2864,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2884,12 +2883,12 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -2906,7 +2905,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -2920,7 +2919,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -3032,12 +3031,12 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd)
*/
static unsigned
-cache_image_smoke_check_1(hbool_t single_file_vfd)
+cache_image_smoke_check_1(bool single_file_vfd)
{
const char *fcn_name = "cache_image_smoke_check_1()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -3047,11 +3046,11 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -3061,7 +3060,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -3078,12 +3077,12 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -3106,7 +3105,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -3121,7 +3120,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3139,12 +3138,12 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3171,7 +3170,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 1) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(1).";
}
}
@@ -3186,7 +3185,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3202,12 +3201,12 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3234,7 +3233,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(2).";
}
}
@@ -3249,7 +3248,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3265,12 +3264,12 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -3290,7 +3289,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3306,12 +3305,12 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3337,7 +3336,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(3).";
}
}
@@ -3352,7 +3351,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3366,7 +3365,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -3440,12 +3439,12 @@ cache_image_smoke_check_1(hbool_t single_file_vfd)
*/
static unsigned
-cache_image_smoke_check_2(hbool_t single_file_vfd)
+cache_image_smoke_check_2(bool single_file_vfd)
{
const char *fcn_name = "cache_image_smoke_check_2()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -3455,11 +3454,11 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -3469,7 +3468,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -3486,12 +3485,12 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -3514,7 +3513,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -3529,7 +3528,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3545,12 +3544,12 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3573,7 +3572,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3589,12 +3588,12 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3625,7 +3624,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3639,7 +3638,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -3735,12 +3734,12 @@ cache_image_smoke_check_2(hbool_t single_file_vfd)
*/
static unsigned
-cache_image_smoke_check_3(hbool_t single_file_vfd)
+cache_image_smoke_check_3(bool single_file_vfd)
{
const char *fcn_name = "cache_image_smoke_check_3()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -3750,11 +3749,11 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -3764,7 +3763,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -3781,12 +3780,12 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -3809,7 +3808,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -3824,7 +3823,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3840,12 +3839,12 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3872,7 +3871,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(1).";
}
}
@@ -3887,7 +3886,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3903,12 +3902,12 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3935,7 +3934,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(2).";
}
}
@@ -3950,7 +3949,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -3963,12 +3962,12 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -3995,7 +3994,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(2).";
}
}
@@ -4010,7 +4009,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4024,7 +4023,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -4109,12 +4108,12 @@ cache_image_smoke_check_3(hbool_t single_file_vfd)
*/
static unsigned
-cache_image_smoke_check_4(hbool_t single_file_vfd)
+cache_image_smoke_check_4(bool single_file_vfd)
{
const char *fcn_name = "cache_image_smoke_check_4()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -4126,11 +4125,11 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -4140,7 +4139,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -4157,12 +4156,12 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -4185,7 +4184,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -4200,7 +4199,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4218,12 +4217,12 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -4246,7 +4245,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(1).";
}
}
@@ -4261,7 +4260,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4279,12 +4278,12 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -4311,7 +4310,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(2).";
}
}
@@ -4326,7 +4325,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4339,12 +4338,12 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -4371,7 +4370,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(2).";
}
}
@@ -4386,7 +4385,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4400,7 +4399,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -4499,14 +4498,14 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
#define MAX_NUM_GROUPS 64
static unsigned
-cache_image_smoke_check_5(hbool_t single_file_vfd)
+cache_image_smoke_check_5(bool single_file_vfd)
{
const char *fcn_name = "cache_image_smoke_check_5()";
char filename[512];
char process_group_name[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
- hid_t proc_gid = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t proc_gid = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -4519,11 +4518,11 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -4535,7 +4534,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], fapl_id, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
@@ -4554,12 +4553,12 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -4573,13 +4572,13 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
/* 2) Create a process specific group. */
if (pass) {
- HDsnprintf(process_group_name, sizeof(process_group_name), "/process_%d", min_group);
+ snprintf(process_group_name, sizeof(process_group_name), "/process_%d", min_group);
proc_gid = H5Gcreate2(file_id, process_group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (proc_gid < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Gcreate2() failed (1).\n";
}
}
@@ -4596,7 +4595,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -4611,7 +4610,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (H5Gclose(proc_gid) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Gclose(proc_gid) failed. (1)";
}
}
@@ -4620,7 +4619,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4638,12 +4637,12 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -4663,7 +4662,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(1).";
}
}
@@ -4676,13 +4675,13 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (pass) {
max_group++;
- HDsnprintf(process_group_name, sizeof(process_group_name), "/process_%d", max_group);
+ snprintf(process_group_name, sizeof(process_group_name), "/process_%d", max_group);
proc_gid = H5Gcreate2(file_id, process_group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (proc_gid < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Gcreate2() failed (2).\n";
}
}
@@ -4703,7 +4702,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (H5Gclose(proc_gid) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Gclose(process_gid) failed. (2)";
}
}
@@ -4712,7 +4711,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4728,12 +4727,12 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
* superblock extension message.
*/
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -4747,14 +4746,14 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
/* 11) Validate all the zoos. */
i = min_group;
while (pass && i <= max_group) {
- HDsnprintf(process_group_name, sizeof(process_group_name), "/process_%d", i);
+ snprintf(process_group_name, sizeof(process_group_name), "/process_%d", i);
validate_zoo(file_id, process_group_name, i++);
}
#if H5C_COLLECT_CACHE_STATS
if (pass) {
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(2).";
}
}
@@ -4766,7 +4765,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
/* 12) Close the file. */
if (pass) {
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4779,12 +4778,12 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -4799,7 +4798,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
i = min_group;
while ((pass) && (i <= max_group)) {
- HDsnprintf(process_group_name, sizeof(process_group_name), "/process_%d", i);
+ snprintf(process_group_name, sizeof(process_group_name), "/process_%d", i);
validate_zoo(file_id, process_group_name, i++);
}
@@ -4808,7 +4807,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(2).";
}
}
@@ -4823,7 +4822,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4836,12 +4835,12 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -4859,7 +4858,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
*/
i = min_group;
while ((pass) && (i <= max_group)) {
- HDsnprintf(process_group_name, sizeof(process_group_name), "/process_%d", i);
+ snprintf(process_group_name, sizeof(process_group_name), "/process_%d", i);
validate_zoo(file_id, process_group_name, i++);
}
@@ -4868,7 +4867,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(2).";
}
}
@@ -4883,7 +4882,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -4897,7 +4896,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -4994,12 +4993,12 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
*/
static unsigned
-cache_image_smoke_check_6(hbool_t single_file_vfd)
+cache_image_smoke_check_6(bool single_file_vfd)
{
const char *fcn_name = "cache_image_smoke_check_6()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
h5_stat_size_t file_size;
@@ -5012,11 +5011,11 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -5026,7 +5025,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -5043,12 +5042,12 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -5071,7 +5070,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -5086,7 +5085,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5104,12 +5103,12 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -5132,7 +5131,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(1).";
}
}
@@ -5156,7 +5155,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5174,12 +5173,12 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -5202,7 +5201,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (cache_ptr->images_loaded == 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block not loaded(2).";
}
}
@@ -5217,7 +5216,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5230,12 +5229,12 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -5261,7 +5260,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(2).";
}
}
@@ -5273,7 +5272,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5294,11 +5293,11 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
*/
if (pass) {
if ((file_size = h5_get_file_size(filename, H5P_DEFAULT)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_get_file_size() failed.\n";
}
else if (file_size > 20 * 1024) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpectedly large file size.\n";
}
}
@@ -5311,7 +5310,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -5386,12 +5385,12 @@ cache_image_smoke_check_6(hbool_t single_file_vfd)
*/
static unsigned
-cache_image_api_error_check_1(hbool_t single_file_vfd)
+cache_image_api_error_check_1(bool single_file_vfd)
{
const char *fcn_name = "cache_image_api_error_check_1()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -5401,11 +5400,11 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -5415,7 +5414,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -5427,12 +5426,12 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -5455,7 +5454,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -5470,7 +5469,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5482,12 +5481,12 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ true,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -5515,7 +5514,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(2).";
}
}
@@ -5530,7 +5529,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5542,12 +5541,12 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -5575,7 +5574,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(3).";
}
}
@@ -5590,7 +5589,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5602,12 +5601,12 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -5635,7 +5634,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(4).";
}
}
@@ -5650,7 +5649,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5664,7 +5663,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -5751,12 +5750,12 @@ cache_image_api_error_check_1(hbool_t single_file_vfd)
*/
static unsigned
-cache_image_api_error_check_2(hbool_t single_file_vfd)
+cache_image_api_error_check_2(bool single_file_vfd)
{
const char *fcn_name = "cache_image_api_error_check_2()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -5766,11 +5765,11 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -5780,7 +5779,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -5792,12 +5791,12 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -5820,7 +5819,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -5835,7 +5834,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5847,12 +5846,12 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -5880,7 +5879,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 1) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block was not loaded(1).";
}
}
@@ -5895,7 +5894,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5907,12 +5906,12 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ 0,
/* file_id_ptr */ &file_id,
@@ -5940,7 +5939,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 1) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block was not loaded(2).";
}
}
@@ -5955,7 +5954,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -5967,12 +5966,12 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -6000,7 +5999,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 1) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block was not loaded(3).";
}
}
@@ -6015,7 +6014,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -6027,12 +6026,12 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -6060,7 +6059,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block was loaded(2).";
}
}
@@ -6075,7 +6074,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -6089,7 +6088,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -6149,12 +6148,12 @@ cache_image_api_error_check_2(hbool_t single_file_vfd)
*/
static unsigned
-cache_image_api_error_check_3(hbool_t single_file_vfd)
+cache_image_api_error_check_3(bool single_file_vfd)
{
const char *fcn_name = "cache_image_api_error_check_3()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -6164,11 +6163,11 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -6178,7 +6177,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -6190,12 +6189,12 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -6214,7 +6213,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
{
if (H5Fstart_swmr_write(file_id) == SUCCEED) {
- pass = FALSE;
+ pass = false;
failure_mssg = "SWMR start succeeded in file with cache image.";
}
}
@@ -6230,13 +6229,13 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -6248,8 +6247,8 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
* access and cache image requested -- should fail.
*/
- attempt_swmr_open_hdf5_file(/* create_file */ TRUE,
- /* set_mdci_fapl */ TRUE,
+ attempt_swmr_open_hdf5_file(/* create_file */ true,
+ /* set_mdci_fapl */ true,
/* hdf_file_name */ filename);
if (show_progress)
@@ -6272,12 +6271,12 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -6300,7 +6299,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -6315,7 +6314,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -6325,8 +6324,8 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
/* 9) Attempt to open the file with SWMR write access -- should fail. */
- attempt_swmr_open_hdf5_file(/* create_file */ FALSE,
- /* set_mdci_fapl */ TRUE,
+ attempt_swmr_open_hdf5_file(/* create_file */ false,
+ /* set_mdci_fapl */ true,
/* hdf_file_name */ filename);
if (show_progress)
@@ -6338,7 +6337,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -6427,13 +6426,13 @@ cache_image_api_error_check_3(hbool_t single_file_vfd)
*/
static unsigned
-cache_image_api_error_check_4(hbool_t single_file_vfd)
+cache_image_api_error_check_4(bool single_file_vfd)
{
const char *fcn_name = "cache_image_api_error_check_4()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t fapl_id = -1;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -6444,11 +6443,11 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -6458,7 +6457,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -6475,7 +6474,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (fapl_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fileaccess() failed.\n";
}
}
@@ -6487,13 +6486,13 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
/* set cache image config fields to taste */
cache_image_config.version = H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION;
- cache_image_config.generate_image = TRUE;
- cache_image_config.save_resize_status = FALSE;
+ cache_image_config.generate_image = true;
+ cache_image_config.save_resize_status = false;
cache_image_config.entry_ageout = H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE;
if (H5Pset_mdc_image_config(fapl_id, &cache_image_config) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Pset_mdc_image_config() failed.\n";
}
}
@@ -6509,7 +6508,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (file_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fcreate() failed.\n";
}
else {
@@ -6518,7 +6517,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get file_ptr.";
}
}
@@ -6534,7 +6533,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (file_ptr->shared->cache == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't get cache pointer(1).\n";
}
else {
@@ -6560,7 +6559,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(1).";
}
}
@@ -6575,7 +6574,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -6587,12 +6586,12 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -6617,7 +6616,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(2).";
}
}
@@ -6632,7 +6631,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -6651,7 +6650,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (file_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fopen() failed.\n";
}
else {
@@ -6660,7 +6659,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get file_ptr.";
}
}
@@ -6676,7 +6675,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (file_ptr->shared->cache == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't get cache pointer(1).\n";
}
else {
@@ -6690,9 +6689,9 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (pass) {
- if ((cache_ptr->load_image == TRUE) || (cache_ptr->delete_image == TRUE)) {
+ if ((cache_ptr->load_image == true) || (cache_ptr->delete_image == true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "mdci sb extension message present?\n";
}
}
@@ -6706,7 +6705,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -6724,7 +6723,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (file_id < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fopen() failed.\n";
}
else {
@@ -6733,7 +6732,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (file_ptr == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "Can't get file_ptr.";
}
}
@@ -6749,7 +6748,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (file_ptr->shared->cache == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "can't get cache pointer(1).\n";
}
else {
@@ -6763,9 +6762,9 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (pass) {
- if ((cache_ptr->load_image == TRUE) || (cache_ptr->delete_image == TRUE)) {
+ if ((cache_ptr->load_image == true) || (cache_ptr->delete_image == true)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "mdci sb extension message present?\n";
}
}
@@ -6788,7 +6787,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(2).";
}
}
@@ -6813,7 +6812,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -6828,12 +6827,12 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -6859,7 +6858,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (cache_ptr->images_loaded != 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "metadata cache image block loaded(2).";
}
}
@@ -6874,7 +6873,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed.\n";
}
}
@@ -6888,7 +6887,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -6996,12 +6995,12 @@ cache_image_api_error_check_4(hbool_t single_file_vfd)
*-------------------------------------------------------------------------
*/
static unsigned
-get_free_sections_test(hbool_t single_file_vfd)
+get_free_sections_test(bool single_file_vfd)
{
const char *fcn_name = "get_free_sections_test()";
char filename[512];
- hbool_t show_progress = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
h5_stat_size_t file_size;
@@ -7012,11 +7011,11 @@ get_free_sections_test(hbool_t single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7026,7 +7025,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -7040,12 +7039,12 @@ get_free_sections_test(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7090,7 +7089,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed (1).\n";
}
}
@@ -7102,12 +7101,12 @@ get_free_sections_test(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7124,7 +7123,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if ((!file_ptr->shared->cache->load_image) || (file_ptr->shared->cache->image_loaded)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache image status.\n";
}
}
@@ -7139,14 +7138,14 @@ get_free_sections_test(hbool_t single_file_vfd)
if (pass) {
- /* file_ptr->shared->first_alloc_dealloc is set to FALSE if the
+ /* file_ptr->shared->first_alloc_dealloc is set to false if the
* file is opened R/O.
*/
if ((!H5_addr_defined(file_ptr->shared->eoa_fsm_fsalloc)) ||
(!H5_addr_defined(file_ptr->shared->cache->image_addr)) ||
(H5_addr_gt(file_ptr->shared->eoa_fsm_fsalloc, file_ptr->shared->cache->image_addr))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache image status (1).\n";
}
}
@@ -7160,7 +7159,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if (H5Fget_free_sections(file_id, H5FD_MEM_DEFAULT, (size_t)0, NULL) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_free_sections() failed (1).\n";
}
}
@@ -7175,7 +7174,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if (!file_ptr->shared->cache->image_loaded) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache image not loaded (1).\n";
}
}
@@ -7199,7 +7198,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed (2).\n";
}
}
@@ -7211,12 +7210,12 @@ get_free_sections_test(hbool_t single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7233,7 +7232,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if ((!file_ptr->shared->cache->load_image) || (file_ptr->shared->cache->image_loaded)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache image status.\n";
}
}
@@ -7251,7 +7250,7 @@ get_free_sections_test(hbool_t single_file_vfd)
(!H5_addr_defined(file_ptr->shared->cache->image_addr)) ||
(H5_addr_gt(file_ptr->shared->eoa_fsm_fsalloc, file_ptr->shared->cache->image_addr))) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpected cache image status (2).\n";
}
}
@@ -7265,7 +7264,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if (H5Fget_free_sections(file_id, H5FD_MEM_DEFAULT, (size_t)0, NULL) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fget_free_sections() failed (2).\n";
}
}
@@ -7280,7 +7279,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if (!file_ptr->shared->cache->image_loaded) {
- pass = FALSE;
+ pass = false;
failure_mssg = "cache image not loaded (2).\n";
}
}
@@ -7314,7 +7313,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed (3).\n";
}
}
@@ -7328,12 +7327,12 @@ get_free_sections_test(hbool_t single_file_vfd)
if ((file_size = h5_get_file_size(filename, H5P_DEFAULT)) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_get_file_size() failed.\n";
}
else if (file_size > 20 * 1024) {
- pass = FALSE;
+ pass = false;
failure_mssg = "unexpectedly large file size.\n";
}
}
@@ -7347,7 +7346,7 @@ get_free_sections_test(hbool_t single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -7434,14 +7433,14 @@ get_free_sections_test(hbool_t single_file_vfd)
*-------------------------------------------------------------------------
*/
static unsigned
-evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
+evict_on_close_test(bool H5_ATTR_PARALLEL_UNUSED single_file_vfd)
{
#ifndef H5_HAVE_PARALLEL
const char *fcn_name = "evict_on_close_test()";
char filename[512];
- hbool_t show_progress = FALSE;
- hbool_t verbose = FALSE;
- hid_t file_id = -1;
+ bool show_progress = false;
+ bool verbose = false;
+ hid_t file_id = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
@@ -7451,18 +7450,18 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
#ifdef H5_HAVE_PARALLEL
SKIPPED();
- HDputs(" EoC not supported in the parallel library.");
+ puts(" EoC not supported in the parallel library.");
return 0;
#else
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
- pass = TRUE;
+ pass = true;
if (show_progress)
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
@@ -7472,7 +7471,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
if (h5_fixname(FILENAMES[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) {
- pass = FALSE;
+ pass = false;
failure_mssg = "h5_fixname() failed.\n";
}
}
@@ -7485,12 +7484,12 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
*/
if (pass) {
- open_hdf5_file(/* create_file */ TRUE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ TRUE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ true,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ true,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7525,7 +7524,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed (1).\n";
}
}
@@ -7537,12 +7536,12 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ FALSE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ TRUE,
- /* config_fsm */ FALSE,
- /* set_eoc */ FALSE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ false,
+ /* read_only */ false,
+ /* set_mdci_fapl */ true,
+ /* config_fsm */ false,
+ /* set_eoc */ false,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7598,7 +7597,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed (2).\n";
}
}
@@ -7610,12 +7609,12 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ TRUE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ TRUE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ true,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ true,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7650,7 +7649,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed (3).\n";
}
}
@@ -7662,12 +7661,12 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
if (pass) {
- open_hdf5_file(/* create_file */ FALSE,
- /* mdci_sbem_expected */ TRUE,
- /* read_only */ FALSE,
- /* set_mdci_fapl */ FALSE,
- /* config_fsm */ FALSE,
- /* set_eoc */ TRUE,
+ open_hdf5_file(/* create_file */ false,
+ /* mdci_sbem_expected */ true,
+ /* read_only */ false,
+ /* set_mdci_fapl */ false,
+ /* config_fsm */ false,
+ /* set_eoc */ true,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -7702,7 +7701,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
if (H5Fclose(file_id) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "H5Fclose() failed (3).\n";
}
}
@@ -7716,7 +7715,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
if (HDremove(filename) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "HDremove() failed.\n";
}
}
@@ -7754,12 +7753,12 @@ int
main(void)
{
const char *env_h5_drvr; /* File driver value from environment */
- hbool_t single_file_vfd; /* Whether VFD used stores data in a single file */
+ bool single_file_vfd; /* Whether VFD used stores data in a single file */
unsigned nerrs = 0;
int express_test;
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
diff --git a/test/cache_logging.c b/test/cache_logging.c
index 5001c49..5372021 100644
--- a/test/cache_logging.c
+++ b/test/cache_logging.c
@@ -32,20 +32,20 @@ static const char *FILENAME[] = {"cache_logging", NULL};
static herr_t
test_logging_api(void)
{
- hid_t fapl = -1;
- hbool_t is_enabled;
- hbool_t is_enabled_out;
- hbool_t start_on_access;
- hbool_t start_on_access_out;
- char *location = NULL;
- size_t size;
-
- hid_t fid = -1;
- hid_t gid = -1;
- hbool_t is_currently_logging;
- char group_name[12];
- char filename[1024];
- int i;
+ hid_t fapl = H5I_INVALID_HID;
+ bool is_enabled;
+ bool is_enabled_out;
+ bool start_on_access;
+ bool start_on_access_out;
+ char *location = NULL;
+ size_t size;
+
+ hid_t fid = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
+ bool is_currently_logging;
+ char group_name[12];
+ char filename[1024];
+ int i;
TESTING("metadata cache log api calls");
@@ -53,8 +53,8 @@ test_logging_api(void)
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
/* Set up metadata cache logging */
- is_enabled = TRUE;
- start_on_access = FALSE;
+ is_enabled = true;
+ start_on_access = false;
if (H5Pset_mdc_log_options(fapl, is_enabled, LOG_LOCATION, start_on_access) < 0)
TEST_ERROR;
@@ -67,13 +67,13 @@ test_logging_api(void)
/* Check to make sure that the property list getter returns the correct
* location string buffer size;
*/
- is_enabled_out = FALSE;
- start_on_access_out = TRUE;
+ is_enabled_out = false;
+ start_on_access_out = true;
location = NULL;
size = 999;
if (H5Pget_mdc_log_options(fapl, &is_enabled_out, location, &size, &start_on_access_out) < 0)
TEST_ERROR;
- if (size != HDstrlen(LOG_LOCATION) + 1)
+ if (size != strlen(LOG_LOCATION) + 1)
TEST_ERROR;
/* Check to make sure that the property list getter works */
@@ -82,7 +82,7 @@ test_logging_api(void)
if (H5Pget_mdc_log_options(fapl, &is_enabled_out, location, &size, &start_on_access_out) < 0)
TEST_ERROR;
if ((is_enabled != is_enabled_out) || (start_on_access != start_on_access_out) ||
- HDstrcmp(LOG_LOCATION, location) != 0)
+ strcmp(LOG_LOCATION, location) != 0)
TEST_ERROR;
/* Create a file */
@@ -92,25 +92,25 @@ test_logging_api(void)
TEST_ERROR;
/* Check to see if the logging flags were set correctly */
- is_enabled = FALSE;
- is_currently_logging = TRUE;
- if ((H5Fget_mdc_logging_status(fid, &is_enabled, &is_currently_logging) < 0) || (is_enabled != TRUE) ||
- (is_currently_logging != FALSE))
+ is_enabled = false;
+ is_currently_logging = true;
+ if ((H5Fget_mdc_logging_status(fid, &is_enabled, &is_currently_logging) < 0) || (is_enabled != true) ||
+ (is_currently_logging != false))
TEST_ERROR;
/* Turn on logging and check flags */
if (H5Fstart_mdc_logging(fid) < 0)
TEST_ERROR;
- is_enabled = FALSE;
- is_currently_logging = FALSE;
- if ((H5Fget_mdc_logging_status(fid, &is_enabled, &is_currently_logging) < 0) || (is_enabled != TRUE) ||
- (is_currently_logging != TRUE))
+ is_enabled = false;
+ is_currently_logging = false;
+ if ((H5Fget_mdc_logging_status(fid, &is_enabled, &is_currently_logging) < 0) || (is_enabled != true) ||
+ (is_currently_logging != true))
TEST_ERROR;
/* Perform some manipulations */
for (i = 0; i < N_GROUPS; i++) {
memset(group_name, 0, sizeof(group_name));
- HDsnprintf(group_name, sizeof(group_name), "%d", i);
+ snprintf(group_name, sizeof(group_name), "%d", i);
if ((gid = H5Gcreate2(fid, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(gid) < 0)
@@ -120,10 +120,10 @@ test_logging_api(void)
/* Turn off logging and check flags */
if (H5Fstop_mdc_logging(fid) < 0)
TEST_ERROR;
- is_enabled = FALSE;
- is_currently_logging = TRUE;
- if ((H5Fget_mdc_logging_status(fid, &is_enabled, &is_currently_logging) < 0) || (is_enabled != TRUE) ||
- (is_currently_logging != FALSE))
+ is_enabled = false;
+ is_currently_logging = true;
+ if ((H5Fget_mdc_logging_status(fid, &is_enabled, &is_currently_logging) < 0) || (is_enabled != true) ||
+ (is_currently_logging != false))
TEST_ERROR;
/* Clean up */
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 9af8bf2..61b1dbe 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -205,7 +205,7 @@ mark_all_entries_investigated(hid_t fid)
entry_ptr = cache_ptr->index[i];
while (entry_ptr != NULL) {
if (!entry_ptr->dirtied)
- entry_ptr->dirtied = TRUE;
+ entry_ptr->dirtied = true;
entry_ptr = entry_ptr->ht_next;
} /* end if */
@@ -247,7 +247,7 @@ reset_all_entries_investigated(hid_t fid)
entry_ptr = cache_ptr->index[i];
while (entry_ptr != NULL) {
if (entry_ptr->dirtied)
- entry_ptr->dirtied = FALSE;
+ entry_ptr->dirtied = false;
entry_ptr = entry_ptr->ht_next;
} /* end if */
@@ -295,7 +295,7 @@ verify_tag(hid_t fid, int id, haddr_t tag)
TEST_ERROR;
/* Mark the entry/tag pair as found */
- entry_ptr->dirtied = TRUE;
+ entry_ptr->dirtied = true;
/* leave now that we've found the entry */
goto done;
@@ -328,7 +328,7 @@ evict_entries(hid_t fid)
mark_all_entries_investigated(fid);
/* setup the skip list prior to calling H5C_flush_cache() */
- if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0)
+ if (H5C_set_slist_enabled(f->shared->cache, true, false) < 0)
TEST_ERROR;
/* Evict all we can from the cache to examine full tag creation tree */
@@ -338,7 +338,7 @@ evict_entries(hid_t fid)
H5C_flush_cache(f, H5C__FLUSH_INVALIDATE_FLAG);
/* shutdown the slist -- allow it to be non-empty */
- if (H5C_set_slist_enabled(f->shared->cache, FALSE, TRUE) < 0)
+ if (H5C_set_slist_enabled(f->shared->cache, false, true) < 0)
TEST_ERROR;
return 0;
@@ -416,11 +416,11 @@ static unsigned
check_file_creation_tags(hid_t fcpl_id, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose test output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose test output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t sbe_tag = 0;
@@ -517,13 +517,13 @@ static unsigned
check_file_open_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
- haddr_t root_tag; /* Root Group Tag */
- haddr_t sbe_tag = HADDR_UNDEF; /* Sblock Extension Tag */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
+ haddr_t root_tag; /* Root Group Tag */
+ haddr_t sbe_tag = HADDR_UNDEF; /* Sblock Extension Tag */
/* Testing Macro */
TESTING("tag application during file open");
@@ -643,14 +643,14 @@ static unsigned
check_group_creation_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
- haddr_t root_tag = HADDR_UNDEF; /* Root Group Tag */
- haddr_t g_tag; /* Group Tag */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
+ haddr_t root_tag = HADDR_UNDEF; /* Root Group Tag */
+ haddr_t g_tag; /* Group Tag */
/* Testing Macro */
TESTING("tag application during group creation");
@@ -763,16 +763,16 @@ static unsigned
check_multi_group_creation_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- char gname[16]; /* group name buffer */
- int i = 0; /* iterator */
- hid_t fapl = -1; /* File access prop list */
- haddr_t g_tag = 0; /* Group tag value */
- haddr_t root_tag = 0; /* Root group tag value */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ char gname[16]; /* group name buffer */
+ int i = 0; /* iterator */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
+ haddr_t g_tag = 0; /* Group tag value */
+ haddr_t root_tag = 0; /* Root group tag value */
/* Testing Macro */
TESTING("tag application during multiple group creation");
@@ -805,7 +805,7 @@ check_multi_group_creation_tags(void)
for (i = 0; i < MULTIGROUPS; i++) {
- HDsnprintf(gname, sizeof(gname), "%d", i);
+ snprintf(gname, sizeof(gname), "%d", i);
if ((gid = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(gid) < 0)
@@ -827,7 +827,7 @@ check_multi_group_creation_tags(void)
for (i = 0; i < MULTIGROUPS; i++) {
/* Re-open the group */
- HDsnprintf(gname, sizeof(gname), "%d", i);
+ snprintf(gname, sizeof(gname), "%d", i);
if ((gid = H5Gopen2(fid, gname, H5P_DEFAULT)) < 0)
TEST_ERROR;
@@ -911,18 +911,18 @@ static unsigned
check_link_iteration_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t sid = -1; /* Group Identifier */
- hid_t did = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t did = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- int i = 0; /* iterator */
- haddr_t root_tag = 0; /* Root Group Tag Value */
- char dsetname[500]; /* Name of dataset */
- H5G_info_t ginfo; /* Group Info Struct */
- hid_t fapl = -1; /* File access prop list */
- hid_t root_group = -1; /* Root Group Identifier */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ int i = 0; /* iterator */
+ haddr_t root_tag = 0; /* Root Group Tag Value */
+ char dsetname[500]; /* Name of dataset */
+ H5G_info_t ginfo; /* Group Info Struct */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
+ hid_t root_group = H5I_INVALID_HID; /* Root Group Identifier */
/* Testing Macro */
TESTING("tag application during iteration over links in a group");
@@ -951,7 +951,7 @@ check_link_iteration_tags(void)
/* Create many datasets in root group */
for (i = 0; i < 500; i++) {
- HDsnprintf(dsetname, sizeof(dsetname), "Dset %d", i);
+ snprintf(dsetname, sizeof(dsetname), "Dset %d", i);
if ((did = H5Dcreate2(fid, dsetname, H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
0)
TEST_ERROR;
@@ -1048,19 +1048,19 @@ static unsigned
check_dense_attribute_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t aid = -1; /* File Identifier */
- hid_t sid = -1; /* Group Identifier */
- hid_t did = -1; /* Group Identifier */
- hid_t dcpl = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t aid = H5I_INVALID_HID; /* File Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t did = H5I_INVALID_HID; /* Group Identifier */
+ hid_t dcpl = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- int i = 0; /* iterator */
- hid_t fapl = -1; /* File access property list */
- haddr_t d_tag = 0; /* Dataset tag value */
- haddr_t root_tag = 0; /* Root group tag value */
- char attrname[500]; /* Name of attribute */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ int i = 0; /* iterator */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ haddr_t d_tag = 0; /* Dataset tag value */
+ haddr_t root_tag = 0; /* Root group tag value */
+ char attrname[500]; /* Name of attribute */
/* Testing Macro */
TESTING("tag application during dense attribute manipulation");
@@ -1111,7 +1111,7 @@ check_dense_attribute_tags(void)
for (i = 0; i < 50; i++) {
- HDsnprintf(attrname, sizeof(attrname), "attr %d", i);
+ snprintf(attrname, sizeof(attrname), "attr %d", i);
if ((aid = H5Acreate2(did, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Awrite(aid, H5T_NATIVE_UINT, &i) < 0)
@@ -1278,12 +1278,12 @@ static unsigned
check_group_open_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
@@ -1404,15 +1404,15 @@ static unsigned
check_attribute_creation_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t aid = -1; /* Attribute Identifier */
- hid_t gid = -1; /* Group Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t aid = H5I_INVALID_HID; /* Attribute Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
- haddr_t root_tag = 0; /* Root group tag */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
+ haddr_t root_tag = 0; /* Root group tag */
haddr_t g_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* dimensions */
@@ -1566,14 +1566,14 @@ static unsigned
check_attribute_open_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t aid = -1; /* Attribute Identifier */
- hid_t gid = -1; /* Group Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t aid = H5I_INVALID_HID; /* Attribute Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t g_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -1730,21 +1730,21 @@ static unsigned
check_attribute_rename_tags(hid_t fcpl, int type)
{
/* Variable declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
- hid_t aid = -1; /* Attribute Identifier */
- hid_t sid = -1; /* Dataset Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t aid = H5I_INVALID_HID; /* Attribute Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataset Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- int *data = NULL; /* data buffer */
- int i, j, k = 0; /* iterators */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ int *data = NULL; /* data buffer */
+ int i, j, k = 0; /* iterators */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t g_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* dimensions */
- hbool_t persistent_fsms = FALSE;
+ bool persistent_fsms = false;
/* Testing Macro */
TESTING("tag application during attribute renaming");
@@ -1940,21 +1940,21 @@ static unsigned
check_attribute_delete_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
- hid_t aid = -1; /* Attribute Identifier */
- hid_t sid = -1; /* Dataset Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t aid = H5I_INVALID_HID; /* Attribute Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataset Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- int *data = NULL; /* data buffer */
- int i, j, k = 0; /* iterators */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ int *data = NULL; /* data buffer */
+ int i, j, k = 0; /* iterators */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t g_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* dimensions */
- hbool_t persistent_fsms = FALSE;
+ bool persistent_fsms = false;
/* Testing Macro */
TESTING("tag application during attribute delete");
@@ -2129,16 +2129,16 @@ static unsigned
check_dataset_creation_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -2286,16 +2286,16 @@ static unsigned
check_dataset_creation_earlyalloc_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -2449,16 +2449,16 @@ static unsigned
check_dataset_open_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -2598,16 +2598,16 @@ static unsigned
check_dataset_write_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -2761,16 +2761,16 @@ static unsigned
check_attribute_write_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
- hid_t aid = -1; /* Attribute Identifier */
- hid_t sid = -1; /* Dataset Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
+ hid_t aid = H5I_INVALID_HID; /* Attribute Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataset Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- int *data = NULL; /* data buffer */
- int i, j, k = 0; /* iterators */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ int *data = NULL; /* data buffer */
+ int i, j, k = 0; /* iterators */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t g_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -2945,16 +2945,16 @@ static unsigned
check_dataset_read_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -3104,16 +3104,16 @@ static unsigned
check_dataset_size_retrieval(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -3265,16 +3265,16 @@ check_dataset_extend_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
@@ -3425,12 +3425,12 @@ static unsigned
check_object_info_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
H5O_native_info_t ninfo; /* Native object info struct */
@@ -3557,12 +3557,12 @@ static unsigned
check_object_copy_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t gid = -1; /* Group Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
haddr_t copy_tag;
@@ -3702,17 +3702,17 @@ static unsigned
check_link_removal_tags(hid_t fcpl, int type)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
- hid_t gid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
haddr_t g_tag = 0;
@@ -3888,17 +3888,17 @@ check_link_getname_tags(void)
{
/* Variable Declarations */
char name[500];
- hid_t fid = -1; /* File Identifier */
- hid_t did = -1; /* Dataset Identifier */
- hid_t sid = -1; /* Dataspace Identifier */
- hid_t gid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t did = H5I_INVALID_HID; /* Dataset Identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t dcpl = -1; /* dataset creation pl */
- hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation pl */
+ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
- hid_t fapl = -1; /* File access prop list */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t d_tag = 0;
haddr_t g_tag = 0;
@@ -4063,13 +4063,13 @@ static unsigned
check_external_link_creation_tags(void)
{
/* Variable Declarations */
- hid_t fid = -1; /* File Identifier */
- hid_t fid2 = -1; /* File Identifier */
- hid_t gid = -1; /* Dataspace Identifier */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t fid2 = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
/* Testing Macro */
@@ -4185,16 +4185,16 @@ static unsigned
check_external_link_open_tags(void)
{
/* Variable Declarations */
- haddr_t link_tag = 0; /* link tag */
- hid_t fid = -1; /* File Identifier */
- hid_t fid2 = -1; /* File Identifier */
- hid_t gid = -1; /* Dataspace Identifier */
- hid_t xid = -1; /* Dataspace Identifier */
+ haddr_t link_tag = 0; /* link tag */
+ hid_t fid = H5I_INVALID_HID; /* File Identifier */
+ hid_t fid2 = H5I_INVALID_HID; /* File Identifier */
+ hid_t gid = H5I_INVALID_HID; /* Dataspace Identifier */
+ hid_t xid = H5I_INVALID_HID; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- H5O_native_info_t ninfo; /* Native object info struct */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = false; /* verbose file output */
+#endif /* NDEBUG */
+ H5O_native_info_t ninfo; /* Native object info struct */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
haddr_t root_tag = 0;
haddr_t root2_tag = 0;
@@ -4357,12 +4357,12 @@ check_invalid_tag_application(void)
#ifdef H5C_DO_TAGGING_SANITY_CHECKS
/* Variables */
H5F_t *f = NULL;
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
haddr_t addr;
H5HL_t *lheap = NULL;
- hid_t fapl = -1; /* File access prop list */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
-#endif /* H5C_DO_TAGGING_SANITY_CHECKS */
+ hid_t fapl = H5I_INVALID_HID; /* File access prop list */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
+#endif /* H5C_DO_TAGGING_SANITY_CHECKS */
/* Testing Macro */
TESTING("failure on invalid tag application");
@@ -4382,7 +4382,7 @@ check_invalid_tag_application(void)
/* Push API context */
if (H5CX_push() < 0)
TEST_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get internal file pointer*/
if (NULL == (f = (H5F_t *)H5VL_object(fid)))
@@ -4420,9 +4420,9 @@ check_invalid_tag_application(void)
TEST_ERROR;
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
TEST_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
/* Close open objects and file */
if (H5Fclose(fid) < 0)
@@ -4440,7 +4440,7 @@ check_invalid_tag_application(void)
#ifdef H5C_DO_TAGGING_SANITY_CHECKS
error:
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
return 1;
#endif /* H5C_DO_TAGGING_SANITY_CHECKS */
@@ -4460,18 +4460,18 @@ int
main(void)
{
/* Variable Declarations */
- hid_t fcpl_default = -1; /* file creation prop list */
- hid_t fcpl_shmesg_all = -1; /* file creation prop list */
- hid_t fcpl = -1; /* file creation prop list */
- unsigned nerrs = 0; /* Error Encountered */
- int test_type = 0; /* test type iterator */
+ hid_t fcpl_default = H5I_INVALID_HID; /* file creation prop list */
+ hid_t fcpl_shmesg_all = H5I_INVALID_HID; /* file creation prop list */
+ hid_t fcpl = H5I_INVALID_HID; /* file creation prop list */
+ unsigned nerrs = 0; /* Error Encountered */
+ int test_type = 0; /* test type iterator */
/* Open the HDF5 Library */
H5open();
/* Only run with sec2/default driver */
if (!h5_using_default_driver(NULL)) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ puts(" -- SKIPPED for incompatible VFD --");
exit(EXIT_SUCCESS);
}
@@ -4486,7 +4486,7 @@ main(void)
fcpl_shmesg_all = H5Pcreate(H5P_FILE_CREATE);
H5Pset_shared_mesg_nindexes(fcpl_shmesg_all, 1);
H5Pset_shared_mesg_index(fcpl_shmesg_all, 0, H5O_SHMESG_ALL_FLAG, 20);
- H5Pset_file_space_strategy(fcpl_shmesg_all, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)0);
+ H5Pset_file_space_strategy(fcpl_shmesg_all, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)0);
/* ========= */
/* Run Tests */
diff --git a/test/chunk_info.c b/test/chunk_info.c
index cb79dc1..9533b2a 100644
--- a/test/chunk_info.c
+++ b/test/chunk_info.c
@@ -169,7 +169,7 @@ static int
verify_get_chunk_info(hid_t dset, hid_t dspace, hsize_t chk_index, hsize_t exp_chk_size,
const hsize_t *exp_offset, unsigned exp_flt_msk)
{
- unsigned read_flt_msk = 0; /* Read filter mask */
+ uint32_t read_flt_msk = 0; /* Read filter mask */
hsize_t out_offset[2] = {0, 0}; /* Buffer to get offset coordinates */
hsize_t size = 0; /* Size of an allocated/written chunk */
haddr_t addr = 0; /* Address of an allocated/written chunk */
@@ -210,7 +210,7 @@ error:
static int
verify_get_chunk_info_by_coord(hid_t dset, hsize_t *offset, hsize_t exp_chk_size, unsigned exp_flt_msk)
{
- unsigned read_flt_msk = 0; /* Read filter mask */
+ uint32_t read_flt_msk = 0; /* Read filter mask */
hsize_t size = 0; /* Size of an allocated/written chunk */
haddr_t addr = 0; /* Address of an allocated/written chunk */
@@ -247,7 +247,7 @@ error:
static int
verify_empty_chunk_info(hid_t dset, hsize_t *offset)
{
- unsigned read_flt_msk = 0; /* Read filter mask */
+ uint32_t read_flt_msk = 0; /* Read filter mask */
hsize_t size = 0; /* Size of an allocated/written chunk */
haddr_t addr = 0; /* Address of an allocated/written chunk */
@@ -319,7 +319,7 @@ verify_selected_chunks(hid_t dset, hid_t plist, const hsize_t *start, const hsiz
{
int read_buf[CHUNK_NX][CHUNK_NY];
int expected_buf[NUM_CHUNKS][CHUNK_NX][CHUNK_NY]; /* Expected data */
- unsigned read_flt_msk = 0; /* Filter mask read back */
+ uint32_t read_flt_msk = 0; /* Filter mask read back */
hsize_t offset[2] = {0, 0}; /* Offset coordinates of a chunk */
hsize_t chk_index; /* Chunk index */
hsize_t ii, jj; /* Array indices */
@@ -434,7 +434,7 @@ verify_idx_nchunks(hid_t dset, hid_t dspace, H5D_chunk_index_t exp_idx_type, hsi
/* Ensure the correct chunk indexing scheme is used */
if (idx_type != exp_idx_type) {
char msg[256];
- HDsnprintf(msg, sizeof(msg), "Should be using %s.\n", index_type_str(idx_type));
+ snprintf(msg, sizeof(msg), "Should be using %s.\n", index_type_str(idx_type));
FAIL_PUTS_ERROR(msg);
}
@@ -494,8 +494,8 @@ test_get_chunk_info_highest_v18(hid_t fapl)
haddr_t addr = 0; /* Address of an allocated/written chunk */
hsize_t chk_index = 0; /* Index of a chunk */
hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */
- unsigned flt_msk = 0; /* Filter mask */
- unsigned read_flt_msk = 0; /* Filter mask after direct read */
+ uint32_t flt_msk = 0; /* Filter mask */
+ uint32_t read_flt_msk = 0; /* Filter mask after direct read */
int fillvalue = -1; /* Fill value */
hsize_t offset[2] = {0, 0}; /* Offset coordinates of a chunk */
#ifdef H5_HAVE_FILTER_DEFLATE
@@ -825,8 +825,8 @@ test_chunk_info_single_chunk(const char *filename, hid_t fapl)
hsize_t chunk_dims[2] = {NX, NY}; /* Chunk dimensions */
int data_buf[NX][NY]; /* Input buffer */
H5D_chunk_index_t idx_type; /* Dataset chunk index type */
- unsigned flt_msk = 0; /* Filter mask */
- unsigned read_flt_msk = 0; /* Filter mask after direct read */
+ uint32_t flt_msk = 0; /* Filter mask */
+ uint32_t read_flt_msk = 0; /* Filter mask after direct read */
hsize_t offset[2]; /* Offset coordinates of a chunk */
hsize_t out_offset[2] = {0, 0}; /* Buffer to get offset coordinates */
hsize_t size = 0; /* Size of an allocated/written chunk */
@@ -970,7 +970,7 @@ test_chunk_info_implicit(char *filename, hid_t fapl)
hid_t cparms = H5I_INVALID_HID; /* Creation plist */
hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; /* Chunk dimensions */
- unsigned flt_msk = 0; /* Filter mask */
+ uint32_t flt_msk = 0; /* Filter mask */
hsize_t chk_index = 0; /* Index of a chunk */
hsize_t ii, jj; /* Array indices */
hsize_t start[2] = {START_CHK_X, START_CHK_Y}; /* Start position */
@@ -1089,8 +1089,8 @@ test_chunk_info_fixed_array(const char *filename, hid_t fapl)
hid_t cparms = H5I_INVALID_HID; /* Creation plist */
hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; /* Chunk dimensions */
- unsigned flt_msk = 0; /* Filter mask */
- unsigned read_flt_msk = 0; /* Filter mask after direct read */
+ uint32_t flt_msk = 0; /* Filter mask */
+ uint32_t read_flt_msk = 0; /* Filter mask after direct read */
hsize_t offset[2]; /* Offset coordinates of a chunk */
hsize_t start[2] = {START_CHK_X, START_CHK_Y}; /* Start position */
hsize_t end[2] = {END_CHK_X, END_CHK_Y}; /* End position */
@@ -1233,8 +1233,8 @@ test_chunk_info_extensible_array(const char *filename, hid_t fapl)
hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; /* Chunk dimensions */
hsize_t maxdims[2] = {H5S_UNLIMITED, NY}; /* One unlimited dimension */
- unsigned flt_msk = 0; /* Filter mask */
- unsigned read_flt_msk = 0; /* Filter mask after direct read */
+ uint32_t flt_msk = 0; /* Filter mask */
+ uint32_t read_flt_msk = 0; /* Filter mask after direct read */
hsize_t offset[2]; /* Offset coordinates of a chunk */
hsize_t start[2] = {START_CHK_X, START_CHK_Y}; /* Start position */
hsize_t end[2] = {END_CHK_X, END_CHK_Y}; /* End position */
@@ -1382,8 +1382,8 @@ test_chunk_info_version2_btrees(const char *filename, hid_t fapl)
hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; /* Chunk dimensions */
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* Two unlimited dims */
- unsigned flt_msk = 0; /* Filter mask */
- unsigned read_flt_msk = 0; /* Filter mask after direct read */
+ uint32_t flt_msk = 0; /* Filter mask */
+ uint32_t read_flt_msk = 0; /* Filter mask after direct read */
hsize_t offset[2]; /* Offset coordinates of a chunk */
hsize_t start[2] = {START_CHK_X, START_CHK_Y}; /* Start position */
hsize_t end[2] = {END_CHK_X, END_CHK_Y}; /* End position */
@@ -1579,8 +1579,8 @@ test_basic_query(hid_t fapl)
hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; /* Chunk dimensions */
int direct_buf[CHUNK_NX][CHUNK_NY]; /* Data in chunks */
- unsigned flt_msk = 0; /* Filter mask */
- unsigned read_flt_msk = 0; /* Filter mask after direct read */
+ uint32_t flt_msk = 0; /* Filter mask */
+ uint32_t read_flt_msk = 0; /* Filter mask after direct read */
hsize_t offset[2]; /* Offset coordinates of a chunk */
hsize_t out_offset[2] = {0, 0}; /* Buffer to get offset coordinates */
hsize_t size = 0; /* Size of an allocated/written chunk */
@@ -1797,7 +1797,7 @@ test_failed_attempts(const char *filename, hid_t fapl)
hid_t dset = H5I_INVALID_HID; /* Dataset ID */
hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */
int data_buf[NX][NY]; /* Input buffer */
- unsigned read_flt_msk = 0; /* Filter mask after direct read */
+ uint32_t read_flt_msk = 0; /* Filter mask after direct read */
hsize_t offset[2]; /* Offset coordinates of a chunk */
hsize_t out_offset[2] = {0, 0}; /* Buffer to get offset coordinates */
hsize_t size = 0; /* Size of an allocated/written chunk */
@@ -2009,8 +2009,8 @@ test_flt_msk_with_skip_compress(hid_t fapl)
int check_chunk[CHUNK_NX][CHUNK_NY]; /* Buffer to read data in */
int read_direct_buf[CHUNK_NX][CHUNK_NY]; /* Buffer to read a chunk */
hsize_t read_buf_size = 0; /* buf size */
- unsigned flt_msk = 0; /* Filter mask */
- unsigned read_flt_msk = 0; /* Filter mask after direct read */
+ uint32_t flt_msk = 0; /* Filter mask */
+ uint32_t read_flt_msk = 0; /* Filter mask after direct read */
hsize_t offset[2] = {0, 0}; /* Offset coordinates of a chunk */
hsize_t nchunks = 0; /* Number of chunks */
hsize_t chk_index = 0; /* Index of a chunk */
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index 5e7a6e1..02dbde3 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -19,7 +19,7 @@
#include "h5test.h"
-static const char *FILENAME[] = {"cmpd_dset", "src_subset", "dst_subset", NULL};
+static const char *FILENAME[] = {"cmpd_dset", "src_subset", "dst_subset", "select_cmpd_dset", NULL};
const char *DSET_NAME[] = {"contig_src_subset", "chunk_src_subset", "contig_dst_subset", "chunk_dst_subset",
NULL};
@@ -78,6 +78,17 @@ typedef struct s6_t {
unsigned int post;
} s6_t;
+typedef struct s7_t {
+ int32_t a;
+ int32_t d;
+} s7_t;
+
+typedef struct s8_t {
+ int64_t a;
+ int64_t b;
+ int64_t c;
+} s8_t;
+
/* Structures for testing the optimization for the Chicago company. */
typedef struct {
int a, b, c[8], d, e;
@@ -108,6 +119,1164 @@ typedef struct {
#define NY 2000U
#define PACK_NMEMBS 100
+static void initialize_stype1(unsigned char *buf, size_t num);
+static void initialize_stype2(unsigned char *buf, size_t num);
+static void initialize_stype3(unsigned char *buf, size_t num);
+static void initialize_stype4(unsigned char *buf, size_t num);
+static hid_t create_stype1(void);
+static hid_t create_stype2(void);
+static hid_t create_stype3(void);
+static hid_t create_stype4(void);
+static int compare_data(void *src_data, void *dst_data, hbool_t src_subset);
+static int compare_stype4_data(void *expect_buf, void *rbuf);
+static int compare_s1_data(void *expect_buf, void *rbuf);
+static int compare_s1_s3_data(void *expect_buf, void *rbuf);
+static int compare_s7_data(void *expect_buf, void *rbuf);
+static int compare_a_d_data(void *exp1_buf, void *exp2_buf, void *rbuf);
+static int compare_a_b_c_data(void *exp1_buf, void *exp2_buf, void *rbuf);
+
+/*-------------------------------------------------------------------------
+ * Function: compare_stype4_data
+ *
+ * Purpose: Compare data (the common fields in stype4/stype2) read in rbuf with expected data
+ * in expect_buf.
+ *
+ * Return: Success: 0
+ *
+ * Failure: negative
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+compare_stype4_data(void *expect_buf, void *rbuf)
+{
+ int i;
+
+ for (i = 0; i < (int)(NX * NY); i++) {
+ stype4 *s1_ptr;
+ stype4 *s2_ptr;
+ s1_ptr = ((stype4 *)expect_buf) + i;
+ s2_ptr = ((stype4 *)rbuf) + i;
+
+ if (s1_ptr->a != s2_ptr->a || s1_ptr->b != s2_ptr->b || s1_ptr->c[0] != s2_ptr->c[0] ||
+ s1_ptr->c[1] != s2_ptr->c[1] || s1_ptr->c[2] != s2_ptr->c[2] || s1_ptr->c[3] != s2_ptr->c[3] ||
+ s1_ptr->c[4] != s2_ptr->c[4] || s1_ptr->c[5] != s2_ptr->c[5] || s1_ptr->c[6] != s2_ptr->c[6] ||
+ s1_ptr->c[7] != s2_ptr->c[7] || s1_ptr->d != s2_ptr->d || s1_ptr->e != s2_ptr->e ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->f, s2_ptr->f) || !H5_FLT_ABS_EQUAL(s1_ptr->g, s2_ptr->g) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[0], s2_ptr->h[0]) || !H5_FLT_ABS_EQUAL(s1_ptr->h[1], s2_ptr->h[1]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[2], s2_ptr->h[2]) || !H5_FLT_ABS_EQUAL(s1_ptr->h[3], s2_ptr->h[3]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[4], s2_ptr->h[4]) || !H5_FLT_ABS_EQUAL(s1_ptr->h[5], s2_ptr->h[5]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[6], s2_ptr->h[6]) || !H5_FLT_ABS_EQUAL(s1_ptr->h[7], s2_ptr->h[7]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[8], s2_ptr->h[8]) || !H5_FLT_ABS_EQUAL(s1_ptr->h[9], s2_ptr->h[9]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[10], s2_ptr->h[10]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[11], s2_ptr->h[11]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[12], s2_ptr->h[12]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[13], s2_ptr->h[13]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[14], s2_ptr->h[14]) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->h[15], s2_ptr->h[15]) || !H5_FLT_ABS_EQUAL(s1_ptr->i, s2_ptr->i) ||
+ !H5_FLT_ABS_EQUAL(s1_ptr->j, s2_ptr->j) || !H5_DBL_ABS_EQUAL(s1_ptr->k, s2_ptr->k) ||
+ !H5_DBL_ABS_EQUAL(s1_ptr->l, s2_ptr->l) || !H5_DBL_ABS_EQUAL(s1_ptr->m, s2_ptr->m) ||
+ !H5_DBL_ABS_EQUAL(s1_ptr->n, s2_ptr->n) || s1_ptr->o != s2_ptr->o || s1_ptr->p != s2_ptr->p ||
+ s1_ptr->q != s2_ptr->q) {
+ H5_FAILED();
+ printf(" i=%d\n", i);
+ printf(" exp_buf={a=%d, b=%d, c=[%d,%d,%d,%d,%d,%d,%d,%d], d=%d, e=%d, f=%f, g=%f, "
+ "h=[%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f], i=%f, j=%f, k=%f, l=%f, m=%f, n=%f, "
+ "o=%ld, p=%ld, q=%ld}\n",
+ s1_ptr->a, s1_ptr->b, s1_ptr->c[0], s1_ptr->c[1], s1_ptr->c[2], s1_ptr->c[3], s1_ptr->c[4],
+ s1_ptr->c[5], s1_ptr->c[6], s1_ptr->c[7], s1_ptr->d, s1_ptr->e, (double)s1_ptr->f,
+ (double)s1_ptr->g, (double)s1_ptr->h[0], (double)s1_ptr->h[1], (double)s1_ptr->h[2],
+ (double)s1_ptr->h[3], (double)s1_ptr->h[4], (double)s1_ptr->h[5], (double)s1_ptr->h[6],
+ (double)s1_ptr->h[7], (double)s1_ptr->h[8], (double)s1_ptr->h[9], (double)s1_ptr->h[10],
+ (double)s1_ptr->h[11], (double)s1_ptr->h[12], (double)s1_ptr->h[13], (double)s1_ptr->h[14],
+ (double)s1_ptr->h[15], (double)s1_ptr->i, (double)s1_ptr->j, s1_ptr->k, s1_ptr->l,
+ s1_ptr->m, s1_ptr->n, s1_ptr->o, s1_ptr->p, s1_ptr->q);
+ printf(" rbuf={a=%d, b=%d, c=[%d,%d,%d,%d,%d,%d,%d,%d], d=%d, e=%d, f=%f, g=%f, "
+ "h=[%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f], i=%f, j=%f, k=%f, l=%f, m=%f, n=%f, "
+ "o=%ld, p=%ld, q=%ld}\n",
+ s2_ptr->a, s2_ptr->b, s2_ptr->c[0], s2_ptr->c[1], s2_ptr->c[2], s2_ptr->c[3], s2_ptr->c[4],
+ s2_ptr->c[5], s2_ptr->c[6], s2_ptr->c[7], s2_ptr->d, s2_ptr->e, (double)s2_ptr->f,
+ (double)s2_ptr->g, (double)s2_ptr->h[0], (double)s2_ptr->h[1], (double)s2_ptr->h[2],
+ (double)s2_ptr->h[3], (double)s2_ptr->h[4], (double)s2_ptr->h[5], (double)s2_ptr->h[6],
+ (double)s2_ptr->h[7], (double)s2_ptr->h[8], (double)s2_ptr->h[9], (double)s2_ptr->h[10],
+ (double)s2_ptr->h[11], (double)s2_ptr->h[12], (double)s2_ptr->h[13], (double)s2_ptr->h[14],
+ (double)s2_ptr->h[15], (double)s2_ptr->i, (double)s2_ptr->j, s2_ptr->k, s2_ptr->l,
+ s2_ptr->m, s2_ptr->n, s1_ptr->o, s1_ptr->p, s1_ptr->q);
+
+ goto error;
+ }
+ } /* end for */
+
+ return SUCCEED;
+
+error:
+ return FAIL;
+
+} /* compare_stype4_data() */
+
+/*-------------------------------------------------------------------------
+ * Function: compare_s1_data
+ *
+ * Purpose: Compare data (s1_t) read in rbuf with expected data in expect_buf.
+ *
+ * Return: Success: 0
+ *
+ * Failure: negative
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+compare_s1_data(void *expect_buf, void *rbuf)
+{
+ int i;
+ s1_t *s1_ptr;
+ s1_t *s2_ptr;
+
+ /* Compare save_s1 with rbuf1. They should be the same */
+ for (i = 0; i < (int)(NX * NY); i++) {
+ s1_ptr = ((s1_t *)expect_buf) + i;
+ s2_ptr = ((s1_t *)rbuf) + i;
+
+ if (s1_ptr->a != s2_ptr->a || s1_ptr->b != s2_ptr->b || s1_ptr->c[0] != s2_ptr->c[0] ||
+ s1_ptr->c[1] != s2_ptr->c[1] || s1_ptr->c[2] != s2_ptr->c[2] || s1_ptr->c[3] != s2_ptr->c[3] ||
+ s1_ptr->d != s2_ptr->d || s1_ptr->e != s2_ptr->e) {
+ H5_FAILED();
+ printf(" i=%d\n", i);
+ puts(" Incorrect values read from the file");
+ goto error;
+ }
+ }
+
+ return SUCCEED;
+
+error:
+ return FAIL;
+
+} /* compare_s1_data() */
+
+/*-------------------------------------------------------------------------
+ * Function: compare_s1_s3_data
+ *
+ * Purpose: Compare data (s1_t/s3_t) read in rbuf with expected data in expect_buf.
+ *
+ * Return: Success: 0
+ *
+ * Failure: negative
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+compare_s1_s3_data(void *expect_buf, void *rbuf)
+{
+ int i;
+ s1_t *s1_ptr;
+ s3_t *s2_ptr;
+
+ for (i = 0; i < (int)(NX * NY); i++) {
+ s1_ptr = ((s1_t *)expect_buf) + i;
+ s2_ptr = ((s3_t *)rbuf) + i;
+
+ if (s1_ptr->a != s2_ptr->a || s1_ptr->b != s2_ptr->b || s1_ptr->c[0] != s2_ptr->c[0] ||
+ s1_ptr->c[1] != s2_ptr->c[1] || s1_ptr->c[2] != s2_ptr->c[2] || s1_ptr->c[3] != s2_ptr->c[3] ||
+ s1_ptr->d != s2_ptr->d || s1_ptr->e != s2_ptr->e) {
+ H5_FAILED();
+ printf(" i=%d\n", i);
+ puts(" Incorrect values read from the file");
+ goto error;
+ }
+ }
+
+ return SUCCEED;
+
+error:
+ return FAIL;
+
+} /* compare_s1_s3_data() */
+
+/*-------------------------------------------------------------------------
+ * Function: compare_s7_data
+ *
+ * Purpose: Compare data (s7_t) read in rbuf with expected data in expect_buf.
+ *
+ * Return: Success: 0
+ *
+ * Failure: negative
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+compare_s7_data(void *expect_buf, void *rbuf)
+{
+ int i;
+ s7_t *s1_ptr;
+ s7_t *s2_ptr;
+
+ for (i = 0; i < (int)(NX * NY); i++) {
+ s1_ptr = ((s7_t *)expect_buf) + i;
+ s2_ptr = ((s7_t *)rbuf) + i;
+
+ /* Compare only the data */
+ if (s1_ptr->a != s2_ptr->a || s1_ptr->d != s2_ptr->d) {
+ H5_FAILED();
+ printf(" i=%d\n", i);
+ printf(" expect_buf:a=%d, d=%d\n", s1_ptr->a, s1_ptr->d);
+ printf(" rbuf:a=%d, d=%d", s2_ptr->a, s2_ptr->d);
+ goto error;
+ }
+ } /* end for */
+
+ return SUCCEED;
+
+error:
+ return FAIL;
+
+} /* compare_s7_data() */
+
+/*-------------------------------------------------------------------------
+ * Function: compare_s7_s8_data
+ *
+ * Purpose: Compare data read in rbuf with expected data
+ * in expect_buf: save_s7, save_s8.
+ *
+ * Return: Success: 0
+ *
+ * Failure: negative
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+compare_a_d_data(void *exp1_buf, void *exp2_buf, void *rbuf)
+{
+ int i;
+ s7_t *s1_ptr;
+ s8_t *s2_ptr;
+ s7_t *rbuf_ptr;
+
+ for (i = 0; i < (int)(NX * NY); i++) {
+ s1_ptr = ((s7_t *)exp1_buf) + i;
+ s2_ptr = ((s8_t *)exp2_buf) + i;
+ rbuf_ptr = ((s7_t *)rbuf) + i;
+
+ if (s2_ptr->a != rbuf_ptr->a || s1_ptr->d != rbuf_ptr->d) {
+ H5_FAILED();
+ printf(" i=%d\n", i);
+ printf(" expect_buf:a=%d, d=%d\n", (int32_t)s2_ptr->a, s1_ptr->d);
+ printf(" rbuf: a=%d, d=%d", rbuf_ptr->a, rbuf_ptr->d);
+ goto error;
+ }
+ } /* end for */
+
+ return SUCCEED;
+
+error:
+ return FAIL;
+
+} /* compare_a_d_data() */
+
+/*-------------------------------------------------------------------------
+ * Function: compare_a_b_c_data
+ *
+ * Purpose: Compare data read in rbuf with expected data
+ * in expect_buf: save_s8, save_rbuf8.
+ *
+ * Return: Success: 0
+ *
+ * Failure: negative
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+compare_a_b_c_data(void *exp1_buf, void *exp2_buf, void *rbuf)
+{
+ int i;
+ s8_t *s1_ptr;
+ s8_t *s2_ptr;
+ s8_t *rbuf_ptr;
+
+ for (i = 0; i < (int)(NX * NY); i++) {
+ s1_ptr = ((s8_t *)exp1_buf) + i;
+ s2_ptr = ((s8_t *)exp2_buf) + i;
+ rbuf_ptr = ((s8_t *)rbuf) + i;
+
+ if (s1_ptr->a != rbuf_ptr->a || s2_ptr->b != rbuf_ptr->b || s2_ptr->c != rbuf_ptr->c) {
+ H5_FAILED();
+ printf(" i=%d\n", i);
+ printf(" expect_buf:a=%ld, b=%ld, c=%ld\n", s1_ptr->a, s2_ptr->b, s2_ptr->c);
+ printf(" rbuf: a=%ld, b=%ld, c=%ld", rbuf_ptr->a, rbuf_ptr->b, rbuf_ptr->c);
+ goto error;
+ }
+ } /* end for */
+
+ return SUCCEED;
+
+error:
+ return FAIL;
+
+} /* compare_a_b_c_data() */
+
+/*-------------------------------------------------------------------------
+ * Function: test_select_src_subset
+ *
+ * Purpose: This is derived from test_hdf5_src_subset() for selection
+ * I/O testing:
+ *
+ * Test the optimization of compound data writing, rewriting,
+ * and reading when the source type is a subset of the destination
+ * type. For example:
+ * struct source { struct destination {
+ * TYPE1 A; --> TYPE1 A;
+ * TYPE2 B; --> TYPE2 B;
+ * TYPE3 C; --> TYPE3 C;
+ * }; TYPE4 D;
+ * TYPE5 E;
+ * };
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_select_src_subset(char *fname, hid_t fapl, hid_t in_dxpl, unsigned set_fillvalue, unsigned set_buf)
+{
+ hid_t fid = H5I_INVALID_HID;
+ hid_t rew_tid = H5I_INVALID_HID, src_tid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t dxpl = H5I_INVALID_HID;
+ hsize_t dims[2] = {NX, NY};
+ hsize_t chunk_dims[2] = {NX / 10, NY / 10};
+ unsigned char *rew_buf = NULL, *save_rew_buf = NULL, *rbuf = NULL;
+ int fillvalue = (-1);
+ size_t ss, ss1, ss2;
+
+ /* Create the file for this test */
+ if ((fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ goto error;
+
+ /* Build hdf5 datatypes */
+ if ((src_tid = create_stype1()) < 0)
+ goto error;
+
+ if ((rew_tid = create_stype3()) < 0)
+ goto error;
+
+ /* Create the data space */
+ if ((sid = H5Screate_simple(2, dims, NULL)) < 0)
+ goto error;
+
+ /* Allocate space and initialize data */
+ rbuf = (unsigned char *)calloc(NX * NY, sizeof(stype3));
+
+ rew_buf = (unsigned char *)calloc(NX * NY, sizeof(stype3));
+ initialize_stype3(rew_buf, (size_t)NX * NY);
+
+ /* Save a copy as the buffer may be clobbered due to H5Pset_modify_write_buf() */
+ save_rew_buf = (unsigned char *)calloc(NX * NY, sizeof(stype3));
+ initialize_stype3(save_rew_buf, (size_t)NX * NY);
+
+ /* Create dataset creation property list */
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto error;
+
+ /*
+ * Create contiguous and chunked datasets.
+ * Write to the datasets in a different compound subset order
+ */
+ printf(" test_select_src_subset(): writing data to contiguous and chunked datasets");
+
+ if (set_fillvalue) {
+ if (H5Pset_fill_value(dcpl, src_tid, &fillvalue) < 0)
+ goto error;
+ }
+
+ dxpl = H5Pcopy(in_dxpl);
+ if (set_buf) {
+ ss1 = H5Tget_size(rew_tid);
+ ss2 = H5Tget_size(src_tid);
+ ss = MAX(ss1, ss2) * NX * NY;
+
+ if (H5Pset_buffer(dxpl, ss, NULL, NULL) < 0)
+ goto error;
+ }
+
+ /* Create contiguous data set */
+ if ((did = H5Dcreate2(fid, DSET_NAME[0], src_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Write to the dataset with rew_tid */
+ if (H5Dwrite(did, rew_tid, H5S_ALL, H5S_ALL, dxpl, rew_buf) < 0)
+ goto error;
+
+ if (H5Dread(did, rew_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0)
+ goto error;
+
+ if (memcmp(save_rew_buf, rbuf, sizeof(stype3) * NX * NY) != 0)
+ goto error;
+
+ if (H5Dclose(did) < 0)
+ goto error;
+
+ /* Set chunking */
+ if (H5Pset_chunk(dcpl, 2, chunk_dims) < 0)
+ goto error;
+
+ /* Create chunked data set */
+ if ((did = H5Dcreate2(fid, DSET_NAME[1], src_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Write to the dataset with rew_tid */
+ if (H5Dwrite(did, rew_tid, H5S_ALL, H5S_ALL, dxpl, rew_buf) < 0)
+ FAIL_STACK_ERROR;
+
+ if (H5Dread(did, rew_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0)
+ goto error;
+
+ if (memcmp(save_rew_buf, rbuf, sizeof(stype3) * NX * NY) != 0)
+ goto error;
+
+ if (H5Dclose(did) < 0)
+ goto error;
+
+ /* Finishing test and release resources */
+ if (H5Sclose(sid) < 0)
+ FAIL_STACK_ERROR;
+
+ if (H5Pclose(dcpl) < 0)
+ FAIL_STACK_ERROR;
+
+ if (H5Pclose(dxpl) < 0)
+ FAIL_STACK_ERROR;
+
+ if (H5Tclose(src_tid) < 0)
+ FAIL_STACK_ERROR;
+
+ if (H5Tclose(rew_tid) < 0)
+ FAIL_STACK_ERROR;
+
+ if (H5Fclose(fid) < 0)
+ FAIL_STACK_ERROR;
+
+ free(rbuf);
+ free(rew_buf);
+ free(save_rew_buf);
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ H5Sclose(sid);
+ H5Pclose(dcpl);
+ H5Pclose(dxpl);
+ H5Dclose(did);
+ H5Fclose(fid);
+ H5Tclose(src_tid);
+ H5Tclose(rew_tid);
+ }
+ H5E_END_TRY
+
+ if (rbuf)
+ free(rbuf);
+ if (rew_buf)
+ free(rew_buf);
+ if (save_rew_buf)
+ free(save_rew_buf);
+
+ printf("\n*** SELECT SRC SUBSET TEST FAILED ***\n");
+ return 1;
+} /* test_select_src_subset() */
+
+/*-------------------------------------------------------------------------
+ * Function: test_select_dst_subset
+ *
+ * Purpose: This is derived from test_hdf5_dst_subset() for selection
+ * I/O testing:
+
+ * Test the optimization of compound data writing, rewriting,
+ * and reading when the destination type is a subset of the
+ * source type. For example:
+ * struct source { struct destination {
+ * TYPE1 A; --> TYPE1 A;
+ * TYPE2 B; --> TYPE2 B;
+ * TYPE3 C; --> TYPE3 C;
+ * TYPE4 D; }
+ * TYPE5 E;
+ * };
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_select_dst_subset(char *fname, hid_t fapl, hid_t in_dxpl, unsigned set_fillvalue, unsigned set_buf)
+{
+ hid_t fid = H5I_INVALID_HID;
+ hid_t rew_tid = H5I_INVALID_HID, src_tid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t dxpl = H5I_INVALID_HID;
+ hsize_t dims[2] = {NX, NY};
+ hsize_t chunk_dims[2] = {NX / 10, NY / 10};
+ unsigned char *rew_buf = NULL, *save_rew_buf = NULL, *rbuf = NULL;
+ int fillvalue = (-1);
+ size_t ss, ss1, ss2;
+
+ /* Create the file for this test */
+ if ((fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ goto error;
+
+ /* Build hdf5 datatypes */
+ if ((src_tid = create_stype2()) < 0)
+ goto error;
+
+ if ((rew_tid = create_stype4()) < 0)
+ goto error;
+
+ /* Create the data space */
+ if ((sid = H5Screate_simple(2, dims, NULL)) < 0)
+ goto error;
+
+ rbuf = (unsigned char *)calloc(NX * NY, sizeof(stype4));
+
+ rew_buf = (unsigned char *)calloc(NX * NY, sizeof(stype4));
+ initialize_stype4(rew_buf, (size_t)NX * NY);
+
+ /* Save a copy as the buffer may be clobbered due to H5Pset_modify_write_buf() */
+ save_rew_buf = (unsigned char *)calloc(NX * NY, sizeof(stype4));
+ initialize_stype4(save_rew_buf, (size_t)NX * NY);
+
+ /* Create dataset creation property list */
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto error;
+
+ /*
+ * Write data to contiguous and chunked datasets.
+ */
+ printf(" test_select_dst_subset(): writing data to contiguous and chunked datasets");
+
+ if (set_fillvalue) {
+ if (H5Pset_fill_value(dcpl, src_tid, &fillvalue) < 0)
+ goto error;
+ }
+
+ dxpl = H5Pcopy(in_dxpl);
+ if (set_buf) {
+ ss1 = H5Tget_size(rew_tid);
+ ss2 = H5Tget_size(src_tid);
+ ss = MAX(ss1, ss2) * NX * NY;
+
+ if (H5Pset_buffer(dxpl, ss, NULL, NULL) < 0)
+ goto error;
+ }
+
+ /* Create contiguous data set */
+ if ((did = H5Dcreate2(fid, DSET_NAME[2], src_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Write to the dataset with rew_tid */
+ if (H5Dwrite(did, rew_tid, H5S_ALL, H5S_ALL, dxpl, rew_buf) < 0)
+ goto error;
+
+ /* Read from the dataset with rew_tid */
+ if (H5Dread(did, rew_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0)
+ goto error;
+
+ if (compare_stype4_data(save_rew_buf, rbuf) < 0)
+ goto error;
+
+ if (H5Dclose(did) < 0)
+ goto error;
+
+ /* Set chunking */
+ if (H5Pset_chunk(dcpl, 2, chunk_dims) < 0)
+ goto error;
+
+ /* Create chunked data set */
+ if ((did = H5Dcreate2(fid, DSET_NAME[3], src_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ initialize_stype4(rew_buf, (size_t)NX * NY);
+
+ /* Write data to the dataset with rew_tid */
+ if (H5Dwrite(did, rew_tid, H5S_ALL, H5S_ALL, dxpl, rew_buf) < 0)
+ goto error;
+
+ /* Read frm the dataset with rew_tid */
+ if (H5Dread(did, rew_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0)
+ goto error;
+
+ if (compare_stype4_data(save_rew_buf, rbuf) < 0)
+ goto error;
+
+ if (H5Dclose(did) < 0)
+ goto error;
+
+ /* Finishing test and release resources */
+ if (H5Sclose(sid) < 0)
+ goto error;
+
+ if (H5Pclose(dcpl) < 0)
+ goto error;
+
+ if (H5Pclose(dxpl) < 0)
+ FAIL_STACK_ERROR;
+
+ if (H5Tclose(src_tid) < 0)
+ goto error;
+
+ if (H5Tclose(rew_tid) < 0)
+ goto error;
+ if (H5Fclose(fid) < 0)
+ goto error;
+
+ free(rbuf);
+ free(rew_buf);
+ free(save_rew_buf);
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ H5Sclose(sid);
+ H5Pclose(dcpl);
+ H5Pclose(dxpl);
+ H5Dclose(did);
+ H5Fclose(fid);
+ H5Tclose(src_tid);
+ H5Tclose(rew_tid);
+ }
+ H5E_END_TRY
+
+ if (rbuf)
+ free(rbuf);
+ if (rew_buf)
+ free(rew_buf);
+ if (save_rew_buf)
+ free(save_rew_buf);
+
+ printf("\n*** SELECT DST SUBSET TEST FAILED ***\n");
+ return 1;
+} /* test_select_dst_subset */
+
+/*-------------------------------------------------------------------------
+ * Function: test_select_compound
+ *
+ * Purpose: This is derived from test_comppound() for selection I/O
+ * testing:
+ *
+ * --Creates a simple dataset of a compound type and then
+ * writes it in original and reverse order.
+ * --Creates another dataset to verify the CI window
+ * is fixed.
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_select_compound(char *fname, hid_t fapl, hid_t in_dxpl, unsigned set_fillvalue, unsigned set_buf)
+{
+ hid_t s1_tid = H5I_INVALID_HID;
+ hid_t s3_tid = H5I_INVALID_HID;
+ hid_t s7_tid = H5I_INVALID_HID;
+ hid_t s8_tid = H5I_INVALID_HID;
+
+ /* Buffers */
+ s1_t *s1 = NULL;
+ s1_t *save_s1 = NULL;
+ s3_t *s3 = NULL;
+ s3_t *save_s3 = NULL;
+ s1_t *rbuf1 = NULL;
+ s3_t *rbuf3 = NULL;
+
+ s7_t *s7 = NULL;
+ s7_t *save_s7 = NULL;
+ s7_t *rbuf7 = NULL;
+
+ s8_t *s8 = NULL;
+ s8_t *save_s8 = NULL;
+ s8_t *rbuf8 = NULL;
+ s8_t *save_rbuf8 = NULL;
+
+ /* Other variables */
+ unsigned int i;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t dxpl = H5I_INVALID_HID;
+ hid_t array_dt = H5I_INVALID_HID;
+ static hsize_t dim[] = {NX, NY};
+ int fillvalue = (-1);
+ size_t ss = 0, ss1 = 0, ss2 = 0;
+ hsize_t memb_size[1] = {4};
+
+ /* Allocate buffers */
+ if (NULL == (s1 = (s1_t *)calloc(NX * NY, sizeof(s1_t))))
+ goto error;
+ if (NULL == (save_s1 = (s1_t *)calloc(NX * NY, sizeof(s1_t))))
+ goto error;
+ if (NULL == (rbuf1 = (s1_t *)calloc(NX * NY, sizeof(s1_t))))
+ goto error;
+ if (NULL == (s3 = (s3_t *)calloc(NX * NY, sizeof(s3_t))))
+ goto error;
+ if (NULL == (save_s3 = (s3_t *)calloc(NX * NY, sizeof(s3_t))))
+ goto error;
+ if (NULL == (rbuf3 = (s3_t *)calloc(NX * NY, sizeof(s3_t))))
+ goto error;
+
+ if (NULL == (s7 = (s7_t *)calloc(NX * NY, sizeof(s7_t))))
+ goto error;
+ if (NULL == (save_s7 = (s7_t *)calloc(NX * NY, sizeof(s7_t))))
+ goto error;
+ if (NULL == (rbuf7 = (s7_t *)calloc(NX * NY, sizeof(s7_t))))
+ goto error;
+
+ if (NULL == (s8 = (s8_t *)calloc(NX * NY, sizeof(s8_t))))
+ goto error;
+ if (NULL == (save_s8 = (s8_t *)calloc(NX * NY, sizeof(s8_t))))
+ goto error;
+ if (NULL == (rbuf8 = (s8_t *)calloc(NX * NY, sizeof(s8_t))))
+ goto error;
+ if (NULL == (save_rbuf8 = (s8_t *)calloc(NX * NY, sizeof(s8_t))))
+ goto error;
+
+ /* Create the file */
+ if ((fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) {
+ goto error;
+ }
+
+ /* Create the data space */
+ if ((sid = H5Screate_simple(2, dim, NULL)) < 0)
+ goto error;
+
+ /* Create dataset creation property list */
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto error;
+
+ /* Create a copy of the incoming dataset transfer property list */
+ if ((dxpl = H5Pcopy(in_dxpl)) < 0)
+ goto error;
+
+ /*
+ * Create and write to the dataset in original compound struct members order
+ */
+ printf(" test_select_compound(): basic compound write");
+
+ /* Initialize buffer with s1_t */
+ for (i = 0; i < NX * NY; i++) {
+ s1[i].a = 8 * i + 0;
+ s1[i].b = 2000 + 2 * i;
+ s1[i].c[0] = 8 * i + 2;
+ s1[i].c[1] = 8 * i + 3;
+ s1[i].c[2] = 8 * i + 4;
+ s1[i].c[3] = 8 * i + 5;
+ s1[i].d = 2001 + 2 * i;
+ s1[i].e = 8 * i + 7;
+ }
+ memcpy(save_s1, s1, sizeof(s1_t) * NX * NY);
+
+ /* Create file type s1_t */
+ if ((s1_tid = H5Tcreate(H5T_COMPOUND, sizeof(s1_t))) < 0)
+ goto error;
+ array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, memb_size);
+ if (H5Tinsert(s1_tid, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(s1_tid, "b", HOFFSET(s1_t, b), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(s1_tid, "c", HOFFSET(s1_t, c), array_dt) < 0 ||
+ H5Tinsert(s1_tid, "d", HOFFSET(s1_t, d), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(s1_tid, "e", HOFFSET(s1_t, e), H5T_NATIVE_INT) < 0)
+ goto error;
+ H5Tclose(array_dt);
+
+ /* Set fill value accordingly */
+ if (set_fillvalue) {
+ if (H5Pset_fill_value(dcpl, s1_tid, &fillvalue) < 0)
+ goto error;
+ }
+
+ /* Create the dataset with file type s1_tid */
+ if ((did = H5Dcreate2(fid, "s1", s1_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Set buffer size accordingly */
+ if (set_buf) {
+ ss1 = H5Tget_size(s1_tid);
+
+ if (H5Pset_buffer(dxpl, ss1, NULL, NULL) < 0)
+ goto error;
+ }
+
+ /* Write to the dataset with file type s1_tid */
+ if (H5Dwrite(did, s1_tid, H5S_ALL, H5S_ALL, dxpl, s1) < 0)
+ goto error;
+
+ /* Read from the dataset with file type s1_tid */
+ if (H5Dread(did, s1_tid, H5S_ALL, H5S_ALL, dxpl, rbuf1) < 0)
+ goto error;
+
+ /* Verify data is correct */
+ if (compare_s1_data(save_s1, rbuf1) < 0)
+ goto error;
+
+ PASSED();
+
+ /*
+ * Write to the dataset with s3 memory buffer. This buffer
+ * has the same data space but the data type is different: the
+ * data type is a struct whose members are in the opposite order.
+ */
+ printf(" test_select_compound(): reversal of struct members");
+
+ /* Create mem type s3_tid */
+ if ((s3_tid = H5Tcreate(H5T_COMPOUND, sizeof(s3_t))) < 0)
+ goto error;
+ array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, memb_size);
+ if (H5Tinsert(s3_tid, "a", HOFFSET(s3_t, a), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(s3_tid, "b", HOFFSET(s3_t, b), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(s3_tid, "c", HOFFSET(s3_t, c), array_dt) < 0 ||
+ H5Tinsert(s3_tid, "d", HOFFSET(s3_t, d), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(s3_tid, "e", HOFFSET(s3_t, e), H5T_NATIVE_INT) < 0)
+ goto error;
+ H5Tclose(array_dt);
+
+ /* Initialize buffer with s3_t */
+ for (i = 0; i < NX * NY; i++) {
+ s3[i].a = 8 * i + 0;
+ s3[i].b = 2000 + 2 * i;
+ s3[i].c[0] = 8 * i + 2;
+ s3[i].c[1] = 8 * i + 3;
+ s3[i].c[2] = 8 * i + 4;
+ s3[i].c[3] = 8 * i + 5;
+ s3[i].d = 2001 + 2 * i;
+ s3[i].e = 8 * i + 7;
+ }
+
+ memcpy(save_s3, s3, sizeof(s3_t) * NX * NY);
+
+ /* Set buffer size accordingly */
+ if (set_buf) {
+ /* ss1 is set already previously */
+ ss2 = H5Tget_size(s3_tid);
+ ss = MAX(ss1, ss2) * NX * NY;
+
+ if (H5Pset_buffer(dxpl, ss, NULL, NULL) < 0)
+ goto error;
+ }
+
+ /* Read from the dataset with mem type s3_tid */
+ if (H5Dread(did, s3_tid, H5S_ALL, H5S_ALL, dxpl, rbuf3) < 0)
+ goto error;
+
+ if (compare_s1_s3_data(save_s1, rbuf3) < 0)
+ goto error;
+
+ if (H5Dclose(did) < 0)
+ goto error;
+
+ PASSED();
+
+ printf(" test_select_compound(): verify fix for non-optimized compound conversions with memory type "
+ "larger than file ");
+
+ /* Create file type s7_tid */
+ if ((s7_tid = H5Tcreate(H5T_COMPOUND, sizeof(s7_t))) < 0)
+ goto error;
+
+ if (H5Tinsert(s7_tid, "a", HOFFSET(s7_t, a), H5T_NATIVE_INT32) < 0 ||
+ H5Tinsert(s7_tid, "d", HOFFSET(s7_t, d), H5T_NATIVE_INT32) < 0)
+ goto error;
+
+ /* Initialize buffer with s7_t */
+ for (i = 0; i < NX * NY; i++) {
+ s7[i].a = (int32_t)(2 * i);
+ s7[i].d = (int32_t)(2 * i + 1);
+ }
+ memcpy(save_s7, s7, sizeof(s7_t) * NX * NY);
+
+ /* Create mem type s8_tid */
+ if ((s8_tid = H5Tcreate(H5T_COMPOUND, sizeof(s8_t))) < 0)
+ goto error;
+
+ if (H5Tinsert(s8_tid, "a", HOFFSET(s8_t, a), H5T_NATIVE_INT64) < 0 ||
+ H5Tinsert(s8_tid, "b", HOFFSET(s8_t, b), H5T_NATIVE_INT64) < 0 ||
+ H5Tinsert(s8_tid, "c", HOFFSET(s8_t, c), H5T_NATIVE_INT64) < 0)
+ goto error;
+
+ /* Initialize buffer with s8_t */
+ for (i = 0; i < NX * NY; i++) {
+ s8[i].a = (int64_t)(2 * NX * NY + 3 * i);
+ s8[i].b = (int64_t)(2 * NX * NY + 3 * i + 1);
+ s8[i].c = (int64_t)(2 * NX * NY + 3 * i + 2);
+ }
+ memcpy(save_s8, s8, sizeof(s8_t) * NX * NY);
+
+ /* Set fill value accordingly */
+ if (set_fillvalue) {
+ if (H5Pset_fill_value(dcpl, s7_tid, &fillvalue) < 0)
+ goto error;
+ }
+
+ /* Set buffer size accordingly */
+ if (set_buf) {
+ ss1 = H5Tget_size(s7_tid);
+ ss2 = H5Tget_size(s8_tid);
+ ss = MAX(ss1, ss2) * NX * NY;
+
+ if (H5Pset_buffer(dxpl, ss, NULL, NULL) < 0)
+ goto error;
+ }
+
+ /* Create dataset with file type s7_tid */
+ if ((did = H5Dcreate2(fid, "ss", s7_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Write to the dataset with mem type s7_tid */
+ if (H5Dwrite(did, s7_tid, H5S_ALL, H5S_ALL, dxpl, s7) < 0)
+ goto error;
+
+ /* Read from the dataset with mem type s7_tid */
+ if (H5Dread(did, s7_tid, H5S_ALL, H5S_ALL, dxpl, rbuf7) < 0)
+ goto error;
+
+ /* Verify data read is correct */
+ if (compare_s7_data(save_s7, rbuf7) < 0)
+ goto error;
+
+ /* Write to the dataset with mem type s8_tid */
+ if (H5Dwrite(did, s8_tid, H5S_ALL, H5S_ALL, dxpl, s8) < 0)
+ goto error;
+
+ /* Read from the dataset with mem type s7_tid */
+ memset(rbuf7, 0, NX * NY * sizeof(s7_t));
+ if (H5Dread(did, s7_tid, H5S_ALL, H5S_ALL, dxpl, rbuf7) < 0)
+ goto error;
+
+ /* Verify a: save_s8, d: save_s7 */
+ if (compare_a_d_data(save_s7, save_s8, rbuf7) < 0)
+ goto error;
+
+ /* Initialize read buffer of s8_t with unique values */
+ for (i = 0; i < NX * NY; i++) {
+ rbuf8[i].a = (int64_t)(5 * NX * NY + 3 * i);
+ rbuf8[i].b = (int64_t)(5 * NX * NY + 3 * i + 1);
+ rbuf8[i].c = (int64_t)(5 * NX * NY + 3 * i + 2);
+ }
+ memcpy(save_rbuf8, rbuf8, sizeof(s8_t) * NX * NY);
+
+ /* Read from the dataset with mem type s8_tid */
+ if (H5Dread(did, s8_tid, H5S_ALL, H5S_ALL, dxpl, rbuf8) < 0)
+ goto error;
+
+ /* Verify a: save_s8; b, c: save_rbuf8 */
+ if (compare_a_b_c_data(save_s8, save_rbuf8, rbuf8) < 0)
+ goto error;
+
+ if (H5Dclose(did) < 0)
+ goto error;
+
+ PASSED();
+
+ /*
+ * Release resources.
+ */
+ if (H5Sclose(sid) < 0)
+ goto error;
+
+ if (H5Pclose(dcpl) < 0)
+ goto error;
+
+ if (H5Pclose(dxpl) < 0)
+ goto error;
+
+ if (H5Tclose(s1_tid) < 0)
+ goto error;
+
+ if (H5Tclose(s3_tid) < 0)
+ goto error;
+
+ if (H5Tclose(s7_tid) < 0)
+ goto error;
+
+ if (H5Tclose(s8_tid) < 0)
+ goto error;
+
+ if (H5Fclose(fid) < 0)
+ goto error;
+
+ /* Release buffers */
+ free(s1);
+ free(s3);
+ free(save_s3);
+ free(rbuf1);
+ free(rbuf3);
+ free(s7);
+ free(save_s7);
+ free(s8);
+ free(save_s8);
+ free(rbuf7);
+ free(rbuf8);
+ free(save_rbuf8);
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ H5Sclose(sid);
+ H5Pclose(dcpl);
+ H5Pclose(dxpl);
+ H5Dclose(did);
+ H5Fclose(fid);
+ H5Tclose(s1_tid);
+ H5Tclose(s3_tid);
+ H5Tclose(s7_tid);
+ H5Tclose(s8_tid);
+ }
+ H5E_END_TRY
+
+ /* Release resources */
+ if (s1)
+ free(s1);
+ if (s3)
+ free(s3);
+ if (save_s3)
+ free(save_s3);
+ if (rbuf1)
+ free(rbuf1);
+ if (rbuf3)
+ free(rbuf3);
+ if (s7)
+ free(s7);
+ if (save_s7)
+ free(save_s7);
+ if (s8)
+ free(s8);
+ if (save_s8)
+ free(save_s8);
+ if (rbuf7)
+ free(rbuf7);
+ if (rbuf8)
+ free(rbuf8);
+ if (save_rbuf8)
+ free(save_rbuf8);
+
+ printf("\n*** SELECT COMPOUND DATASET TESTS FAILED ***\n");
+ return 1;
+} /* test_select_compound() */
+
+/*
+ * Purpose: Tests for selection I/O with compound types:
+ * --set_cache: set chunk cache to 0 or not
+ * via H5Pset_cache(fapl...)
+ * --set_fillvalue: set fill value or not
+ * via H5Pset_fill_value(dcpl...)
+ * --select_io: enable selection I/O or not
+ * via H5Pset_selection_io(dxpl...)
+ * --mwbuf: with or without modifying write buffers
+ * via H5Pset_modify_write_buf(dxpl...)
+ * --set_buf: with or without setting the maximum size
+ * for the type conversion buffer and background buffer
+ * via H5Pset_buffer(dxpl...)
+ *
+ * These tests will test the selection I/O pipeline in particular
+ * triggering H5D__scatgath_read()/write(),
+ * H5D__scatgath_write_select_read()/write(),
+ * and with/without the optimized compound read/write.
+ */
+static unsigned
+test_compounds_selection_io(void)
+{
+ unsigned nerrs = 0;
+ unsigned set_cache; /* Set cache to 0 or not */
+ unsigned set_fillvalue; /* Set fill value or not */
+ unsigned select_io; /* Enable selection I/O or not */
+ unsigned mwbuf; /* With or without modifying write buffers */
+ unsigned set_buf; /* With or without H5Pset_buffer */
+ hid_t fapl = -1;
+ hid_t dxpl = -1;
+ char fname[256];
+
+ fapl = h5_fileaccess();
+ h5_fixname(FILENAME[3], fapl, fname, sizeof(fname));
+
+ for (set_cache = FALSE; set_cache <= TRUE; set_cache++) {
+ for (set_fillvalue = FALSE; set_fillvalue <= TRUE; set_fillvalue++) {
+ for (select_io = FALSE; select_io <= TRUE; select_io++) {
+ for (mwbuf = FALSE; mwbuf <= TRUE; mwbuf++) {
+ for (set_buf = FALSE; set_buf <= TRUE; set_buf++) {
+
+ if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ goto error;
+
+ if (set_cache) {
+ printf(" With chunk cache set 0, ");
+ if (H5Pset_cache(fapl, 0, (size_t)0, (size_t)0, 0.0) < 0)
+ goto error;
+ }
+ else
+ printf(" With default chunk cache, ");
+
+ if (set_fillvalue)
+ printf("set fill value, ");
+ else
+ printf("not set fill value, ");
+
+ if (select_io) {
+ printf("selection I/O ON, ");
+ if (H5Pset_selection_io(dxpl, H5D_SELECTION_IO_MODE_ON) < 0)
+ goto error;
+ }
+ else
+ printf("selection I/O OFF, ");
+
+ if (mwbuf) {
+ printf("with modify write buf, ");
+ if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ goto error;
+ }
+ else
+ printf("without modify write buf, ");
+
+ if (set_buf)
+ printf("with H5Pset_buffer:\n");
+ else
+ printf("without H5Pset_buffer:\n");
+
+ nerrs += test_select_compound(fname, fapl, dxpl, set_fillvalue, set_buf);
+ nerrs += test_select_src_subset(fname, fapl, dxpl, set_fillvalue, set_buf);
+ nerrs += test_select_dst_subset(fname, fapl, dxpl, set_fillvalue, set_buf);
+
+ if (H5Pclose(dxpl) < 0)
+ goto error;
+
+ } /* set_buf */
+ } /* mwbuf */
+ } /* select_io */
+ } /* set_fillvalue */
+ } /* set_cache */
+
+ if (H5Pclose(fapl) < 0)
+ goto error;
+
+ if (nerrs)
+ goto error;
+
+ return 0;
+
+error:
+ printf("*** COMPOUNDS TESTS FOR SELECTION I/O FAILED ***");
+
+ return 1;
+} /* test_compounds_selection_io() */
+
/*-------------------------------------------------------------------------
* Function: test_compound
*
@@ -202,7 +1371,7 @@ test_compound(char *filename, hid_t fapl)
goto error;
if ((ret_code = H5Pget_preserve(PRESERVE)) != 0) {
printf("Preserve status of dataset transfer property list should be"
- " 0 (FALSE), got %d\n",
+ " 0 (false), got %d\n",
ret_code);
goto error;
}
@@ -210,7 +1379,7 @@ test_compound(char *filename, hid_t fapl)
goto error;
if ((ret_code = H5Pget_preserve(PRESERVE)) != 1) {
printf("Preserve status of dataset transfer property list should be"
- " 1 (TRUE), got %d\n",
+ " 1 (true), got %d\n",
ret_code);
goto error;
}
@@ -286,7 +1455,7 @@ test_compound(char *filename, hid_t fapl)
s1[i].c[1] != s2[i].c[1] || s1[i].c[2] != s2[i].c[2] || s1[i].c[3] != s2[i].c[3] ||
s1[i].d != s2[i].d || s1[i].e != s2[i].e) {
H5_FAILED();
- HDputs(" Incorrect values read from the file");
+ puts(" Incorrect values read from the file");
goto error;
}
}
@@ -323,7 +1492,7 @@ test_compound(char *filename, hid_t fapl)
s1[i].c[1] != s3[i].c[1] || s1[i].c[2] != s3[i].c[2] || s1[i].c[3] != s3[i].c[3] ||
s1[i].d != s3[i].d || s1[i].e != s3[i].e) {
H5_FAILED();
- HDputs(" Incorrect values read from the file");
+ puts(" Incorrect values read from the file");
goto error;
}
}
@@ -353,7 +1522,7 @@ test_compound(char *filename, hid_t fapl)
for (i = 0; i < NX * NY; i++) {
if (s1[i].b != s4[i].b || s1[i].d != s4[i].d) {
H5_FAILED();
- HDputs(" Incorrect values read from the file");
+ puts(" Incorrect values read from the file");
goto error;
}
}
@@ -397,7 +1566,7 @@ test_compound(char *filename, hid_t fapl)
s1[i].c[1] != s5[i].c[1] || s1[i].c[2] != s5[i].c[2] || s1[i].c[3] != s5[i].c[3] ||
s1[i].d != s5[i].d || s1[i].e != s5[i].e) {
H5_FAILED();
- HDputs(" Incorrect values read from the file");
+ puts(" Incorrect values read from the file");
goto error;
}
}
@@ -407,7 +1576,7 @@ test_compound(char *filename, hid_t fapl)
if (s5[i].pre != 1000 + 4 * i || s5[i].mid1 != 1001 + 4 * i || s5[i].mid2 != 1002 + 4 * i ||
s5[i].post != 1003 + 4 * i) {
H5_FAILED();
- HDputs(" Memory values were clobbered");
+ puts(" Memory values were clobbered");
goto error;
}
}
@@ -466,7 +1635,7 @@ test_compound(char *filename, hid_t fapl)
s1[i].c[1] != s6[i].c[1] || s1[i].c[2] != s6[i].c[2] || s1[i].c[3] != s6[i].c[3] ||
s1[i].d != s6[i].d || s1[i].e != s6[i].e) {
H5_FAILED();
- HDputs(" Incorrect values read from the file");
+ puts(" Incorrect values read from the file");
goto error;
}
}
@@ -476,7 +1645,7 @@ test_compound(char *filename, hid_t fapl)
if (s6[i].pre != 1000 + 4 * i || s6[i].mid1 != 1001 + 4 * i || s6[i].mid2 != 1002 + 4 * i ||
s6[i].post != 1003 + 4 * i) {
H5_FAILED();
- HDputs(" Memory values were clobbered");
+ puts(" Memory values were clobbered");
goto error;
}
}
@@ -545,7 +1714,7 @@ test_compound(char *filename, hid_t fapl)
s2[i].c[1] != s1[i].c[1] || s2[i].c[2] != s1[i].c[2] || s2[i].c[3] != s1[i].c[3] ||
s2[i].d != s1[i].d || s2[i].e != s1[i].e) {
H5_FAILED();
- HDputs(" Incorrect values read from file");
+ puts(" Incorrect values read from file");
goto error;
}
}
@@ -588,7 +1757,7 @@ test_compound(char *filename, hid_t fapl)
if (ps8->a != ps1->a || ps8->b != ps1->b || ps8->c[0] != ps1->c[0] || ps8->c[1] != ps1->c[1] ||
ps8->c[2] != ps1->c[2] || ps8->c[3] != ps1->c[3] || ps8->d != ps1->d || ps8->e != ps1->e) {
H5_FAILED();
- HDputs(" Incorrect values read from file");
+ puts(" Incorrect values read from file");
goto error;
}
}
@@ -627,7 +1796,7 @@ test_compound(char *filename, hid_t fapl)
ps2->c[1] != ps1->c[1] || ps2->c[2] != ps1->c[2] || ps2->c[3] != ps1->c[3] ||
ps2->d != ps1->d || ps2->e != ps1->e) {
H5_FAILED();
- HDputs(" Memory values clobbered");
+ puts(" Memory values clobbered");
goto error;
}
}
@@ -636,7 +1805,7 @@ test_compound(char *filename, hid_t fapl)
ps2->c[1] != (unsigned)(-1) || ps2->c[2] != (unsigned)(-1) ||
ps2->c[3] != (unsigned)(-1) || ps2->d != (unsigned)(-1) || ps2->e != (unsigned)(-1)) {
H5_FAILED();
- HDputs(" Incorrect values read from file");
+ puts(" Incorrect values read from file");
goto error;
}
}
@@ -675,7 +1844,7 @@ test_compound(char *filename, hid_t fapl)
ps5->c[2] != ps1->c[2] || ps5->c[3] != ps1->c[3] || ps5->mid2 != (unsigned)(-1) ||
ps5->d != ps1->d || ps5->e != ps1->e || ps5->post != (unsigned)(-1)) {
H5_FAILED();
- HDputs(" Memory values clobbered");
+ puts(" Memory values clobbered");
goto error;
}
}
@@ -686,7 +1855,7 @@ test_compound(char *filename, hid_t fapl)
ps5->c[3] != (unsigned)(-1) || ps5->mid2 != (unsigned)(-1) || ps5->d != (unsigned)(-1) ||
ps5->e != (unsigned)(-1) || ps5->post != (unsigned)(-1)) {
H5_FAILED();
- HDputs(" Incorrect values read from file");
+ puts(" Incorrect values read from file");
goto error;
}
}
@@ -735,7 +1904,7 @@ test_compound(char *filename, hid_t fapl)
ps1->c[1] != 8 * (i * NY + j) + 3 || ps1->c[2] != 8 * (i * NY + j) + 4 ||
ps1->c[3] != 8 * (i * NY + j) + 5 || ps1->e != 8 * (i * NY + j) + 7) {
H5_FAILED();
- HDputs(" Write clobbered values");
+ puts(" Write clobbered values");
goto error;
}
@@ -743,14 +1912,14 @@ test_compound(char *filename, hid_t fapl)
j < f_offset[1] + h_size[1]) {
if (ps1->b != (unsigned)(-1) || ps1->d != (unsigned)(-1)) {
H5_FAILED();
- HDputs(" Wrong values written or read");
+ puts(" Wrong values written or read");
goto error;
}
}
else {
if (ps1->b != 8 * (i * NY + j) + 1 || ps1->d != 8 * (i * NY + j) + 6) {
H5_FAILED();
- HDputs(" Write clobbered values");
+ puts(" Write clobbered values");
goto error;
}
}
@@ -776,7 +1945,7 @@ test_compound(char *filename, hid_t fapl)
return 0;
error:
- HDputs("*** DATASET TESTS FAILED ***");
+ puts("*** DATASET TESTS FAILED ***");
/* Release resources */
if (s1)
@@ -1159,7 +2328,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-compare_data(void *src_data, void *dst_data, hbool_t src_subset)
+compare_data(void *src_data, void *dst_data, bool src_subset)
{
stype1 *s_ptr;
stype2 *d_ptr;
@@ -1220,7 +2389,7 @@ error:
* Function: test_hdf5_src_subset
*
* Purpose: Test the optimization of compound data writing, rewriting,
- * and reading when the source type is a subset of destination
+ * and reading when the source type is a subset of the destination
* type. For example:
* struct source { struct destination {
* TYPE1 A; --> TYPE1 A;
@@ -1324,7 +2493,7 @@ test_hdf5_src_subset(char *filename, hid_t fapl)
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
FAIL_STACK_ERROR;
- if (H5Pset_preserve(dxpl, TRUE) < 0)
+ if (H5Pset_preserve(dxpl, true) < 0)
FAIL_STACK_ERROR;
/* Rewrite contiguous data set */
@@ -1364,7 +2533,7 @@ test_hdf5_src_subset(char *filename, hid_t fapl)
if (H5Dread(dataset, dst_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0)
FAIL_STACK_ERROR;
- if (compare_data(orig, rbuf, TRUE) < 0)
+ if (compare_data(orig, rbuf, true) < 0)
TEST_ERROR;
if (H5Dclose(dataset) < 0)
@@ -1377,7 +2546,7 @@ test_hdf5_src_subset(char *filename, hid_t fapl)
if (H5Dread(dataset, dst_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0)
FAIL_STACK_ERROR;
- if (compare_data(orig, rbuf, TRUE) < 0)
+ if (compare_data(orig, rbuf, true) < 0)
TEST_ERROR;
if (H5Dclose(dataset) < 0)
@@ -1414,7 +2583,7 @@ error:
free(rbuf);
free(rew_buf);
- HDputs("*** DATASET TESTS FAILED ***");
+ puts("*** DATASET TESTS FAILED ***");
return 1;
}
@@ -1432,7 +2601,7 @@ error:
* TYPE5 E;
* };
* This optimization is for the Chicago company. This test
- * is in opposite of test_hdf5_src_subset.
+ * is the opposite of test_hdf5_src_subset.
*
* Return: Success: 0
*
@@ -1527,7 +2696,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl)
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
goto error;
- if (H5Pset_preserve(dxpl, TRUE) < 0)
+ if (H5Pset_preserve(dxpl, true) < 0)
goto error;
/* Rewrite contiguous data set */
@@ -1567,7 +2736,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl)
if (H5Dread(dataset, dst_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0)
goto error;
- if (compare_data(orig, rbuf, FALSE) < 0)
+ if (compare_data(orig, rbuf, false) < 0)
goto error;
if (H5Dclose(dataset) < 0)
@@ -1580,7 +2749,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl)
if (H5Dread(dataset, dst_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0)
goto error;
- if (compare_data(orig, rbuf, FALSE) < 0)
+ if (compare_data(orig, rbuf, false) < 0)
goto error;
if (H5Dclose(dataset) < 0)
@@ -1613,7 +2782,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl)
return 0;
error:
- HDputs("*** DATASET TESTS FAILED ***");
+ puts("*** DATASET TESTS FAILED ***");
return 1;
}
@@ -1686,9 +2855,9 @@ test_pack_ooo(void)
for (extra_space = 0; extra_space < 2; extra_space++) {
if (extra_space)
- HDputs("With extra space at the end of compound...");
+ puts("With extra space at the end of compound...");
else
- HDputs("Without extra space at the end of compound...");
+ puts("Without extra space at the end of compound...");
TESTING("random member insertion with empty compound subtype");
@@ -1702,7 +2871,7 @@ test_pack_ooo(void)
/* Insert the compound members in the random order previously generated */
for (i = 0; i < PACK_NMEMBS; i++) {
- HDsnprintf(name, sizeof(name), "%05d", i);
+ snprintf(name, sizeof(name), "%05d", i);
if (i == sub_cmpd_order) {
if (H5Tinsert(cmpd, name, (size_t)(4 * order[i]), sub_cmpd) < 0)
PACK_OOO_ERROR
@@ -1735,7 +2904,7 @@ test_pack_ooo(void)
/* Insert the compound members in the random order previously generated */
for (i = 0; i < PACK_NMEMBS; i++) {
- HDsnprintf(name, sizeof(name), "%05d", i);
+ snprintf(name, sizeof(name), "%05d", i);
if (i == sub_cmpd_order) {
if (H5Tinsert(cmpd, name, (size_t)(4 * order[i]), sub_cmpd) < 0)
PACK_OOO_ERROR
@@ -1770,7 +2939,7 @@ test_pack_ooo(void)
/* Insert the compound members in reverse order, with compound last */
for (i = 0; i < PACK_NMEMBS; i++) {
- HDsnprintf(name, sizeof(name), "%05d", i);
+ snprintf(name, sizeof(name), "%05d", i);
if (i == PACK_NMEMBS - 1) {
if (H5Tinsert(cmpd, name, (size_t)(4 * (PACK_NMEMBS - i - 1)), sub_cmpd) < 0)
PACK_OOO_ERROR
@@ -1803,7 +2972,7 @@ test_pack_ooo(void)
/* Insert the compound members in reverse order, with compound last */
for (i = 0; i < PACK_NMEMBS; i++) {
- HDsnprintf(name, sizeof(name), "%05d", i);
+ snprintf(name, sizeof(name), "%05d", i);
if (i == PACK_NMEMBS - 1) {
if (H5Tinsert(cmpd, name, (size_t)(4 * (PACK_NMEMBS - i - 1)), sub_cmpd) < 0)
PACK_OOO_ERROR
@@ -1838,7 +3007,7 @@ test_pack_ooo(void)
/* Insert the compound members in forward order, with compound first */
for (i = 0; i < PACK_NMEMBS; i++) {
- HDsnprintf(name, sizeof(name), "%05d", i);
+ snprintf(name, sizeof(name), "%05d", i);
if (i == 0) {
if (H5Tinsert(cmpd, name, (size_t)(4 * i), sub_cmpd) < 0)
PACK_OOO_ERROR
@@ -1871,7 +3040,7 @@ test_pack_ooo(void)
/* Insert the compound members in forward order */
for (i = 0; i < PACK_NMEMBS; i++) {
- HDsnprintf(name, sizeof(name), "%05d", i);
+ snprintf(name, sizeof(name), "%05d", i);
if (i == 0) {
if (H5Tinsert(cmpd, name, (size_t)(4 * i), sub_cmpd) < 0)
PACK_OOO_ERROR
@@ -1898,7 +3067,7 @@ test_pack_ooo(void)
return 0;
error:
- HDputs("*** DATASET TESTS FAILED ***");
+ puts("*** DATASET TESTS FAILED ***");
return 1;
}
@@ -1920,10 +3089,10 @@ error:
static unsigned
test_ooo_order(char *filename, hid_t fapl_id)
{
- hid_t file = -1; /* File ID */
- hid_t dtype = -1; /* Datatype IDs */
- hid_t dtype_tmp = -1; /* Temp Datatype ID */
- H5T_t *dt = NULL; /* Datatype pointer */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t dtype = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t dtype_tmp = H5I_INVALID_HID; /* Temp Datatype ID */
+ H5T_t *dt = NULL; /* Datatype pointer */
TESTING("that compound member insertion order is preserved");
@@ -2138,7 +3307,7 @@ error:
H5Fclose(file);
}
H5E_END_TRY
- HDputs("*** DATASET TESTS FAILED ***");
+ puts("*** DATASET TESTS FAILED ***");
return 1;
} /* test_ooo_order */
@@ -2165,7 +3334,7 @@ main(int argc, char *argv[])
/* Turn off optimized compound converter? */
if (argc > 1) {
- if (argc > 2 || HDstrcmp("--noopt", argv[1]) != 0) {
+ if (argc > 2 || strcmp("--noopt", argv[1]) != 0) {
fprintf(stderr, "usage: %s [--noopt]\n", argv[0]);
exit(EXIT_FAILURE);
}
@@ -2173,26 +3342,29 @@ main(int argc, char *argv[])
(H5T_conv_t)((void (*)(void))H5T__conv_struct_opt));
}
+ printf("Testing compound dataset for selection I/O cases----\n");
+ nerrors += test_compounds_selection_io();
+
/* Create the file */
fapl_id = h5_fileaccess();
h5_fixname(FILENAME[0], fapl_id, fname, sizeof(fname));
- HDputs("Testing compound dataset:");
+ puts("Testing compound dataset:");
nerrors += test_compound(fname, fapl_id);
- HDputs("Testing the optimization of when the source type is a subset of the dest:");
+ puts("Testing the optimization of when the source type is a subset of the dest:");
h5_fixname(FILENAME[1], fapl_id, fname, sizeof(fname));
nerrors += test_hdf5_src_subset(fname, fapl_id);
- HDputs("Testing the optimization of when the dest type is a subset of the source:");
+ puts("Testing the optimization of when the dest type is a subset of the source:");
h5_fixname(FILENAME[2], fapl_id, fname, sizeof(fname));
nerrors += test_hdf5_dst_subset(fname, fapl_id);
- HDputs("Testing that compound types can be packed out of order:");
+ puts("Testing that compound types can be packed out of order:");
nerrors += test_pack_ooo();
- HDputs("Testing compound member ordering:");
+ puts("Testing compound member ordering:");
nerrors += test_ooo_order(fname, fapl_id);
/* Verify symbol table messages are cached */
@@ -2204,6 +3376,6 @@ main(int argc, char *argv[])
}
h5_cleanup(FILENAME, fapl_id);
- HDputs("All compound dataset tests passed.");
+ puts("All compound dataset tests passed.");
return 0;
}
diff --git a/test/cmpd_dtransform.c b/test/cmpd_dtransform.c
index bb61110..8fd3788 100644
--- a/test/cmpd_dtransform.c
+++ b/test/cmpd_dtransform.c
@@ -46,8 +46,8 @@ main(void)
/* Compound datatype */
if (NULL == (atts = malloc(sizeof(att_t))))
TEST_ERROR;
- HDstrcpy(atts[0].name, "Name");
- HDstrcpy(atts[0].unit, "Unit");
+ strcpy(atts[0].name, "Name");
+ strcpy(atts[0].unit, "Unit");
/* String type */
if ((str_dtyp_id = H5Tcopy(H5T_C_S1)) < 0)
@@ -113,9 +113,9 @@ main(void)
FAIL_STACK_ERROR;
/* Verify attribute */
- if (HDstrcmp(atts_res[0].name, atts[0].name) != 0)
+ if (strcmp(atts_res[0].name, atts[0].name) != 0)
TEST_ERROR;
- if (HDstrcmp(atts_res[0].unit, atts[0].unit) != 0)
+ if (strcmp(atts_res[0].unit, atts[0].unit) != 0)
TEST_ERROR;
/* Read the data */
diff --git a/test/cork.c b/test/cork.c
index d67d18b..e0a7196 100644
--- a/test/cork.c
+++ b/test/cork.c
@@ -65,14 +65,14 @@
/* ===================== */
/* Tests */
-static unsigned test_objs_cork(hbool_t swmr, hbool_t new_format);
-static unsigned test_dset_cork(hbool_t swmr, hbool_t new_format);
+static unsigned test_objs_cork(bool swmr, bool new_format);
+static unsigned test_dset_cork(bool swmr, bool new_format);
static unsigned verify_old_dset_cork(void);
-static unsigned verify_obj_dset_cork(hbool_t swmr);
-static unsigned verify_dset_cork(hbool_t swmr, hbool_t new_format);
-static unsigned verify_group_cork(hbool_t swmr);
-static unsigned verify_named_cork(hbool_t swmr);
-static unsigned verify_multiple_cork(hbool_t swmr);
+static unsigned verify_obj_dset_cork(bool swmr);
+static unsigned verify_dset_cork(bool swmr, bool new_format);
+static unsigned verify_group_cork(bool swmr);
+static unsigned verify_named_cork(bool swmr);
+static unsigned verify_multiple_cork(bool swmr);
/*-------------------------------------------------------------------------
* Function: verify_old_dset_cork
@@ -133,7 +133,7 @@ verify_old_dset_cork(void)
TEST_ERROR;
/* Verify cork status */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, true) < 0)
TEST_ERROR;
/* Set up data array */
@@ -154,7 +154,7 @@ verify_old_dset_cork(void)
TEST_ERROR;
/* Verify the cork status for DSET_BT1 */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, true) < 0)
TEST_ERROR;
/* Create compact dataset: DSET_COMPACT */
@@ -178,7 +178,7 @@ verify_old_dset_cork(void)
TEST_ERROR;
/* Verify cork status */
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, true) < 0)
TEST_ERROR;
/* Closing */
@@ -226,11 +226,11 @@ verify_old_dset_cork(void)
TEST_ERROR;
/* Verify the cork status for DSET_CONTIG */
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, true) < 0)
TEST_ERROR;
/* Verify the cork status for DSET_BT1 */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, false) < 0)
TEST_ERROR;
/* Un-cork the dataset: DSET_CONTIG */
@@ -238,7 +238,7 @@ verify_old_dset_cork(void)
TEST_ERROR;
/* Verify the cork status for DSET_CONTIG */
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, false) < 0)
TEST_ERROR;
/* Closing */
@@ -291,7 +291,7 @@ error:
*-------------------------------------------------------------------------
*/
static unsigned
-verify_obj_dset_cork(hbool_t swmr)
+verify_obj_dset_cork(bool swmr)
{
/* Variable Declarations */
hid_t fid = H5I_INVALID_HID; /* File ID */
@@ -342,7 +342,7 @@ verify_obj_dset_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the dataset: DSET */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, false) < 0)
TEST_ERROR;
/* Cork the dataset: DSET */
@@ -354,7 +354,7 @@ verify_obj_dset_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the dataset: DSET */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, true) < 0)
TEST_ERROR;
/* Close the attribute */
@@ -362,7 +362,7 @@ verify_obj_dset_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the dataset: DSET */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, true) < 0)
TEST_ERROR;
/* Create dcpl */
@@ -390,7 +390,7 @@ verify_obj_dset_cork(hbool_t swmr)
/* Attach 8 attributes to the dataset */
for (i = 0; i < 8; i++) {
- HDsnprintf(attrname, sizeof(attrname), "attr %d", i);
+ snprintf(attrname, sizeof(attrname), "attr %d", i);
if ((aid = H5Acreate2(did2, attrname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Awrite(aid, H5T_NATIVE_INT, &i) < 0)
@@ -400,7 +400,7 @@ verify_obj_dset_cork(hbool_t swmr)
} /* end for */
/* Verify cork status of the dataset: DSET_NONE */
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, true) < 0)
TEST_ERROR;
/* Closing */
@@ -429,7 +429,7 @@ verify_obj_dset_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the dataset: DSET */
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, false) < 0)
TEST_ERROR;
/* Open the attribute attached to the dataset object: DSET_NONE */
@@ -442,7 +442,7 @@ verify_obj_dset_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the dataset: DSET_NONE */
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, true) < 0)
TEST_ERROR;
/* Close the attribute */
@@ -450,7 +450,7 @@ verify_obj_dset_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the dataset: DSET */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, true) < 0)
TEST_ERROR;
/* Closing */
@@ -494,7 +494,7 @@ error:
*-------------------------------------------------------------------------
*/
static unsigned
-verify_dset_cork(hbool_t swmr, hbool_t new_format)
+verify_dset_cork(bool swmr, bool new_format)
{
/* Variable Declarations */
hid_t fid = H5I_INVALID_HID; /* File ID */
@@ -568,7 +568,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR;
/* Verify cork status */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, true) < 0)
TEST_ERROR;
/* Create chunked dataset with fixed array indexing: DSET_FA */
@@ -590,11 +590,11 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR;
/* Verify the cork status for DSET_FA */
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, true) < 0)
TEST_ERROR;
/* Verify the cork status for DSET_EA */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, false) < 0)
TEST_ERROR;
/* Create chunked dataset with v2-Btree indexing */
@@ -613,7 +613,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR;
/* Verify the cork status for DSET_BT2 */
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, true) < 0)
TEST_ERROR;
/* Closing */
@@ -664,7 +664,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR;
/* Verify the cork status for DSET_EA */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, false) < 0)
TEST_ERROR;
/* Open and write to the dataset: DSET_FA */
@@ -678,7 +678,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR;
/* Verify the cork status for DSET_FA */
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, true) < 0)
TEST_ERROR;
/* Open and write to the dataset: DSET_BT2 */
@@ -688,7 +688,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR;
/* Verify the cork status for DSET_BT2 */
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, false) < 0)
TEST_ERROR;
/* Cork the dataset: DSET_BT2 */
@@ -696,7 +696,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR;
/* Verify the cork status for DSET_BT2 */
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, true) < 0)
TEST_ERROR;
/* Closing */
@@ -750,7 +750,7 @@ error:
*-------------------------------------------------------------------------
*/
static unsigned
-verify_group_cork(hbool_t swmr)
+verify_group_cork(bool swmr)
{
/* Variable Declarations */
hid_t fid = H5I_INVALID_HID; /* File ID */
@@ -806,11 +806,11 @@ verify_group_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the groups */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, false) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, true) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, false) < 0)
TEST_ERROR;
/* Close the second group: GRP2 */
@@ -822,7 +822,7 @@ verify_group_cork(hbool_t swmr)
FAIL_STACK_ERROR;
/* Verify cork status of the second group: GRP2 */
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, false) < 0)
TEST_ERROR;
/* Closing */
@@ -854,7 +854,7 @@ verify_group_cork(hbool_t swmr)
/* Attach 8 attributes to the third group: GRP3 */
for (i = 0; i < 8; i++) {
- HDsnprintf(attrname, sizeof(attrname), "attr %d", i);
+ snprintf(attrname, sizeof(attrname), "attr %d", i);
if ((aid = H5Acreate2(gid3, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Awrite(aid, H5T_NATIVE_UINT, &i) < 0)
@@ -863,7 +863,7 @@ verify_group_cork(hbool_t swmr)
if (i == 3) {
if (H5Odisable_mdc_flushes(gid3) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, true) < 0)
TEST_ERROR;
}
if (H5Aclose(aid) < 0)
@@ -871,7 +871,7 @@ verify_group_cork(hbool_t swmr)
} /* end for */
/* Verify cork status of the third group: GRP3 */
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, true) < 0)
TEST_ERROR;
/* Closing */
@@ -917,7 +917,7 @@ error:
*-------------------------------------------------------------------------
*/
static unsigned
-verify_named_cork(hbool_t swmr)
+verify_named_cork(bool swmr)
{
/* Variable Declarations */
hid_t fid = H5I_INVALID_HID; /* File ID */
@@ -995,11 +995,11 @@ verify_named_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the named datatypes */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, true) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, false) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, true) < 0)
TEST_ERROR;
/* Close the datatypes */
@@ -1019,11 +1019,11 @@ verify_named_cork(hbool_t swmr)
FAIL_STACK_ERROR;
/* Verify cork status of the named datatypes */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, false) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, false) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, false) < 0)
TEST_ERROR;
/* Closing */
@@ -1069,7 +1069,7 @@ verify_named_cork(hbool_t swmr)
/* Attach 8 attributes to datatype: DT3 */
for (i = 0; i < 8; i++) {
- HDsnprintf(attrname, sizeof(attrname), "attr %d", i);
+ snprintf(attrname, sizeof(attrname), "attr %d", i);
if ((aid = H5Acreate2(tid3, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Awrite(aid, H5T_NATIVE_UINT, &i) < 0)
@@ -1078,7 +1078,7 @@ verify_named_cork(hbool_t swmr)
if (i == 3) {
if (H5Odisable_mdc_flushes(tid3) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, true) < 0)
TEST_ERROR;
}
if (H5Aclose(aid) < 0)
@@ -1098,20 +1098,20 @@ verify_named_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the datatype: DT */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, false) < 0)
TEST_ERROR;
/* Verify cork status of the datatype: DT2 */
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, true) < 0)
TEST_ERROR;
/* Verify cork status of the datatype: DT3 */
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, true) < 0)
TEST_ERROR;
/* Un-cork the datatype: DT3 */
if (H5Oenable_mdc_flushes(tid3) < 0)
TEST_ERROR;
/* Verify cork status of the datatype: DT3 */
- if (H5C__verify_cork_tag_test(fid, oinfo3.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo3.token, false) < 0)
TEST_ERROR;
/* Cork the datatype: DT */
@@ -1119,14 +1119,14 @@ verify_named_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the datatype: DT */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, true) < 0)
TEST_ERROR;
/* Verify cork status of the datatype: DT2 */
- if (H5C__verify_cork_tag_test(fid, oinfo2.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo2.token, true) < 0)
TEST_ERROR;
/* Verify cork status of the dataset: DSET */
- if (H5C__verify_cork_tag_test(fid, oinfo4.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo4.token, true) < 0)
TEST_ERROR;
/* Close the dataset */
@@ -1134,11 +1134,11 @@ verify_named_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the datatype: DT */
- if (H5C__verify_cork_tag_test(fid, oinfo.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo.token, true) < 0)
TEST_ERROR;
/* Verify cork status of the dataset: DSET */
- if (H5C__verify_cork_tag_test(fid, oinfo4.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid, oinfo4.token, false) < 0)
TEST_ERROR;
/* Closing */
@@ -1192,7 +1192,7 @@ error:
*-------------------------------------------------------------------------
*/
static unsigned
-verify_multiple_cork(hbool_t swmr)
+verify_multiple_cork(bool swmr)
{
/* Variable Declarations */
hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File ID */
@@ -1207,7 +1207,7 @@ verify_multiple_cork(hbool_t swmr)
H5O_info2_t oinfo1, oinfo2, oinfo3; /* Object metadata information */
hsize_t dim[1] = {5}; /* Dimension sizes */
unsigned flags; /* File access flags */
- hbool_t corked; /* Cork status */
+ bool corked; /* Cork status */
herr_t ret; /* Return value */
/* Testing Macro */
@@ -1306,7 +1306,7 @@ verify_multiple_cork(hbool_t swmr)
/* Verify cork status of the group: gid2 */
if (H5Oget_info3(gid2, &oinfo1, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid2, oinfo1.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid2, oinfo1.token, true) < 0)
TEST_ERROR;
/* Check cork status of the group: gid1 */
@@ -1334,7 +1334,7 @@ verify_multiple_cork(hbool_t swmr)
/* Verify cork status of the dataset: did1 */
if (H5Oget_info3(did1, &oinfo2, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid1, oinfo2.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid1, oinfo2.token, true) < 0)
TEST_ERROR;
/* Check cork status of the dataset: did2 */
@@ -1362,7 +1362,7 @@ verify_multiple_cork(hbool_t swmr)
/* Verify cork status of the datatype: tid2 */
if (H5Oget_info3(tid2, &oinfo3, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid2, oinfo3.token, TRUE) < 0)
+ if (H5C__verify_cork_tag_test(fid2, oinfo3.token, true) < 0)
TEST_ERROR;
/* Check cork status of the datatype: tid1 */
@@ -1378,7 +1378,7 @@ verify_multiple_cork(hbool_t swmr)
/* Verify cork status of the group: gid1 */
if (H5Oget_info3(gid1, &oinfo1, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid1, oinfo1.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid1, oinfo1.token, false) < 0)
TEST_ERROR;
/* Check cork status of the group: gid2 */
@@ -1398,7 +1398,7 @@ verify_multiple_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the group: gid1 */
- if (H5C__verify_cork_tag_test(fid1, oinfo1.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid1, oinfo1.token, false) < 0)
TEST_ERROR;
/* Close the group: gid1 */
@@ -1412,7 +1412,7 @@ verify_multiple_cork(hbool_t swmr)
/* Verify cork status of the dataset: did2 */
if (H5Oget_info3(did2, &oinfo2, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- if (H5C__verify_cork_tag_test(fid2, oinfo2.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid2, oinfo2.token, false) < 0)
TEST_ERROR;
/* Check cork status of the dataset: did1 */
@@ -1432,7 +1432,7 @@ verify_multiple_cork(hbool_t swmr)
TEST_ERROR;
/* Verify cork status of the dataset: did1 */
- if (H5C__verify_cork_tag_test(fid1, oinfo2.token, FALSE) < 0)
+ if (H5C__verify_cork_tag_test(fid1, oinfo2.token, false) < 0)
TEST_ERROR;
/* Close the dataset: did1 */
@@ -1565,7 +1565,7 @@ error:
*-------------------------------------------------------------------------
*/
static unsigned
-test_objs_cork(hbool_t swmr, hbool_t new_format)
+test_objs_cork(bool swmr, bool new_format)
{
hid_t fid = H5I_INVALID_HID; /* HDF5 File ID */
hid_t fapl = H5I_INVALID_HID; /* File access property list */
@@ -1575,7 +1575,7 @@ test_objs_cork(hbool_t swmr, hbool_t new_format)
hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
hid_t aid = H5I_INVALID_HID; /* Attribute ID */
hsize_t dims[RANK]; /* Dataset dimension sizes */
- hbool_t corked; /* Cork status of an object */
+ bool corked; /* Cork status of an object */
unsigned flags; /* File access flags */
herr_t ret; /* Return value */
@@ -1865,7 +1865,7 @@ error:
*-------------------------------------------------------------------------
*/
static unsigned
-test_dset_cork(hbool_t swmr, hbool_t new_format)
+test_dset_cork(bool swmr, bool new_format)
{
hid_t fid = H5I_INVALID_HID; /* File ID */
hid_t fapl; /* File access property list */
@@ -1882,7 +1882,7 @@ test_dset_cork(hbool_t swmr, hbool_t new_format)
int **wbuf = NULL; /* Data buffer for writes (pointers to fake 2D array) */
int *wbuf_data = NULL; /* Data buffer for writes (real data) */
int *rbuf_data = NULL; /* Data buffer for reads (real data) */
- hbool_t corked; /* Cork status of an object */
+ bool corked; /* Cork status of an object */
unsigned flags; /* File access flags */
/* Testing Macro */
@@ -2234,25 +2234,25 @@ main(void)
/* Skip these tests if SWMR I/O is not supported for the VFD specified
* by the environment variable.
*/
- driver = HDgetenv(HDF5_DRIVER);
+ driver = getenv(HDF5_DRIVER);
if (!H5FD__supports_swmr_test(driver)) {
- HDputs("-- SKIPPED SWMR tests for SWMR-incompatible VFD --");
+ puts("-- SKIPPED SWMR tests for SWMR-incompatible VFD --");
continue;
}
}
/* Tests with new/old library format */
/* This is the test moved from th5o.c: test_h5o_cork() */
- nerrs += test_objs_cork(swmr, TRUE);
- nerrs += test_objs_cork(swmr, FALSE);
+ nerrs += test_objs_cork(swmr, true);
+ nerrs += test_objs_cork(swmr, false);
/* This is the test moved from th5o.c: test_h5o_cork_dataset() */
- nerrs += test_dset_cork(swmr, TRUE);
- nerrs += test_dset_cork(swmr, FALSE);
+ nerrs += test_dset_cork(swmr, true);
+ nerrs += test_dset_cork(swmr, false);
/* Tests with/without SWMR access */
nerrs += verify_obj_dset_cork(swmr);
- nerrs += verify_dset_cork(swmr, TRUE);
- nerrs += verify_dset_cork(swmr, FALSE);
+ nerrs += verify_dset_cork(swmr, true);
+ nerrs += verify_dset_cork(swmr, false);
nerrs += verify_group_cork(swmr);
nerrs += verify_named_cork(swmr);
nerrs += verify_multiple_cork(swmr);
diff --git a/test/cross_read.c b/test/cross_read.c
index 8369a76..ce1f90b 100644
--- a/test/cross_read.c
+++ b/test/cross_read.c
@@ -66,11 +66,11 @@ static const char *FILENAME[] = {"vms_data", "le_data", "be_data", NULL};
static int
check_data_i(const char *dsetname, hid_t fid)
{
- hid_t did = -1; /* dataset ID */
- long long data_in[NX + 1][NY]; /* input buffer */
- long long data_out[NX + 1][NY]; /* output buffer */
- int i, j; /* iterators */
- int nerrors = 0; /* # errors in dataset values */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ long long data_in[NX + 1][NY]; /* input buffer */
+ long long data_out[NX + 1][NY]; /* output buffer */
+ int i, j; /* iterators */
+ int nerrors = 0; /* # errors in dataset values */
/* Open the dataset. */
if ((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0)
@@ -137,11 +137,11 @@ error:
static int
check_data_f(const char *dsetname, hid_t fid)
{
- hid_t did = -1; /* dataset ID */
- double data_in[NX + 1][NY]; /* input buffer */
- double data_out[NX + 1][NY]; /* output buffer */
- int i, j; /* iterators */
- int nerrors = 0; /* # of errors in dataset values */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ double data_in[NX + 1][NY]; /* input buffer */
+ double data_out[NX + 1][NY]; /* output buffer */
+ int i, j; /* iterators */
+ int nerrors = 0; /* # of errors in dataset values */
/* Open the dataset. */
if ((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0)
@@ -209,7 +209,7 @@ static int
check_file(char *filename)
{
const char *pathname = H5_get_srcdir_filename(filename); /* Corrected test file name */
- hid_t fid = -1; /* file ID */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
int nerrors = 0; /* # of datasets with errors */
#if !defined(H5_HAVE_FILTER_DEFLATE) || !defined(H5_HAVE_FILTER_SZIP)
const char *not_supported = " filter is not enabled."; /* no filter message */
@@ -274,7 +274,7 @@ check_file(char *filename)
nerrors += check_data_f(DATASETNAME16, fid);
#else /*H5_HAVE_FILTER_DEFLATE*/
SKIPPED();
- HDputs(not_supported);
+ puts(not_supported);
#endif /*H5_HAVE_FILTER_DEFLATE*/
TESTING("dataset of BE FLOAT with Deflate filter");
@@ -282,7 +282,7 @@ check_file(char *filename)
nerrors += check_data_f(DATASETNAME17, fid);
#else /*H5_HAVE_FILTER_DEFLATE*/
SKIPPED();
- HDputs(not_supported);
+ puts(not_supported);
#endif /*H5_HAVE_FILTER_DEFLATE*/
TESTING("dataset of LE FLOAT with Szip filter");
@@ -290,7 +290,7 @@ check_file(char *filename)
nerrors += check_data_f(DATASETNAME18, fid);
#else /*H5_HAVE_FILTER_SZIP*/
SKIPPED();
- HDputs(not_supported);
+ puts(not_supported);
#endif /*H5_HAVE_FILTER_SZIP*/
TESTING("dataset of BE FLOAT with Szip filter");
@@ -298,7 +298,7 @@ check_file(char *filename)
nerrors += check_data_f(DATASETNAME19, fid);
#else /*H5_HAVE_FILTER_SZIP*/
SKIPPED();
- HDputs(not_supported);
+ puts(not_supported);
#endif /*H5_HAVE_FILTER_SZIP*/
TESTING("dataset of LE FLOAT with Shuffle filter");
@@ -338,9 +338,9 @@ error:
int
main(void)
{
- hbool_t driver_is_default_compatible;
- char filename[1024];
- int nerrors = 0;
+ bool driver_is_default_compatible;
+ char filename[1024];
+ int nerrors = 0;
h5_reset();
@@ -348,21 +348,21 @@ main(void)
* Skip tests for VFDs that aren't compatible with default VFD.
*/
if (h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible) < 0) {
- HDputs(" -- couldn't check if VFD is compatible with default VFD --");
+ puts(" -- couldn't check if VFD is compatible with default VFD --");
exit(EXIT_SUCCESS);
}
if (!driver_is_default_compatible) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ puts(" -- SKIPPED for incompatible VFD --");
exit(EXIT_SUCCESS);
}
- HDputs("\n");
- HDputs("Testing reading data created on Linux");
+ puts("\n");
+ puts("Testing reading data created on Linux");
h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename));
nerrors += check_file(filename);
- HDputs("\n");
- HDputs("Testing reading data created on Solaris");
+ puts("\n");
+ puts("Testing reading data created on Solaris");
h5_fixname(FILENAME[2], H5P_DEFAULT, filename, sizeof(filename));
nerrors += check_file(filename);
diff --git a/test/dangle.c b/test/dangle.c
index c589448..4079fce 100644
--- a/test/dangle.c
+++ b/test/dangle.c
@@ -627,20 +627,20 @@ main(void)
int nerrors = 0;
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
/* Don't run this test with the multi/split VFD. A bug in library shutdown
* ordering causes problems with the multi VFD when IDs are left dangling.
*/
- if (!HDstrcmp(env_h5_drvr, "multi") || !HDstrcmp(env_h5_drvr, "split")) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ if (!strcmp(env_h5_drvr, "multi") || !strcmp(env_h5_drvr, "split")) {
+ puts(" -- SKIPPED for incompatible VFD --");
return 0;
}
/* Run tests w/weak file close */
- HDputs("Testing dangling objects with weak file close:");
+ puts("Testing dangling objects with weak file close:");
nerrors += test_dangle_dataset(H5F_CLOSE_WEAK);
nerrors += test_dangle_group(H5F_CLOSE_WEAK);
nerrors += test_dangle_datatype1(H5F_CLOSE_WEAK);
@@ -648,7 +648,7 @@ main(void)
nerrors += test_dangle_attribute(H5F_CLOSE_WEAK);
/* Run tests w/semi file close */
- HDputs("Testing dangling objects with semi file close:");
+ puts("Testing dangling objects with semi file close:");
nerrors += test_dangle_dataset(H5F_CLOSE_SEMI);
nerrors += test_dangle_group(H5F_CLOSE_SEMI);
nerrors += test_dangle_datatype1(H5F_CLOSE_SEMI);
@@ -656,7 +656,7 @@ main(void)
nerrors += test_dangle_attribute(H5F_CLOSE_SEMI);
/* Run tests w/strong file close */
- HDputs("Testing dangling objects with strong file close:");
+ puts("Testing dangling objects with strong file close:");
nerrors += test_dangle_dataset(H5F_CLOSE_STRONG);
nerrors += test_dangle_group(H5F_CLOSE_STRONG);
nerrors += test_dangle_datatype1(H5F_CLOSE_STRONG);
@@ -669,11 +669,11 @@ main(void)
/* Check for errors */
if (nerrors)
goto error;
- HDputs("All dangling ID tests passed.");
+ puts("All dangling ID tests passed.");
return 0;
error:
- HDputs("***** DANGLING ID TESTS FAILED *****");
+ puts("***** DANGLING ID TESTS FAILED *****");
return 1;
}
diff --git a/test/del_many_dense_attrs.c b/test/del_many_dense_attrs.c
index 58ecb61..b0000f9 100644
--- a/test/del_many_dense_attrs.c
+++ b/test/del_many_dense_attrs.c
@@ -53,17 +53,17 @@ catch_signal(int H5_ATTR_UNUSED signo)
int
main(void)
{
- hid_t fid = -1; /* HDF5 File ID */
- hid_t gid = -1; /* Group ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t fapl = -1; /* File access property lists */
- hid_t gcpl = -1; /* Group creation property list */
- char aname[50]; /* Name of attribute */
- const char *basename = "attr"; /* Name prefix for attribute */
- char filename[100]; /* File name */
- int i; /* Local index variable */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property lists */
+ hid_t gcpl = H5I_INVALID_HID; /* Group creation property list */
+ char aname[50]; /* Name of attribute */
+ const char *basename = "attr"; /* Name prefix for attribute */
+ char filename[100]; /* File name */
+ int i; /* Local index variable */
/* Testing setup */
h5_reset();
@@ -114,7 +114,7 @@ main(void)
/* Create attributes in the group */
for (i = ATTR_COUNT; i >= 0; i--) {
/* Set up the attribute name */
- HDsnprintf(aname, sizeof(aname), "%s%d", basename, i);
+ snprintf(aname, sizeof(aname), "%s%d", basename, i);
/* Create the attribute */
if ((aid = H5Acreate2(gid, aname, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -160,7 +160,7 @@ main(void)
/* Delete the attributes */
for (i = 0; i <= ATTR_COUNT; i++) {
/* Set up the attribute name */
- HDsnprintf(aname, sizeof(aname), "%s%d", basename, i);
+ snprintf(aname, sizeof(aname), "%s%d", basename, i);
/* Delete the attribute */
if (H5Adelete(gid, aname) < 0)
diff --git a/test/direct_chunk.c b/test/direct_chunk.c
index 89eb90c..bde67db 100644
--- a/test/direct_chunk.c
+++ b/test/direct_chunk.c
@@ -47,7 +47,7 @@
#define CHUNK_NY 4
#ifdef H5_HAVE_FILTER_DEFLATE
-#define DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s)) * 1.001) + 12.0)
+#define DEFLATE_SIZE_ADJUST(s) (ceil(((double)(s)) * 1.001) + 12.0)
#endif
/* Temporary filter IDs used for testing */
@@ -120,9 +120,9 @@ static const H5Z_class2_t H5Z_BOGUS2[1] = {{
static int
test_direct_chunk_write(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID, dxpl = H5I_INVALID_HID;
hsize_t dims[2] = {NX, NY};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
@@ -131,7 +131,7 @@ test_direct_chunk_write(hid_t file)
int data[NX][NY];
int i, j, n;
- unsigned filter_mask = 0;
+ uint32_t filter_mask = 0;
int direct_buf[CHUNK_NX][CHUNK_NY];
int check_chunk[CHUNK_NX][CHUNK_NY];
hsize_t offset[2] = {0, 0};
@@ -389,9 +389,9 @@ test_direct_chunk_overwrite_data(hid_t fid)
int16_t overwrite_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_NX];
uint32_t filter_mask = 0;
hid_t tid = H5T_NATIVE_UINT16;
- hid_t dcpl_id = -1;
- hid_t sid = -1;
- hid_t did = -1;
+ hid_t dcpl_id = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
uint16_t fill_value = 0;
hsize_t dset_dims[] = {1, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_2NX};
hsize_t dset_max_dims[] = {H5S_UNLIMITED, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_2NX};
@@ -490,23 +490,23 @@ error:
static int
test_skip_compress_write1(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID, dxpl = H5I_INVALID_HID;
hsize_t dims[2] = {NX, NY};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
herr_t status;
int i, j, n;
- unsigned filter_mask = 0;
+ uint32_t filter_mask = 0;
int direct_buf[CHUNK_NX][CHUNK_NY];
int check_chunk[CHUNK_NX][CHUNK_NY];
hsize_t offset[2] = {0, 0};
size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
int aggression = 9; /* Compression aggression setting */
- unsigned read_filter_mask = 0; /* filter mask after direct read */
+ uint32_t read_filter_mask = 0; /* filter mask after direct read */
int read_direct_buf[CHUNK_NX][CHUNK_NY];
hsize_t read_buf_size = 0; /* buf size */
@@ -738,16 +738,16 @@ filter_bogus2(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts,
static int
test_skip_compress_write2(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID, dxpl = H5I_INVALID_HID;
hsize_t dims[2] = {NX, NY};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
herr_t status;
int i, j, n;
- unsigned filter_mask = 0; /* orig filter mask */
+ uint32_t filter_mask = 0; /* orig filter mask */
int origin_direct_buf[CHUNK_NX][CHUNK_NY];
int direct_buf[CHUNK_NX][CHUNK_NY];
int check_chunk[CHUNK_NX][CHUNK_NY];
@@ -755,7 +755,7 @@ test_skip_compress_write2(hid_t file)
size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
int aggression = 9; /* Compression aggression setting */
- unsigned read_filter_mask = 0; /* filter mask after direct read */
+ uint32_t read_filter_mask = 0; /* filter mask after direct read */
int read_direct_buf[CHUNK_NX][CHUNK_NY];
hsize_t read_buf_size = 0; /* buf size */
@@ -944,19 +944,19 @@ test_data_conv(hid_t file)
int a, c[4], e;
} dst_type_t;
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID, dxpl = H5I_INVALID_HID;
hsize_t dims[2] = {NX, NY};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
herr_t status;
int i, j, n;
const hsize_t four = 4;
- hid_t st = -1, dt = -1;
+ hid_t st = H5I_INVALID_HID, dt = H5I_INVALID_HID;
hid_t array_dt;
- unsigned filter_mask = 0;
+ uint32_t filter_mask = 0;
src_type_t direct_buf[CHUNK_NX][CHUNK_NY];
dst_type_t check_chunk[CHUNK_NX][CHUNK_NY];
src_type_t read_chunk[CHUNK_NX][CHUNK_NY]; /* For H5Dread_chunk */
@@ -1170,15 +1170,15 @@ error:
static int
test_invalid_parameters(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID, dxpl = H5I_INVALID_HID;
hsize_t dims[2] = {NX, NY};
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
herr_t status;
int i, j, n;
- unsigned filter_mask = 0;
+ uint32_t filter_mask = 0;
int direct_buf[CHUNK_NX][CHUNK_NY];
hsize_t offset[2] = {0, 0};
size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
@@ -1267,14 +1267,15 @@ test_invalid_parameters(hid_t file)
/* Check invalid dataset ID for H5Dwrite_chunk and H5Dread_chunk */
H5E_BEGIN_TRY
{
- if ((status = H5Dwrite_chunk((hid_t)-1, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
+ if ((status = H5Dwrite_chunk((hid_t)H5I_INVALID_HID, dxpl, filter_mask, offset, buf_size,
+ direct_buf)) != FAIL)
goto error;
}
H5E_END_TRY
H5E_BEGIN_TRY
{
- if ((status = H5Dread_chunk((hid_t)-1, dxpl, offset, &filter_mask, direct_buf)) != FAIL)
+ if ((status = H5Dread_chunk((hid_t)H5I_INVALID_HID, dxpl, offset, &filter_mask, direct_buf)) != FAIL)
goto error;
}
H5E_END_TRY
@@ -1282,14 +1283,16 @@ test_invalid_parameters(hid_t file)
/* Check invalid DXPL ID for H5Dwrite_chunk and H5Dread_chunk */
H5E_BEGIN_TRY
{
- if ((status = H5Dwrite_chunk(dataset, (hid_t)-1, filter_mask, offset, buf_size, direct_buf)) != FAIL)
+ if ((status = H5Dwrite_chunk(dataset, (hid_t)H5I_INVALID_HID, filter_mask, offset, buf_size,
+ direct_buf)) != FAIL)
goto error;
}
H5E_END_TRY
H5E_BEGIN_TRY
{
- if ((status = H5Dread_chunk(dataset, (hid_t)-1, offset, &filter_mask, direct_buf)) != FAIL)
+ if ((status = H5Dread_chunk(dataset, (hid_t)H5I_INVALID_HID, offset, &filter_mask, direct_buf)) !=
+ FAIL)
goto error;
}
H5E_END_TRY
@@ -1414,9 +1417,9 @@ error:
static int
test_direct_chunk_read_no_cache(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1, dapl = -1;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID, dxpl = H5I_INVALID_HID, dapl = H5I_INVALID_HID;
hsize_t dims[2] = {NX, NY};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
@@ -1425,7 +1428,7 @@ test_direct_chunk_read_no_cache(hid_t file)
int data[NX][NY];
int i, j, k, l, n; /* local index variables */
- unsigned filter_mask = 0; /* filter mask returned from H5Dread_chunk */
+ uint32_t filter_mask = 0; /* filter mask returned from H5Dread_chunk */
int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread and manually decompressed */
int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */
hsize_t offset[2]; /* chunk offset used for H5Dread_chunk */
@@ -1590,11 +1593,11 @@ error:
#ifdef H5_HAVE_FILTER_DEFLATE
static int
-test_direct_chunk_read_cache(hid_t file, hbool_t flush)
+test_direct_chunk_read_cache(hid_t file, bool flush)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID, dxpl = H5I_INVALID_HID;
hsize_t dims[2] = {NX, NY};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
@@ -1603,7 +1606,7 @@ test_direct_chunk_read_cache(hid_t file, hbool_t flush)
int data[NX][NY];
int i, j, k, l, n; /* local index variables */
- unsigned filter_mask = 0; /* filter mask returned from H5Dread_chunk */
+ uint32_t filter_mask = 0; /* filter mask returned from H5Dread_chunk */
int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread and manually decompressed */
int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */
hsize_t offset[2]; /* chunk offset used for H5Dread_chunk */
@@ -1791,9 +1794,9 @@ error:
static int
test_read_unfiltered_dset(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID, dxpl = H5I_INVALID_HID;
hsize_t dims[2] = {NX, NY};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
@@ -1801,7 +1804,7 @@ test_read_unfiltered_dset(hid_t file)
int data[NX][NY];
int i, j, k, l, n;
- unsigned filter_mask = 0;
+ uint32_t filter_mask = 0;
int direct_buf[CHUNK_NX][CHUNK_NY];
int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */
hsize_t offset[2] = {0, 0};
@@ -1944,9 +1947,9 @@ error:
static int
test_read_unallocated_chunk(hid_t file)
{
- hid_t dataspace = -1, dataset = -1;
- hid_t mem_space = -1;
- hid_t cparms = -1, dxpl = -1;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID, dxpl = H5I_INVALID_HID;
hsize_t dims[2] = {NX, NY};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
@@ -1955,7 +1958,7 @@ test_read_unallocated_chunk(hid_t file)
herr_t status; /* status from H5 function calls */
hsize_t i, j; /* local index variables */
- unsigned filter_mask = 0; /* filter mask returned from H5Dread_chunk */
+ uint32_t filter_mask = 0; /* filter mask returned from H5Dread_chunk */
int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread and manually decompressed */
hsize_t offset[2]; /* chunk offset used for H5Dread_chunk */
@@ -2249,15 +2252,15 @@ main(void)
/* Test direct chunk read */
#ifdef H5_HAVE_FILTER_DEFLATE
nerrors += test_direct_chunk_read_no_cache(file_id);
- nerrors += test_direct_chunk_read_cache(file_id, TRUE);
- nerrors += test_direct_chunk_read_cache(file_id, FALSE);
+ nerrors += test_direct_chunk_read_cache(file_id, true);
+ nerrors += test_direct_chunk_read_cache(file_id, false);
#endif /* H5_HAVE_FILTER_DEFLATE */
nerrors += test_read_unfiltered_dset(file_id);
nerrors += test_read_unallocated_chunk(file_id);
/* Loop over test configurations */
for (config = 0; config < CONFIG_END; config++) {
- hbool_t need_comma = FALSE;
+ bool need_comma = false;
/* Check for invalid combinations */
if ((config & CONFIG_REOPEN_FILE) && !(config & CONFIG_REOPEN_DSET))
@@ -2271,31 +2274,31 @@ main(void)
if (need_comma)
printf(", ");
printf("latest format");
- need_comma = TRUE;
+ need_comma = true;
} /* end if */
if (config & CONFIG_REOPEN_FILE) {
if (need_comma)
printf(", ");
printf("reopen file");
- need_comma = TRUE;
+ need_comma = true;
} /* end if */
else if (config & CONFIG_REOPEN_DSET) {
if (need_comma)
printf(", ");
printf("reopen dataset");
- need_comma = TRUE;
+ need_comma = true;
} /* end if */
if (config & CONFIG_DIRECT_WRITE) {
if (need_comma)
printf(", ");
printf("direct write");
- need_comma = TRUE;
+ need_comma = true;
} /* end if */
if (config & CONFIG_DIRECT_READ) {
if (need_comma)
printf(", ");
printf("direct read");
- need_comma = TRUE;
+ need_comma = true;
} /* end if */
printf(":\n");
fflush(stdout);
@@ -2310,10 +2313,10 @@ main(void)
if (nerrors)
goto error;
- HDputs("All direct chunk read/write tests passed.");
+ puts("All direct chunk read/write tests passed.");
return EXIT_SUCCESS;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
return EXIT_FAILURE;
}
diff --git a/test/dsets.c b/test/dsets.c
index 6d8c9dc..9bebbb8 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -416,7 +416,7 @@ test_create(hid_t file)
H5E_END_TRY
if (dataset >= 0) {
H5_FAILED();
- HDputs(" Library allowed overwrite of existing dataset.");
+ puts(" Library allowed overwrite of existing dataset.");
goto error;
}
@@ -443,7 +443,7 @@ test_create(hid_t file)
H5E_END_TRY
if (dataset >= 0) {
H5_FAILED();
- HDputs(" Opened a non-existent dataset.");
+ puts(" Opened a non-existent dataset.");
goto error;
}
@@ -467,7 +467,7 @@ test_create(hid_t file)
H5E_END_TRY
if (dataset >= 0) {
H5_FAILED();
- HDputs(" Opened a dataset with incorrect chunking parameters.");
+ puts(" Opened a dataset with incorrect chunking parameters.");
goto error;
}
@@ -531,9 +531,9 @@ error:
static herr_t
test_simple_io(const char *env_h5_drvr, hid_t fapl)
{
- char filename[FILENAME_BUF_SIZE];
- hid_t file = -1, dataset = -1, space = -1, xfer = -1;
- int i, j, n;
+ char filename[FILENAME_BUF_SIZE];
+ hid_t file = H5I_INVALID_HID, dataset = H5I_INVALID_HID, space = H5I_INVALID_HID, xfer = H5I_INVALID_HID;
+ int i, j, n;
hsize_t dims[2];
void *tconv_buf = NULL;
int f = -1;
@@ -544,8 +544,8 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
TESTING("simple I/O");
/* Can't run this test with multi-file VFDs because of HDopen/read/seek the file directly */
- if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0) {
+ if (strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0) {
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
/* Set up data array */
@@ -626,7 +626,7 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
file = -1;
f = HDopen(filename, O_RDONLY);
- HDlseek(f, (off_t)offset, SEEK_SET);
+ HDlseek(f, (HDoff_t)offset, SEEK_SET);
if (HDread(f, rdata_bytes, sizeof(int) * DSET_DIM1 * DSET_DIM2) < 0)
goto error;
@@ -653,7 +653,7 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support continuous address space");
+ puts(" Current VFD doesn't support continuous address space");
} /* end else */
return SUCCEED;
@@ -691,11 +691,11 @@ error:
*-------------------------------------------------------------------------
*/
static herr_t
-test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
+test_userblock_offset(const char *env_h5_drvr, hid_t fapl, bool new_format)
{
- char filename[FILENAME_BUF_SIZE];
- hid_t file = -1, fcpl = -1, dataset = -1, space = -1;
- int i, j;
+ char filename[FILENAME_BUF_SIZE];
+ hid_t file = H5I_INVALID_HID, fcpl = H5I_INVALID_HID, dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ int i, j;
hsize_t dims[2];
int f = -1;
haddr_t offset;
@@ -705,8 +705,8 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
TESTING("dataset offset with user block");
/* Can't run this test with multi-file VFDs because of HDopen/read/seek the file directly */
- if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0) {
+ if (strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0) {
h5_fixname(FILENAME[2], fapl, filename, sizeof filename);
/* Set up data array */
@@ -763,7 +763,7 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
file = -1;
f = HDopen(filename, O_RDONLY);
- HDlseek(f, (off_t)offset, SEEK_SET);
+ HDlseek(f, (HDoff_t)offset, SEEK_SET);
if (HDread(f, rdata_bytes, sizeof(int) * DSET_DIM1 * DSET_DIM2) < 0)
goto error;
@@ -789,7 +789,7 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support continuous address space");
+ puts(" Current VFD doesn't support continuous address space");
} /* end else */
return SUCCEED;
@@ -836,7 +836,7 @@ test_compact_io(hid_t fapl)
hid_t space = H5I_INVALID_HID;
hid_t plist = H5I_INVALID_HID;
- hid_t verfile = -1, new_fapl = -1;
+ hid_t verfile = H5I_INVALID_HID, new_fapl = H5I_INVALID_HID;
hsize_t dims[2];
int wbuf[16][8], rbuf[16][8];
char filename[FILENAME_BUF_SIZE];
@@ -1053,10 +1053,10 @@ error:
static herr_t
test_max_compact(hid_t fapl)
{
- hid_t file = -1;
- hid_t dataset = -1;
- hid_t space = -1;
- hid_t plist = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t plist = H5I_INVALID_HID;
hsize_t dims[1];
size_t compact_size;
int *wbuf = NULL;
@@ -1215,12 +1215,13 @@ error:
static herr_t
test_layout_extend(hid_t fapl)
{
- char filename[FILENAME_BUF_SIZE]; /* File name */
- hid_t fid = -1; /* File id */
- hid_t sid_fix = -1, sid_unlim = -1; /* Dataspace id */
- hid_t dcpl_compact = -1, dcpl_contig = -1, dcpl_chunked = -1; /* Dataset creation property list id */
- hid_t did_fixed = -1, did_unlim = -1; /* Dataset id */
- hsize_t cur_size[1] = {10}; /* Current size of dataspace */
+ char filename[FILENAME_BUF_SIZE]; /* File name */
+ hid_t fid = H5I_INVALID_HID; /* File id */
+ hid_t sid_fix = H5I_INVALID_HID, sid_unlim = H5I_INVALID_HID; /* Dataspace id */
+ hid_t dcpl_compact = H5I_INVALID_HID, dcpl_contig = H5I_INVALID_HID,
+ dcpl_chunked = H5I_INVALID_HID; /* Dataset creation property list id */
+ hid_t did_fixed = H5I_INVALID_HID, did_unlim = H5I_INVALID_HID; /* Dataset id */
+ hsize_t cur_size[1] = {10}; /* Current size of dataspace */
hsize_t max_unlim[1] = {H5S_UNLIMITED}; /* Maximum size of dataspace (unlimited) */
hsize_t max_fix[1] = {100}; /* Maximum size of dataspace (fixed) */
hsize_t chunk_dim[1] = {10}; /* Chunk size */
@@ -1469,7 +1470,7 @@ test_conv_buffer(hid_t fid)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Library shouldn't allow conversion buffer too small");
+ puts(" Library shouldn't allow conversion buffer too small");
goto error;
}
@@ -1504,7 +1505,7 @@ test_conv_buffer(hid_t fid)
free(cf);
free(cfrR);
- HDputs(" PASSED");
+ puts(" PASSED");
return SUCCEED;
error:
@@ -1543,7 +1544,7 @@ test_tconv(hid_t file)
{
char *out = NULL, *in = NULL;
hsize_t dims[1];
- hid_t space = -1, dataset = -1;
+ hid_t space = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
int i;
if ((out = (char *)malloc((size_t)(4 * 1000 * 1000))) == NULL)
@@ -1584,7 +1585,7 @@ test_tconv(hid_t file)
if (in[4 * i + 0] != out[4 * i + 3] || in[4 * i + 1] != out[4 * i + 2] ||
in[4 * i + 2] != out[4 * i + 1] || in[4 * i + 3] != out[4 * i + 0]) {
H5_FAILED();
- HDputs(" Read with byte order conversion failed.");
+ puts(" Read with byte order conversion failed.");
goto error;
}
}
@@ -1596,7 +1597,7 @@ test_tconv(hid_t file)
free(out);
free(in);
- HDputs(" PASSED");
+ puts(" PASSED");
return SUCCEED;
error:
@@ -1935,7 +1936,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
TESTING(" filters (setup)");
/* Check if all the filters are available */
- if (H5Pall_filters_avail(dcpl) != TRUE) {
+ if (H5Pall_filters_avail(dcpl) != true) {
H5_FAILED();
printf(" Line %d: Incorrect filter availability\n", __LINE__);
goto error;
@@ -2286,11 +2287,11 @@ error:
static herr_t
test_filter_noencoder(const char *dset_name)
{
- hid_t file_id = -1;
- hid_t dset_id = -1;
- hid_t test_dset_id = -1;
- hid_t dcpl_id = -1;
- hid_t space_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t test_dset_id = H5I_INVALID_HID;
+ hid_t dcpl_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
hsize_t dims = 10;
herr_t err;
int test_ints[10] = {12};
@@ -2525,7 +2526,7 @@ test_filters(hid_t file)
* STEP 0: Test null I/O filter by itself.
*----------------------------------------------------------
*/
- HDputs("Testing 'null' filter");
+ puts("Testing 'null' filter");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2547,7 +2548,7 @@ test_filters(hid_t file)
* STEP 1: Test Fletcher32 Checksum by itself.
*----------------------------------------------------------
*/
- HDputs("Testing Fletcher32 checksum(enabled for read)");
+ puts("Testing Fletcher32 checksum(enabled for read)");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2561,23 +2562,23 @@ test_filters(hid_t file)
goto error;
if (fletcher32_size <= null_size) {
H5_FAILED();
- HDputs(" Size after checksumming is incorrect.");
+ puts(" Size after checksumming is incorrect.");
goto error;
} /* end if */
/* Disable checksum during read */
- HDputs("Testing Fletcher32 checksum(disabled for read)");
+ puts("Testing Fletcher32 checksum(disabled for read)");
if (test_filter_internal(file, DSET_FLETCHER32_NAME_2, dc, DISABLE_FLETCHER32, DATA_NOT_CORRUPTED,
&fletcher32_size) < 0)
goto error;
if (fletcher32_size <= null_size) {
H5_FAILED();
- HDputs(" Size after checksumming is incorrect.");
+ puts(" Size after checksumming is incorrect.");
goto error;
} /* end if */
/* Try to corrupt data and see if checksum fails */
- HDputs("Testing Fletcher32 checksum(when data is corrupted)");
+ puts("Testing Fletcher32 checksum(when data is corrupted)");
data_corrupt[0] = 52;
data_corrupt[1] = 33;
data_corrupt[2] = 27;
@@ -2591,7 +2592,7 @@ test_filters(hid_t file)
goto error;
if (fletcher32_size <= null_size) {
H5_FAILED();
- HDputs(" Size after checksumming is incorrect.");
+ puts(" Size after checksumming is incorrect.");
goto error;
} /* end if */
@@ -2604,7 +2605,7 @@ test_filters(hid_t file)
*----------------------------------------------------------
*/
#ifdef H5_HAVE_FILTER_DEFLATE
- HDputs("Testing deflate filter");
+ puts("Testing deflate filter");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2621,7 +2622,7 @@ test_filters(hid_t file)
#else /* H5_HAVE_FILTER_DEFLATE */
TESTING("deflate filter");
SKIPPED();
- HDputs(" Deflate filter not enabled");
+ puts(" Deflate filter not enabled");
#endif /* H5_HAVE_FILTER_DEFLATE */
/*----------------------------------------------------------
@@ -2636,7 +2637,7 @@ test_filters(hid_t file)
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
goto error;
- HDputs("");
+ puts("");
if (H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0)
goto error;
if (test_filter_internal(file, DSET_SZIP_NAME, dc, DISABLE_FLETCHER32, DATA_NOT_CORRUPTED,
@@ -2652,7 +2653,7 @@ test_filters(hid_t file)
TESTING("szip filter (without encoder)");
if (h5_szip_can_encode() != 1) {
- HDputs("");
+ puts("");
if (test_filter_noencoder(NOENCODER_SZIP_DATASET) < 0)
goto error;
}
@@ -2663,14 +2664,14 @@ test_filters(hid_t file)
#else /* H5_HAVE_FILTER_SZIP */
TESTING("szip filter");
SKIPPED();
- HDputs(" Szip filter not enabled");
+ puts(" Szip filter not enabled");
#endif /* H5_HAVE_FILTER_SZIP */
/*----------------------------------------------------------
* STEP 4: Test shuffling by itself.
*----------------------------------------------------------
*/
- HDputs("Testing shuffle filter");
+ puts("Testing shuffle filter");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2683,7 +2684,7 @@ test_filters(hid_t file)
goto error;
if (shuffle_size != null_size) {
H5_FAILED();
- HDputs(" Shuffled size not the same as uncompressed size.");
+ puts(" Shuffled size not the same as uncompressed size.");
goto error;
} /* end if */
@@ -2696,7 +2697,7 @@ test_filters(hid_t file)
*----------------------------------------------------------
*/
#ifdef H5_HAVE_FILTER_DEFLATE
- HDputs("Testing shuffle+deflate+checksum filters(checksum first)");
+ puts("Testing shuffle+deflate+checksum filters(checksum first)");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2716,7 +2717,7 @@ test_filters(hid_t file)
if (H5Pclose(dc) < 0)
goto error;
- HDputs("Testing shuffle+deflate+checksum filters(checksum last)");
+ puts("Testing shuffle+deflate+checksum filters(checksum last)");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2738,7 +2739,7 @@ test_filters(hid_t file)
#else /* H5_HAVE_FILTER_DEFLATE */
TESTING("shuffle+deflate+fletcher32 filters");
SKIPPED();
- HDputs(" Deflate filter not enabled");
+ puts(" Deflate filter not enabled");
#endif /* H5_HAVE_FILTER_DEFLATE */
/*----------------------------------------------------------
@@ -2759,7 +2760,7 @@ test_filters(hid_t file)
/* Make sure encoding is enabled */
if (h5_szip_can_encode() == 1) {
- HDputs("");
+ puts("");
if (H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0)
goto error;
if (test_filter_internal(file, DSET_SHUF_SZIP_FLET_NAME, dc, ENABLE_FLETCHER32, DATA_NOT_CORRUPTED,
@@ -2773,7 +2774,7 @@ test_filters(hid_t file)
TESTING("shuffle+szip+checksum filters(checksum first, without encoder)");
if (h5_szip_can_encode() != 1) {
- HDputs("");
+ puts("");
if (test_filter_noencoder(NOENCODER_SZIP_SHUFF_FLETCH_DATASET) < 0)
goto error;
}
@@ -2789,7 +2790,7 @@ test_filters(hid_t file)
/* Make sure encoding is enabled */
if (h5_szip_can_encode() == 1) {
- HDputs("");
+ puts("");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2816,7 +2817,7 @@ test_filters(hid_t file)
#else /* H5_HAVE_FILTER_SZIP */
TESTING("shuffle+szip+fletcher32 filters");
SKIPPED();
- HDputs(" szip filter not enabled");
+ puts(" szip filter not enabled");
#endif /* H5_HAVE_FILTER_SZIP */
return SUCCEED;
@@ -2845,14 +2846,14 @@ test_missing_filter(hid_t file)
size_t i, j; /* Local index variables */
herr_t ret; /* Generic return value */
const char *testfile = H5_get_srcdir_filename(FILE_DEFLATE_NAME); /* Corrected test file name */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
TESTING("dataset access with missing filter");
/* Unregister the deflate filter */
#ifdef H5_HAVE_FILTER_DEFLATE
/* Verify deflate filter is registered currently */
- if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != TRUE) {
+ if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != true) {
H5_FAILED();
printf(" Line %d: Deflate filter not available\n", __LINE__);
goto error;
@@ -2861,7 +2862,7 @@ test_missing_filter(hid_t file)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Unregister deflate filter */
/* (Use private routine, to avoid range checking on filter ID) */
@@ -2872,7 +2873,7 @@ test_missing_filter(hid_t file)
} /* end if */
#endif /* H5_HAVE_FILTER_DEFLATE */
/* Verify deflate filter is not registered currently */
- if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != FALSE) {
+ if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != false) {
H5_FAILED();
printf(" Line %d: Deflate filter available\n", __LINE__);
goto error;
@@ -2902,7 +2903,7 @@ test_missing_filter(hid_t file)
printf(" Line %d: Can't check filter availability\n", __LINE__);
goto error;
} /* end if */
- if (ret != FALSE) {
+ if (ret != false) {
H5_FAILED();
printf(" Line %d: Filter shouldn't be available\n", __LINE__);
goto error;
@@ -3040,7 +3041,7 @@ test_missing_filter(hid_t file)
/* Re-register the deflate filter */
/* Verify deflate filter is not registered currently */
- if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != FALSE) {
+ if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != false) {
H5_FAILED();
printf(" Line %d: Deflate filter available\n", __LINE__);
goto error;
@@ -3054,7 +3055,7 @@ test_missing_filter(hid_t file)
} /* end if */
/* Verify deflate filter is registered currently */
- if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != TRUE) {
+ if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != true) {
H5_FAILED();
printf(" Line %d: Deflate filter not available\n", __LINE__);
goto error;
@@ -3062,16 +3063,16 @@ test_missing_filter(hid_t file)
#endif /* H5_HAVE_FILTER_DEFLATE */
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
PASSED();
return SUCCEED;
error:
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
return FAIL;
} /* end test_missing_filter() */
@@ -3195,7 +3196,7 @@ test_nbit_int(hid_t file)
double power;
size_t i, j;
- HDputs("Testing nbit filter");
+ puts("Testing nbit filter");
TESTING(" nbit int (setup)");
/* Define dataset datatype (integer), and set precision, offset */
@@ -3233,7 +3234,7 @@ test_nbit_int(hid_t file)
/* Initialize data, assuming size of long long >= size of int */
for (i = 0; i < (size_t)size[0]; i++)
for (j = 0; j < (size_t)size[1]; j++) {
- power = HDpow(2.0, (double)(precision - 1));
+ power = pow(2.0, (double)(precision - 1));
orig_data[i][j] = (int)(((long long)HDrandom() % (long long)power) << offset);
/* even-numbered values are negative */
@@ -3387,7 +3388,7 @@ test_nbit_float(hid_t file)
*/
for (i = 0; i < (size_t)size[0]; i++) {
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDisnan(orig_data[i][j]))
+ if (isnan(orig_data[i][j]))
continue; /* skip if value is NaN */
if (!H5_FLT_ABS_EQUAL(new_data[i][j], orig_data[i][j])) {
H5_FAILED();
@@ -3509,7 +3510,7 @@ test_nbit_double(hid_t file)
*/
for (i = 0; i < (size_t)size[0]; i++) {
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDisnan(orig_data[i][j]))
+ if (isnan(orig_data[i][j]))
continue; /* skip if value is NaN */
if (!H5_DBL_ABS_EQUAL(new_data[i][j], orig_data[i][j])) {
H5_FAILED();
@@ -3610,7 +3611,7 @@ test_nbit_array(hid_t file)
for (j = 0; j < (size_t)size[1]; j++)
for (m = 0; m < (size_t)adims[0]; m++)
for (n = 0; n < (size_t)adims[1]; n++) {
- power = HDpow(2.0, (double)precision);
+ power = pow(2.0, (double)precision);
orig_data[i][j][m][n] =
(unsigned int)(((long long)HDrandom() % (long long)power) << offset);
} /* end for */
@@ -3803,11 +3804,11 @@ test_nbit_compound(hid_t file)
/* Initialize data, assuming size of long long >= size of member datatypes */
for (i = 0; i < (size_t)size[0]; i++)
for (j = 0; j < (size_t)size[1]; j++) {
- power = HDpow(2.0, (double)(precision[0] - 1));
+ power = pow(2.0, (double)(precision[0] - 1));
orig_data[i][j].i = (int)(((long long)HDrandom() % (long long)power) << offset[0]);
- power = HDpow(2.0, (double)(precision[1] - 1));
+ power = pow(2.0, (double)(precision[1] - 1));
orig_data[i][j].c = (char)(((long long)HDrandom() % (long long)power) << offset[1]);
- power = HDpow(2.0, (double)(precision[2] - 1));
+ power = pow(2.0, (double)(precision[2] - 1));
orig_data[i][j].s = (short)(((long long)HDrandom() % (long long)power) << offset[2]);
orig_data[i][j].f = float_val[i][j];
@@ -3852,7 +3853,7 @@ test_nbit_compound(hid_t file)
if (((unsigned)new_data[i][j].i & i_mask) != ((unsigned)orig_data[i][j].i & i_mask) ||
((unsigned)new_data[i][j].c & c_mask) != ((unsigned)orig_data[i][j].c & c_mask) ||
((unsigned)new_data[i][j].s & s_mask) != ((unsigned)orig_data[i][j].s & s_mask) ||
- (!HDisnan(orig_data[i][j].f) && !H5_FLT_ABS_EQUAL(new_data[i][j].f, orig_data[i][j].f))) {
+ (!isnan(orig_data[i][j].f) && !H5_FLT_ABS_EQUAL(new_data[i][j].f, orig_data[i][j].f))) {
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
@@ -4082,32 +4083,32 @@ test_nbit_compound_2(hid_t file)
/* Initialize data, assuming size of long long >= size of member datatypes */
for (i = 0; i < (size_t)size[0]; i++)
for (j = 0; j < (size_t)size[1]; j++) {
- power = HDpow(2.0, (double)(precision[0] - 1));
+ power = pow(2.0, (double)(precision[0] - 1));
orig_data[i][j].a.i = (int)(((long long)HDrandom() % (long long)power) << offset[0]);
- power = HDpow(2.0, (double)(precision[1] - 1));
+ power = pow(2.0, (double)(precision[1] - 1));
orig_data[i][j].a.c = (char)(((long long)HDrandom() % (long long)power) << offset[1]);
- power = HDpow(2.0, (double)(precision[2] - 1));
+ power = pow(2.0, (double)(precision[2] - 1));
orig_data[i][j].a.s = (short)(-(((long long)HDrandom() % (long long)power) << offset[2]));
orig_data[i][j].a.f = float_val[i][j];
- power = HDpow(2.0, (double)precision[3]);
+ power = pow(2.0, (double)precision[3]);
orig_data[i][j].v = (unsigned int)(((long long)HDrandom() % (long long)power) << offset[3]);
for (m = 0; m < (size_t)array_dims[0]; m++)
for (n = 0; n < (size_t)array_dims[1]; n++) {
- power = HDpow(2.0, (double)(precision[4] - 1));
+ power = pow(2.0, (double)(precision[4] - 1));
orig_data[i][j].b[m][n] = (char)(((long long)HDrandom() % (long long)power) << offset[4]);
} /* end for */
for (m = 0; m < (size_t)array_dims[0]; m++)
for (n = 0; n < (size_t)array_dims[1]; n++) {
- power = HDpow(2.0, (double)(precision[0] - 1));
+ power = pow(2.0, (double)(precision[0] - 1));
orig_data[i][j].d[m][n].i =
(int)(-(((long long)HDrandom() % (long long)power) << offset[0]));
- power = HDpow(2.0, (double)(precision[1] - 1));
+ power = pow(2.0, (double)(precision[1] - 1));
orig_data[i][j].d[m][n].c =
(char)(((long long)HDrandom() % (long long)power) << offset[1]);
- power = HDpow(2.0, (double)(precision[2] - 1));
+ power = pow(2.0, (double)(precision[2] - 1));
orig_data[i][j].d[m][n].s =
(short)(((long long)HDrandom() % (long long)power) << offset[2]);
orig_data[i][j].d[m][n].f = float_val[i][j];
@@ -4176,7 +4177,7 @@ test_nbit_compound_2(hid_t file)
((unsigned)orig_data[i][j].d[m][n].c & c_mask) ||
((unsigned)new_data[i][j].d[m][n].s & s_mask) !=
((unsigned)orig_data[i][j].d[m][n].s & s_mask) ||
- (!HDisnan(new_data[i][j].d[m][n].f) &&
+ (!isnan(new_data[i][j].d[m][n].f) &&
!H5_FLT_ABS_EQUAL(new_data[i][j].d[m][n].f, new_data[i][j].d[m][n].f))) {
d_failed = 1;
goto out;
@@ -4186,7 +4187,7 @@ out:
if (((unsigned)new_data[i][j].a.i & i_mask) != ((unsigned)orig_data[i][j].a.i & i_mask) ||
((unsigned)new_data[i][j].a.c & c_mask) != ((unsigned)orig_data[i][j].a.c & c_mask) ||
((unsigned)new_data[i][j].a.s & s_mask) != ((unsigned)orig_data[i][j].a.s & s_mask) ||
- (!HDisnan(new_data[i][j].a.f) && !H5_FLT_ABS_EQUAL(new_data[i][j].a.f, new_data[i][j].a.f)) ||
+ (!isnan(new_data[i][j].a.f) && !H5_FLT_ABS_EQUAL(new_data[i][j].a.f, new_data[i][j].a.f)) ||
new_data[i][j].v != orig_data[i][j].v || b_failed || d_failed) {
H5_FAILED();
printf(" Read different values than written.\n");
@@ -4265,7 +4266,7 @@ test_nbit_compound_3(hid_t file)
} atomic;
hid_t i_tid, str_tid, vl_str_tid, v_tid, o_tid;
hid_t cmpd_tid; /* atomic compound datatype */
- hid_t dataset, space, dc, obj_ref_dataset = -1;
+ hid_t dataset, space, dc, obj_ref_dataset = H5I_INVALID_HID;
const hsize_t size[1] = {5};
const hsize_t chunk_size[1] = {5};
atomic orig_data[5];
@@ -4335,11 +4336,11 @@ test_nbit_compound_3(hid_t file)
/* Initialize data */
for (i = 0; i < (size_t)size[0]; i++) {
- power = HDpow(2.0, 17.0 - 1.0);
+ power = pow(2.0, 17.0 - 1.0);
memset(&orig_data[i], 0, sizeof(orig_data[i]));
orig_data[i].i = (int)(HDrandom() % (long)power);
- HDstrcpy(orig_data[i].str, "fixed-length C string");
- orig_data[i].vl_str = HDstrdup("variable-length C string");
+ strcpy(orig_data[i].str, "fixed-length C string");
+ orig_data[i].vl_str = strdup("variable-length C string");
orig_data[i].v.p = malloc((size_t)(i + 1) * sizeof(unsigned int));
orig_data[i].v.len = (size_t)i + 1;
@@ -4379,9 +4380,9 @@ test_nbit_compound_3(hid_t file)
/* Check that the values read are the same as the values written */
for (i = 0; i < (size_t)size[0]; i++) {
- if (new_data[i].i != orig_data[i].i || HDstrcmp(new_data[i].str, orig_data[i].str) != 0 ||
- HDstrcmp(new_data[i].vl_str, orig_data[i].vl_str) != 0 ||
- new_data[i].v.len != orig_data[i].v.len || new_data[i].r != orig_data[i].r) {
+ if (new_data[i].i != orig_data[i].i || strcmp(new_data[i].str, orig_data[i].str) != 0 ||
+ strcmp(new_data[i].vl_str, orig_data[i].vl_str) != 0 || new_data[i].v.len != orig_data[i].v.len ||
+ new_data[i].r != orig_data[i].r) {
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu\n", (unsigned long)i);
@@ -4521,7 +4522,7 @@ test_nbit_int_size(hid_t file)
*/
for (i = 0; i < DSET_DIM1; i++)
for (j = 0; j < DSET_DIM2; j++) {
- power = HDpow(2.0, (double)(precision - 1));
+ power = pow(2.0, (double)(precision - 1));
orig[i][j] = HDrandom() % (int)power << offset;
}
@@ -4845,7 +4846,7 @@ test_scaleoffset_int(hid_t file)
int new_data[2][5];
size_t i, j;
- HDputs("Testing scaleoffset filter");
+ puts("Testing scaleoffset filter");
TESTING(" scaleoffset int without fill value (setup)");
datatype = H5Tcopy(H5T_NATIVE_INT);
@@ -5173,7 +5174,7 @@ test_scaleoffset_float(hid_t file)
/* Check that the values read are the same as the values written */
for (i = 0; i < (size_t)size[0]; i++) {
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDfabs((double)(new_data[i][j] - orig_data[i][j])) > HDpow(10.0, -3.0)) {
+ if (fabs((double)(new_data[i][j] - orig_data[i][j])) > pow(10.0, -3.0)) {
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
@@ -5316,7 +5317,7 @@ test_scaleoffset_float_2(hid_t file)
/* Check that the values read are the same as the values written */
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDfabs((double)(new_data[0][j] - orig_data[0][j])) > HDpow(10.0, -3.0)) {
+ if (fabs((double)(new_data[0][j] - orig_data[0][j])) > pow(10.0, -3.0)) {
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
@@ -5434,7 +5435,7 @@ test_scaleoffset_double(hid_t file)
/* Check that the values read are the same as the values written */
for (i = 0; i < (size_t)size[0]; i++) {
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDfabs(new_data[i][j] - orig_data[i][j]) > HDpow(10.0, -7.0)) {
+ if (fabs(new_data[i][j] - orig_data[i][j]) > pow(10.0, -7.0)) {
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
@@ -5577,7 +5578,7 @@ test_scaleoffset_double_2(hid_t file)
/* Check that the values read are the same as the values written */
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDfabs((double)(new_data[0][j] - orig_data[0][j])) > HDpow(10.0, -7.0)) {
+ if (fabs((double)(new_data[0][j] - orig_data[0][j])) > pow(10.0, -7.0)) {
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
@@ -5622,9 +5623,9 @@ error:
static herr_t
test_multiopen(hid_t file)
{
- hid_t dcpl = -1, space = -1, dset1 = -1, dset2 = -1;
- hsize_t cur_size[1] = {10};
- hsize_t tmp_size[1];
+ hid_t dcpl = H5I_INVALID_HID, space = H5I_INVALID_HID, dset1 = H5I_INVALID_HID, dset2 = H5I_INVALID_HID;
+ hsize_t cur_size[1] = {10};
+ hsize_t tmp_size[1];
static hsize_t max_size[1] = {H5S_UNLIMITED};
TESTING("multi-open with extending");
@@ -5697,9 +5698,9 @@ error:
static herr_t
test_types(hid_t file)
{
- hid_t grp = -1, type = -1, space = -1, dset = -1;
- size_t i;
- hsize_t nelmts;
+ hid_t grp = H5I_INVALID_HID, type = H5I_INVALID_HID, space = H5I_INVALID_HID, dset = H5I_INVALID_HID;
+ size_t i;
+ hsize_t nelmts;
unsigned char buf[32];
TESTING("various datatypes");
@@ -6414,11 +6415,11 @@ test_can_apply_szip(hid_t
}
else {
SKIPPED();
- HDputs(" Szip encoding is not enabled.");
+ puts(" Szip encoding is not enabled.");
}
#else /* H5_HAVE_FILTER_SZIP */
SKIPPED();
- HDputs(" Szip filter is not enabled.");
+ puts(" Szip filter is not enabled.");
#endif /* H5_HAVE_FILTER_SZIP */
return SUCCEED;
@@ -6714,12 +6715,13 @@ error:
static herr_t
test_compare_dcpl(hid_t file)
{
- hid_t dsid = (-1); /* Dataset ID */
- hid_t sid = (-1); /* Dataspace ID */
- hid_t dcpl = (-1); /* Dataspace creation property list ID */
- hid_t dcpl1 = (-1), dcpl2 = (-1); /* Dataspace creation property list IDs from datasets */
- const hsize_t dims[2] = {500, 4096}; /* Dataspace dimensions */
- const hsize_t chunk_dims[2] = {250, 2048}; /* Chunk dimensions */
+ hid_t dsid = (H5I_INVALID_HID); /* Dataset ID */
+ hid_t sid = (H5I_INVALID_HID); /* Dataspace ID */
+ hid_t dcpl = (H5I_INVALID_HID); /* Dataspace creation property list ID */
+ hid_t dcpl1 = (H5I_INVALID_HID),
+ dcpl2 = (H5I_INVALID_HID); /* Dataspace creation property list IDs from datasets */
+ const hsize_t dims[2] = {500, 4096}; /* Dataspace dimensions */
+ const hsize_t chunk_dims[2] = {250, 2048}; /* Chunk dimensions */
TESTING("comparing dataset creation property lists");
@@ -6814,16 +6816,17 @@ error:
static herr_t
test_copy_dcpl(hid_t file, hid_t fapl)
{
- hid_t dsid1 = (-1), dsid2 = (-1); /* Dataset ID */
- hid_t new_dsid1 = (-1), new_dsid2 = (-1); /* Dataset ID */
- hid_t sid = (-1); /* Dataspace ID */
- hid_t dcpl = (-1); /* Dataset creation property list ID */
- hid_t dcpl1 = (-1), dcpl2 = (-1); /* Copies of creation property list IDs */
- hid_t dcpl1_copy = (-1), dcpl2_copy = (-1); /* Copies of creation property list IDs */
- const hsize_t dims[2] = {500, 4096}; /* Dataspace dimensions */
- const hsize_t chunk_dims[2] = {250, 2048}; /* Chunk dimensions */
+ hid_t dsid1 = (H5I_INVALID_HID), dsid2 = (H5I_INVALID_HID); /* Dataset ID */
+ hid_t new_dsid1 = (H5I_INVALID_HID), new_dsid2 = (H5I_INVALID_HID); /* Dataset ID */
+ hid_t sid = (H5I_INVALID_HID); /* Dataspace ID */
+ hid_t dcpl = (H5I_INVALID_HID); /* Dataset creation property list ID */
+ hid_t dcpl1 = (H5I_INVALID_HID), dcpl2 = (H5I_INVALID_HID); /* Copies of creation property list IDs */
+ hid_t dcpl1_copy = (H5I_INVALID_HID),
+ dcpl2_copy = (H5I_INVALID_HID); /* Copies of creation property list IDs */
+ const hsize_t dims[2] = {500, 4096}; /* Dataspace dimensions */
+ const hsize_t chunk_dims[2] = {250, 2048}; /* Chunk dimensions */
char filename[FILENAME_BUF_SIZE];
- hid_t new_file = (-1);
+ hid_t new_file = (H5I_INVALID_HID);
TESTING("copying dataset creation property lists");
@@ -6972,16 +6975,16 @@ static herr_t
test_filter_delete(hid_t file)
{
#ifdef H5_HAVE_FILTER_DEFLATE
- H5Z_filter_t filtn; /* filter identification number */
- hid_t dsid = -1; /* dataset ID */
- hid_t sid = -1; /* dataspace ID */
- hid_t dcpl = -1; /* dataset creation property list ID */
- hid_t dcpl1 = -1; /* dataset creation property list ID */
- hsize_t dims[2] = {20, 20}; /* dataspace dimensions */
- hsize_t chunk_dims[2] = {10, 10}; /* chunk dimensions */
- int nfilters; /* number of filters in DCPL */
- unsigned flags; /* flags for filter */
- herr_t ret; /* generic return value */
+ H5Z_filter_t filtn; /* filter identification number */
+ hid_t dsid = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list ID */
+ hid_t dcpl1 = H5I_INVALID_HID; /* dataset creation property list ID */
+ hsize_t dims[2] = {20, 20}; /* dataspace dimensions */
+ hsize_t chunk_dims[2] = {10, 10}; /* chunk dimensions */
+ int nfilters; /* number of filters in DCPL */
+ unsigned flags; /* flags for filter */
+ herr_t ret; /* generic return value */
int i;
#endif
@@ -7121,16 +7124,16 @@ error:
static herr_t
auxread_fdata(hid_t fid, const char *name)
{
- hid_t dset_id = -1; /* dataset ID */
- hid_t dcpl_id = -1; /* dataset creation property list ID */
- hid_t space_id = -1; /* space ID */
- hid_t ftype_id = -1; /* file data type ID */
- hid_t mtype_id = -1; /* memory data type ID */
- size_t msize; /* memory size of memory type */
- void *buf = NULL; /* data buffer */
- hsize_t nelmts; /* number of elements in dataset */
- int rank; /* rank of dataset */
- hsize_t dims[H5S_MAX_RANK]; /* dimensions of dataset */
+ hid_t dset_id = H5I_INVALID_HID; /* dataset ID */
+ hid_t dcpl_id = H5I_INVALID_HID; /* dataset creation property list ID */
+ hid_t space_id = H5I_INVALID_HID; /* space ID */
+ hid_t ftype_id = H5I_INVALID_HID; /* file data type ID */
+ hid_t mtype_id = H5I_INVALID_HID; /* memory data type ID */
+ size_t msize; /* memory size of memory type */
+ void *buf = NULL; /* data buffer */
+ hsize_t nelmts; /* number of elements in dataset */
+ int rank; /* rank of dataset */
+ hsize_t dims[H5S_MAX_RANK]; /* dimensions of dataset */
int i;
if ((dset_id = H5Dopen2(fid, name, H5P_DEFAULT)) < 0)
@@ -7203,10 +7206,10 @@ error:
static herr_t
test_filters_endianess(void)
{
- hid_t fid = -1; /* file ID */
- hid_t dsid = -1; /* dataset ID */
- hid_t sid = -1; /* dataspace ID */
- hid_t dcpl = -1; /* dataset creation property list ID */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t dsid = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list ID */
const char *data_file = H5_get_srcdir_filename("test_filters_le.h5"); /* Corrected test file name */
TESTING("filters with big-endian/little-endian data");
@@ -7277,8 +7280,8 @@ error:
static herr_t
test_zero_dims(hid_t file)
{
- hid_t s = -1, d = -1, dcpl = -1;
- hid_t s2 = -1, d2 = -1, dcpl2 = -1;
+ hid_t s = H5I_INVALID_HID, d = H5I_INVALID_HID, dcpl = H5I_INVALID_HID;
+ hid_t s2 = H5I_INVALID_HID, d2 = H5I_INVALID_HID, dcpl2 = H5I_INVALID_HID;
hsize_t dzero = 0, dmax = H5S_UNLIMITED, csize = 5;
hsize_t dzero2[2] = {0, 0};
hsize_t dmax2[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
@@ -7485,9 +7488,9 @@ error:
static herr_t
test_missing_chunk(hid_t file)
{
- hid_t d = -1, did2 = -1; /* Dataset IDs */
- hid_t dcpl = -1, dcpl2 = -1; /* Dataset creation property IDs */
- hid_t s = -1, sid2 = -1; /* Dataspace ID */
+ hid_t d = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dcpl = H5I_INVALID_HID, dcpl2 = H5I_INVALID_HID; /* Dataset creation property IDs */
+ hid_t s = H5I_INVALID_HID, sid2 = H5I_INVALID_HID; /* Dataspace ID */
hsize_t hs_start[1], hs_stride[1], hs_count[1], hs_block[1]; /* Hyperslab setting */
hsize_t hs_start2[2], hs_stride2[2], hs_count2[2], hs_block2[2]; /* Hyperslab setting */
@@ -7737,9 +7740,9 @@ error:
static H5_ATTR_CONST long
gcd(long l0, long r0)
{
- long magnitude, remainder;
- hbool_t negative = ((l0 < 0) != (r0 < 0));
- long l = HDlabs(l0), r = HDlabs(r0);
+ long magnitude, remainder;
+ bool negative = ((l0 < 0) != (r0 < 0));
+ long l = labs(l0), r = labs(r0);
do {
if (l < r) {
@@ -7805,10 +7808,11 @@ make_random_offset_and_increment(long nelts, long *offsetp, long *incp)
*-------------------------------------------------------------------------
*/
static herr_t
-test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl)
+test_random_chunks_real(const char *testname, bool early_alloc, hid_t fapl)
{
- char filename[FILENAME_BUF_SIZE];
- hid_t s = -1, m = -1, d = -1, dcpl = -1, file = -1;
+ char filename[FILENAME_BUF_SIZE];
+ hid_t s = H5I_INVALID_HID, m = H5I_INVALID_HID, d = H5I_INVALID_HID, dcpl = H5I_INVALID_HID,
+ file = H5I_INVALID_HID;
int wbuf[NPOINTS], rbuf[NPOINTS], check2[20][20];
hsize_t coord[NPOINTS][2];
const hsize_t dsize[2] = {100, 100}, dmax[2] = {H5S_UNLIMITED, H5S_UNLIMITED}, csize[2] = {10, 10},
@@ -8287,8 +8291,8 @@ test_random_chunks(hid_t fapl)
int nerrors = 0; /* Errors in sub-tests */
nerrors +=
- test_random_chunks_real("Write/read on randomly selected chunks w/non-implicit index", FALSE, fapl);
- nerrors += test_random_chunks_real("Write/read on randomly selected chunks w/implicit index", TRUE, fapl);
+ test_random_chunks_real("Write/read on randomly selected chunks w/non-implicit index", false, fapl);
+ nerrors += test_random_chunks_real("Write/read on randomly selected chunks w/implicit index", true, fapl);
return nerrors;
} /* end test_random_chunks() */
@@ -8372,7 +8376,7 @@ test_deprec(hid_t file)
H5E_END_TRY
if (dataset >= 0) {
H5_FAILED();
- HDputs(" Library allowed overwrite of existing dataset.");
+ puts(" Library allowed overwrite of existing dataset.");
goto error;
}
@@ -8397,7 +8401,7 @@ test_deprec(hid_t file)
H5E_END_TRY
if (dataset >= 0) {
H5_FAILED();
- HDputs(" Opened a non-existent dataset.");
+ puts(" Opened a non-existent dataset.");
goto error;
}
@@ -8450,7 +8454,7 @@ test_deprec(hid_t file)
H5E_END_TRY
if (dataset >= 0) {
H5_FAILED();
- HDputs(" Opened a dataset with incorrect chunking parameters.");
+ puts(" Opened a dataset with incorrect chunking parameters.");
goto error;
}
@@ -8514,7 +8518,7 @@ test_deprec(hid_t file)
if (H5Pset_filter(dcpl, H5Z_FILTER_DEPREC, 0, (size_t)0, NULL) < 0)
goto error;
- HDputs("");
+ puts("");
if (test_filter_internal(file, DSET_DEPREC_NAME_FILTER, dcpl, DISABLE_FLETCHER32, DATA_NOT_CORRUPTED,
&deprec_size) < 0)
goto error;
@@ -8543,10 +8547,10 @@ static herr_t
test_huge_chunks(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t dsid = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
hsize_t dim, chunk_dim; /* Dataset and chunk dimensions */
hsize_t dim2[3], chunk_dim2[3]; /* Dataset and chunk dimensions */
herr_t ret; /* Generic return value */
@@ -8671,14 +8675,14 @@ static herr_t
test_chunk_cache(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t fapl_local = -1; /* Local fapl */
- hid_t fapl_def = -1; /* Default fapl */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t dapl1 = -1; /* Dataset access property list ID */
- hid_t dapl2 = -1; /* Dataset access property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t dsid = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl_local = H5I_INVALID_HID; /* Local fapl */
+ hid_t fapl_def = H5I_INVALID_HID; /* Default fapl */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t dapl1 = H5I_INVALID_HID; /* Dataset access property list ID */
+ hid_t dapl2 = H5I_INVALID_HID; /* Dataset access property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
hsize_t dim, chunk_dim; /* Dataset and chunk dimensions */
size_t nslots_1, nslots_2, nslots_3, nslots_4; /* rdcc number of elements */
size_t nbytes_1, nbytes_2, nbytes_3, nbytes_4; /* rdcc number of bytes */
@@ -8940,12 +8944,12 @@ static herr_t
test_big_chunks_bypass_cache(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t fapl_local = -1; /* File access property list ID */
- hid_t dcpl = -1, t_dcpl = -1; /* Dataset creation property list ID */
- hid_t sid = -1, t_sid = -1; /* Dataspace ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl_local = H5I_INVALID_HID; /* File access property list ID */
+ hid_t dcpl = H5I_INVALID_HID, t_dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t sid = H5I_INVALID_HID, t_sid = H5I_INVALID_HID; /* Dataspace ID */
hid_t mid; /* Memory space ID */
- hid_t dsid = -1, t_dsid = -1; /* Dataset ID */
+ hid_t dsid = H5I_INVALID_HID, t_dsid = H5I_INVALID_HID; /* Dataset ID */
hsize_t dim, chunk_dim; /* Dataset and chunk dimensions */
hsize_t t_dim[2], t_max[2], t_chunk_dim[2]; /* Dataset and chunk dimensions */
size_t rdcc_nelmts, rdcc_nbytes; /* Chunk cache parameters */
@@ -9309,17 +9313,17 @@ static herr_t
test_chunk_fast(const char *env_h5_driver, hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t my_fapl = -1; /* File access property list ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t scalar_sid = -1; /* Scalar dataspace ID */
- hid_t dsid = -1; /* Dataset ID */
- hsize_t fill; /* Temporary value, for filling arrays */
- hsize_t hs_size[EARRAY_MAX_RANK]; /* Hyperslab size */
- hsize_t chunk_dim[EARRAY_MAX_RANK]; /* Chunk dimensions */
- H5F_libver_t low; /* File format low bound */
- unsigned swmr; /* Whether file should be written with SWMR access enabled */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t my_fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t scalar_sid = H5I_INVALID_HID; /* Scalar dataspace ID */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
+ hsize_t fill; /* Temporary value, for filling arrays */
+ hsize_t hs_size[EARRAY_MAX_RANK]; /* Hyperslab size */
+ hsize_t chunk_dim[EARRAY_MAX_RANK]; /* Chunk dimensions */
+ H5F_libver_t low; /* File format low bound */
+ unsigned swmr; /* Whether file should be written with SWMR access enabled */
TESTING("datasets w/extensible array as chunk index");
@@ -9726,17 +9730,17 @@ static herr_t
test_reopen_chunk_fast(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t scalar_sid = -1; /* Scalar dataspace ID */
- hid_t dsid = -1; /* Dataset ID */
- hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */
- hsize_t hs_offset; /* Hyperslab offset */
- hsize_t hs_size; /* Hyperslab size */
- H5D_alloc_time_t alloc_time; /* Storage allocation time */
- unsigned write_elem, read_elem; /* Element written/read */
- unsigned u; /* Local index variable */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t scalar_sid = H5I_INVALID_HID; /* Scalar dataspace ID */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
+ hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */
+ hsize_t hs_offset; /* Hyperslab offset */
+ hsize_t hs_size; /* Hyperslab size */
+ H5D_alloc_time_t alloc_time; /* Storage allocation time */
+ unsigned write_elem, read_elem; /* Element written/read */
+ unsigned u; /* Local index variable */
TESTING("datasets w/extensible array open/reopen with read/write");
@@ -9860,10 +9864,10 @@ static herr_t
test_chunk_fast_bug1(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t dsid = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
hsize_t dim[2], max_dim[2], chunk_dim[2]; /* Dataset and chunk dimensions */
H5D_alloc_time_t alloc_time; /* Storage allocation time */
@@ -10064,22 +10068,22 @@ static herr_t
test_chunk_expand(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1, dcpl2 = -1; /* Dataset creation property list ID */
- hid_t sid = -1, sid2 = -1; /* Dataspace ID */
- hid_t scalar_sid = -1; /* Scalar dataspace ID */
- hid_t dsid = -1, dsid2 = -1; /* Dataset ID */
- hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */
- hsize_t dim2[2], max_dim2[2], chunk_dim2[2]; /* Dataset and chunk dimensions */
- H5D_chunk_index_t idx_type, idx_type2; /* Dataset chunk index type */
- H5F_libver_t low, high; /* File format bounds */
- hsize_t hs_offset, hs_offset2[2]; /* Hyperslab offset */
- hsize_t hs_size, hs_size2[2]; /* Hyperslab size */
- H5D_alloc_time_t alloc_time; /* Storage allocation time */
- unsigned write_elem, read_elem; /* Element written/read */
- unsigned write_elem2, read_elem2; /* Element written/read */
- unsigned u; /* Local index variable */
- herr_t status; /* Generic return value */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID, dcpl2 = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t sid = H5I_INVALID_HID, sid2 = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t scalar_sid = H5I_INVALID_HID; /* Scalar dataspace ID */
+ hid_t dsid = H5I_INVALID_HID, dsid2 = H5I_INVALID_HID; /* Dataset ID */
+ hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */
+ hsize_t dim2[2], max_dim2[2], chunk_dim2[2]; /* Dataset and chunk dimensions */
+ H5D_chunk_index_t idx_type, idx_type2; /* Dataset chunk index type */
+ H5F_libver_t low, high; /* File format bounds */
+ hsize_t hs_offset, hs_offset2[2]; /* Hyperslab offset */
+ hsize_t hs_size, hs_size2[2]; /* Hyperslab size */
+ H5D_alloc_time_t alloc_time; /* Storage allocation time */
+ unsigned write_elem, read_elem; /* Element written/read */
+ unsigned write_elem2, read_elem2; /* Element written/read */
+ unsigned u; /* Local index variable */
+ herr_t status; /* Generic return value */
TESTING("filter expanding chunks too much");
@@ -10091,7 +10095,7 @@ test_chunk_expand(hid_t fapl)
if (sizeof(size_t) <= 4 && low != H5F_LIBVER_LATEST) {
SKIPPED();
- HDputs(" Current machine can't test for error w/old file format");
+ puts(" Current machine can't test for error w/old file format");
} /* end if */
else {
/* Register "expansion" filter */
@@ -10099,7 +10103,7 @@ test_chunk_expand(hid_t fapl)
FAIL_STACK_ERROR;
/* Check that the filter was registered */
- if (TRUE != H5Zfilter_avail(H5Z_FILTER_EXPAND))
+ if (true != H5Zfilter_avail(H5Z_FILTER_EXPAND))
FAIL_STACK_ERROR;
/* Loop over storage allocation time */
@@ -10550,7 +10554,7 @@ test_chunk_expand(hid_t fapl)
FAIL_STACK_ERROR;
/* Check that the filter was unregistered */
- if (FALSE != H5Zfilter_avail(H5Z_FILTER_EXPAND))
+ if (false != H5Zfilter_avail(H5Z_FILTER_EXPAND))
FAIL_STACK_ERROR;
PASSED();
@@ -10606,16 +10610,16 @@ static herr_t
test_fixed_array(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE]; /* File name */
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
- hid_t sid = -1; /* Dataspace ID for dataset with fixed dimensions */
- hid_t sid_big = -1; /* Dataspate ID for big dataset */
- hid_t sid_max = -1; /* Dataspace ID for dataset with maximum dimensions set */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID for dataset with fixed dimensions */
+ hid_t sid_big = H5I_INVALID_HID; /* Dataspate ID for big dataset */
+ hid_t sid_max = H5I_INVALID_HID; /* Dataspace ID for dataset with maximum dimensions set */
- hid_t dsid = -1; /* Dataset ID for dataset with fixed dimensions */
- hid_t dsid_big = -1; /* Dataset ID for big dataset with fixed dimensions */
- hid_t dsid_max = -1; /* Dataset ID for dataset with maximum dimensions set */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID for dataset with fixed dimensions */
+ hid_t dsid_big = H5I_INVALID_HID; /* Dataset ID for big dataset with fixed dimensions */
+ hid_t dsid_max = H5I_INVALID_HID; /* Dataset ID for dataset with maximum dimensions set */
hsize_t dim2[2] = {48, 18}; /* Dataset dimensions */
const hsize_t dim2_big[2] = {500, 60}; /* Big dataset dimensions */
@@ -10719,7 +10723,7 @@ test_fixed_array(hid_t fapl)
#ifdef H5_HAVE_FILTER_DEFLATE
/* Loop over compressing chunks */
- for (compress = FALSE; compress <= TRUE; compress++) {
+ for (compress = false; compress <= true; compress++) {
#endif /* H5_HAVE_FILTER_DEFLATE */
/* Loop over storage allocation time */
@@ -11143,18 +11147,19 @@ static herr_t
test_single_chunk(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE]; /* File name */
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t t_dcpl = -1; /* Dataset creation property list ID */
-
- hid_t sid = -1, sid_max = -1; /* Dataspace ID for dataset with fixed dimensions */
- hid_t did = -1, did_max = -1; /* Dataset ID for dataset with fixed dimensions */
- hsize_t dim2[2] = {DSET_DIM1, DSET_DIM2}; /* Dataset dimensions */
- hsize_t t_dim2[2] = {DSET_TMP_DIM1, DSET_TMP_DIM2}; /* Dataset dimensions */
- int *wbuf = NULL; /* write buffer */
- int *t_wbuf = NULL; /* write buffer */
- int *rbuf = NULL; /* read buffer */
- int *t_rbuf = NULL; /* read buffer */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t t_dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+
+ hid_t sid = H5I_INVALID_HID,
+ sid_max = H5I_INVALID_HID; /* Dataspace ID for dataset with fixed dimensions */
+ hid_t did = H5I_INVALID_HID, did_max = H5I_INVALID_HID; /* Dataset ID for dataset with fixed dimensions */
+ hsize_t dim2[2] = {DSET_DIM1, DSET_DIM2}; /* Dataset dimensions */
+ hsize_t t_dim2[2] = {DSET_TMP_DIM1, DSET_TMP_DIM2}; /* Dataset dimensions */
+ int *wbuf = NULL; /* write buffer */
+ int *t_wbuf = NULL; /* write buffer */
+ int *rbuf = NULL; /* read buffer */
+ int *t_rbuf = NULL; /* read buffer */
H5D_chunk_index_t idx_type; /* Dataset chunk index type */
H5F_libver_t low, high; /* File format bounds */
@@ -11205,7 +11210,7 @@ test_single_chunk(hid_t fapl)
#ifdef H5_HAVE_FILTER_DEFLATE
/* Loop over compressing chunks */
- for (compress = FALSE; compress <= TRUE; compress++) {
+ for (compress = false; compress <= true; compress++) {
#endif /* H5_HAVE_FILTER_DEFLATE */
/* Loop over storage allocation time */
@@ -11420,11 +11425,11 @@ error:
static herr_t
test_idx_compatible(void)
{
- hid_t fid = -1; /* File id */
- hid_t did = -1; /* Dataset id */
- const char *filename = NULL; /* old test file name */
- unsigned j; /* Local index variable */
- H5D_chunk_index_t idx_type; /* Chunked dataset index type */
+ hid_t fid = H5I_INVALID_HID; /* File id */
+ hid_t did = H5I_INVALID_HID; /* Dataset id */
+ const char *filename = NULL; /* old test file name */
+ unsigned j; /* Local index variable */
+ H5D_chunk_index_t idx_type; /* Chunked dataset index type */
/* Output message about test being performed */
TESTING("compatibility for 1.6/1.8 datasets that use B-tree indexing");
@@ -11497,10 +11502,10 @@ error:
static herr_t
test_unfiltered_edge_chunks(hid_t fapl)
{
- hid_t fid = -1; /* File id */
- hid_t did = -1; /* Dataset id */
- hid_t sid = -1; /* Dataspace id */
- hid_t dcpl = -1; /* DCPL id */
+ hid_t fid = H5I_INVALID_HID; /* File id */
+ hid_t did = H5I_INVALID_HID; /* Dataset id */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace id */
+ hid_t dcpl = H5I_INVALID_HID; /* DCPL id */
hsize_t dim[2] = {4, 3}; /* Dataset dimensions */
hsize_t cdim[2] = {2, 2}; /* Chunk dimension */
char wbuf[4][3]; /* Write buffer */
@@ -11640,15 +11645,15 @@ static herr_t
test_large_chunk_shrink(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t scalar_sid = -1; /* Scalar dataspace ID */
- hid_t dsid = -1; /* Dataset ID */
- hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */
- hsize_t hs_offset; /* Hyperslab offset */
- hsize_t hs_size; /* Hyperslab size */
- unsigned write_elem, read_elem; /* Element written/read */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t scalar_sid = H5I_INVALID_HID; /* Scalar dataspace ID */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
+ hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */
+ hsize_t hs_offset; /* Hyperslab offset */
+ hsize_t hs_size; /* Hyperslab size */
+ unsigned write_elem, read_elem; /* Element written/read */
TESTING("shrinking large chunk");
@@ -11773,11 +11778,11 @@ static herr_t
test_zero_dim_dset(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t dsid = -1; /* Dataset ID */
- hsize_t dim, chunk_dim; /* Dataset and chunk dimensions */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
+ hsize_t dim, chunk_dim; /* Dataset and chunk dimensions */
int data[1];
H5F_libver_t low, high; /* File format bounds */
herr_t ret; /* Generic return value */
@@ -11878,11 +11883,11 @@ static herr_t
test_swmr_non_latest(const char *env_h5_driver, hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
hsize_t dim[1], dims2[2]; /* Size of dataset */
hsize_t max_dim[1], max_dims2[2]; /* Maximum size of dataset */
hsize_t chunk_dim[1], chunk_dims2[2]; /* Chunk dimensions */
@@ -11898,7 +11903,7 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl)
*/
if (!H5FD__supports_swmr_test(env_h5_driver)) {
SKIPPED();
- HDputs(" Test skipped due to VFD not supporting SWMR I/O.");
+ puts(" Test skipped due to VFD not supporting SWMR I/O.");
return SUCCEED;
}
@@ -12148,12 +12153,12 @@ static herr_t
test_earray_hdr_fd(const char *env_h5_driver, hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1;
- hid_t sid = -1;
- hid_t did = -1;
- hid_t tid = -1;
- hid_t dcpl = -1;
- hid_t msid = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t msid = H5I_INVALID_HID;
H5D_chunk_index_t idx_type;
const hsize_t shape[1] = {8};
const hsize_t maxshape[1] = {H5S_UNLIMITED};
@@ -12168,7 +12173,7 @@ test_earray_hdr_fd(const char *env_h5_driver, hid_t fapl)
*/
if (!H5FD__supports_swmr_test(env_h5_driver)) {
SKIPPED();
- HDputs(" Test skipped due to VFD not supporting SWMR I/O.");
+ puts(" Test skipped due to VFD not supporting SWMR I/O.");
return SUCCEED;
}
@@ -12269,12 +12274,12 @@ static herr_t
test_farray_hdr_fd(const char *env_h5_driver, hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1;
- hid_t sid = -1;
- hid_t did = -1;
- hid_t tid = -1;
- hid_t dcpl = -1;
- hid_t msid = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t msid = H5I_INVALID_HID;
H5D_chunk_index_t idx_type;
const hsize_t shape[1] = {8};
const hsize_t maxshape[1] = {64};
@@ -12289,7 +12294,7 @@ test_farray_hdr_fd(const char *env_h5_driver, hid_t fapl)
*/
if (!H5FD__supports_swmr_test(env_h5_driver)) {
SKIPPED();
- HDputs(" Test skipped due to VFD not supporting SWMR I/O.");
+ puts(" Test skipped due to VFD not supporting SWMR I/O.");
return SUCCEED;
}
@@ -12390,12 +12395,12 @@ static herr_t
test_bt2_hdr_fd(const char *env_h5_driver, hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1;
- hid_t sid = -1;
- hid_t did = -1;
- hid_t tid = -1;
- hid_t dcpl = -1;
- hid_t msid = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t msid = H5I_INVALID_HID;
H5D_chunk_index_t idx_type;
const hsize_t shape[2] = {8, 8};
const hsize_t maxshape[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
@@ -12416,7 +12421,7 @@ test_bt2_hdr_fd(const char *env_h5_driver, hid_t fapl)
*/
if (!H5FD__supports_swmr_test(env_h5_driver)) {
SKIPPED();
- HDputs(" Test skipped due to VFD not supporting SWMR I/O.");
+ puts(" Test skipped due to VFD not supporting SWMR I/O.");
return SUCCEED;
}
@@ -12516,13 +12521,13 @@ static herr_t
test_storage_size(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1, dcpl2 = -1; /* Dataset creation property list IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t dsid = -1; /* Dataset ID */
- hsize_t dims[2], max_dims[2]; /* Dataset dimensions */
- hsize_t new_dims[2]; /* New dataset dimensions */
- hsize_t chunk_dims[2]; /* Chunk dimensions */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID, dcpl2 = H5I_INVALID_HID; /* Dataset creation property list IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
+ hsize_t dims[2], max_dims[2]; /* Dataset dimensions */
+ hsize_t new_dims[2]; /* New dataset dimensions */
+ hsize_t chunk_dims[2]; /* Chunk dimensions */
int wdata[STORAGE_SIZE_DIM1][STORAGE_SIZE_DIM2];
hsize_t ssize; /* Dataset storage size */
@@ -13005,15 +13010,15 @@ static herr_t
test_power2up(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hsize_t dims[2]; /* Dataset dimension sizes */
- hsize_t max_dims[2]; /* Maximum dimension sizes */
- hsize_t chunk_dims[2]; /* Chunk dimensions */
- hsize_t ext_dims[2]; /* Extended dimension sizes */
- herr_t status; /* Error status */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hsize_t dims[2]; /* Dataset dimension sizes */
+ hsize_t max_dims[2]; /* Maximum dimension sizes */
+ hsize_t chunk_dims[2]; /* Chunk dimensions */
+ hsize_t ext_dims[2]; /* Extended dimension sizes */
+ herr_t status; /* Error status */
TESTING("the next power of 2");
@@ -13134,8 +13139,8 @@ scatter_cb(void **src_buf /*out*/, size_t *src_buf_bytes_used /*out*/, void *_sc
static herr_t
test_scatter(void)
{
- hid_t sid = -1; /* Dataspace ID */
- hsize_t dim[3] = {8, 5, 8}; /* Dataspace dimensions */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dim[3] = {8, 5, 8}; /* Dataspace dimensions */
hsize_t start[3] = {0, 0, 0};
hsize_t stride[3] = {0, 0, 0};
hsize_t count[3] = {0, 0, 0};
@@ -13402,9 +13407,9 @@ error:
*-------------------------------------------------------------------------
*/
typedef struct gather_info_t {
- int *expect_dst_buf; /* Expected destination data buffer */
- size_t max_nelmts; /* Maximum number of elements passed to callback */
- hbool_t last_call; /* Whether this should be the last time the callback is called */
+ int *expect_dst_buf; /* Expected destination data buffer */
+ size_t max_nelmts; /* Maximum number of elements passed to callback */
+ bool last_call; /* Whether this should be the last time the callback is called */
} gather_info_t;
static herr_t
@@ -13433,7 +13438,7 @@ gather_cb(const void *dst_buf, size_t dst_buf_bytes_used, void *_gather_info)
if (gather_info->last_call)
TEST_ERROR;
if (nelmts < gather_info->max_nelmts)
- gather_info->last_call = TRUE;
+ gather_info->last_call = true;
/* Compare data and expected data */
for (i = 0; i < (int)nelmts; i++)
@@ -13449,8 +13454,8 @@ error:
static herr_t
test_gather(void)
{
- hid_t sid = -1; /* Dataspace ID */
- hsize_t dim[3] = {8, 5, 8}; /* Dataspace dimensions */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dim[3] = {8, 5, 8}; /* Dataspace dimensions */
hsize_t start[3] = {0, 0, 0};
hsize_t stride[3] = {0, 0, 0};
hsize_t count[3] = {0, 0, 0};
@@ -13501,7 +13506,7 @@ test_gather(void)
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
gather_info.max_nelmts = dst_buf_size;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
/* Gather data */
if (H5Dgather(sid, src_buf, H5T_NATIVE_INT, dst_buf_size * sizeof(dst_buf[0]), dst_buf, gather_cb,
@@ -13538,7 +13543,7 @@ test_gather(void)
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
gather_info.max_nelmts = dst_buf_size - 1;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
/* Gather data */
if (H5Dgather(sid, src_buf, H5T_NATIVE_INT, dst_buf_size * sizeof(dst_buf[0]) - 1, dst_buf, gather_cb,
@@ -13578,7 +13583,7 @@ test_gather(void)
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
gather_info.max_nelmts = dst_buf_size;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
/* Gather data */
if (H5Dgather(sid, src_buf, H5T_NATIVE_INT, dst_buf_size * sizeof(dst_buf[0]), dst_buf, gather_cb,
@@ -13634,7 +13639,7 @@ test_gather(void)
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
gather_info.max_nelmts = dst_buf_size;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
/* Gather data */
if (H5Dgather(sid, src_buf, H5T_NATIVE_INT, dst_buf_size * sizeof(dst_buf[0]), dst_buf, gather_cb,
@@ -13691,7 +13696,7 @@ test_gather(void)
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
gather_info.max_nelmts = dst_buf_size;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
/* Gather data */
if (H5Dgather(sid, src_buf, H5T_NATIVE_INT, dst_buf_size * sizeof(dst_buf[0]), dst_buf, gather_cb,
@@ -13725,7 +13730,7 @@ test_gather(void)
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
gather_info.max_nelmts = dst_buf_size;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
/* Gather data */
if (H5Dgather(sid, src_buf, H5T_NATIVE_INT, dst_buf_size * sizeof(dst_buf[0]), dst_buf, gather_cb,
@@ -13813,8 +13818,8 @@ scatter_error_cb_unalign(void **src_buf /*out*/, size_t *src_buf_bytes_used /*ou
static herr_t
test_scatter_error(void)
{
- hid_t sid = -1; /* Dataspace ID */
- hsize_t dim[1] = {10}; /* Dataspace dimensions */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dim[1] = {10}; /* Dataspace dimensions */
hsize_t start[3] = {2};
hsize_t count[3] = {6};
int src_buf[7]; /* Source data buffer */
@@ -14005,8 +14010,8 @@ gather_error_cb_fail(const void H5_ATTR_UNUSED *dst_buf, size_t H5_ATTR_UNUSED d
static herr_t
test_gather_error(void)
{
- hid_t sid = -1; /* Dataspace ID */
- hsize_t dim[1] = {10}; /* Dataspace dimensions */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dim[1] = {10}; /* Dataspace dimensions */
hsize_t start[1] = {2};
hsize_t count[1] = {6};
int src_buf[10]; /* Source data buffer */
@@ -14038,7 +14043,7 @@ test_gather_error(void)
/* Verify that base configuration passes */
gather_info.expect_dst_buf = expect_dst_buf;
gather_info.max_nelmts = 6;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
if (H5Dgather(sid, src_buf, H5T_NATIVE_INT, 6 * sizeof(dst_buf[0]), dst_buf, gather_cb, &gather_info) < 0)
TEST_ERROR;
@@ -14046,7 +14051,7 @@ test_gather_error(void)
* Test invalid parameters
*/
gather_info.expect_dst_buf = expect_dst_buf;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
H5E_BEGIN_TRY
{
ret = H5Dgather(H5T_NATIVE_INT, src_buf, H5T_NATIVE_INT, 6 * sizeof(dst_buf[0]), dst_buf, gather_cb,
@@ -14057,7 +14062,7 @@ test_gather_error(void)
TEST_ERROR;
gather_info.expect_dst_buf = expect_dst_buf;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
H5E_BEGIN_TRY
{
ret = H5Dgather(sid, NULL, H5T_NATIVE_INT, 6 * sizeof(dst_buf[0]), dst_buf, gather_cb, &gather_info);
@@ -14067,7 +14072,7 @@ test_gather_error(void)
TEST_ERROR;
gather_info.expect_dst_buf = expect_dst_buf;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
H5E_BEGIN_TRY
{
ret = H5Dgather(sid, src_buf, sid, 6 * sizeof(dst_buf[0]), dst_buf, gather_cb, &gather_info);
@@ -14077,7 +14082,7 @@ test_gather_error(void)
TEST_ERROR;
gather_info.expect_dst_buf = expect_dst_buf;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
H5E_BEGIN_TRY
{
ret = H5Dgather(sid, src_buf, H5T_NATIVE_INT, 0, dst_buf, gather_cb, &gather_info);
@@ -14087,7 +14092,7 @@ test_gather_error(void)
TEST_ERROR;
gather_info.expect_dst_buf = expect_dst_buf;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
H5E_BEGIN_TRY
{
ret = H5Dgather(sid, src_buf, H5T_NATIVE_INT, 1, dst_buf, gather_cb, &gather_info);
@@ -14097,7 +14102,7 @@ test_gather_error(void)
TEST_ERROR;
gather_info.expect_dst_buf = expect_dst_buf;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
H5E_BEGIN_TRY
{
ret = H5Dgather(sid, src_buf, H5T_NATIVE_INT, 6 * sizeof(dst_buf[0]), NULL, gather_cb, &gather_info);
@@ -14107,7 +14112,7 @@ test_gather_error(void)
TEST_ERROR;
gather_info.expect_dst_buf = expect_dst_buf;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
H5E_BEGIN_TRY
{
ret = H5Dgather(sid, src_buf, H5T_NATIVE_INT, 5 * sizeof(dst_buf[0]), dst_buf, NULL, &gather_info);
@@ -14120,7 +14125,7 @@ test_gather_error(void)
* Test callback returns failure
*/
gather_info.expect_dst_buf = expect_dst_buf;
- gather_info.last_call = FALSE;
+ gather_info.last_call = false;
H5E_BEGIN_TRY
{
ret = H5Dgather(sid, src_buf, H5T_NATIVE_INT, 6 * sizeof(dst_buf[0]), dst_buf, gather_error_cb_fail,
@@ -14380,10 +14385,10 @@ dls_01_main(void)
if (NULL == buffer)
TEST_ERROR;
- HDstrcpy(buffer, strings[0]);
- HDstrcpy(buffer + DLS_01_STR_SIZE, strings[1]);
- HDstrcpy(buffer + DLS_01_STR_SIZE * 2, strings[2]);
- HDstrcpy(buffer + DLS_01_STR_SIZE * 3, strings[3]);
+ strcpy(buffer, strings[0]);
+ strcpy(buffer + DLS_01_STR_SIZE, strings[1]);
+ strcpy(buffer + DLS_01_STR_SIZE * 2, strings[2]);
+ strcpy(buffer + DLS_01_STR_SIZE * 3, strings[3]);
fapl = H5Pcreate(H5P_FILE_ACCESS);
if (fapl <= 0)
@@ -14453,15 +14458,15 @@ error:
static herr_t
test_compact_open_close_dirty(hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t did = -1; /* Dataset ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t dcpl = -1; /* Dataset creation property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
hsize_t dims[1] = {10}; /* Dimension */
int wbuf[10]; /* Data buffer */
char filename[FILENAME_BUF_SIZE]; /* Filename */
int i; /* Local index variable */
- hbool_t dirty; /* The dirty flag */
+ bool dirty; /* The dirty flag */
TESTING("compact dataset repeated open/close and dirty flag");
@@ -14579,15 +14584,15 @@ error:
static herr_t
test_versionbounds(void)
{
- hid_t fapl = -1;
- hid_t srcfile = -1; /* Files with source dsets */
- hid_t vfile = -1; /* File with virtual dset */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t srcspace = -1; /* Source dataspaces */
- hid_t vspace = -1; /* Virtual dset dataspaces */
- hid_t srcdset = -1; /* Source dataset */
- hid_t vdset = -1; /* Virtual dataset */
- hsize_t dims[1] = {3}; /* Data space current size */
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t srcfile = H5I_INVALID_HID; /* Files with source dsets */
+ hid_t vfile = H5I_INVALID_HID; /* File with virtual dset */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t srcspace = H5I_INVALID_HID; /* Source dataspaces */
+ hid_t vspace = H5I_INVALID_HID; /* Virtual dset dataspaces */
+ hid_t srcdset = H5I_INVALID_HID; /* Source dataset */
+ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */
+ hsize_t dims[1] = {3}; /* Data space current size */
char srcfilename[FILENAME_BUF_SIZE];
char vfilename1[FILENAME_BUF_SIZE];
char vfilename2[FILENAME_BUF_SIZE];
@@ -14662,7 +14667,7 @@ test_versionbounds(void)
if (vdset > 0) /* dataset created successfully */
{
/* Virtual dataset is only available starting in V110 */
- VERIFY(high >= H5F_LIBVER_V110, TRUE, "virtual dataset");
+ VERIFY(high >= H5F_LIBVER_V110, true, "virtual dataset");
if (H5Dclose(vdset) < 0)
TEST_ERROR;
@@ -14732,11 +14737,11 @@ error:
static herr_t
test_object_header_minimization_dcpl(void)
{
- hid_t dcpl_id = -1;
- hid_t file_id = -1;
- char filename[FILENAME_BUF_SIZE] = "";
- hbool_t minimize = FALSE;
- herr_t ret;
+ hid_t dcpl_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
+ char filename[FILENAME_BUF_SIZE] = "";
+ bool minimize = false;
+ herr_t ret;
TESTING("dcpl flags to minimize dataset object header");
@@ -14762,23 +14767,23 @@ test_object_header_minimization_dcpl(void)
/* Default value (not set explicitly) */
if (H5Pget_dset_no_attrs_hint(dcpl_id, &minimize) == FAIL)
TEST_ERROR;
- if (FALSE != minimize)
+ if (false != minimize)
TEST_ERROR;
- /* FALSE-set value */
- if (H5Pset_dset_no_attrs_hint(dcpl_id, FALSE) == FAIL)
+ /* false-set value */
+ if (H5Pset_dset_no_attrs_hint(dcpl_id, false) == FAIL)
TEST_ERROR;
if (H5Pget_dset_no_attrs_hint(dcpl_id, &minimize) == FAIL)
TEST_ERROR;
- if (FALSE != minimize)
+ if (false != minimize)
TEST_ERROR;
- /* TRUE-set value */
- if (H5Pset_dset_no_attrs_hint(dcpl_id, TRUE) == FAIL)
+ /* true-set value */
+ if (H5Pset_dset_no_attrs_hint(dcpl_id, true) == FAIL)
TEST_ERROR;
if (H5Pget_dset_no_attrs_hint(dcpl_id, &minimize) == FAIL)
TEST_ERROR;
- if (TRUE != minimize)
+ if (true != minimize)
TEST_ERROR;
/***************/
@@ -14797,7 +14802,7 @@ test_object_header_minimization_dcpl(void)
/* Invalid DCPL ID should fail */
H5E_BEGIN_TRY
{
- ret = H5Pset_dset_no_attrs_hint(H5I_INVALID_HID, FALSE);
+ ret = H5Pset_dset_no_attrs_hint(H5I_INVALID_HID, false);
}
H5E_END_TRY
if (ret == SUCCEED)
@@ -14806,7 +14811,7 @@ test_object_header_minimization_dcpl(void)
/* Invalid DCPL ID should fail */
H5E_BEGIN_TRY
{
- ret = H5Pset_dset_no_attrs_hint(H5I_INVALID_HID, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(H5I_INVALID_HID, true);
}
H5E_END_TRY
if (ret == SUCCEED)
@@ -15243,7 +15248,7 @@ test_0sized_dset_metadata_alloc(hid_t fapl_id)
/*************/
/* Iterate over file format versions */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
H5D_layout_t layout; /* Dataset layout type */
H5D_alloc_time_t alloc_time; /* Storage allocation time */
@@ -15278,8 +15283,8 @@ test_0sized_dset_metadata_alloc(hid_t fapl_id)
continue;
/* Compose dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "/Dataset-%u-%u", (unsigned)alloc_time,
- (unsigned)layout);
+ snprintf(dset_name, sizeof(dset_name), "/Dataset-%u-%u", (unsigned)alloc_time,
+ (unsigned)layout);
/* Set up DCPL */
if ((dcpl_id_copy = H5Pcopy(dcpl_id)) < 0)
@@ -15407,7 +15412,7 @@ main(void)
{
char filename[FILENAME_BUF_SIZE];
hid_t file, grp, fapl, fapl2;
- hid_t fcpl = -1, fcpl2 = -1;
+ hid_t fcpl = H5I_INVALID_HID, fcpl2 = H5I_INVALID_HID;
unsigned new_format;
unsigned paged;
unsigned minimized_ohdr;
@@ -15417,17 +15422,17 @@ main(void)
double rdcc_w0;
int nerrors = 0;
const char *envval;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
- hbool_t driver_is_default_compatible;
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool driver_is_default_compatible;
int i;
/* Don't run this test using certain file drivers */
- envval = HDgetenv(HDF5_DRIVER);
+ envval = getenv(HDF5_DRIVER);
if (envval == NULL)
envval = "nomatch";
/* Current VFD that does not support contiguous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(envval, "split") != 0 && HDstrcmp(envval, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(envval, "split") != 0 && strcmp(envval, "multi") != 0);
/* Set the random # seed */
HDsrandom((unsigned)HDtime(NULL));
@@ -15494,23 +15499,23 @@ main(void)
TEST_ERROR;
/* Set file space strategy to paged aggregation and persisting free-space */
- if (H5Pset_file_space_strategy(fcpl2, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl2, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1) < 0)
TEST_ERROR;
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
/* Test with paged aggregation enabled or not */
- for (paged = FALSE; paged <= TRUE; paged++) {
+ for (paged = false; paged <= true; paged++) {
/* Temporary: skip testing for multi/split drivers:
fail file create when persisting free-space or using paged aggregation strategy */
if (!contig_addr_vfd && paged)
continue;
- for (minimized_ohdr = FALSE; minimized_ohdr <= TRUE; minimized_ohdr++) {
+ for (minimized_ohdr = false; minimized_ohdr <= true; minimized_ohdr++) {
/* Test with old & new format groups */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl, my_fcpl;
/* Set the FAPL for the type of format */
@@ -15518,22 +15523,22 @@ main(void)
my_fapl = fapl2;
if (paged) {
my_fcpl = fcpl2;
- HDputs("\nTesting with new file format and paged aggregation");
+ puts("\nTesting with new file format and paged aggregation");
}
else {
my_fcpl = fcpl;
- HDputs("\nTesting with new file format and non-paged aggregation");
+ puts("\nTesting with new file format and non-paged aggregation");
}
} /* end if */
else {
my_fapl = fapl;
if (paged) {
my_fcpl = fcpl2;
- HDputs("Testing with old file format and paged aggregation:");
+ puts("Testing with old file format and paged aggregation:");
}
else {
my_fcpl = fcpl;
- HDputs("Testing with old file format and non-paged aggregation:");
+ puts("Testing with old file format and non-paged aggregation:");
}
} /* end else */
@@ -15541,10 +15546,10 @@ main(void)
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, my_fcpl, my_fapl)) < 0)
goto error;
- if (TRUE == minimized_ohdr) {
- if (0 > H5Fset_dset_no_attrs_hint(file, TRUE))
+ if (true == minimized_ohdr) {
+ if (0 > H5Fset_dset_no_attrs_hint(file, true))
goto error;
- HDputs("(minimized dataset object headers with file setting)");
+ puts("(minimized dataset object headers with file setting)");
}
/* Cause the library to emit initial messages */
diff --git a/test/dt_arith.c b/test/dt_arith.c
index ed80d5f..ab89b68 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -298,9 +298,9 @@ static int without_hardware_g = 0;
*00000111,..., until 11111111.*/ \
memset(tmp1, 0, SRC_SIZE); \
memset(tmp2, 0, SRC_SIZE); \
- H5T__bit_set(tmp2, SRC_PREC - 1, (size_t)1, TRUE); /*the negative value*/ \
+ H5T__bit_set(tmp2, SRC_PREC - 1, (size_t)1, true); /*the negative value*/ \
for (n = 0; n < SRC_MANT_DIG - 1; n++) { \
- H5T__bit_set(tmp1, n, (size_t)1, TRUE); /*turn on 1 bit each time*/ \
+ H5T__bit_set(tmp1, n, (size_t)1, true); /*turn on 1 bit each time*/ \
CHANGE_ORDER(tmp1, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
memcpy(buf_p, tmp1, SRC_SIZE); \
memcpy(saved_p, tmp1, SRC_SIZE); \
@@ -309,7 +309,7 @@ static int without_hardware_g = 0;
saved_p += SRC_SIZE; \
\
/*negative values*/ \
- H5T__bit_set(tmp2, n, (size_t)1, TRUE); \
+ H5T__bit_set(tmp2, n, (size_t)1, true); \
CHANGE_ORDER(tmp2, SRC_ORDR, SRC_SIZE); \
memcpy(buf_p, tmp2, SRC_SIZE); \
memcpy(saved_p, tmp2, SRC_SIZE); \
@@ -344,7 +344,7 @@ static int without_hardware_g = 0;
buf_p = BUF; \
\
/* +0 */ \
- H5T__bit_set(value, (size_t)0, SRC_PREC, FALSE); \
+ H5T__bit_set(value, (size_t)0, SRC_PREC, false); \
memcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
buf_p += SRC_SIZE; \
\
@@ -352,7 +352,7 @@ static int without_hardware_g = 0;
if (n == 1) { \
memset(value, 0, SRC_SIZE * sizeof(unsigned char)); \
/* -0 */ \
- H5T__bit_set(value, (size_t)(SRC_PREC - 1), (size_t)1, TRUE); \
+ H5T__bit_set(value, (size_t)(SRC_PREC - 1), (size_t)1, true); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
memcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change back the order for bit operation*/ \
@@ -360,21 +360,21 @@ static int without_hardware_g = 0;
} \
\
/* +/-infinity */ \
- H5T__bit_set(value, (size_t)(SRC_MANT_DIG - 1), SRC_PREC - SRC_MANT_DIG, TRUE); \
+ H5T__bit_set(value, (size_t)(SRC_MANT_DIG - 1), SRC_PREC - SRC_MANT_DIG, true); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
memcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change back the order for bit operation*/ \
buf_p += SRC_SIZE; \
\
/* +/-SNaN */ \
- H5T__bit_set(value, (size_t)0, (size_t)1, TRUE); \
+ H5T__bit_set(value, (size_t)0, (size_t)1, true); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
memcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change back the order for bit operation*/ \
buf_p += SRC_SIZE; \
\
/* +/-QNaN */ \
- H5T__bit_set(value, (size_t)(SRC_MANT_DIG - 2), (size_t)1, TRUE); \
+ H5T__bit_set(value, (size_t)(SRC_MANT_DIG - 2), (size_t)1, true); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
memcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change back the order for bit operation*/ \
@@ -385,8 +385,8 @@ static int without_hardware_g = 0;
free(value); \
} while (0)
-static hbool_t overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits);
-static int my_isnan(dtype_t type, void *val);
+static bool overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits);
+static int my_isnan(dtype_t type, void *val);
static int my_isinf(int endian, const unsigned char *val, size_t size, size_t mpos, size_t msize, size_t epos,
size_t esize);
@@ -403,10 +403,10 @@ static void
fpe_handler(int H5_ATTR_UNUSED signo)
{
SKIPPED();
- HDputs(" Test skipped due to SIGFPE.");
+ puts(" Test skipped due to SIGFPE.");
#ifndef HANDLE_SIGFPE
- HDputs(" Remaining tests could not be run.");
- HDputs(" Please turn off SIGFPE on overflows and try again.");
+ puts(" Remaining tests could not be run.");
+ puts(" Please turn off SIGFPE on overflows and try again.");
#endif
exit(255);
}
@@ -505,7 +505,7 @@ test_hard_query(void)
TESTING("query functions of compiler conversion");
/* Verify the conversion from int to float is a hard conversion. */
- if (H5Tcompiler_conv(H5T_NATIVE_INT, H5T_NATIVE_FLOAT) != TRUE) {
+ if (H5Tcompiler_conv(H5T_NATIVE_INT, H5T_NATIVE_FLOAT) != true) {
H5_FAILED();
printf("Can't query conversion function\n");
goto error;
@@ -515,7 +515,7 @@ test_hard_query(void)
* is a soft conversion. */
H5Tunregister(H5T_PERS_HARD, NULL, H5T_NATIVE_INT, H5T_NATIVE_FLOAT,
(H5T_conv_t)((void (*)(void))H5T__conv_int_float));
- if (H5Tcompiler_conv(H5T_NATIVE_INT, H5T_NATIVE_FLOAT) != FALSE) {
+ if (H5Tcompiler_conv(H5T_NATIVE_INT, H5T_NATIVE_FLOAT) != false) {
H5_FAILED();
printf("Can't query conversion function\n");
goto error;
@@ -525,7 +525,7 @@ test_hard_query(void)
* is a hard conversion. */
H5Tregister(H5T_PERS_HARD, "int_flt", H5T_NATIVE_INT, H5T_NATIVE_FLOAT,
(H5T_conv_t)((void (*)(void))H5T__conv_int_float));
- if (H5Tcompiler_conv(H5T_NATIVE_INT, H5T_NATIVE_FLOAT) != TRUE) {
+ if (H5Tcompiler_conv(H5T_NATIVE_INT, H5T_NATIVE_FLOAT) != true) {
H5_FAILED();
printf("Can't query conversion function\n");
goto error;
@@ -567,7 +567,7 @@ expt_handle(H5T_conv_except_t except_type, hid_t H5_ATTR_UNUSED src_id, hid_t H5
if (except_type == H5T_CONV_EXCEPT_RANGE_HI || except_type == H5T_CONV_EXCEPT_RANGE_LOW ||
except_type == H5T_CONV_EXCEPT_TRUNCATE) {
- if (*(hbool_t *)user_data)
+ if (*(bool *)user_data)
*(signed char *)dst_buf = fill_value1;
else
*(int *)dst_buf = fill_value2;
@@ -601,7 +601,7 @@ static int
test_particular_fp_integer(void)
{
hid_t dxpl_id;
- hbool_t flag;
+ bool flag;
double src_d = (double)SCHAR_MAX;
signed char dst_c;
unsigned char *buf1 = NULL, *buf2 = NULL;
@@ -777,8 +777,8 @@ error:
static int
test_derived_flt(void)
{
- hid_t file = -1, tid1 = -1, tid2 = -1;
- hid_t dxpl_id = -1;
+ hid_t file = H5I_INVALID_HID, tid1 = H5I_INVALID_HID, tid2 = H5I_INVALID_HID;
+ hid_t dxpl_id = H5I_INVALID_HID;
char filename[1024];
size_t spos, epos, esize, mpos, msize, size;
size_t src_size, dst_size;
@@ -953,8 +953,8 @@ test_derived_flt(void)
/* Print errors */
if (0 == fails_this_test++) {
- HDsnprintf(str, sizeof(str),
- "\nTesting random sw derived floating-point -> derived floating-point conversions");
+ snprintf(str, sizeof(str),
+ "\nTesting random sw derived floating-point -> derived floating-point conversions");
printf("%-70s", str);
fflush(stdout);
H5_FAILED();
@@ -976,7 +976,7 @@ test_derived_flt(void)
printf(" %29d\n", *aligned);
if (fails_this_test >= max_fails) {
- HDputs(" maximum failures reached, aborting test...");
+ puts(" maximum failures reached, aborting test...");
goto error;
}
}
@@ -1122,8 +1122,8 @@ test_derived_flt(void)
/* Print errors */
if (0 == fails_this_test++) {
- HDsnprintf(str, sizeof(str),
- "\nTesting random sw derived floating-point -> derived floating-point conversions");
+ snprintf(str, sizeof(str),
+ "\nTesting random sw derived floating-point -> derived floating-point conversions");
printf("%-70s", str);
fflush(stdout);
H5_FAILED();
@@ -1141,7 +1141,7 @@ test_derived_flt(void)
printf("\n");
if (fails_this_test >= max_fails) {
- HDputs(" maximum failures reached, aborting test...");
+ puts(" maximum failures reached, aborting test...");
goto error;
}
}
@@ -1223,8 +1223,8 @@ error:
static int
test_derived_integer(void)
{
- hid_t file = -1, tid1 = -1, tid2 = -1;
- hid_t dxpl_id = -1;
+ hid_t file = H5I_INVALID_HID, tid1 = H5I_INVALID_HID, tid2 = H5I_INVALID_HID;
+ hid_t dxpl_id = H5I_INVALID_HID;
char filename[1024];
size_t src_size, dst_size;
unsigned char *buf = NULL, *saved_buf = NULL;
@@ -1435,8 +1435,7 @@ test_derived_integer(void)
/* Print errors */
if (0 == fails_this_test++) {
- HDsnprintf(str, sizeof(str),
- "\nTesting random sw derived integer -> derived integer conversions");
+ snprintf(str, sizeof(str), "\nTesting random sw derived integer -> derived integer conversions");
printf("%-70s", str);
fflush(stdout);
H5_FAILED();
@@ -1454,7 +1453,7 @@ test_derived_integer(void)
printf("\n");
if (fails_this_test >= max_fails) {
- HDputs(" maximum failures reached, aborting test...");
+ puts(" maximum failures reached, aborting test...");
goto error;
}
}
@@ -1664,14 +1663,14 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
/* Sanity checks */
if (OTHER == src_type || OTHER == dst_type) {
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
printf("%-70s", str);
H5_FAILED();
- HDputs(" Unknown data type.");
+ puts(" Unknown data type.");
goto error;
}
else {
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
printf("%-70s", str);
fflush(stdout);
fails_this_test = 0;
@@ -2532,8 +2531,8 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
}
if (++fails_all_tests >= max_fails) {
- HDputs(" maximum failures reached, aborting test...");
- HDputs(" (dst is library's conversion output. ans is compiler's conversion output.)");
+ puts(" maximum failures reached, aborting test...");
+ puts(" (dst is library's conversion output. ans is compiler's conversion output.)");
goto done;
}
}
@@ -2627,7 +2626,7 @@ test_conv_int_2(void)
*
* Purpose: Determines whether VAL points to NaN.
*
- * Return: TRUE or FALSE
+ * Return: true or false
*
*-------------------------------------------------------------------------
*/
@@ -2667,26 +2666,26 @@ my_isnan(dtype_t type, void *val)
float x = 0.0;
memcpy(&x, val, sizeof(float));
- HDsnprintf(s, sizeof(s), "%g", (double)x);
+ snprintf(s, sizeof(s), "%g", (double)x);
}
else if (FLT_DOUBLE == type) {
double x = 0.0;
memcpy(&x, val, sizeof(double));
- HDsnprintf(s, sizeof(s), "%g", x);
+ snprintf(s, sizeof(s), "%g", x);
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
}
else if (FLT_LDOUBLE == type) {
long double x = 0.0L;
memcpy(&x, val, sizeof(long double));
- HDsnprintf(s, sizeof(s), "%Lg", x);
+ snprintf(s, sizeof(s), "%Lg", x);
#endif
}
else {
return 0;
}
- if (HDstrstr(s, "NaN") || HDstrstr(s, "NAN") || HDstrstr(s, "nan"))
+ if (strstr(s, "NaN") || strstr(s, "NAN") || strstr(s, "nan"))
retval = 1;
}
@@ -2698,7 +2697,7 @@ my_isnan(dtype_t type, void *val)
*
* Purpose: Determines whether VAL points to +/-infinity.
*
- * Return: TRUE or FALSE
+ * Return: true or false
*
*-------------------------------------------------------------------------
*/
@@ -2786,7 +2785,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
fflush(stdout);
fflush(stderr);
if ((child_pid = fork()) < 0) {
- HDperror("fork");
+ perror("fork");
return 1;
}
else if (child_pid > 0) {
@@ -2799,12 +2798,12 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
return WEXITSTATUS(status);
}
else if (WIFSIGNALED(status)) {
- HDsnprintf(str, sizeof(str), " Child caught signal %d.", WTERMSIG(status));
- HDputs(str);
+ snprintf(str, sizeof(str), " Child caught signal %d.", WTERMSIG(status));
+ puts(str);
return 1; /*child exit after catching non-SIGFPE signal */
}
else {
- HDputs(" Child didn't exit normally.");
+ puts(" Child didn't exit normally.");
return 1;
}
}
@@ -2857,39 +2856,37 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
/* Sanity checks */
if (sizeof(float) == sizeof(double))
- HDputs("Sizeof(float)==sizeof(double) - some tests may not be sensible.");
+ puts("Sizeof(float)==sizeof(double) - some tests may not be sensible.");
if (OTHER == src_type || OTHER == dst_type) {
- if (!HDstrcmp(name, "noop"))
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ if (!strcmp(name, "noop"))
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
else if (run_test == TEST_SPECIAL)
- HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name,
+ dst_type_name);
else if (run_test == TEST_NORMAL)
- HDsnprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name,
+ dst_type_name);
else if (run_test == TEST_DENORM)
- HDsnprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
+ dst_type_name);
printf("%-70s", str);
H5_FAILED();
- HDputs(" Unknown data type.");
+ puts(" Unknown data type.");
goto error;
}
else {
- if (!HDstrcmp(name, "noop"))
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ if (!strcmp(name, "noop"))
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
else if (run_test == TEST_SPECIAL)
- HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name,
+ dst_type_name);
else if (run_test == TEST_NORMAL)
- HDsnprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name,
+ dst_type_name);
else if (run_test == TEST_DENORM)
- HDsnprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
+ dst_type_name);
printf("%-70s", str);
fflush(stdout);
@@ -3014,8 +3011,8 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
if (FLT_FLOAT == dst_type) {
hw_f = (float)(*((double *)aligned));
hw = (unsigned char *)&hw_f;
- underflow = HDfabs(*((double *)aligned)) < (double)FLT_MIN;
- overflow = HDfabs(*((double *)aligned)) > (double)FLT_MAX;
+ underflow = fabs(*((double *)aligned)) < (double)FLT_MIN;
+ overflow = fabs(*((double *)aligned)) > (double)FLT_MAX;
}
else if (FLT_DOUBLE == dst_type) {
hw_d = *((double *)aligned);
@@ -3034,14 +3031,14 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
if (FLT_FLOAT == dst_type) {
hw_f = (float)*((long double *)aligned);
hw = (unsigned char *)&hw_f;
- underflow = HDfabsl(*((long double *)aligned)) < (long double)FLT_MIN;
- overflow = HDfabsl(*((long double *)aligned)) > (long double)FLT_MAX;
+ underflow = fabsl(*((long double *)aligned)) < (long double)FLT_MIN;
+ overflow = fabsl(*((long double *)aligned)) > (long double)FLT_MAX;
}
else if (FLT_DOUBLE == dst_type) {
hw_d = (double)*((long double *)aligned);
hw = (unsigned char *)&hw_d;
- underflow = HDfabsl(*((long double *)aligned)) < (long double)DBL_MIN;
- overflow = HDfabsl(*((long double *)aligned)) > (long double)DBL_MAX;
+ underflow = fabsl(*((long double *)aligned)) < (long double)DBL_MIN;
+ overflow = fabsl(*((long double *)aligned)) > (long double)DBL_MAX;
}
else {
hw_ld = *((long double *)aligned);
@@ -3120,32 +3117,32 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
if (FLT_FLOAT == dst_type) {
float x = 0.0;
memcpy(&x, &buf[j * dst_size], sizeof(float));
- if (underflow && HDfabsf(x) <= FLT_MIN && HDfabsf(hw_f) <= FLT_MIN)
+ if (underflow && fabsf(x) <= FLT_MIN && fabsf(hw_f) <= FLT_MIN)
continue; /* all underflowed, no error */
if (overflow && my_isinf(dendian, buf + j * sizeof(float), dst_size, dst_mpos, dst_msize,
dst_epos, dst_esize))
continue; /* all overflowed, no error */
- check_mant[0] = (double)HDfrexpf(x, check_expo + 0);
- check_mant[1] = (double)HDfrexpf(hw_f, check_expo + 1);
+ check_mant[0] = (double)frexpf(x, check_expo + 0);
+ check_mant[1] = (double)frexpf(hw_f, check_expo + 1);
}
else if (FLT_DOUBLE == dst_type) {
double x = 0.0;
memcpy(&x, &buf[j * dst_size], sizeof(double));
- if (underflow && HDfabs(x) <= DBL_MIN && HDfabs(hw_d) <= DBL_MIN)
+ if (underflow && fabs(x) <= DBL_MIN && fabs(hw_d) <= DBL_MIN)
continue; /* all underflowed, no error */
if (overflow && my_isinf(dendian, buf + j * sizeof(double), dst_size, dst_mpos, dst_msize,
dst_epos, dst_esize))
continue; /* all overflowed, no error */
- check_mant[0] = HDfrexp(x, check_expo + 0);
- check_mant[1] = HDfrexp(hw_d, check_expo + 1);
+ check_mant[0] = frexp(x, check_expo + 0);
+ check_mant[1] = frexp(hw_d, check_expo + 1);
#if (H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE)
}
else {
long double x = 0.0L;
memcpy(&x, &buf[j * dst_size], sizeof(long double));
/* dst is largest float, no need to check underflow. */
- check_mant[0] = (double)HDfrexpl(x, check_expo + 0);
- check_mant[1] = (double)HDfrexpl(hw_ld, check_expo + 1);
+ check_mant[0] = (double)frexpl(x, check_expo + 0);
+ check_mant[1] = (double)frexpl(hw_ld, check_expo + 1);
#endif
}
/* Special check for denormalized values */
@@ -3157,18 +3154,18 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
/* Re-scale the mantissas based on any exponent difference */
if (expo_diff != 0)
- check_mant[0] = HDldexp(check_mant[0], expo_diff);
+ check_mant[0] = ldexp(check_mant[0], expo_diff);
/* Compute the proper epsilon */
- epsilon = HDldexp(epsilon, -valid_bits);
+ epsilon = ldexp(epsilon, -valid_bits);
/* Check for "close enough" fit with scaled epsilon value */
- if (HDfabs(check_mant[0] - check_mant[1]) <= epsilon)
+ if (fabs(check_mant[0] - check_mant[1]) <= epsilon)
continue;
} /* end if */
else {
if (check_expo[0] == check_expo[1] &&
- HDfabs(check_mant[0] - check_mant[1]) < (double)FP_EPSILON)
+ fabs(check_mant[0] - check_mant[1]) < (double)FP_EPSILON)
continue;
} /* end else */
}
@@ -3244,10 +3241,10 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
* denormalized or special values, print out warning message.*/
if (++fails_all_tests >= max_fails) {
if (run_test == TEST_NORMAL)
- HDputs(" maximum failures reached, aborting test...");
+ puts(" maximum failures reached, aborting test...");
else if (run_test == TEST_DENORM || run_test == TEST_SPECIAL)
- HDputs(" maximum warnings reached, aborting test...");
- HDputs(" (dst is library's conversion output. ans is compiler's conversion output.)");
+ puts(" maximum warnings reached, aborting test...");
+ puts(" (dst is library's conversion output. ans is compiler's conversion output.)");
goto done;
}
@@ -3338,7 +3335,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
int fill_value = 9; /*fill value for conversion exception*/
H5T_conv_except_func_t op; /*returned callback function for conversion exception*/
void *user_data; /*returned pointer to user data passed in to the callback*/
- hbool_t except_set = FALSE; /*whether user's exception handling is set*/
+ bool except_set = false; /*whether user's exception handling is set*/
size_t nelmts = 0; /*num values per test */
const size_t max_fails = 40; /*max number of failures*/
size_t fails_all_tests = 0; /*number of failures */
@@ -3496,10 +3493,10 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
/* Sanity checks */
if (OTHER == src_type || OTHER == dst_type) {
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
printf("%-70s", str);
H5_FAILED();
- HDputs(" Unknown data type.");
+ puts(" Unknown data type.");
goto error;
}
@@ -3507,10 +3504,10 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
INT_INT == src_type || INT_UINT == src_type || INT_LONG == src_type || INT_ULONG == src_type ||
INT_LLONG == src_type || INT_ULLONG == src_type) &&
(FLT_FLOAT != dst_type && FLT_DOUBLE != dst_type && FLT_LDOUBLE != dst_type)) {
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
printf("%-70s", str);
H5_FAILED();
- HDputs(" 1. Not an integer-float conversion.");
+ puts(" 1. Not an integer-float conversion.");
goto error;
}
@@ -3518,31 +3515,31 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
(INT_SCHAR != dst_type && INT_UCHAR != dst_type && INT_SHORT != dst_type && INT_USHORT != dst_type &&
INT_INT != dst_type && INT_UINT != dst_type && INT_LONG != dst_type && INT_ULONG != dst_type &&
INT_LLONG != dst_type && INT_ULLONG != dst_type)) {
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
printf("%-70s", str);
H5_FAILED();
- HDputs(" 2. Not a float-integer conversion.");
+ puts(" 2. Not a float-integer conversion.");
goto error;
}
if (INT_SCHAR == src_type || INT_UCHAR == src_type || INT_SHORT == src_type || INT_USHORT == src_type ||
INT_INT == src_type || INT_UINT == src_type || INT_LONG == src_type || INT_ULONG == src_type ||
INT_LLONG == src_type || INT_ULLONG == src_type) {
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
printf("%-70s", str);
fflush(stdout);
fails_this_test = 0;
}
else {
if (run_test == TEST_NORMAL)
- HDsnprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name,
+ dst_type_name);
else if (run_test == TEST_DENORM)
- HDsnprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
+ dst_type_name);
else
- HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name,
+ dst_type_name);
printf("%-70s", str);
fflush(stdout);
fails_this_test = 0;
@@ -3580,7 +3577,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
if (H5Pset_type_conv_cb(dxpl_id, except_func, &fill_value) < 0)
goto error;
else
- except_set = TRUE;
+ except_set = true;
if (H5Pget_type_conv_cb(dxpl_id, &op, &user_data) < 0)
goto error;
@@ -4461,10 +4458,10 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
* denormalized or special values, print out warning message.*/
if (++fails_all_tests >= max_fails) {
if (run_test == TEST_NORMAL)
- HDputs(" maximum failures reached, aborting test...");
+ puts(" maximum failures reached, aborting test...");
else if (run_test == TEST_DENORM || run_test == TEST_SPECIAL)
- HDputs(" maximum warnings reached, aborting test...");
- HDputs(" (dst is library's conversion output. ans is compiler's conversion output.)");
+ puts(" maximum warnings reached, aborting test...");
+ puts(" (dst is library's conversion output. ans is compiler's conversion output.)");
goto done;
}
@@ -4522,16 +4519,16 @@ error:
* check if overflow occurs.
*
*
- * Return: TRUE: overflow happens
+ * Return: true: overflow happens
*
- * FALSE: no overflow
+ * false: no overflow
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits)
{
- hbool_t ret_value = FALSE;
+ bool ret_value = false;
hsize_t expt;
size_t mant_digits = 0, expt_digits = 0, bias = 0;
size_t epos, mpos;
@@ -4556,18 +4553,18 @@ overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits)
memcpy(bits, origin_bits, src_prec / 8 + 1);
/*Check for special cases: +Inf, -Inf*/
- if (H5T__bit_find(bits, mpos, mant_digits, H5T_BIT_LSB, TRUE) < 0) {
- if (H5T__bit_find(bits, epos, expt_digits, H5T_BIT_LSB, FALSE) < 0) {
- ret_value = TRUE;
+ if (H5T__bit_find(bits, mpos, mant_digits, H5T_BIT_LSB, true) < 0) {
+ if (H5T__bit_find(bits, epos, expt_digits, H5T_BIT_LSB, false) < 0) {
+ ret_value = true;
goto done;
}
}
- else if (H5T_NORM_NONE == norm && H5T__bit_find(bits, mpos, mant_digits - 1, H5T_BIT_LSB, TRUE) < 0 &&
- H5T__bit_find(bits, epos, expt_digits, H5T_BIT_LSB, FALSE) < 0) {
+ else if (H5T_NORM_NONE == norm && H5T__bit_find(bits, mpos, mant_digits - 1, H5T_BIT_LSB, true) < 0 &&
+ H5T__bit_find(bits, epos, expt_digits, H5T_BIT_LSB, false) < 0) {
/*This is a special case for the source of no implied mantissa bit.
*If the exponent bits are all 1s and only the 1st bit of mantissa
*is set to 1. It's infinity. The Intel-Linux "long double" is this case.*/
- ret_value = TRUE;
+ ret_value = true;
goto done;
}
@@ -4575,7 +4572,7 @@ overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits)
expt = H5T__bit_get_d(bits, mant_digits, expt_digits) - bias;
if (expt >= (dst_num_bits - 1)) {
- ret_value = TRUE;
+ ret_value = true;
goto done;
}
@@ -4594,7 +4591,7 @@ overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits)
indx = H5T__bit_find(mant_bits, (size_t)0, (size_t)(32 * 8), H5T_BIT_MSB, 1);
if ((size_t)indx >= dst_num_bits)
- ret_value = TRUE;
+ ret_value = true;
done:
return ret_value;
@@ -4771,7 +4768,7 @@ run_fp_tests(const char *name)
{
int nerrors = 0;
- if (!HDstrcmp(name, "noop")) {
+ if (!strcmp(name, "noop")) {
nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_FLOAT, H5T_NATIVE_FLOAT);
nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_DOUBLE, H5T_NATIVE_DOUBLE);
nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_LDOUBLE, H5T_NATIVE_LDOUBLE);
@@ -4800,11 +4797,11 @@ run_fp_tests(const char *name)
{
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, "long double",
- "float");
+ snprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, "long double",
+ "float");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
+ puts(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
}
#endif
@@ -4824,11 +4821,11 @@ run_fp_tests(const char *name)
{
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, "long double",
- "float or double");
+ snprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, "long double",
+ "float or double");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
+ puts(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
}
#endif
#endif
@@ -4900,11 +4897,10 @@ run_int_fp_conv(const char *name)
{
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "(unsigned) long",
- "long double");
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "(unsigned) long", "long double");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to the special algorithm of hardware conversion.");
+ puts(" Test skipped due to the special algorithm of hardware conversion.");
}
#endif
#endif /* H5_SIZEOF_LONG!=H5_SIZEOF_INT */
@@ -4915,10 +4911,10 @@ run_int_fp_conv(const char *name)
{
char str[256]; /*hello string */
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long long", "long double");
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long long", "long double");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to compiler error in handling conversion.");
+ puts(" Test skipped due to compiler error in handling conversion.");
}
#endif /* H5_LLONG_TO_LDOUBLE_CORRECT */
#if H5_LLONG_TO_LDOUBLE_CORRECT
@@ -4927,11 +4923,11 @@ run_int_fp_conv(const char *name)
{
char str[256]; /*hello string */
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "unsigned long long",
- "long double");
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "unsigned long long",
+ "long double");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to compiler not handling conversion.");
+ puts(" Test skipped due to compiler not handling conversion.");
}
#endif /* H5_LLONG_TO_LDOUBLE_CORRECT */
#endif
@@ -4984,7 +4980,7 @@ run_fp_int_conv(const char *name)
#endif
#if H5_SIZEOF_LONG_LONG != H5_SIZEOF_LONG
- if (!HDstrcmp(name, "hw")) { /* Hardware conversion */
+ if (!strcmp(name, "hw")) { /* Hardware conversion */
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_LLONG);
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_LLONG);
}
@@ -5016,11 +5012,11 @@ run_fp_int_conv(const char *name)
#else
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, "long double",
- "signed and unsigned char, short, int, long");
+ snprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, "long double",
+ "signed and unsigned char, short, int, long");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
+ puts(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
#endif
}
#if H5_SIZEOF_LONG != H5_SIZEOF_INT
@@ -5039,11 +5035,11 @@ run_fp_int_conv(const char *name)
{
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double",
- "(unsigned) long");
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double",
+ "(unsigned) long");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to the special algorithm of hardware conversion.");
+ puts(" Test skipped due to the special algorithm of hardware conversion.");
}
#endif
#endif /*H5_SIZEOF_LONG!=H5_SIZEOF_INT */
@@ -5055,10 +5051,10 @@ run_fp_int_conv(const char *name)
{
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double", "long long");
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double", "long long");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to hardware conversion error.");
+ puts(" Test skipped due to hardware conversion error.");
}
#endif /*H5_LDOUBLE_TO_LLONG_ACCURATE*/
#if defined(H5_LDOUBLE_TO_LLONG_ACCURATE)
@@ -5067,11 +5063,11 @@ run_fp_int_conv(const char *name)
{
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double",
- "unsigned long long");
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double",
+ "unsigned long long");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to hardware conversion error.");
+ puts(" Test skipped due to hardware conversion error.");
}
#endif /*H5_LDOUBLE_TO_LLONG_ACCURATE*/
#endif
@@ -5140,7 +5136,7 @@ main(void)
* Software tests
*----------------------------------------------------------------------
*/
- without_hardware_g = TRUE;
+ without_hardware_g = true;
/* Restore the default error handler (set in h5_reset()) */
h5_restore_err();
diff --git a/test/dtransform.c b/test/dtransform.c
index 6892a7c..6ec48a6 100644
--- a/test/dtransform.c
+++ b/test/dtransform.c
@@ -25,10 +25,10 @@ static int test_set(void);
static int test_getset(hid_t dxpl_id_simple);
/* These are needed for multiple tests, so are declared here globally and are init'ed in init_test */
-hid_t dset_id_int = -1;
-hid_t dset_id_float = -1;
-hid_t dset_id_int_chunk = -1;
-hid_t dset_id_float_chunk = -1;
+hid_t dset_id_int = H5I_INVALID_HID;
+hid_t dset_id_float = H5I_INVALID_HID;
+hid_t dset_id_int_chunk = H5I_INVALID_HID;
+hid_t dset_id_float_chunk = H5I_INVALID_HID;
const float windchillFfloat[ROWS][COLS] = {
{36.0F, 31.0F, 25.0F, 19.0F, 13.0F, 7.0F, 1.0F, -5.0F, -11.0F, -16.0F, -22.0F, -28.0F, -34.0F, -40.0F,
@@ -315,13 +315,13 @@ const int transformData[ROWS][COLS] = {{36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22,
int
main(void)
{
- hid_t dxpl_id_c_to_f = -1;
+ hid_t dxpl_id_c_to_f = H5I_INVALID_HID;
hid_t dxpl_id_c_to_f_copy = 1;
- hid_t dxpl_id_simple = -1;
- hid_t dxpl_id_polynomial = -1;
- hid_t dxpl_id_polynomial_copy = -1;
- hid_t dxpl_id_utrans_inv = -1;
- hid_t file_id = -1;
+ hid_t dxpl_id_simple = H5I_INVALID_HID;
+ hid_t dxpl_id_polynomial = H5I_INVALID_HID;
+ hid_t dxpl_id_polynomial_copy = H5I_INVALID_HID;
+ hid_t dxpl_id_utrans_inv = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
const char *c_to_f = "(9/5.0)*x + 32";
const char *simple = "(4/2) * ( (2 + 4)/(5 - 2.5))"; /* this equals 4.8 */
@@ -452,11 +452,11 @@ init_test(hid_t file_id)
/* utrans is a transform for char types: numbers are restricted from -128 to 127, fits into char */
const char *utrans = "(x/4+25)*3";
- hid_t dataspace = -1;
- hid_t dxpl_id_f_to_c = -1;
- hid_t dxpl_id_utrans = -1;
- hid_t cparms = -1;
- hid_t filespace = -1;
+ hid_t dataspace = H5I_INVALID_HID;
+ hid_t dxpl_id_f_to_c = H5I_INVALID_HID;
+ hid_t dxpl_id_utrans = H5I_INVALID_HID;
+ hid_t cparms = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
hsize_t dim[2] = {ROWS, COLS};
hsize_t offset[2] = {0, 0};
@@ -857,12 +857,12 @@ test_getset(const hid_t dxpl_id_c_to_f)
TESTING("H5Pget_data_transform");
- if (NULL == (ptrgetTest = (char *)malloc(HDstrlen(simple) + 1)))
+ if (NULL == (ptrgetTest = (char *)malloc(strlen(simple) + 1)))
TEST_ERROR;
- if (H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, HDstrlen(c_to_f) + 1) < 0)
+ if (H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, strlen(c_to_f) + 1) < 0)
TEST_ERROR;
- if (HDstrcmp(c_to_f, ptrgetTest) != 0)
+ if (strcmp(c_to_f, ptrgetTest) != 0)
FAIL_PUTS_ERROR(" ERROR: Data transform failed to match what was set\n");
PASSED();
@@ -888,11 +888,11 @@ test_getset(const hid_t dxpl_id_c_to_f)
TESTING("H5Pget_data_transform, after resetting transform property");
- if (NULL == (ptrgetTest = (char *)calloc((size_t)1, HDstrlen(simple) + 1)))
+ if (NULL == (ptrgetTest = (char *)calloc((size_t)1, strlen(simple) + 1)))
TEST_ERROR;
- if (H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, HDstrlen(simple) + 1) < 0)
+ if (H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, strlen(simple) + 1) < 0)
TEST_ERROR;
- if (HDstrcmp(simple, ptrgetTest) != 0)
+ if (strcmp(simple, ptrgetTest) != 0)
FAIL_PUTS_ERROR(" ERROR: Data transform failed to match what was set\n");
PASSED();
@@ -912,14 +912,14 @@ error:
static int
test_set(void)
{
- hid_t dxpl_id = -1;
+ hid_t dxpl_id = H5I_INVALID_HID;
H5E_auto2_t func;
const char *str = "(9/5.0)*x + 32";
char *ptrgetTest = NULL;
TESTING("H5Pget_data_transform (get before set)");
- if (NULL == (ptrgetTest = (char *)malloc(HDstrlen(str) + 1)))
+ if (NULL == (ptrgetTest = (char *)malloc(strlen(str) + 1)))
TEST_ERROR;
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
@@ -930,7 +930,7 @@ test_set(void)
H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
- if (H5Pget_data_transform(dxpl_id, ptrgetTest, HDstrlen(str) + 1) < 0)
+ if (H5Pget_data_transform(dxpl_id, ptrgetTest, strlen(str) + 1) < 0)
PASSED();
else
FAIL_PUTS_ERROR(" ERROR: Data transform get before set succeeded (it shouldn't have)\n");
diff --git a/test/dtypes.c b/test/dtypes.c
index 21a79a1..74b6f61 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -309,7 +309,7 @@ test_copy(void)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Should not be able to close a predefined type!");
+ puts(" Should not be able to close a predefined type!");
goto error;
}
@@ -364,15 +364,15 @@ test_detect(void)
* Test class of some atomic types.
*------------------------------------------------------------------------------*/
/* Native integers should be in the integer class */
- if (H5Tdetect_class(H5T_NATIVE_INT, H5T_INTEGER) != TRUE)
+ if (H5Tdetect_class(H5T_NATIVE_INT, H5T_INTEGER) != true)
TEST_ERROR;
/* Native integers should _not_ be in other classes */
- if (H5Tdetect_class(H5T_NATIVE_INT, H5T_FLOAT) != FALSE)
+ if (H5Tdetect_class(H5T_NATIVE_INT, H5T_FLOAT) != false)
TEST_ERROR;
- if (H5Tdetect_class(H5T_NATIVE_INT, H5T_ARRAY) != FALSE)
+ if (H5Tdetect_class(H5T_NATIVE_INT, H5T_ARRAY) != false)
TEST_ERROR;
- if (H5Tdetect_class(H5T_NATIVE_INT, H5T_ENUM) != FALSE)
+ if (H5Tdetect_class(H5T_NATIVE_INT, H5T_ENUM) != false)
TEST_ERROR;
/*--------------------------------------------------------------------------------
@@ -393,15 +393,15 @@ test_detect(void)
TEST_ERROR;
/* Make certain that the correct classes can be detected */
- if (H5Tdetect_class(atom_cmpd_id, H5T_COMPOUND) != TRUE)
+ if (H5Tdetect_class(atom_cmpd_id, H5T_COMPOUND) != true)
TEST_ERROR;
- if (H5Tdetect_class(atom_cmpd_id, H5T_INTEGER) != TRUE)
+ if (H5Tdetect_class(atom_cmpd_id, H5T_INTEGER) != true)
TEST_ERROR;
- if (H5Tdetect_class(atom_cmpd_id, H5T_FLOAT) != TRUE)
+ if (H5Tdetect_class(atom_cmpd_id, H5T_FLOAT) != true)
TEST_ERROR;
/* Make certain that an incorrect class is not detected */
- if (H5Tdetect_class(atom_cmpd_id, H5T_VLEN) != FALSE)
+ if (H5Tdetect_class(atom_cmpd_id, H5T_VLEN) != false)
TEST_ERROR;
/*--------------------------------------------------------------------------------
@@ -412,17 +412,17 @@ test_detect(void)
TEST_ERROR;
/* Make certain that the correct classes can be detected */
- if (H5Tdetect_class(atom_arr_id, H5T_ARRAY) != TRUE)
+ if (H5Tdetect_class(atom_arr_id, H5T_ARRAY) != true)
TEST_ERROR;
- if (H5Tdetect_class(atom_arr_id, H5T_REFERENCE) != TRUE)
+ if (H5Tdetect_class(atom_arr_id, H5T_REFERENCE) != true)
TEST_ERROR;
/* Make certain that an incorrect class is not detected */
- if (H5Tdetect_class(atom_arr_id, H5T_VLEN) != FALSE)
+ if (H5Tdetect_class(atom_arr_id, H5T_VLEN) != false)
TEST_ERROR;
- if (H5Tdetect_class(atom_arr_id, H5T_FLOAT) != FALSE)
+ if (H5Tdetect_class(atom_arr_id, H5T_FLOAT) != false)
TEST_ERROR;
- if (H5Tdetect_class(atom_arr_id, H5T_INTEGER) != FALSE)
+ if (H5Tdetect_class(atom_arr_id, H5T_INTEGER) != false)
TEST_ERROR;
/* Create a VL datatype with an atomic base type of float*/
@@ -430,15 +430,15 @@ test_detect(void)
TEST_ERROR;
/* Make certain that the correct classes can be detected */
- if (H5Tdetect_class(atom_vlf_id, H5T_VLEN) != TRUE)
+ if (H5Tdetect_class(atom_vlf_id, H5T_VLEN) != true)
TEST_ERROR;
- if (H5Tdetect_class(atom_vlf_id, H5T_FLOAT) != TRUE)
+ if (H5Tdetect_class(atom_vlf_id, H5T_FLOAT) != true)
TEST_ERROR;
/* Make certain that an incorrect class is not detected */
- if (H5Tdetect_class(atom_vlf_id, H5T_COMPOUND) != FALSE)
+ if (H5Tdetect_class(atom_vlf_id, H5T_COMPOUND) != false)
TEST_ERROR;
- if (H5Tdetect_class(atom_vlf_id, H5T_INTEGER) != FALSE)
+ if (H5Tdetect_class(atom_vlf_id, H5T_INTEGER) != false)
TEST_ERROR;
/* Create a VL datatype with an atomic base type of char. It should be a VL
@@ -447,13 +447,13 @@ test_detect(void)
TEST_ERROR;
/* Make certain that the correct classes can be detected */
- if (H5Tdetect_class(atom_vlc_id, H5T_VLEN) != TRUE)
+ if (H5Tdetect_class(atom_vlc_id, H5T_VLEN) != true)
TEST_ERROR;
- if (H5Tdetect_class(atom_vlc_id, H5T_INTEGER) != TRUE)
+ if (H5Tdetect_class(atom_vlc_id, H5T_INTEGER) != true)
TEST_ERROR;
/* Make certain that an incorrect class is not detected */
- if (H5Tdetect_class(atom_vlc_id, H5T_STRING) != FALSE)
+ if (H5Tdetect_class(atom_vlc_id, H5T_STRING) != false)
TEST_ERROR;
/* Create a VL string. It should be a string, not a VL class. */
@@ -463,11 +463,11 @@ test_detect(void)
TEST_ERROR;
/* Make certain that the correct classes can be detected */
- if (H5Tdetect_class(atom_vls_id, H5T_STRING) != TRUE)
+ if (H5Tdetect_class(atom_vls_id, H5T_STRING) != true)
TEST_ERROR;
/* Make certain that an incorrect class is not detected */
- if (H5Tdetect_class(atom_vls_id, H5T_VLEN) != FALSE)
+ if (H5Tdetect_class(atom_vls_id, H5T_VLEN) != false)
TEST_ERROR;
/*--------------------------------------------------------------------------------
@@ -490,25 +490,25 @@ test_detect(void)
TEST_ERROR;
/* Make certain that the correct classes can be detected */
- if (H5Tdetect_class(cplx_cmpd_id, H5T_COMPOUND) != TRUE)
+ if (H5Tdetect_class(cplx_cmpd_id, H5T_COMPOUND) != true)
TEST_ERROR;
- if (H5Tdetect_class(cplx_cmpd_id, H5T_ARRAY) != TRUE)
+ if (H5Tdetect_class(cplx_cmpd_id, H5T_ARRAY) != true)
TEST_ERROR;
- if (H5Tdetect_class(cplx_cmpd_id, H5T_REFERENCE) != TRUE)
+ if (H5Tdetect_class(cplx_cmpd_id, H5T_REFERENCE) != true)
TEST_ERROR;
- if (H5Tdetect_class(cplx_cmpd_id, H5T_INTEGER) != TRUE)
+ if (H5Tdetect_class(cplx_cmpd_id, H5T_INTEGER) != true)
TEST_ERROR;
- if (H5Tdetect_class(cplx_cmpd_id, H5T_FLOAT) != TRUE)
+ if (H5Tdetect_class(cplx_cmpd_id, H5T_FLOAT) != true)
TEST_ERROR;
- if (H5Tdetect_class(cplx_cmpd_id, H5T_STRING) != TRUE)
+ if (H5Tdetect_class(cplx_cmpd_id, H5T_STRING) != true)
TEST_ERROR;
- if (H5Tdetect_class(cplx_cmpd_id, H5T_VLEN) != TRUE)
+ if (H5Tdetect_class(cplx_cmpd_id, H5T_VLEN) != true)
TEST_ERROR;
/* Make certain that an incorrect class is not detected */
- if (H5Tdetect_class(cplx_cmpd_id, H5T_TIME) != FALSE)
+ if (H5Tdetect_class(cplx_cmpd_id, H5T_TIME) != false)
TEST_ERROR;
- if (H5Tdetect_class(cplx_cmpd_id, H5T_ENUM) != FALSE)
+ if (H5Tdetect_class(cplx_cmpd_id, H5T_ENUM) != false)
TEST_ERROR;
/* Close complex compound datatype */
@@ -750,7 +750,7 @@ test_compound_2(void)
const size_t nelmts = NTESTELEM;
const hsize_t four = 4;
unsigned char *buf = NULL, *orig = NULL, *bkg = NULL;
- hid_t st = -1, dt = -1;
+ hid_t st = H5I_INVALID_HID, dt = H5I_INVALID_HID;
hid_t array_dt;
int64_t nmembs;
int i;
@@ -875,7 +875,7 @@ test_compound_3(void)
const size_t nelmts = NTESTELEM;
const hsize_t four = 4;
unsigned char *buf = NULL, *orig = NULL, *bkg = NULL;
- hid_t st = -1, dt = -1;
+ hid_t st = H5I_INVALID_HID, dt = H5I_INVALID_HID;
hid_t array_dt;
int64_t nmembs;
int i;
@@ -1000,7 +1000,7 @@ test_compound_4(void)
const size_t nelmts = NTESTELEM;
const hsize_t four = 4;
unsigned char *buf = NULL, *orig = NULL, *bkg = NULL;
- hid_t st = -1, dt = -1;
+ hid_t st = H5I_INVALID_HID, dt = H5I_INVALID_HID;
hid_t array_dt;
int64_t nmembs;
int i;
@@ -1225,7 +1225,7 @@ test_compound_6(void)
const size_t nelmts = NTESTELEM;
unsigned char *buf = NULL, *orig = NULL, *bkg = NULL;
- hid_t st = -1, dt = -1;
+ hid_t st = H5I_INVALID_HID, dt = H5I_INVALID_HID;
int64_t nmembs;
int i;
@@ -1850,7 +1850,7 @@ test_compound_9(void)
goto error;
} /* end if */
- if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || HDstrcmp(rdata.str, wdata.str) != 0) {
+ if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || strcmp(rdata.str, wdata.str) != 0) {
H5_FAILED();
AT();
printf("incorrect read data\n");
@@ -1924,7 +1924,7 @@ test_compound_9(void)
goto error;
} /* end if */
- if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || HDstrcmp(rdata.str, wdata.str) != 0) {
+ if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || strcmp(rdata.str, wdata.str) != 0) {
H5_FAILED();
AT();
printf("incorrect read data\n");
@@ -1998,12 +1998,12 @@ test_compound_10(void)
for (i = 0; i < ARRAY_DIM; i++) {
wdata[i].i1 = i * 10 + i;
- wdata[i].str = HDstrdup("C string A");
+ wdata[i].str = strdup("C string A");
wdata[i].str[9] = (char)(wdata[i].str[9] + i);
wdata[i].i2 = i * 1000 + i * 10;
- wdata[i].text.p = (void *)HDstrdup("variable-length text A\0");
- len = wdata[i].text.len = HDstrlen((char *)wdata[i].text.p) + 1;
+ wdata[i].text.p = (void *)strdup("variable-length text A\0");
+ len = wdata[i].text.len = strlen((char *)wdata[i].text.p) + 1;
((char *)(wdata[i].text.p))[len - 2] = (char)(((char *)(wdata[i].text.p))[len - 2] + i);
((char *)(wdata[i].text.p))[len - 1] = '\0';
}
@@ -2109,7 +2109,7 @@ test_compound_10(void)
for (i = 0; i < ARRAY_DIM; i++) {
if (rdata[i].i1 != wdata[i].i1 || rdata[i].i2 != wdata[i].i2 ||
- HDstrcmp(rdata[i].str, wdata[i].str) != 0) {
+ strcmp(rdata[i].str, wdata[i].str) != 0) {
H5_FAILED();
AT();
printf("incorrect read data\n");
@@ -2125,7 +2125,7 @@ test_compound_10(void)
t1 = rdata[i].text.p;
t2 = wdata[i].text.p;
- if (HDstrcmp((char *)t1, (char *)t2) != 0) {
+ if (strcmp((char *)t1, (char *)t2) != 0) {
H5_FAILED();
AT();
printf("incorrect VL read data\n");
@@ -2264,7 +2264,7 @@ test_compound_11(void)
((big_t *)buf)[u].s1 = (char *)malloc((size_t)32);
if (!((big_t *)buf)[u].s1)
TEST_ERROR;
- HDsnprintf(((big_t *)buf)[u].s1, 32, "%u", (unsigned)u);
+ snprintf(((big_t *)buf)[u].s1, 32, "%u", (unsigned)u);
} /* end for */
/* Make copy of buffer before conversion */
@@ -2307,7 +2307,7 @@ test_compound_11(void)
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
} /* end if */
- else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
+ else if (strcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
printf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
@@ -2358,7 +2358,7 @@ test_compound_11(void)
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
} /* end if */
- else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
+ else if (strcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
printf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
@@ -2399,7 +2399,7 @@ test_compound_11(void)
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
} /* end if */
- else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
+ else if (strcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
printf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
@@ -2525,7 +2525,7 @@ test_compound_12(void)
H5E_END_TRY
if (ret >= 0) {
H5_FAILED();
- HDputs(" Tries to cut off the last member. Should have failed.");
+ puts(" Tries to cut off the last member. Should have failed.");
goto error;
}
@@ -2971,14 +2971,14 @@ test_compound_14(void)
goto error;
} /* end if */
- if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || HDstrcmp(rdata1.str, wdata1.str) != 0) {
+ if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || strcmp(rdata1.str, wdata1.str) != 0) {
H5_FAILED();
AT();
printf("incorrect read data\n");
goto error;
} /* end if */
- if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || HDstrcmp(rdata2.str, wdata2.str) != 0 ||
+ if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || strcmp(rdata2.str, wdata2.str) != 0 ||
rdata2.l1 != wdata2.l1 || rdata2.l2 != wdata2.l2 || rdata2.l3 != wdata2.l3 ||
rdata2.l4 != wdata2.l4) {
H5_FAILED();
@@ -3069,14 +3069,14 @@ test_compound_14(void)
goto error;
} /* end if */
- if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || HDstrcmp(rdata1.str, wdata1.str) != 0) {
+ if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || strcmp(rdata1.str, wdata1.str) != 0) {
H5_FAILED();
AT();
printf("incorrect read data\n");
goto error;
} /* end if */
- if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || HDstrcmp(rdata2.str, wdata2.str) != 0 ||
+ if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || strcmp(rdata2.str, wdata2.str) != 0 ||
rdata2.l1 != wdata2.l1 || rdata2.l2 != wdata2.l2 || rdata2.l3 != wdata2.l3 ||
rdata2.l4 != wdata2.l4) {
H5_FAILED();
@@ -3688,16 +3688,16 @@ error:
static int
test_compound_18(void)
{
- hid_t file = -1;
- hid_t gid = -1;
- hid_t did = -1;
- hid_t aid = -1;
- hid_t tid = -1;
- hid_t sid = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t aid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
hsize_t dim = 1;
const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */
char filename[1024];
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret;
TESTING("accessing objects with compound datatypes that have no fields");
@@ -3842,7 +3842,7 @@ test_query(void)
long c;
double d;
};
- hid_t file = -1, tid1 = -1, tid2 = -1;
+ hid_t file = H5I_INVALID_HID, tid1 = H5I_INVALID_HID, tid2 = H5I_INVALID_HID;
char filename[1024];
char compnd_type[] = "Compound_type", enum_type[] = "Enum_type";
short enum_val;
@@ -4028,7 +4028,7 @@ test_query(void)
printf("Can't get name for enum member\n");
goto error;
} /* end if */
- if (HDstrcmp("YELLOW", enum_name) != 0) {
+ if (strcmp("YELLOW", enum_name) != 0) {
H5_FAILED();
printf("Incorrect name for enum member\n");
goto error;
@@ -4081,10 +4081,11 @@ static int
test_transient(hid_t fapl)
{
static hsize_t ds_size[2] = {10, 20};
- hid_t file = -1, type = -1, space = -1, dset = -1, t2 = -1;
- char filename[1024];
- hid_t ret_id; /* Generic hid_t return value */
- herr_t status;
+ hid_t file = H5I_INVALID_HID, type = H5I_INVALID_HID, space = H5I_INVALID_HID, dset = H5I_INVALID_HID,
+ t2 = H5I_INVALID_HID;
+ char filename[1024];
+ hid_t ret_id; /* Generic hid_t return value */
+ herr_t status;
TESTING("transient datatypes");
@@ -4103,7 +4104,7 @@ test_transient(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Predefined types should not be modifiable!");
+ puts(" Predefined types should not be modifiable!");
goto error;
}
H5E_BEGIN_TRY
@@ -4113,7 +4114,7 @@ test_transient(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Predefined types should not be closable!");
+ puts(" Predefined types should not be closable!");
goto error;
}
@@ -4131,7 +4132,7 @@ test_transient(hid_t fapl)
H5E_END_TRY
if (ret_id >= 0) {
H5_FAILED();
- HDputs(" Attributes should not be allowed for transient types!");
+ puts(" Attributes should not be allowed for transient types!");
goto error;
}
@@ -4153,7 +4154,7 @@ test_transient(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Dataset datatypes should not be modifiable!");
+ puts(" Dataset datatypes should not be modifiable!");
goto error;
}
if (H5Tclose(t2) < 0)
@@ -4176,7 +4177,7 @@ test_transient(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Dataset datatypes should not be modifiable!");
+ puts(" Dataset datatypes should not be modifiable!");
goto error;
}
if (H5Tclose(t2) < 0)
@@ -4232,7 +4233,8 @@ error:
static int
test_named(hid_t fapl)
{
- hid_t file = -1, type = -1, space = -1, dset = -1, t2 = -1, t3 = -1, attr1 = -1;
+ hid_t file = H5I_INVALID_HID, type = H5I_INVALID_HID, space = H5I_INVALID_HID, dset = H5I_INVALID_HID,
+ t2 = H5I_INVALID_HID, t3 = H5I_INVALID_HID, attr1 = H5I_INVALID_HID;
herr_t status;
static hsize_t ds_size[2] = {10, 20};
size_t i, j;
@@ -4257,7 +4259,7 @@ test_named(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Predefined types should not be committable!");
+ puts(" Predefined types should not be committable!");
goto error;
}
@@ -4270,7 +4272,7 @@ test_named(hid_t fapl)
goto error;
if (0 == status) {
H5_FAILED();
- HDputs(" H5Tcommitted() returned false!");
+ puts(" H5Tcommitted() returned false!");
goto error;
}
@@ -4282,7 +4284,7 @@ test_named(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Committed type is not constant!");
+ puts(" Committed type is not constant!");
goto error;
}
@@ -4295,7 +4297,7 @@ test_named(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Committed types should not be recommitted!");
+ puts(" Committed types should not be recommitted!");
goto error;
}
@@ -4320,7 +4322,7 @@ test_named(hid_t fapl)
goto error;
if (status) {
H5_FAILED();
- HDputs(" Copying a named type should result in a transient type!");
+ puts(" Copying a named type should result in a transient type!");
goto error;
}
if (H5Tset_precision(t2, (size_t)256) < 0)
@@ -4339,7 +4341,7 @@ test_named(hid_t fapl)
goto error;
if (!status) {
H5_FAILED();
- HDputs(" Opened named types should be named types!");
+ puts(" Opened named types should be named types!");
goto error;
}
@@ -4354,7 +4356,7 @@ test_named(hid_t fapl)
goto error;
if (!status) {
H5_FAILED();
- HDputs(" Dataset type should be a named type!");
+ puts(" Dataset type should be a named type!");
goto error;
}
@@ -4373,7 +4375,7 @@ test_named(hid_t fapl)
goto error;
if (!status) {
H5_FAILED();
- HDputs(" Dataset type should be a named type!");
+ puts(" Dataset type should be a named type!");
goto error;
}
@@ -4399,7 +4401,7 @@ test_named(hid_t fapl)
goto error;
if (!status) {
H5_FAILED();
- HDputs(" Dataset type should be a named type!");
+ puts(" Dataset type should be a named type!");
goto error;
}
if (H5Tclose(t2) < 0)
@@ -4427,7 +4429,7 @@ test_named(hid_t fapl)
goto error;
if (status) {
H5_FAILED();
- HDputs(" Copied type should not be a named type!");
+ puts(" Copied type should not be a named type!");
goto error;
}
if ((dset = H5Dcreate2(file, "dset3", t2, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -4438,7 +4440,7 @@ test_named(hid_t fapl)
goto error;
if (status) {
H5_FAILED();
- HDputs(" Datatype from dataset using copied type should not be a named type!");
+ puts(" Datatype from dataset using copied type should not be a named type!");
goto error;
}
if (H5Tclose(t3) < 0)
@@ -4469,7 +4471,7 @@ test_named(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Types should not be committable to a read-only file!");
+ puts(" Types should not be committable to a read-only file!");
goto error;
}
@@ -4483,7 +4485,7 @@ test_named(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Types should not be committable to a read-only file!");
+ puts(" Types should not be committable to a read-only file!");
goto error;
}
@@ -4550,7 +4552,7 @@ test_str_create(void)
{
hid_t fixed_str1, fixed_str2;
hid_t vlen_str1, vlen_str2;
- htri_t is_vl_str = FALSE;
+ htri_t is_vl_str = false;
size_t query_size, str_size = 10;
TESTING("string type creation using H5Tcreate");
@@ -4631,8 +4633,8 @@ static int
test_conv_str_1(void)
{
char *buf = NULL;
- hid_t src_type = -1;
- hid_t dst_type = -1;
+ hid_t src_type = H5I_INVALID_HID;
+ hid_t dst_type = H5I_INVALID_HID;
TESTING("string conversions");
@@ -4651,14 +4653,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcd\0abcd\0abcdefghi\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Truncated C-string test failed");
+ puts(" Truncated C-string test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcd\0\0\0\0\0\0abcd\0\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Extended C-string test failed");
+ puts(" Extended C-string test failed");
goto error;
}
free(buf);
@@ -4682,14 +4684,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdeabcdeabcdefghij", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Truncated C buffer test failed");
+ puts(" Truncated C buffer test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Extended C buffer test failed");
+ puts(" Extended C buffer test failed");
goto error;
}
free(buf);
@@ -4713,14 +4715,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdeabcdeabcdefghij", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Truncated Fortran-string test failed");
+ puts(" Truncated Fortran-string test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcde abcde ", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Extended Fortran-string test failed");
+ puts(" Extended Fortran-string test failed");
goto error;
}
free(buf);
@@ -4747,7 +4749,7 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Non-terminated string test 1");
+ puts(" Non-terminated string test 1");
goto error;
}
H5Tclose(dst_type);
@@ -4758,7 +4760,7 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcd\0abcd\0abcdefghij", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Non-terminated string test 2");
+ puts(" Non-terminated string test 2");
goto error;
}
memcpy(buf, "abcdeabcdexxxxxxxxxx", (size_t)20);
@@ -4766,7 +4768,7 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Non-terminated string test 2");
+ puts(" Non-terminated string test 2");
goto error;
}
free(buf);
@@ -4790,14 +4792,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdefghi abcdefghi ", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" C string to Fortran test 1");
+ puts(" C string to Fortran test 1");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcdefghi\0abcdefghi\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Fortran to C string test 1");
+ puts(" Fortran to C string test 1");
goto error;
}
if (H5Tclose(dst_type) < 0)
@@ -4809,14 +4811,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" C string to Fortran test 2");
+ puts(" C string to Fortran test 2");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Fortran to C string test 2");
+ puts(" Fortran to C string test 2");
goto error;
}
if (H5Tclose(src_type) < 0)
@@ -4832,14 +4834,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcd abcd ", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" C string to Fortran test 3");
+ puts(" C string to Fortran test 3");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcd\0abcd\0abcd ", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Fortran to C string test 3");
+ puts(" Fortran to C string test 3");
goto error;
}
free(buf);
@@ -4863,14 +4865,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" C buffer to Fortran test 1");
+ puts(" C buffer to Fortran test 1");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Fortran to C buffer test 1");
+ puts(" Fortran to C buffer test 1");
goto error;
}
if (H5Tclose(dst_type) < 0)
@@ -4882,14 +4884,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" C buffer to Fortran test 2");
+ puts(" C buffer to Fortran test 2");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Fortran to C buffer test 2");
+ puts(" Fortran to C buffer test 2");
goto error;
}
if (H5Tclose(src_type) < 0)
@@ -4905,14 +4907,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcd abcd ", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" C buffer to Fortran test 3");
+ puts(" C buffer to Fortran test 3");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcd\0abcd\0abcd ", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Fortran to C buffer test 3");
+ puts(" Fortran to C buffer test 3");
goto error;
}
if (H5Tclose(src_type) < 0)
@@ -4962,8 +4964,8 @@ static int
test_conv_str_2(void)
{
char *buf = NULL, s[80];
- hid_t c_type = -1;
- hid_t f_type = -1;
+ hid_t c_type = H5I_INVALID_HID;
+ hid_t f_type = H5I_INVALID_HID;
const size_t nelmts = NTESTELEM;
size_t i, j, nchars;
int ret_value = 1;
@@ -4986,7 +4988,7 @@ test_conv_str_2(void)
} /* end for */
/* Do the conversions */
- HDsnprintf(s, sizeof(s), "Testing random string conversion speed");
+ snprintf(s, sizeof(s), "Testing random string conversion speed");
printf("%-70s", s);
fflush(stdout);
if (H5Tconvert(c_type, f_type, nelmts, buf, NULL, H5P_DEFAULT) < 0)
@@ -5031,8 +5033,8 @@ static int
test_conv_str_3(void)
{
char *buf = NULL;
- hid_t type = -1;
- hid_t super = -1;
+ hid_t type = H5I_INVALID_HID;
+ hid_t super = H5I_INVALID_HID;
const size_t nelmts = NTESTELEM;
size_t i, j, nchars;
int ret_value = 1;
@@ -5168,8 +5170,8 @@ test_conv_enum_1(void)
{
const size_t nelmts = NTESTELEM;
int i, val, *buf = NULL;
- hid_t t1 = -1;
- hid_t t2 = -1;
+ hid_t t1 = H5I_INVALID_HID;
+ hid_t t2 = H5I_INVALID_HID;
char s[80];
int ret_value = 1;
size_t u;
@@ -5194,14 +5196,14 @@ test_conv_enum_1(void)
buf[u] = HDrand() % 26;
/* Conversions */
- HDsnprintf(s, sizeof(s), "Testing random enum conversion O(N)");
+ snprintf(s, sizeof(s), "Testing random enum conversion O(N)");
printf("%-70s", s);
fflush(stdout);
if (H5Tconvert(t1, t2, nelmts, buf, NULL, H5P_DEFAULT) < 0)
goto error;
PASSED();
- HDsnprintf(s, sizeof(s), "Testing random enum conversion O(N log N)");
+ snprintf(s, sizeof(s), "Testing random enum conversion O(N log N)");
printf("%-70s", s);
fflush(stdout);
if (H5Tconvert(t2, t1, nelmts, buf, NULL, H5P_DEFAULT) < 0)
@@ -5243,7 +5245,7 @@ error:
static int
test_conv_enum_2(void)
{
- hid_t srctype = -1, dsttype = -1, oddsize = -1;
+ hid_t srctype = H5I_INVALID_HID, dsttype = H5I_INVALID_HID, oddsize = H5I_INVALID_HID;
int *data = NULL, i, nerrors = 0;
const char *mname[] = {"RED", "GREEN", "BLUE", "YELLOW", "PINK", "PURPLE", "ORANGE", "WHITE"};
@@ -5317,7 +5319,7 @@ static int
test_conv_bitfield(void)
{
unsigned char buf[4];
- hid_t st = -1, dt = -1;
+ hid_t st = H5I_INVALID_HID, dt = H5I_INVALID_HID;
TESTING("bitfield conversions");
@@ -5411,7 +5413,7 @@ error:
static int
test_bitfield_funcs(void)
{
- hid_t type = -1, ntype = -1, super = -1;
+ hid_t type = H5I_INVALID_HID, ntype = H5I_INVALID_HID, super = H5I_INVALID_HID;
size_t size;
char *tag = 0;
H5T_pad_t inpad;
@@ -5613,7 +5615,7 @@ static int
opaque_check(int tag_it)
{
#define OPAQUE_NELMTS 1000
- hid_t st = -1, dt = -1;
+ hid_t st = H5I_INVALID_HID, dt = H5I_INVALID_HID;
herr_t status;
char buf[1]; /*not really used*/
int saved;
@@ -5689,7 +5691,7 @@ static int
opaque_long(void)
{
char *long_tag = NULL;
- hid_t dt = -1;
+ hid_t dt = H5I_INVALID_HID;
herr_t ret;
/* Build opaque type */
@@ -5743,7 +5745,7 @@ error:
static int
opaque_funcs(void)
{
- hid_t type = -1, super = -1;
+ hid_t type = H5I_INVALID_HID, super = H5I_INVALID_HID;
size_t size;
H5T_pad_t inpad;
H5T_cset_t cset;
@@ -6455,9 +6457,9 @@ test_latest(void)
long c;
double d;
};
- hid_t file = (-1); /* File ID */
- hid_t tid1 = (-1), tid2 = (-1); /* Datatype ID */
- hid_t fapl = (-1); /* File access property list */
+ hid_t file = (H5I_INVALID_HID); /* File ID */
+ hid_t tid1 = (H5I_INVALID_HID), tid2 = (H5I_INVALID_HID); /* Datatype ID */
+ hid_t fapl = (H5I_INVALID_HID); /* File access property list */
H5O_native_info_t oi; /* Stat buffer for committed datatype */
hsize_t old_dtype_oh_size; /* Size of object header with "old" format */
hsize_t new_dtype_oh_size; /* Size of object header with "new" format */
@@ -6800,7 +6802,7 @@ test_int_float_except(void)
PASSED();
#else /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */
SKIPPED();
- HDputs(" Test skipped due to int or float not 4 bytes.");
+ puts(" Test skipped due to int or float not 4 bytes.");
#endif /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */
return 0;
@@ -7073,9 +7075,10 @@ test_set_order_compound(hid_t fapl)
atomic_cmpd d[3][4];
} complex_cmpd;
- hid_t file = -1;
- hid_t cmpd = -1, memb_cmpd = -1, memb_array1 = -1, memb_array2 = -1, cmpd_array = -1;
- hid_t vl_id = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t cmpd = H5I_INVALID_HID, memb_cmpd = H5I_INVALID_HID, memb_array1 = H5I_INVALID_HID,
+ memb_array2 = H5I_INVALID_HID, cmpd_array = H5I_INVALID_HID;
+ hid_t vl_id = H5I_INVALID_HID;
hsize_t dims[2] = {3, 4}; /* Array dimensions */
char filename[1024];
herr_t ret; /* Generic return value */
@@ -7224,7 +7227,8 @@ error:
static int
test_named_indirect_reopen(hid_t fapl)
{
- hid_t file = -1, type = -1, reopened_type = -1, strtype = -1, dset = -1, space = -1;
+ hid_t file = H5I_INVALID_HID, type = H5I_INVALID_HID, reopened_type = H5I_INVALID_HID,
+ strtype = H5I_INVALID_HID, dset = H5I_INVALID_HID, space = H5I_INVALID_HID;
static hsize_t dims[1] = {3};
size_t dt_size;
int enum_value;
@@ -7384,7 +7388,7 @@ test_named_indirect_reopen(hid_t fapl)
TEST_ERROR;
if (NULL == (tag_ret = H5Tget_tag(type)))
TEST_ERROR;
- if (HDstrcmp(tag, tag_ret) != 0)
+ if (strcmp(tag, tag_ret) != 0)
TEST_ERROR;
H5free_memory(tag_ret);
tag_ret = NULL;
@@ -7400,7 +7404,7 @@ test_named_indirect_reopen(hid_t fapl)
TEST_ERROR;
if (NULL == (tag_ret = H5Tget_tag(type)))
TEST_ERROR;
- if (HDstrcmp(tag, tag_ret) != 0)
+ if (strcmp(tag, tag_ret) != 0)
TEST_ERROR;
H5free_memory(tag_ret);
tag_ret = NULL;
@@ -7592,11 +7596,11 @@ create_del_obj_named_test_file(const char *filename, hid_t fapl, H5F_libver_t lo
static int
test_delete_obj_named(hid_t fapl)
{
- hid_t filea1 = -1, filea2 = -1, fileb = -1; /* File IDs */
- hid_t attr = -1; /* Attribute ID */
- hid_t dset = -1; /* Dataset ID */
- hid_t fapl2 = -1; /* File access property list ID */
- H5F_libver_t low, high; /* File format bounds */
+ hid_t filea1 = H5I_INVALID_HID, filea2 = H5I_INVALID_HID, fileb = H5I_INVALID_HID; /* File IDs */
+ hid_t attr = H5I_INVALID_HID; /* Attribute ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t fapl2 = H5I_INVALID_HID; /* File access property list ID */
+ H5F_libver_t low, high; /* File format bounds */
char filename[1024], filename2[1024];
TESTING("deleting objects that use named datatypes");
@@ -7709,15 +7713,15 @@ error:
static int
test_delete_obj_named_fileid(hid_t fapl)
{
- hid_t filea1 = -1, filea2 = -1, fileb = -1; /* File IDs */
- hid_t dset_fid = -1; /* File ID from dataset */
- hid_t type_fid = -1; /* File ID from datatype */
- hid_t attr_fid = -1; /* File ID from attribute */
- hid_t type = -1; /* Datatype ID */
- hid_t attr = -1; /* Attribute ID */
- hid_t dset = -1; /* Dataset ID */
- hid_t fapl2 = -1; /* File access property list ID */
- H5F_libver_t low, high; /* File format bounds */
+ hid_t filea1 = H5I_INVALID_HID, filea2 = H5I_INVALID_HID, fileb = H5I_INVALID_HID; /* File IDs */
+ hid_t dset_fid = H5I_INVALID_HID; /* File ID from dataset */
+ hid_t type_fid = H5I_INVALID_HID; /* File ID from datatype */
+ hid_t attr_fid = H5I_INVALID_HID; /* File ID from attribute */
+ hid_t type = H5I_INVALID_HID; /* Datatype ID */
+ hid_t attr = H5I_INVALID_HID; /* Attribute ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t fapl2 = H5I_INVALID_HID; /* File access property list ID */
+ H5F_libver_t low, high; /* File format bounds */
char filename[1024], filename2[1024];
TESTING("deleting objects that use named datatypes");
@@ -7908,14 +7912,14 @@ error:
static int
test_deprec(hid_t fapl)
{
- hid_t file = -1; /* File ID */
- hid_t type = -1; /* Datatype ID */
- unsigned rank = 2; /* Rank for array datatype */
- hsize_t dims[2] = {3, 3}; /* Dimensions for array datatype */
- int perm[2] = {0, 1}; /* Dimensions permutations for array datatype */
- hsize_t rdims[2] = {0, 0}; /* Dimensions for querying array datatype */
- int rperm[2] = {-2, -2}; /* Dimensions permutations for array datatype */
- hbool_t dim_mismatch; /* Whether any dimensions didn't match */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t type = H5I_INVALID_HID; /* Datatype ID */
+ unsigned rank = 2; /* Rank for array datatype */
+ hsize_t dims[2] = {3, 3}; /* Dimensions for array datatype */
+ int perm[2] = {0, 1}; /* Dimensions permutations for array datatype */
+ hsize_t rdims[2] = {0, 0}; /* Dimensions for querying array datatype */
+ int rperm[2] = {-2, -2}; /* Dimensions permutations for array datatype */
+ bool dim_mismatch; /* Whether any dimensions didn't match */
char filename[1024];
unsigned u; /* Local index variable */
herr_t status; /* Generic routine value */
@@ -7928,9 +7932,9 @@ test_deprec(hid_t fapl)
FAIL_STACK_ERROR;
/* Make certain that the correct classes can be detected */
- if (H5Tdetect_class(type, H5T_ARRAY) != TRUE)
+ if (H5Tdetect_class(type, H5T_ARRAY) != true)
FAIL_STACK_ERROR;
- if (H5Tdetect_class(type, H5T_INTEGER) != TRUE)
+ if (H5Tdetect_class(type, H5T_INTEGER) != true)
FAIL_STACK_ERROR;
/* Get the array dimensions */
@@ -7939,24 +7943,24 @@ test_deprec(hid_t fapl)
FAIL_STACK_ERROR;
/* Check the array dimensions */
- dim_mismatch = FALSE;
+ dim_mismatch = false;
for (u = 0; u < rank; u++)
if (rdims[u] != dims[u]) {
TestErrPrintf("Array dimension information doesn't match!, rdims1[%u]=%d, tdims1[%u]=%d\n", u,
(int)rdims[u], u, (int)dims[u]);
- dim_mismatch = TRUE;
+ dim_mismatch = true;
} /* end if */
if (dim_mismatch)
FAIL_PUTS_ERROR(" Dimensions didn't match!");
/* Check the array dimension permutations */
- dim_mismatch = FALSE;
+ dim_mismatch = false;
for (u = 0; u < rank; u++)
if (rperm[u] != -2) {
TestErrPrintf(
"Array dimension permutation information was modified!, rdims1[%u]=%d, tdims1[%u]=%d\n", u,
rperm[u], u, perm[u]);
- dim_mismatch = TRUE;
+ dim_mismatch = true;
} /* end if */
if (dim_mismatch)
FAIL_PUTS_ERROR(" Dimension permutations modified!");
@@ -8038,7 +8042,7 @@ test_deprec(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Types should not be committable to a read-only file!");
+ puts(" Types should not be committable to a read-only file!");
goto error;
}
@@ -8076,13 +8080,13 @@ error:
static int
test_utf_ascii_conv(void)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t utf8_vtid = -1;
- hid_t ascii_vtid = -1;
- hid_t utf8_tid = -1;
- hid_t ascii_tid = -1;
- hid_t sid = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t utf8_vtid = H5I_INVALID_HID;
+ hid_t ascii_vtid = H5I_INVALID_HID;
+ hid_t utf8_tid = H5I_INVALID_HID;
+ hid_t ascii_tid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
const char *utf8_w = "foo!";
char *ascii_r = NULL;
const char *ascii_w = "bar!";
@@ -8340,8 +8344,8 @@ error:
static herr_t
verify_version(hid_t dtype, H5F_libver_t low, unsigned *highest_version)
{
- hid_t base_dtype = -1;
- hid_t mem_dtype = -1;
+ hid_t base_dtype = H5I_INVALID_HID;
+ hid_t mem_dtype = H5I_INVALID_HID;
H5T_t *dtypep = NULL; /* Internal structure of a datatype */
H5T_class_t type_cls = H5T_NO_CLASS; /* Temporary var for datatype class */
int nmembers = 0;
@@ -8509,25 +8513,25 @@ test_versionbounds(void)
color_t enum_color;
} outer_cmp_t;
- hid_t file = -1; /* File ID */
- hid_t space = -1; /* Dataspace ID */
- hid_t dset = -1; /* Dataset ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t fapl = -1; /* Copy of file access property list ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t dset_dtype = -1; /* Dataset's datatype */
- hid_t arr_chartype = -1; /* Array of characters datatype */
- hid_t vlen_floattype = -1; /* Vlen of float datatype */
- hid_t enum_type = -1; /* Enumeration datatype */
- hid_t outer_cmp_type = -1; /* Outer compound datatype */
- hid_t inner_cmp_type = -1; /* Inner compound datatype */
- hid_t simple_cmp_type = -1; /* Simple cmpd dtype, contains no other cmpd */
- hid_t outer_arr_type = -1; /* Outermost array datatype */
- hid_t inner_arr_type = -1; /* Inner array datatype */
- H5F_t *filep = NULL; /* Pointer to internal structure of a file */
- H5T_t *dtypep = NULL; /* Pointer to internal structure of a datatype */
- hsize_t arr_dim[] = {ARRAY_LEN}; /* Length of the array */
- int low, high; /* Indices for iterating over versions */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t space = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t fapl = H5I_INVALID_HID; /* Copy of file access property list ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t dset_dtype = H5I_INVALID_HID; /* Dataset's datatype */
+ hid_t arr_chartype = H5I_INVALID_HID; /* Array of characters datatype */
+ hid_t vlen_floattype = H5I_INVALID_HID; /* Vlen of float datatype */
+ hid_t enum_type = H5I_INVALID_HID; /* Enumeration datatype */
+ hid_t outer_cmp_type = H5I_INVALID_HID; /* Outer compound datatype */
+ hid_t inner_cmp_type = H5I_INVALID_HID; /* Inner compound datatype */
+ hid_t simple_cmp_type = H5I_INVALID_HID; /* Simple cmpd dtype, contains no other cmpd */
+ hid_t outer_arr_type = H5I_INVALID_HID; /* Outermost array datatype */
+ hid_t inner_arr_type = H5I_INVALID_HID; /* Inner array datatype */
+ H5F_t *filep = NULL; /* Pointer to internal structure of a file */
+ H5T_t *dtypep = NULL; /* Pointer to internal structure of a datatype */
+ hsize_t arr_dim[] = {ARRAY_LEN}; /* Length of the array */
+ int low, high; /* Indices for iterating over versions */
H5F_libver_t versions[] = {H5F_LIBVER_EARLIEST, H5F_LIBVER_V18, H5F_LIBVER_V110,
H5F_LIBVER_V112, H5F_LIBVER_V114, H5F_LIBVER_V114};
int versions_count = 6; /* Number of version bounds in the array */
@@ -8746,9 +8750,9 @@ error:
int
main(void)
{
- hbool_t driver_is_parallel;
- long nerrors = 0;
- hid_t fapl = H5I_INVALID_HID;
+ bool driver_is_parallel;
+ long nerrors = 0;
+ hid_t fapl = H5I_INVALID_HID;
/* Set the random # seed */
HDsrandom((unsigned)HDtime(NULL));
diff --git a/test/earray.c b/test/earray.c
index 8f5b2be..9cea8f4 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -136,13 +136,13 @@ struct earray_test_param_t {
/* Flush depend test context */
typedef struct earray_flush_depend_ctx_t {
- hbool_t base_obj; /* Flag to indicate that base object has been flushed */
- hbool_t idx0_obj; /* Flag to indicate that index 0's object has been flushed */
- hbool_t idx0_elem; /* Flag to indicate that index 0's element has been flushed */
- hbool_t idx1_obj; /* Flag to indicate that index 1's object has been flushed */
- hbool_t idx1_elem; /* Flag to indicate that index 1's element has been flushed */
- hbool_t idx10000_obj; /* Flag to indicate that index 10000's object has been flushed */
- hbool_t idx10000_elem; /* Flag to indicate that index 10000's element has been flushed */
+ bool base_obj; /* Flag to indicate that base object has been flushed */
+ bool idx0_obj; /* Flag to indicate that index 0's object has been flushed */
+ bool idx0_elem; /* Flag to indicate that index 0's element has been flushed */
+ bool idx1_obj; /* Flag to indicate that index 1's object has been flushed */
+ bool idx1_elem; /* Flag to indicate that index 1's element has been flushed */
+ bool idx10000_obj; /* Flag to indicate that index 10000's object has been flushed */
+ bool idx10000_elem; /* Flag to indicate that index 10000's element has been flushed */
} earray_flush_depend_ctx_t;
/* Extensible array test cache object */
@@ -566,10 +566,10 @@ error:
static unsigned
test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSED *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5EA_t *ea = NULL; /* Extensible array wrapper */
- haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5EA_t *ea = NULL; /* Extensible array wrapper */
+ haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
/* Create file & retrieve pointer to internal file object */
if (create_file(H5F_ACC_TRUNC, fapl, &file, &f) < 0)
@@ -753,7 +753,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
}
#else /* NDEBUG */
SKIPPED();
- HDputs(" Not tested when assertions are disabled");
+ puts(" Not tested when assertions are disabled");
#endif /* NDEBUG */
/*
@@ -808,10 +808,10 @@ error:
static unsigned
test_reopen(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5EA_t *ea = NULL; /* Extensible array wrapper */
- haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5EA_t *ea = NULL; /* Extensible array wrapper */
+ haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
/* Create file & retrieve pointer to internal file object */
if (create_file(H5F_ACC_TRUNC, fapl, &file, &f) < 0)
@@ -876,13 +876,13 @@ error:
static unsigned
test_open_twice(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- hid_t file2 = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5F_t *f2 = NULL; /* Internal file object pointer */
- H5EA_t *ea = NULL; /* Extensible array wrapper */
- H5EA_t *ea2 = NULL; /* Extensible array wrapper */
- haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t file2 = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5F_t *f2 = NULL; /* Internal file object pointer */
+ H5EA_t *ea = NULL; /* Extensible array wrapper */
+ H5EA_t *ea2 = NULL; /* Extensible array wrapper */
+ haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
/* Create file & retrieve pointer to internal file object */
if (create_file(H5F_ACC_TRUNC, fapl, &file, &f) < 0)
@@ -984,10 +984,10 @@ static unsigned
test_open_twice_diff(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
{
char filename_tmp[EARRAY_FILENAME_LEN]; /* Temporary file name */
- hid_t file = -1; /* File ID */
- hid_t file2 = -1; /* File ID */
- hid_t file0 = -1; /* File ID */
- hid_t file00 = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t file2 = H5I_INVALID_HID; /* File ID */
+ hid_t file0 = H5I_INVALID_HID; /* File ID */
+ hid_t file00 = H5I_INVALID_HID; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
H5F_t *f2 = NULL; /* Internal file object pointer */
H5EA_t *ea = NULL; /* Extensible array wrapper */
@@ -1120,12 +1120,12 @@ error:
static unsigned
test_delete_open(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5EA_t *ea = NULL; /* Extensible array wrapper */
- H5EA_t *ea2 = NULL; /* Extensible array wrapper */
- haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
- h5_stat_size_t file_size; /* File size, after deleting array */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5EA_t *ea = NULL; /* Extensible array wrapper */
+ H5EA_t *ea2 = NULL; /* Extensible array wrapper */
+ haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
+ h5_stat_size_t file_size; /* File size, after deleting array */
/* Create file & retrieve pointer to internal file object */
if (create_file(H5F_ACC_TRUNC, fapl, &file, &f) < 0)
@@ -1961,20 +1961,20 @@ static unsigned
test_set_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam, hsize_t nelmts,
const char *test_str)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5EA_t *ea = NULL; /* Extensible array wrapper */
- void *eiter_info; /* Extensible array iterator info */
- earray_state_t state; /* State of extensible array */
- uint64_t welmt; /* Element to write */
- uint64_t relmt; /* Element to read */
- hsize_t nelmts_written; /* Highest element written in array */
- hsize_t cnt; /* Count of array indices */
- hssize_t smax; /* Index value of max. element set */
- hsize_t max; /* Index value of max. element set */
- hssize_t sidx; /* Index value of first element of first data block */
- hsize_t idx; /* Index value of first element of first data block */
- haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5EA_t *ea = NULL; /* Extensible array wrapper */
+ void *eiter_info; /* Extensible array iterator info */
+ earray_state_t state; /* State of extensible array */
+ uint64_t welmt; /* Element to write */
+ uint64_t relmt; /* Element to read */
+ hsize_t nelmts_written; /* Highest element written in array */
+ hsize_t cnt; /* Count of array indices */
+ hssize_t smax; /* Index value of max. element set */
+ hsize_t max; /* Index value of max. element set */
+ hssize_t sidx; /* Index value of first element of first data block */
+ hsize_t idx; /* Index value of first element of first data block */
+ haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
/*
* Display testing message
@@ -2136,16 +2136,16 @@ static unsigned
test_skip_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam, hsize_t skip_elmts,
const char *test_str)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5EA_t *ea = NULL; /* Extensible array wrapper */
- earray_state_t state; /* State of extensible array */
- uint64_t welmt; /* Element to write */
- uint64_t relmt; /* Element to read */
- hsize_t nelmts_written; /* Highest element written in array */
- hsize_t idx; /* Index value of element to get */
- hsize_t cnt; /* Count of array indices */
- haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5EA_t *ea = NULL; /* Extensible array wrapper */
+ earray_state_t state; /* State of extensible array */
+ uint64_t welmt; /* Element to write */
+ uint64_t relmt; /* Element to read */
+ hsize_t nelmts_written; /* Highest element written in array */
+ hsize_t idx; /* Index value of element to get */
+ hsize_t cnt; /* Count of array indices */
+ haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
/*
* Display testing message
@@ -2291,15 +2291,15 @@ error:
int
main(void)
{
- H5EA_create_t cparam; /* Creation parameters for extensible array */
- earray_test_param_t tparam; /* Testing parameters */
- earray_test_type_t curr_test; /* Current test being worked on */
- earray_iter_type_t curr_iter; /* Current iteration type being worked on */
- hid_t fapl = -1; /* File access property list for data files */
- unsigned nerrors = 0; /* Cumulative error count */
- time_t curr_time; /* Current time, for seeding random number generator */
- int ExpressMode; /* Test express value */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ H5EA_create_t cparam; /* Creation parameters for extensible array */
+ earray_test_param_t tparam; /* Testing parameters */
+ earray_test_type_t curr_test; /* Current test being worked on */
+ earray_iter_type_t curr_iter; /* Current iteration type being worked on */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list for data files */
+ unsigned nerrors = 0; /* Cumulative error count */
+ time_t curr_time; /* Current time, for seeding random number generator */
+ int ExpressMode; /* Test express value */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
/* Reset library */
h5_reset();
@@ -2314,7 +2314,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Seed random #'s */
curr_time = HDtime(NULL);
@@ -2349,12 +2349,12 @@ main(void)
switch (curr_test) {
/* "Normal" testing parameters */
case EARRAY_TEST_NORMAL:
- HDputs("Testing with normal parameters");
+ puts("Testing with normal parameters");
break;
/* "Re-open array" testing parameters */
case EARRAY_TEST_REOPEN:
- HDputs("Testing with reopen array flag set");
+ puts("Testing with reopen array flag set");
tparam.reopen_array = EARRAY_TEST_REOPEN;
break;
@@ -2383,31 +2383,31 @@ main(void)
switch (curr_iter) {
/* "Forward" testing parameters */
case EARRAY_ITER_FW:
- HDputs("Testing with forward iteration");
+ puts("Testing with forward iteration");
tparam.eiter = &ea_iter_fw;
break;
/* "Reverse" testing parameters */
case EARRAY_ITER_RV:
- HDputs("Testing with reverse iteration");
+ puts("Testing with reverse iteration");
tparam.eiter = &ea_iter_rv;
break;
/* "Random" testing parameters */
case EARRAY_ITER_RND:
- HDputs("Testing with random iteration");
+ puts("Testing with random iteration");
tparam.eiter = &ea_iter_rnd;
break;
/* "Random #2" testing parameters */
case EARRAY_ITER_RND2:
- HDputs("Testing with random #2 iteration");
+ puts("Testing with random #2 iteration");
tparam.eiter = &ea_iter_rnd2;
break;
/* "Cyclic" testing parameters */
case EARRAY_ITER_CYC:
- HDputs("Testing with cyclic iteration");
+ puts("Testing with cyclic iteration");
tparam.eiter = &ea_iter_cyc;
break;
@@ -2429,16 +2429,15 @@ main(void)
/* Test first element in data block */
nelmts = (hsize_t)((hsize_t)1 + cparam.idx_blk_elmts + tparam.sblk_info[sblk].start_idx +
(tparam.sblk_info[sblk].dblk_nelmts * dblk));
- HDsnprintf(test_str, sizeof(test_str),
- "setting first element of array's data block #%llu",
- (unsigned long long)ndblks);
+ snprintf(test_str, sizeof(test_str), "setting first element of array's data block #%llu",
+ (unsigned long long)ndblks);
nerrors += test_set_elmts(fapl, &cparam, &tparam, nelmts, test_str);
/* Test all elements in data block */
nelmts = (hsize_t)(cparam.idx_blk_elmts + tparam.sblk_info[sblk].start_idx +
(tparam.sblk_info[sblk].dblk_nelmts * (dblk + 1)));
- HDsnprintf(test_str, sizeof(test_str), "setting all elements of array's data block #%llu",
- (unsigned long long)ndblks);
+ snprintf(test_str, sizeof(test_str), "setting all elements of array's data block #%llu",
+ (unsigned long long)ndblks);
nerrors += test_set_elmts(fapl, &cparam, &tparam, nelmts, test_str);
/* Increment data block being tested */
@@ -2475,13 +2474,13 @@ main(void)
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
if (nerrors)
goto error;
- HDputs("All extensible array tests passed.");
+ puts("All extensible array tests passed.");
/* Clean up file used */
h5_cleanup(FILENAME, fapl);
@@ -2489,7 +2488,7 @@ main(void)
return 0;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
@@ -2498,7 +2497,7 @@ error:
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
return 1;
} /* end main() */
diff --git a/test/efc.c b/test/efc.c
index cb7cdde..484320d 100644
--- a/test/efc.c
+++ b/test/efc.c
@@ -2638,11 +2638,11 @@ main(void)
unsigned nerrors = 0; /* track errors */
H5P_genplist_t *plist; /* Property list pointer for FAPL */
H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
int i; /* iterator */
/* Test Setup */
- HDputs("Testing the external file cache");
+ puts("Testing the external file cache");
/* Create property lists */
fcpl_id = H5Pcreate(H5P_FILE_CREATE);
@@ -2664,7 +2664,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Get the VOL info from the fapl */
plist = (H5P_genplist_t *)H5I_object(fapl_id);
@@ -2688,14 +2688,14 @@ main(void)
nerrors += (h5_verify_cached_stabs(FILENAME, fapl_id) < 0 ? 1 : 0);
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
if (nerrors)
goto error;
- HDputs("All external file cache tests passed.");
+ puts("All external file cache tests passed.");
h5_clean_files(FILENAME, fapl_id);
@@ -2706,7 +2706,7 @@ main(void)
return EXIT_SUCCESS;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
@@ -2715,7 +2715,7 @@ error:
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
for (i = 0; i < N_FILENAMES; i++) {
free(filename[i]);
diff --git a/test/enc_dec_plist.c b/test/enc_dec_plist.c
index cd97cb9..e643b1b 100644
--- a/test/enc_dec_plist.c
+++ b/test/enc_dec_plist.c
@@ -24,10 +24,10 @@
static int
test_encode_decode(hid_t orig_pl, H5F_libver_t low, H5F_libver_t high)
{
- hid_t pl = (-1); /* Decoded property list */
- hid_t fapl = -1; /* File access property list */
- void *temp_buf = NULL; /* Pointer to encoding buffer */
- size_t temp_size = 0; /* Size of encoding buffer */
+ hid_t pl = (H5I_INVALID_HID); /* Decoded property list */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ void *temp_buf = NULL; /* Pointer to encoding buffer */
+ size_t temp_size = 0; /* Size of encoding buffer */
/* Create file access property list */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
@@ -113,24 +113,24 @@ error:
int
main(void)
{
- hid_t dcpl; /* dataset create prop. list */
- hid_t dapl; /* dataset access prop. list */
- hid_t dxpl; /* dataset xfer prop. list */
- hid_t gcpl; /* group create prop. list */
- hid_t ocpypl; /* object copy prop. list */
- hid_t ocpl; /* object create prop. list */
- hid_t lcpl; /* link create prop. list */
- hid_t lapl; /* link access prop. list */
- hid_t fapl; /* file access prop. list */
- hid_t fcpl; /* file create prop. list */
- hid_t strcpl; /* string create prop. list */
- hid_t acpl; /* attribute create prop. list */
- hid_t srcspace = -1; /* Source dataspaces */
- hid_t vspace = -1; /* Virtual dset dataspaces */
- hsize_t dims[1] = {3}; /* Data space current size */
- hsize_t chunk_size[2] = {16384, 4}; /* chunk size */
- double fill = 2.7; /* Fill value */
- hsize_t max_size[1]; /* data space maximum size */
+ hid_t dcpl; /* dataset create prop. list */
+ hid_t dapl; /* dataset access prop. list */
+ hid_t dxpl; /* dataset xfer prop. list */
+ hid_t gcpl; /* group create prop. list */
+ hid_t ocpypl; /* object copy prop. list */
+ hid_t ocpl; /* object create prop. list */
+ hid_t lcpl; /* link create prop. list */
+ hid_t lapl; /* link access prop. list */
+ hid_t fapl; /* file access prop. list */
+ hid_t fcpl; /* file create prop. list */
+ hid_t strcpl; /* string create prop. list */
+ hid_t acpl; /* attribute create prop. list */
+ hid_t srcspace = H5I_INVALID_HID; /* Source dataspaces */
+ hid_t vspace = H5I_INVALID_HID; /* Virtual dset dataspaces */
+ hsize_t dims[1] = {3}; /* Data space current size */
+ hsize_t chunk_size[2] = {16384, 4}; /* chunk size */
+ double fill = 2.7; /* Fill value */
+ hsize_t max_size[1]; /* data space maximum size */
size_t nslots = 521 * 2;
size_t nbytes = 1048576 * 10;
double w0 = 0.5;
@@ -140,12 +140,12 @@ main(void)
H5F_libver_t low, high; /* Low and high bounds */
H5AC_cache_config_t my_cache_config = {H5AC__CURR_CACHE_CONFIG_VERSION,
- TRUE,
- FALSE,
- FALSE,
+ true,
+ false,
+ false,
"temp",
- TRUE,
- FALSE,
+ true,
+ false,
(2 * 2048 * 1024),
0.3,
(64 * 1024 * 1024),
@@ -154,7 +154,7 @@ main(void)
H5C_incr__threshold,
0.8,
3.0,
- TRUE,
+ true,
(8 * 1024 * 1024),
H5C_flash_incr__add_space,
2.0,
@@ -162,15 +162,15 @@ main(void)
H5C_decr__age_out_with_threshold,
0.997,
0.8,
- TRUE,
+ true,
(3 * 1024 * 1024),
3,
- FALSE,
+ false,
0.2,
(256 * 2048),
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
- H5AC_cache_image_config_t my_cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, TRUE, FALSE,
+ H5AC_cache_image_config_t my_cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, true, false,
-1};
/* Loop through all the combinations of low/high version bounds */
@@ -187,9 +187,9 @@ main(void)
/* Display testing info */
low_string = h5_get_version_string(low);
high_string = h5_get_version_string(high);
- HDsnprintf(msg, sizeof(msg),
- "Testing ENCODE/DECODE with file version bounds: (%s, %s):", low_string, high_string);
- HDputs(msg);
+ snprintf(msg, sizeof(msg),
+ "Testing ENCODE/DECODE with file version bounds: (%s, %s):", low_string, high_string);
+ puts(msg);
if (VERBOSE_MED)
printf("Encode/Decode DCPLs\n");
@@ -216,7 +216,7 @@ main(void)
if ((H5Pset_fill_value(dcpl, H5T_NATIVE_DOUBLE, &fill)) < 0)
FAIL_STACK_ERROR;
- if ((H5Pset_dset_no_attrs_hint(dcpl, FALSE)) < 0)
+ if ((H5Pset_dset_no_attrs_hint(dcpl, false)) < 0)
FAIL_STACK_ERROR;
max_size[0] = 100;
@@ -370,7 +370,7 @@ main(void)
if (H5Pset_selection_io(dxpl, H5D_SELECTION_IO_MODE_ON) < 0)
FAIL_STACK_ERROR;
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
/* Test encoding & decoding property list */
@@ -435,7 +435,7 @@ main(void)
TESTING("LCPL Encoding/Decoding");
- if ((H5Pset_create_intermediate_group(lcpl, TRUE)) < 0)
+ if ((H5Pset_create_intermediate_group(lcpl, true)) < 0)
FAIL_STACK_ERROR;
/* Test encoding & decoding property list */
diff --git a/test/enc_dec_plist_cross_platform.c b/test/enc_dec_plist_cross_platform.c
index 81464cb..a368214 100644
--- a/test/enc_dec_plist_cross_platform.c
+++ b/test/enc_dec_plist_cross_platform.c
@@ -31,121 +31,121 @@ main(void)
/******* ENCODE/DECODE DCPLS *****/
TESTING("Default DCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_dcpl_") < 0)
+ if (test_plists("plist_files/def_dcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("DCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/dcpl_") < 0)
+ if (test_plists("plist_files/dcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE DAPLS *****/
TESTING("Default DAPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_dapl_") < 0)
+ if (test_plists("plist_files/def_dapl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("DAPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/dapl_") < 0)
+ if (test_plists("plist_files/dapl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE DXPLS *****/
TESTING("Default DXPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_dxpl_") < 0)
+ if (test_plists("plist_files/def_dxpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("DXPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/dxpl_") < 0)
+ if (test_plists("plist_files/dxpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE GCPLS *****/
TESTING("Default GCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_gcpl_") < 0)
+ if (test_plists("plist_files/def_gcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("GCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/gcpl_") < 0)
+ if (test_plists("plist_files/gcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE LCPLS *****/
TESTING("Default LCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_lcpl_") < 0)
+ if (test_plists("plist_files/def_lcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("LCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/lcpl_") < 0)
+ if (test_plists("plist_files/lcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE LAPLS *****/
TESTING("Default LAPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_lapl_") < 0)
+ if (test_plists("plist_files/def_lapl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("LAPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/lapl_") < 0)
+ if (test_plists("plist_files/lapl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE OCPLS *****/
TESTING("Default OCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_ocpl_") < 0)
+ if (test_plists("plist_files/def_ocpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("OCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/ocpl_") < 0)
+ if (test_plists("plist_files/ocpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE OCPYPLS *****/
TESTING("Default OCPYPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_ocpypl_") < 0)
+ if (test_plists("plist_files/def_ocpypl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("OCPYPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/ocpypl_") < 0)
+ if (test_plists("plist_files/ocpypl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE FCPLS *****/
TESTING("Default FCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_fcpl_") < 0)
+ if (test_plists("plist_files/def_fcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("FCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/fcpl_") < 0)
+ if (test_plists("plist_files/fcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE FAPLS *****/
TESTING("Default FAPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_fapl_") < 0)
+ if (test_plists("plist_files/def_fapl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("FAPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/fapl_") < 0)
+ if (test_plists("plist_files/fapl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE STRCPLS *****/
TESTING("Default STRCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_strcpl_") < 0)
+ if (test_plists("plist_files/def_strcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("STRCPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/strcpl_") < 0)
+ if (test_plists("plist_files/strcpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
/******* ENCODE/DECODE ACPLS *****/
TESTING("Default ACPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/def_acpl_") < 0)
+ if (test_plists("plist_files/def_acpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
TESTING("ACPL Encoding/Decoding");
- if (test_plists("testfiles/plist_files/acpl_") < 0)
+ if (test_plists("plist_files/acpl_") < 0)
FAIL_STACK_ERROR;
PASSED();
@@ -170,8 +170,8 @@ test_plists(const char *filename_prefix)
for (config_1 = 0; config_1 < (NCONFIG - 1); config_1++)
for (config_2 = config_1 + 1; config_2 < NCONFIG; config_2++) {
/* Generate filename for file 1 */
- if (HDsnprintf(filename, sizeof(filename), "%s%s%s", filename_prefix,
- config_1 & CONFIG_64 ? "64" : "32", config_1 & CONFIG_LE ? "le" : "be") < 0)
+ if (snprintf(filename, sizeof(filename), "%s%s%s", filename_prefix,
+ config_1 & CONFIG_64 ? "64" : "32", config_1 & CONFIG_LE ? "le" : "be") < 0)
TEST_ERROR;
/* Read file 1 */
@@ -186,8 +186,8 @@ test_plists(const char *filename_prefix)
HDclose(fd_1);
/* Generate filename for file 2 */
- if (HDsnprintf(filename, sizeof(filename), "%s%s%s", filename_prefix,
- config_2 & CONFIG_64 ? "64" : "32", config_2 & CONFIG_LE ? "le" : "be") < 0)
+ if (snprintf(filename, sizeof(filename), "%s%s%s", filename_prefix,
+ config_2 & CONFIG_64 ? "64" : "32", config_2 & CONFIG_LE ? "le" : "be") < 0)
TEST_ERROR;
/* Read file 1 */
diff --git a/test/enum.c b/test/enum.c
index 8ee0606..b64355c 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -808,12 +808,12 @@ main(void)
if (nerrors)
goto error;
- HDputs("All enum tests passed.");
+ puts("All enum tests passed.");
h5_cleanup(FILENAME, fapl_id);
return EXIT_SUCCESS;
error:
- HDputs("*** ENUM TESTS FAILED ***");
+ puts("*** ENUM TESTS FAILED ***");
return EXIT_FAILURE;
}
diff --git a/test/error_test.c b/test/error_test.c
index b4d366a..57b1eb7a 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -89,9 +89,9 @@ static herr_t custom_print_cb(unsigned n, const H5E_error2_t *err_desc, void *cl
static herr_t
test_error(hid_t file)
{
- hid_t dataset = -1;
- hid_t space = -1;
- hid_t estack_id = -1;
+ hid_t dataset = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t estack_id = H5I_INVALID_HID;
hsize_t dims[2];
const char *FUNC_test_error = "test_error";
H5E_auto2_t old_func;
@@ -175,15 +175,15 @@ error:
static herr_t
init_error(void)
{
- ssize_t cls_size = (ssize_t)HDstrlen(ERR_CLS_NAME) + 1;
- ssize_t msg_size = (ssize_t)HDstrlen(ERR_MIN_SUBROUTINE_MSG) + 1;
+ ssize_t cls_size = (ssize_t)strlen(ERR_CLS_NAME) + 1;
+ ssize_t msg_size = (ssize_t)strlen(ERR_MIN_SUBROUTINE_MSG) + 1;
char *cls_name = NULL;
char *msg = NULL;
H5E_type_t msg_type;
- if (NULL == (cls_name = (char *)malloc(HDstrlen(ERR_CLS_NAME) + 1)))
+ if (NULL == (cls_name = (char *)malloc(strlen(ERR_CLS_NAME) + 1)))
TEST_ERROR;
- if (NULL == (msg = (char *)malloc(HDstrlen(ERR_MIN_SUBROUTINE_MSG) + 1)))
+ if (NULL == (msg = (char *)malloc(strlen(ERR_MIN_SUBROUTINE_MSG) + 1)))
TEST_ERROR;
if ((ERR_CLS = H5Eregister_class(ERR_CLS_NAME, PROG_NAME, PROG_VERS)) < 0)
@@ -191,7 +191,7 @@ init_error(void)
if (cls_size != H5Eget_class_name(ERR_CLS, cls_name, (size_t)cls_size) + 1)
TEST_ERROR;
- if (HDstrcmp(ERR_CLS_NAME, cls_name) != 0)
+ if (strcmp(ERR_CLS_NAME, cls_name) != 0)
TEST_ERROR;
if ((ERR_MAJ_TEST = H5Ecreate_msg(ERR_CLS, H5E_MAJOR, ERR_MAJ_TEST_MSG)) < 0)
@@ -216,7 +216,7 @@ init_error(void)
TEST_ERROR;
if (msg_type != H5E_MINOR)
TEST_ERROR;
- if (HDstrcmp(msg, ERR_MIN_SUBROUTINE_MSG) != 0)
+ if (strcmp(msg, ERR_MIN_SUBROUTINE_MSG) != 0)
TEST_ERROR;
/* Register another class for later testing. */
@@ -293,7 +293,7 @@ long_desc_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *clie
{
char *real_desc = (char *)client_data;
- if (err_desc->desc != NULL && HDstrcmp(err_desc->desc, real_desc) == 0)
+ if (err_desc->desc != NULL && strcmp(err_desc->desc, real_desc) == 0)
return 0;
else
return -1;
@@ -345,10 +345,10 @@ test_long_desc(void)
long_desc) < 0)
TEST_ERROR;
- /* Create the string that should be in the description. Must use HDsnprintf here
+ /* Create the string that should be in the description. Must use snprintf here
* because snprintf is _snprintf on Windows
*/
- HDsnprintf(full_desc, (size_t)(LONG_DESC_SIZE + 128), format, long_desc);
+ snprintf(full_desc, (size_t)(LONG_DESC_SIZE + 128), format, long_desc);
/* Make certain that the description is correct */
if (H5Ewalk2(H5E_DEFAULT, H5E_WALK_UPWARD, long_desc_cb, full_desc) < 0)
@@ -456,10 +456,10 @@ error:
static herr_t
test_create(void)
{
- const char *err_func = "test_create"; /* Function name for pushing error */
- const char *err_msg = "Error message"; /* Error message for pushing error */
- ssize_t err_num; /* Number of errors on stack */
- hid_t estack_id = -1; /* Error stack ID */
+ const char *err_func = "test_create"; /* Function name for pushing error */
+ const char *err_msg = "Error message"; /* Error message for pushing error */
+ ssize_t err_num; /* Number of errors on stack */
+ hid_t estack_id = H5I_INVALID_HID; /* Error stack ID */
/* Create an empty error stack */
if ((estack_id = H5Ecreate_stack()) < 0)
@@ -512,11 +512,11 @@ error:
static herr_t
test_copy(void)
{
- const char *err_func = "test_copy"; /* Function name for pushing error */
- const char *err_msg = "Error message"; /* Error message for pushing error */
- ssize_t err_num; /* Number of errors on stack */
- hid_t estack_id = -1; /* Error stack ID */
- herr_t ret; /* Generic return value */
+ const char *err_func = "test_copy"; /* Function name for pushing error */
+ const char *err_msg = "Error message"; /* Error message for pushing error */
+ ssize_t err_num; /* Number of errors on stack */
+ hid_t estack_id = H5I_INVALID_HID; /* Error stack ID */
+ herr_t ret; /* Generic return value */
/* Push an error with a long description */
if (H5Epush(H5E_DEFAULT, __FILE__, err_func, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_SUBROUTINE, "%s",
@@ -585,8 +585,8 @@ test_append(void)
const char *err_msg1 = "Error message #1"; /* Error message #1 for pushing error */
const char *err_msg2 = "Error message #2"; /* Error message #2 for pushing error */
ssize_t err_num; /* Number of errors on stack */
- hid_t estack_id1 = -1; /* Error stack ID */
- hid_t estack_id2 = -1; /* Error stack ID */
+ hid_t estack_id1 = H5I_INVALID_HID; /* Error stack ID */
+ hid_t estack_id2 = H5I_INVALID_HID; /* Error stack ID */
herr_t ret; /* Generic return value */
/* Push an error */
@@ -625,28 +625,28 @@ test_append(void)
/* Try to append bad error stack IDs */
H5E_BEGIN_TRY
{
- ret = H5Eappend_stack(H5E_DEFAULT, H5E_DEFAULT, FALSE);
+ ret = H5Eappend_stack(H5E_DEFAULT, H5E_DEFAULT, false);
}
H5E_END_TRY
if (ret >= 0)
TEST_ERROR;
H5E_BEGIN_TRY
{
- ret = H5Eappend_stack(estack_id1, H5E_DEFAULT, FALSE);
+ ret = H5Eappend_stack(estack_id1, H5E_DEFAULT, false);
}
H5E_END_TRY
if (ret >= 0)
TEST_ERROR;
H5E_BEGIN_TRY
{
- ret = H5Eappend_stack(H5E_DEFAULT, estack_id2, FALSE);
+ ret = H5Eappend_stack(H5E_DEFAULT, estack_id2, false);
}
H5E_END_TRY
if (ret >= 0)
TEST_ERROR;
/* Append error stack #2 to error stack #1, without closing stack #2 */
- if (H5Eappend_stack(estack_id1, estack_id2, FALSE) < 0)
+ if (H5Eappend_stack(estack_id1, estack_id2, false) < 0)
TEST_ERROR;
/* Check the number of errors on stack #1 */
@@ -660,7 +660,7 @@ test_append(void)
TEST_ERROR;
/* Append error stack #2 to error stack #1, and close stack #2 */
- if (H5Eappend_stack(estack_id1, estack_id2, TRUE) < 0)
+ if (H5Eappend_stack(estack_id1, estack_id2, true) < 0)
TEST_ERROR;
/* Try to close error stack #2. Should fail because H5Eappend_stack
@@ -737,8 +737,8 @@ static herr_t
test_filter_error(const char *fname, hid_t fapl)
{
const char *pathname = H5_get_srcdir_filename(fname); /* Corrected test file name */
- hid_t file = -1;
- hid_t dataset = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID;
int buf[20];
fprintf(stderr, "\nTesting error message during data reading when filter isn't registered\n");
@@ -777,16 +777,16 @@ error:
int
main(void)
{
- hid_t file = -1;
- hid_t fapl = -1;
- hid_t estack_id = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t estack_id = H5I_INVALID_HID;
char filename[1024];
const char *env_h5_drvr; /* File driver value from environment */
const char *FUNC_main = "main";
int i;
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -879,7 +879,7 @@ main(void)
* the test file was pre-generated.
*/
h5_fixname(DATAFILE, H5P_DEFAULT, filename, sizeof filename);
- if (!h5_using_default_driver(env_h5_drvr) && HDstrcmp(env_h5_drvr, "stdio")) {
+ if (!h5_using_default_driver(env_h5_drvr) && strcmp(env_h5_drvr, "stdio")) {
/* If not using the library's default VFD or the stdio VFD, force
* the library's default VFD here. The test file was pre-generated
* and can cause issues with many VFDs.
diff --git a/test/event_set.c b/test/event_set.c
index 8102d4a..52aa6ba 100644
--- a/test/event_set.c
+++ b/test/event_set.c
@@ -184,7 +184,7 @@ test_es_create(void)
size_t count; /* # of events in set */
size_t num_errs; /* # of failed events in set */
uint64_t num_ops; /* # of events inserted into set */
- hbool_t err_occurred; /* Whether an error has occurred */
+ bool err_occurred; /* Whether an error has occurred */
TESTING("event set creation");
@@ -200,7 +200,7 @@ test_es_create(void)
FAIL_PUTS_ERROR("should be empty event set");
/* Check for errors */
- err_occurred = FALSE;
+ err_occurred = false;
if (H5ESget_err_status(es_id, &err_occurred) < 0)
TEST_ERROR;
if (err_occurred)
@@ -311,12 +311,12 @@ error:
static int
test_es_get_requests(void)
{
- hid_t es_id; /* Event set ID */
- hid_t connector_ids[2]; /* Connector IDs */
- void *requests[2]; /* Requests */
- int req_targets[2]; /* Dummy targets for void * requests */
- size_t count; /* # of events in set */
- hbool_t op_failed; /* Whether an operation failed (unused) */
+ hid_t es_id; /* Event set ID */
+ hid_t connector_ids[2]; /* Connector IDs */
+ void *requests[2]; /* Requests */
+ int req_targets[2]; /* Dummy targets for void * requests */
+ size_t count; /* # of events in set */
+ bool op_failed; /* Whether an operation failed (unused) */
TESTING("event set get requests");
@@ -681,11 +681,11 @@ main(void)
goto error;
/* Report status */
- HDputs("All event set tests passed.");
+ puts("All event set tests passed.");
exit(EXIT_SUCCESS);
error:
- HDputs("***** EVENT SET TESTS FAILED *****");
+ puts("***** EVENT SET TESTS FAILED *****");
exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/evict_on_close.c b/test/evict_on_close.c
index feebb08..9ca7f9f 100644
--- a/test/evict_on_close.c
+++ b/test/evict_on_close.c
@@ -69,11 +69,11 @@ const char *FILENAMES[] = {"evict-on-close", /* 0 */
#define SUBGROUP_NAME_SIZE 16
/* Prototypes */
-static hbool_t verify_tag_not_in_cache(const H5F_t *f, haddr_t tag);
-static herr_t check_evict_on_close_api(void);
-static hid_t generate_eoc_test_file(hid_t fapl_id);
-static herr_t check_dset_scheme(hid_t fid, const char *dset_name);
-static herr_t check_group_layout(hid_t fid, const char *group_name);
+static bool verify_tag_not_in_cache(const H5F_t *f, haddr_t tag);
+static herr_t check_evict_on_close_api(void);
+static hid_t generate_eoc_test_file(hid_t fapl_id);
+static herr_t check_dset_scheme(hid_t fid, const char *dset_name);
+static herr_t check_group_layout(hid_t fid, const char *group_name);
/*-------------------------------------------------------------------------
* Function: verify_tag_not_in_cache()
@@ -81,11 +81,11 @@ static herr_t check_group_layout(hid_t fid, const char *group_name);
* Purpose: Ensure that metadata cache entries with a given tag are not
* present in the cache.
*
- * Return: TRUE/FALSE
+ * Return: true/false
*
*-------------------------------------------------------------------------
*/
-static H5_ATTR_PURE hbool_t
+static H5_ATTR_PURE bool
verify_tag_not_in_cache(const H5F_t *f, haddr_t tag)
{
H5C_t *cache_ptr = NULL; /* cache pointer */
@@ -100,13 +100,13 @@ verify_tag_not_in_cache(const H5F_t *f, haddr_t tag)
entry_ptr = cache_ptr->index[i];
while (entry_ptr != NULL) {
if (tag == entry_ptr->tag_info->tag)
- return TRUE;
+ return true;
else
entry_ptr = entry_ptr->ht_next;
}
}
- return FALSE;
+ return false;
} /* end verify_tag_not_in_cache() */
/*-------------------------------------------------------------------------
@@ -122,22 +122,22 @@ verify_tag_not_in_cache(const H5F_t *f, haddr_t tag)
static hid_t
generate_eoc_test_file(hid_t fapl_id)
{
- char filename[FILENAME_BUF_SIZE]; /* decorated file name */
- hid_t fid = -1; /* file ID (returned) */
- hid_t fapl_copy_id = -1; /* ID of copied fapl */
- hid_t gid1 = -1, gid2 = -1; /* group IDs */
- hid_t sid = -1; /* dataspace ID */
- hid_t dcpl_id = -1; /* dataset creation plist */
- hid_t did = -1; /* dataset ID */
- int rank; /* # of array dimensions */
- hsize_t current_dims[2]; /* current dataset size */
- hsize_t maximum_dims[2]; /* maximum dataset size */
- hsize_t chunk_dims[2]; /* chunk dimensions */
- H5D_chunk_index_t idx_type; /* dataset chunk index type */
- H5D_layout_t layout_type; /* dataset layout type */
- int *data = NULL; /* buffer for fake data */
- int n; /* # of data elements */
- int i; /* iterator (# subgroups) */
+ char filename[FILENAME_BUF_SIZE]; /* decorated file name */
+ hid_t fid = H5I_INVALID_HID; /* file ID (returned) */
+ hid_t fapl_copy_id = H5I_INVALID_HID; /* ID of copied fapl */
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* group IDs */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t dcpl_id = H5I_INVALID_HID; /* dataset creation plist */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ int rank; /* # of array dimensions */
+ hsize_t current_dims[2]; /* current dataset size */
+ hsize_t maximum_dims[2]; /* maximum dataset size */
+ hsize_t chunk_dims[2]; /* chunk dimensions */
+ H5D_chunk_index_t idx_type; /* dataset chunk index type */
+ H5D_layout_t layout_type; /* dataset layout type */
+ int *data = NULL; /* buffer for fake data */
+ int n; /* # of data elements */
+ int i; /* iterator (# subgroups) */
TESTING("generating evict-on-close test file");
@@ -184,7 +184,7 @@ generate_eoc_test_file(hid_t fapl_id)
/* Create the group name */
memset(subgroup_name, '\0', SUBGROUP_NAME_SIZE);
- if (HDsnprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
+ if (snprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
TEST_ERROR;
if ((gid2 = H5Gcreate2(gid1, subgroup_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -279,7 +279,7 @@ generate_eoc_test_file(hid_t fapl_id)
/* Create the group name */
memset(subgroup_name, '\0', SUBGROUP_NAME_SIZE);
- if (HDsnprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
+ if (snprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
TEST_ERROR;
if ((gid2 = H5Gcreate2(gid1, subgroup_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -584,12 +584,12 @@ error:
static herr_t
check_group_layout(hid_t fid, const char *group_name)
{
- H5F_t *file_ptr = NULL; /* ptr to internal file struct */
- hid_t gid1 = -1, gid2 = -1; /* group IDs */
- H5G_t *grp_ptr = NULL; /* ptr to internal group struct */
- haddr_t tag1, tag2; /* MD cache tags for groups */
- uint32_t before, during, after; /* cache sizes */
- int i; /* iterator */
+ H5F_t *file_ptr = NULL; /* ptr to internal file struct */
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* group IDs */
+ H5G_t *grp_ptr = NULL; /* ptr to internal group struct */
+ haddr_t tag1, tag2; /* MD cache tags for groups */
+ uint32_t before, during, after; /* cache sizes */
+ int i; /* iterator */
/* NOTE: The TESTING() macro is called in main() */
@@ -620,7 +620,7 @@ check_group_layout(hid_t fid, const char *group_name)
/* Create the group name */
memset(subgroup_name, '\0', SUBGROUP_NAME_SIZE);
- if (HDsnprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
+ if (snprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
TEST_ERROR;
if ((gid2 = H5Gopen2(gid1, subgroup_name, H5P_DEFAULT)) < 0)
@@ -633,7 +633,7 @@ check_group_layout(hid_t fid, const char *group_name)
if (H5Gclose(gid2) < 0)
TEST_ERROR;
- if (TRUE == verify_tag_not_in_cache(file_ptr, tag2))
+ if (true == verify_tag_not_in_cache(file_ptr, tag2))
TEST_ERROR;
} /* end for */
@@ -663,7 +663,7 @@ check_group_layout(hid_t fid, const char *group_name)
#endif
/* Ensure that the cache does not contain entries with the tag */
- if (TRUE == verify_tag_not_in_cache(file_ptr, tag1))
+ if (true == verify_tag_not_in_cache(file_ptr, tag1))
TEST_ERROR;
/* Compare the number of cache entries */
if (before != after || before == during)
@@ -698,12 +698,12 @@ error:
static herr_t
check_dset_scheme(hid_t fid, const char *dset_name)
{
- H5F_t *file_ptr = NULL; /* ptr to internal file struct */
- hid_t did = -1; /* dataset ID */
- H5D_t *dset_ptr = NULL; /* ptr to internal dset struct */
- haddr_t tag; /* MD cache tag for dataset */
- int *data = NULL; /* buffer for fake data */
- uint32_t before, during, after; /* cache sizes */
+ H5F_t *file_ptr = NULL; /* ptr to internal file struct */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ H5D_t *dset_ptr = NULL; /* ptr to internal dset struct */
+ haddr_t tag; /* MD cache tag for dataset */
+ int *data = NULL; /* buffer for fake data */
+ uint32_t before, during, after; /* cache sizes */
/* NOTE: The TESTING() macro is called in main() */
@@ -764,7 +764,7 @@ check_dset_scheme(hid_t fid, const char *dset_name)
#endif
/* Ensure that the cache does not contain entries with the tag */
- if (TRUE == verify_tag_not_in_cache(file_ptr, tag))
+ if (true == verify_tag_not_in_cache(file_ptr, tag))
TEST_ERROR;
/* Compare the number of cache entries */
@@ -801,10 +801,10 @@ error:
static herr_t
check_evict_on_close_api(void)
{
- hid_t fapl_id = -1;
- hid_t dapl_id = -1;
- hbool_t evict_on_close;
- herr_t status;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t dapl_id = H5I_INVALID_HID;
+ bool evict_on_close;
+ herr_t status;
TESTING("evict on close API");
@@ -813,22 +813,22 @@ check_evict_on_close_api(void)
TEST_ERROR;
/* Check the default */
- evict_on_close = TRUE;
+ evict_on_close = true;
if (H5Pget_evict_on_close(fapl_id, &evict_on_close) < 0)
TEST_ERROR;
- if (evict_on_close != FALSE)
+ if (evict_on_close != false)
FAIL_PUTS_ERROR("Incorrect default evict on close value.");
/* Set the evict on close property */
- evict_on_close = TRUE;
+ evict_on_close = true;
if (H5Pset_evict_on_close(fapl_id, evict_on_close) < 0)
TEST_ERROR;
/* Make sure we can get it back out */
- evict_on_close = FALSE;
+ evict_on_close = false;
if (H5Pget_evict_on_close(fapl_id, &evict_on_close) < 0)
TEST_ERROR;
- if (evict_on_close != TRUE)
+ if (evict_on_close != true)
FAIL_PUTS_ERROR("Incorrect evict on close value.");
/* close fapl */
@@ -883,9 +883,9 @@ error:
int
main(void)
{
- hid_t fapl_id = -1; /* VFD-specific fapl */
- hid_t fid = -1; /* file ID */
- unsigned nerrors = 0; /* number of test errors */
+ hid_t fapl_id = H5I_INVALID_HID; /* VFD-specific fapl */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ unsigned nerrors = 0; /* number of test errors */
printf("Testing evict-on-close cache behavior\n");
@@ -902,7 +902,7 @@ main(void)
} /* end if */
/* Set evict-on-close property */
- if (H5Pset_evict_on_close(fapl_id, TRUE) < 0) {
+ if (H5Pset_evict_on_close(fapl_id, true) < 0) {
nerrors++;
PUTS_ERROR("Unable to set evict-on-close property\n");
} /* end if */
@@ -990,9 +990,9 @@ error:
static herr_t
check_evict_on_close_parallel_fail(void)
{
- hid_t fapl_id = -1;
- hbool_t evict_on_close;
- herr_t status;
+ hid_t fapl_id = H5I_INVALID_HID;
+ bool evict_on_close;
+ herr_t status;
TESTING("evict on close fails in parallel");
@@ -1001,7 +1001,7 @@ check_evict_on_close_parallel_fail(void)
TEST_ERROR;
/* Set the evict on close property (should fail)*/
- evict_on_close = TRUE;
+ evict_on_close = true;
H5E_BEGIN_TRY
{
status = H5Pset_evict_on_close(fapl_id, evict_on_close);
diff --git a/test/external.c b/test/external.c
index aad2d7c..bf3c5bd 100644
--- a/test/external.c
+++ b/test/external.c
@@ -29,7 +29,7 @@
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
files_have_same_contents(const char *name1, const char *name2)
{
int fd1 = 0;
@@ -38,7 +38,7 @@ files_have_same_contents(const char *name1, const char *name2)
ssize_t n2 = 0;
char buf1[1024];
char buf2[1024];
- hbool_t ret = FALSE; /* not equal until proven otherwise */
+ bool ret = false; /* not equal until proven otherwise */
if ((fd1 = HDopen(name1, O_RDONLY)) < 0)
goto out;
@@ -61,7 +61,7 @@ files_have_same_contents(const char *name1, const char *name2)
break;
if (n1 == 0 && n2 == 0) {
- ret = TRUE;
+ ret = true;
break;
}
@@ -91,15 +91,15 @@ out:
static int
test_non_extendible(hid_t file)
{
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dset = -1; /* dataset */
- hsize_t cur_size[1] = {100}; /* data space current size */
- hsize_t max_size[1] = {100}; /* data space maximum size */
- int n = 0; /* number of external files */
- off_t file_offset = 0; /* external file offset */
- hsize_t file_size = 0; /* sizeof external file segment */
- haddr_t dset_addr = HADDR_UNDEF; /* address of dataset */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ hsize_t cur_size[1] = {100}; /* data space current size */
+ hsize_t max_size[1] = {100}; /* data space maximum size */
+ int n = 0; /* number of external files */
+ off_t file_offset = 0; /* external file offset */
+ hsize_t file_size = 0; /* sizeof external file segment */
+ haddr_t dset_addr = HADDR_UNDEF; /* address of dataset */
TESTING("fixed-size data space, exact storage");
@@ -139,7 +139,7 @@ test_non_extendible(hid_t file)
FAIL_STACK_ERROR;
if (1 != n) {
H5_FAILED();
- HDputs(" Returned external count is wrong.");
+ puts(" Returned external count is wrong.");
printf(" got: %d\n ans: 1\n", n);
goto error;
}
@@ -149,13 +149,13 @@ test_non_extendible(hid_t file)
FAIL_STACK_ERROR;
if (file_offset != 0) {
H5_FAILED();
- HDputs(" Wrong file offset.");
+ puts(" Wrong file offset.");
printf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
goto error;
}
if (file_size != (max_size[0] * sizeof(int))) {
H5_FAILED();
- HDputs(" Wrong file size.");
+ puts(" Wrong file size.");
printf(" got: %" PRIuHSIZE "\n ans: %" PRIuHSIZE "\n", file_size, max_size[0] * sizeof(int));
goto error;
}
@@ -193,11 +193,11 @@ error:
static int
test_too_small(hid_t file)
{
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dset = -1; /* dataset */
- hsize_t cur_size[1] = {100}; /* current data space size */
- hsize_t max_size[1] = {100}; /* maximum data space size */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ hsize_t cur_size[1] = {100}; /* current data space size */
+ hsize_t max_size[1] = {100}; /* maximum data space size */
TESTING("external storage is too small");
@@ -250,11 +250,11 @@ error:
static int
test_large_enough_current_eventual(hid_t file)
{
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dset = -1; /* dataset */
- hsize_t cur_size[1] = {100}; /* current data space size */
- hsize_t max_size[1] = {200}; /* maximum data space size */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ hsize_t cur_size[1] = {100}; /* current data space size */
+ hsize_t max_size[1] = {200}; /* maximum data space size */
TESTING("extendible dataspace, exact external size");
@@ -302,11 +302,11 @@ error:
static int
test_large_enough_current_not_eventual(hid_t file)
{
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dset = -1; /* dataset */
- hsize_t cur_size[1] = {100}; /* current data space size */
- hsize_t max_size[1] = {200}; /* maximum data space size */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ hsize_t cur_size[1] = {100}; /* current data space size */
+ hsize_t max_size[1] = {200}; /* maximum data space size */
TESTING("extendible dataspace, external storage is too small");
@@ -359,9 +359,9 @@ error:
static int
test_unlimited(hid_t file)
{
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dset = -1; /* dataset */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
hsize_t cur_size[1] = {100}; /* data space current size */
hsize_t max_size[1] = {H5S_UNLIMITED}; /* data space maximum size */
int n; /* number of external files */
@@ -396,7 +396,7 @@ test_unlimited(hid_t file)
FAIL_STACK_ERROR;
if (1 != n) {
H5_FAILED();
- HDputs(" Returned external count is wrong.");
+ puts(" Returned external count is wrong.");
printf(" got: %d\n ans: 1\n", n);
goto error;
} /* end if */
@@ -405,13 +405,13 @@ test_unlimited(hid_t file)
FAIL_STACK_ERROR;
if (file_offset != 0) {
H5_FAILED();
- HDputs(" Wrong file offset.");
+ puts(" Wrong file offset.");
printf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
goto error;
}
if (H5F_UNLIMITED != file_size) {
H5_FAILED();
- HDputs(" Wrong file size.");
+ puts(" Wrong file size.");
printf(" got: %lu\n ans: INF\n", (unsigned long)file_size);
goto error;
}
@@ -457,7 +457,7 @@ add_external_files(hid_t dcpl_id, unsigned int n_external_files, off_t offset, h
return -1;
}
for (i = 0; i < n_external_files; i++) {
- if (HDsnprintf(exname, AEF_EXNAME_MAX_LEN, "ext%d.data", i + 1) > AEF_EXNAME_MAX_LEN) {
+ if (snprintf(exname, AEF_EXNAME_MAX_LEN, "ext%d.data", i + 1) > AEF_EXNAME_MAX_LEN) {
fprintf(stderr, "External file %d overflows name buffer\n", i + 1);
fflush(stderr);
return -1;
@@ -484,12 +484,12 @@ add_external_files(hid_t dcpl_id, unsigned int n_external_files, off_t offset, h
static int
test_multiple_files(hid_t file)
{
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* dataspace */
- hid_t dset = -1; /* dataset */
- hsize_t cur_size[1] = {100}; /* data space current size */
- hsize_t max_size[1] = {100}; /* data space maximum size */
- hsize_t max_ext_size; /* maximum size of external files */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* dataspace */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ hsize_t cur_size[1] = {100}; /* data space current size */
+ hsize_t max_size[1] = {100}; /* data space maximum size */
+ hsize_t max_ext_size; /* maximum size of external files */
unsigned int n_external_files = 4;
TESTING("multiple external files");
@@ -568,9 +568,9 @@ error:
static int
test_add_to_unlimited(void)
{
- hid_t dcpl = -1; /* dataset creation properties */
- herr_t status = FAIL; /* function return status */
- int n = 0; /* number of external files */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ herr_t status = FAIL; /* function return status */
+ int n = 0; /* number of external files */
TESTING("external file following unlimited file");
@@ -620,8 +620,8 @@ error:
static int
test_overflow(void)
{
- hid_t dcpl = -1; /* dataset creation properties */
- herr_t status = FAIL; /* return status */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ herr_t status = FAIL; /* return status */
TESTING("address overflow in external files");
@@ -666,19 +666,19 @@ error:
static int
test_read_file_set(hid_t fapl)
{
- hid_t file = -1; /* file to write to */
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dset = -1; /* dataset */
- hid_t grp = -1; /* group to emit diagnostics */
- size_t i = 0; /* miscellaneous counter */
- char filename[1024]; /* file names */
- int part[PART_SIZE]; /* raw data buffer (partial) */
- int whole[TOTAL_SIZE]; /* raw data buffer (total) */
- hsize_t cur_size; /* current data space size */
- hid_t hs_space = -1; /* hyperslab data space */
- hsize_t hs_start = 30; /* hyperslab starting offset */
- hsize_t hs_count = 25; /* hyperslab size */
+ hid_t file = H5I_INVALID_HID; /* file to write to */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ hid_t grp = H5I_INVALID_HID; /* group to emit diagnostics */
+ size_t i = 0; /* miscellaneous counter */
+ char filename[1024]; /* file names */
+ int part[PART_SIZE]; /* raw data buffer (partial) */
+ int whole[TOTAL_SIZE]; /* raw data buffer (total) */
+ hsize_t cur_size; /* current data space size */
+ hid_t hs_space = H5I_INVALID_HID; /* hyperslab data space */
+ hsize_t hs_start = 30; /* hyperslab starting offset */
+ hsize_t hs_count = 25; /* hyperslab size */
TESTING("read external dataset");
@@ -686,7 +686,7 @@ test_read_file_set(hid_t fapl)
TEST_ERROR;
/* Reset the raw data files */
- if (reset_raw_data_files(FALSE) < 0)
+ if (reset_raw_data_files(false) < 0)
TEST_ERROR;
/* Create the file and an initial group. This causes messages about
@@ -705,7 +705,7 @@ test_read_file_set(hid_t fapl)
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR;
for (i = 0; i < N_EXT_FILES; i++) {
- HDsnprintf(filename, sizeof(filename), "extern_%dr.raw", (int)i + 1);
+ snprintf(filename, sizeof(filename), "extern_%dr.raw", (int)i + 1);
if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
FAIL_STACK_ERROR;
}
@@ -788,19 +788,19 @@ error:
static int
test_write_file_set(hid_t fapl)
{
- hid_t file = -1; /* file to which to write */
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t mem_space = -1; /* memory data space */
- hid_t file_space = -1; /* file data space */
- hid_t dset = -1; /* dataset */
- unsigned i = 0; /* miscellaneous counter */
- int part[PART_SIZE]; /* raw data buffer (partial) */
- int whole[TOTAL_SIZE]; /* raw data buffer (total) */
- hsize_t cur_size = 100; /* current data space size */
- hsize_t max_size = 200; /* maximum data space size */
- hsize_t hs_start = 100; /* hyperslab starting offset */
- hsize_t hs_count = 100; /* hyperslab size */
- char filename[1024]; /* file name */
+ hid_t file = H5I_INVALID_HID; /* file to which to write */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t mem_space = H5I_INVALID_HID; /* memory data space */
+ hid_t file_space = H5I_INVALID_HID; /* file data space */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ unsigned i = 0; /* miscellaneous counter */
+ int part[PART_SIZE]; /* raw data buffer (partial) */
+ int whole[TOTAL_SIZE]; /* raw data buffer (total) */
+ hsize_t cur_size = 100; /* current data space size */
+ hsize_t max_size = 200; /* maximum data space size */
+ hsize_t hs_start = 100; /* hyperslab starting offset */
+ hsize_t hs_count = 100; /* hyperslab size */
+ char filename[1024]; /* file name */
TESTING("write external dataset");
@@ -818,7 +818,7 @@ test_write_file_set(hid_t fapl)
for (i = 0; i < N_EXT_FILES; i++) {
hsize_t size;
- HDsnprintf(filename, sizeof(filename), "extern_%dw.raw", (int)i + 1);
+ snprintf(filename, sizeof(filename), "extern_%dw.raw", (int)i + 1);
if (i != N_EXT_FILES - 1)
size = (hsize_t)sizeof(part);
@@ -830,7 +830,7 @@ test_write_file_set(hid_t fapl)
} /* end for */
/* Reset the raw data files */
- if (reset_raw_data_files(FALSE) < 0)
+ if (reset_raw_data_files(false) < 0)
TEST_ERROR;
/* Create the dataset */
@@ -849,8 +849,8 @@ test_write_file_set(hid_t fapl)
for (i = 0; i < N_EXT_FILES; i++) {
char name1[64], name2[64];
- HDsnprintf(name1, sizeof(name1), "extern_%dr.raw", i + 1);
- HDsnprintf(name2, sizeof(name2), "extern_%dw.raw", i + 1);
+ snprintf(name1, sizeof(name1), "extern_%dr.raw", i + 1);
+ snprintf(name2, sizeof(name2), "extern_%dw.raw", i + 1);
if (!files_have_same_contents(name1, name2))
FAIL_PUTS_ERROR(" Output differs from expected value.");
} /* end for */
@@ -915,16 +915,16 @@ error:
static int
test_path_absolute(hid_t fapl)
{
- hid_t file = -1; /* file to write to */
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dset = -1; /* dataset */
- size_t i = 0; /* miscellaneous counter */
- char cwdpath[1024]; /* working directory */
- char filename[1088]; /* file name */
- int part[PART_SIZE]; /* raw data buffer (partial) */
- int whole[TOTAL_SIZE]; /* raw data buffer (total) */
- hsize_t cur_size; /* current data space size */
+ hid_t file = H5I_INVALID_HID; /* file to write to */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ size_t i = 0; /* miscellaneous counter */
+ char cwdpath[1024]; /* working directory */
+ char filename[1088]; /* file name */
+ int part[PART_SIZE]; /* raw data buffer (partial) */
+ int whole[TOTAL_SIZE]; /* raw data buffer (total) */
+ hsize_t cur_size; /* current data space size */
TESTING("absolute filenames for external file");
@@ -933,7 +933,7 @@ test_path_absolute(hid_t fapl)
FAIL_STACK_ERROR;
/* Reset the raw data files */
- if (reset_raw_data_files(FALSE) < 0)
+ if (reset_raw_data_files(false) < 0)
TEST_ERROR;
/* Create the dcpl */
@@ -942,11 +942,11 @@ test_path_absolute(hid_t fapl)
if (NULL == HDgetcwd(cwdpath, sizeof(cwdpath)))
TEST_ERROR;
for (i = 0; i < N_EXT_FILES; i++) {
- HDsnprintf(filename, sizeof(filename), "%s%sextern_%zur.raw", cwdpath, H5_DIR_SEPS, i + 1);
+ snprintf(filename, sizeof(filename), "%s%sextern_%zur.raw", cwdpath, H5_DIR_SEPS, i + 1);
#if defined(H5_HAVE_WINDOW_PATH)
/* For windows, test path-absolute case (\dir\file.raw) for the second file */
if (i == 1)
- HDsnprintf(filename, sizeof(filename), "%s%sextern_%zur.raw", cwdpath + 2, H5_DIR_SEPS, i + 1);
+ snprintf(filename, sizeof(filename), "%s%sextern_%zur.raw", cwdpath + 2, H5_DIR_SEPS, i + 1);
#endif
if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
FAIL_STACK_ERROR;
@@ -1007,15 +1007,15 @@ error:
static int
test_path_relative(hid_t fapl)
{
- hid_t file = -1; /* file to write to */
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dset = -1; /* dataset */
- size_t i = 0; /* miscellaneous counters */
- char filename[1024]; /* file name */
- int part[PART_SIZE]; /* raw data buffer (partial) */
- int whole[TOTAL_SIZE]; /* raw data buffer (total) */
- hsize_t cur_size; /* current data space size */
+ hid_t file = H5I_INVALID_HID; /* file to write to */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ size_t i = 0; /* miscellaneous counters */
+ char filename[1024]; /* file name */
+ int part[PART_SIZE]; /* raw data buffer (partial) */
+ int whole[TOTAL_SIZE]; /* raw data buffer (total) */
+ hsize_t cur_size; /* current data space size */
TESTING("filenames relative to current directory for external file");
@@ -1030,14 +1030,14 @@ test_path_relative(hid_t fapl)
FAIL_STACK_ERROR;
/* Reset the raw data files */
- if (reset_raw_data_files(FALSE) < 0)
+ if (reset_raw_data_files(false) < 0)
TEST_ERROR;
/* Create the dataset */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR;
for (i = 0; i < N_EXT_FILES; i++) {
- HDsnprintf(filename, sizeof(filename), "extern_%dr.raw", (int)i + 1);
+ snprintf(filename, sizeof(filename), "extern_%dr.raw", (int)i + 1);
if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1096,20 +1096,20 @@ error:
static int
test_path_relative_cwd(hid_t fapl)
{
- hid_t file = -1; /* file to write to */
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dapl = -1; /* dataset access property list */
- hid_t dapl2 = -1; /* copy of dapl */
- hid_t dset = -1; /* dataset */
- hid_t dset2 = -1; /* dataset, opened a second time */
- hid_t dset3 = -1; /* dataset, opened with different prefix */
- size_t i = 0; /* miscellaneous counters */
- char filename[1024]; /* file name */
- int part[PART_SIZE]; /* raw data buffer (partial) */
- int whole[TOTAL_SIZE]; /* raw data buffer (total) */
- hsize_t cur_size; /* current data space size */
- char buffer[1024]; /* buffer to read efile_prefix */
+ hid_t file = H5I_INVALID_HID; /* file to write to */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dapl = H5I_INVALID_HID; /* dataset access property list */
+ hid_t dapl2 = H5I_INVALID_HID; /* copy of dapl */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ hid_t dset2 = H5I_INVALID_HID; /* dataset, opened a second time */
+ hid_t dset3 = H5I_INVALID_HID; /* dataset, opened with different prefix */
+ size_t i = 0; /* miscellaneous counters */
+ char filename[1024]; /* file name */
+ int part[PART_SIZE]; /* raw data buffer (partial) */
+ int whole[TOTAL_SIZE]; /* raw data buffer (total) */
+ hsize_t cur_size; /* current data space size */
+ char buffer[1024]; /* buffer to read efile_prefix */
TESTING("filenames relative to HDF5 file for external file");
@@ -1124,14 +1124,14 @@ test_path_relative_cwd(hid_t fapl)
FAIL_STACK_ERROR;
/* Reset the raw data files */
- if (reset_raw_data_files(FALSE) < 0)
+ if (reset_raw_data_files(false) < 0)
TEST_ERROR;
/* Create the dataset */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR;
for (i = 0; i < N_EXT_FILES; i++) {
- HDsnprintf(filename, sizeof(filename), "..%sextern_%dr.raw", H5_DIR_SEPS, (int)i + 1);
+ snprintf(filename, sizeof(filename), "..%sextern_%dr.raw", H5_DIR_SEPS, (int)i + 1);
if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1145,7 +1145,7 @@ test_path_relative_cwd(hid_t fapl)
FAIL_STACK_ERROR;
if (H5Pget_efile_prefix(dapl, buffer, sizeof(buffer)) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(buffer, "${ORIGIN}") != 0)
+ if (strcmp(buffer, "${ORIGIN}") != 0)
FAIL_PUTS_ERROR("efile prefix not set correctly");
if ((dapl2 = H5Pcopy(dapl)) < 0)
FAIL_STACK_ERROR;
@@ -1260,14 +1260,14 @@ error:
static int
test_h5d_get_access_plist(hid_t fapl_id)
{
- hid_t fid = -1; /* file to write to */
- hid_t dcpl_id = -1; /* dataset creation properties */
- hid_t dapl_id = -1; /* dataset access properties */
- hid_t sid = -1; /* data space */
- hid_t did = -1; /* dataset */
- hsize_t dims = 0; /* dataset size */
- char *buffer = NULL; /* saved prefix name from dapl */
- char filename[1024]; /* file names */
+ hid_t fid = H5I_INVALID_HID; /* file to write to */
+ hid_t dcpl_id = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t dapl_id = H5I_INVALID_HID; /* dataset access properties */
+ hid_t sid = H5I_INVALID_HID; /* data space */
+ hid_t did = H5I_INVALID_HID; /* dataset */
+ hsize_t dims = 0; /* dataset size */
+ char *buffer = NULL; /* saved prefix name from dapl */
+ char filename[1024]; /* file names */
TESTING("H5Dget_access_plist() returns correct prefix");
@@ -1275,7 +1275,7 @@ test_h5d_get_access_plist(hid_t fapl_id)
TEST_ERROR;
/* Reset the raw data files */
- if (reset_raw_data_files(FALSE) < 0)
+ if (reset_raw_data_files(false) < 0)
TEST_ERROR;
/* Create the file */
@@ -1315,7 +1315,7 @@ test_h5d_get_access_plist(hid_t fapl_id)
TEST_ERROR;
if (H5Pget_efile_prefix(dapl_id, buffer, (size_t)64) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(buffer, "someprefix") != 0)
+ if (strcmp(buffer, "someprefix") != 0)
FAIL_PUTS_ERROR("external file prefix from dapl incorrect");
/* Close everything */
@@ -1361,13 +1361,13 @@ error:
int
main(void)
{
- hid_t fapl_id_old = -1; /* file access properties (old format) */
- hid_t fapl_id_new = -1; /* file access properties (new format) */
- hid_t fid = -1; /* file for test_1* functions */
- hid_t gid = -1; /* group to emit diagnostics */
- char filename[1024]; /* file name for test_1* funcs */
- unsigned latest_format; /* default or latest file format */
- int nerrors = 0; /* number of errors */
+ hid_t fapl_id_old = H5I_INVALID_HID; /* file access properties (old format) */
+ hid_t fapl_id_new = H5I_INVALID_HID; /* file access properties (new format) */
+ hid_t fid = H5I_INVALID_HID; /* file for test_1* functions */
+ hid_t gid = H5I_INVALID_HID; /* group to emit diagnostics */
+ char filename[1024]; /* file name for test_1* funcs */
+ unsigned latest_format; /* default or latest file format */
+ int nerrors = 0; /* number of errors */
h5_reset();
@@ -1383,19 +1383,19 @@ main(void)
/* The file format doesn't matter for this test */
nerrors += test_h5d_get_access_plist(fapl_id_new);
- HDputs("");
+ puts("");
/* Test with old & new format groups */
- for (latest_format = FALSE; latest_format <= TRUE; latest_format++) {
- hid_t current_fapl_id = -1;
+ for (latest_format = false; latest_format <= true; latest_format++) {
+ hid_t current_fapl_id = H5I_INVALID_HID;
/* Set the fapl for different file formats */
if (latest_format) {
- HDputs("\nTesting with the latest file format:");
+ puts("\nTesting with the latest file format:");
current_fapl_id = fapl_id_new;
}
else {
- HDputs("Testing with the default file format:");
+ puts("Testing with the default file format:");
current_fapl_id = fapl_id_old;
}
@@ -1444,7 +1444,7 @@ main(void)
if (H5Pclose(fapl_id_new) < 0)
FAIL_STACK_ERROR;
- HDputs("All external storage tests passed.");
+ puts("All external storage tests passed.");
/* Clean up files used by file set tests */
if (h5_cleanup(EXT_FNAME, fapl_id_old)) {
diff --git a/test/external_common.c b/test/external_common.c
index 0fd47f2..8f0b7b9 100644
--- a/test/external_common.c
+++ b/test/external_common.c
@@ -27,7 +27,7 @@
*-------------------------------------------------------------------------
*/
herr_t
-reset_raw_data_files(hbool_t is_env)
+reset_raw_data_files(bool is_env)
{
int fd = 0; /* external file descriptor */
size_t i, j; /* iterators */
@@ -52,9 +52,9 @@ reset_raw_data_files(hbool_t is_env)
/* Open file */
if (is_env)
- HDsnprintf(filename, sizeof(filename), "extern_env_%lur.raw", (unsigned long)i + 1);
+ snprintf(filename, sizeof(filename), "extern_env_%lur.raw", (unsigned long)i + 1);
else
- HDsnprintf(filename, sizeof(filename), "extern_%lur.raw", (unsigned long)i + 1);
+ snprintf(filename, sizeof(filename), "extern_%lur.raw", (unsigned long)i + 1);
if ((fd = HDopen(filename, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0)
goto error;
@@ -89,9 +89,9 @@ reset_raw_data_files(hbool_t is_env)
/* Open file */
if (is_env)
- HDsnprintf(filename, sizeof(filename), "extern_env_%luw.raw", (unsigned long)i + 1);
+ snprintf(filename, sizeof(filename), "extern_env_%luw.raw", (unsigned long)i + 1);
else
- HDsnprintf(filename, sizeof(filename), "extern_%luw.raw", (unsigned long)i + 1);
+ snprintf(filename, sizeof(filename), "extern_%luw.raw", (unsigned long)i + 1);
if ((fd = HDopen(filename, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0)
goto error;
diff --git a/test/external_common.h b/test/external_common.h
index 197be06..cf00fe2 100644
--- a/test/external_common.h
+++ b/test/external_common.h
@@ -31,7 +31,7 @@
extern "C" {
#endif
-H5TEST_DLL herr_t reset_raw_data_files(hbool_t is_env);
+H5TEST_DLL herr_t reset_raw_data_files(bool is_env);
#ifdef __cplusplus
}
diff --git a/test/external_env.c b/test/external_env.c
index 1a91c2a..6d6146a 100644
--- a/test/external_env.c
+++ b/test/external_env.c
@@ -38,17 +38,17 @@ static const char *EXT_ENV_FNAME[] = {"extern_env_dir/env_file_1", NULL};
static int
test_path_env(hid_t fapl)
{
- hid_t file = -1; /* file to write to */
- hid_t dcpl = -1; /* dataset creation properties */
- hid_t space = -1; /* data space */
- hid_t dapl = -1; /* dataset access property list */
- hid_t dset = -1; /* dataset */
- size_t i; /* miscellaneous counters */
- char filename[1024]; /* file name */
- int part[PART_SIZE]; /* raw data buffer (partial) */
- int whole[TOTAL_SIZE]; /* raw data buffer (total) */
- hsize_t cur_size; /* current data space size */
- char buffer[1024]; /* buffer to read efile_prefix */
+ hid_t file = H5I_INVALID_HID; /* file to write to */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t space = H5I_INVALID_HID; /* data space */
+ hid_t dapl = H5I_INVALID_HID; /* dataset access property list */
+ hid_t dset = H5I_INVALID_HID; /* dataset */
+ size_t i; /* miscellaneous counters */
+ char filename[1024]; /* file name */
+ int part[PART_SIZE]; /* raw data buffer (partial) */
+ int whole[TOTAL_SIZE]; /* raw data buffer (total) */
+ hsize_t cur_size; /* current data space size */
+ char buffer[1024]; /* buffer to read efile_prefix */
TESTING("prefix in HDF5_EXTFILE_PREFIX");
@@ -60,14 +60,14 @@ test_path_env(hid_t fapl)
FAIL_STACK_ERROR;
/* Reset the raw data files */
- if (reset_raw_data_files(TRUE) < 0)
+ if (reset_raw_data_files(true) < 0)
TEST_ERROR;
/* Create the dataset */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR;
for (i = 0; i < N_EXT_FILES; i++) {
- HDsnprintf(filename, sizeof(filename), "..%sextern_env_%dr.raw", H5_DIR_SEPS, (int)i + 1);
+ snprintf(filename, sizeof(filename), "..%sextern_env_%dr.raw", H5_DIR_SEPS, (int)i + 1);
if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -83,7 +83,7 @@ test_path_env(hid_t fapl)
FAIL_STACK_ERROR;
if (H5Pget_efile_prefix(dapl, buffer, sizeof(buffer)) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(buffer, "someprefix") != 0)
+ if (strcmp(buffer, "someprefix") != 0)
FAIL_PUTS_ERROR("efile prefix not set correctly");
/* Create dataset */
@@ -137,12 +137,12 @@ error:
int
main(void)
{
- hid_t fapl_id_old = -1; /* file access properties (old format) */
- hid_t fapl_id_new = -1; /* file access properties (new format) */
- hid_t fid = -1; /* file for test_1* functions */
- hid_t gid = -1; /* group to emit diagnostics */
- unsigned latest_format; /* default or latest file format */
- int nerrors = 0; /* number of errors */
+ hid_t fapl_id_old = H5I_INVALID_HID; /* file access properties (old format) */
+ hid_t fapl_id_new = H5I_INVALID_HID; /* file access properties (new format) */
+ hid_t fid = H5I_INVALID_HID; /* file for test_1* functions */
+ hid_t gid = H5I_INVALID_HID; /* group to emit diagnostics */
+ unsigned latest_format; /* default or latest file format */
+ int nerrors = 0; /* number of errors */
h5_reset();
@@ -156,16 +156,16 @@ main(void)
FAIL_STACK_ERROR;
/* Test with old & new format groups */
- for (latest_format = FALSE; latest_format <= TRUE; latest_format++) {
- hid_t current_fapl_id = -1;
+ for (latest_format = false; latest_format <= true; latest_format++) {
+ hid_t current_fapl_id = H5I_INVALID_HID;
/* Set the fapl for different file formats */
if (latest_format) {
- HDputs("\nTesting with the latest file format:");
+ puts("\nTesting with the latest file format:");
current_fapl_id = fapl_id_new;
} /* end if */
else {
- HDputs("Testing with the default file format:");
+ puts("Testing with the default file format:");
current_fapl_id = fapl_id_old;
} /* end else */
@@ -179,7 +179,7 @@ main(void)
if (H5Pclose(fapl_id_new) < 0)
FAIL_STACK_ERROR;
- HDputs("All external storage tests passed.");
+ puts("All external storage tests passed.");
/* Clean up files used by file set tests */
if (h5_cleanup(EXT_ENV_FNAME, fapl_id_old)) {
diff --git a/test/farray.c b/test/farray.c
index a7a4125..791cb54 100644
--- a/test/farray.c
+++ b/test/farray.c
@@ -418,10 +418,10 @@ error:
static unsigned
test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSED *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5FA_t *fa = NULL; /* Fixed array wrapper */
- haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5FA_t *fa = NULL; /* Fixed array wrapper */
+ haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
/* Create file & retrieve pointer to internal file object */
if (create_file(fapl, &file, &f) < 0)
@@ -491,7 +491,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE
}
#else /* NDEBUG */
SKIPPED();
- HDputs(" Not tested when assertions are disabled");
+ puts(" Not tested when assertions are disabled");
#endif /* NDEBUG */
/*
@@ -546,10 +546,10 @@ error:
static unsigned
test_reopen(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5FA_t *fa = NULL; /* Fixed array wrapper */
- haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5FA_t *fa = NULL; /* Fixed array wrapper */
+ haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
/* Create file & retrieve pointer to internal file object */
if (create_file(fapl, &file, &f) < 0)
@@ -850,12 +850,12 @@ error:
static unsigned
test_delete_open(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5FA_t *fa = NULL; /* Fixed array wrapper */
- H5FA_t *fa2 = NULL; /* Fixed array wrapper */
- haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
- h5_stat_size_t file_size; /* File size, after deleting array */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5FA_t *fa = NULL; /* Fixed array wrapper */
+ H5FA_t *fa2 = NULL; /* Fixed array wrapper */
+ haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
+ h5_stat_size_t file_size; /* File size, after deleting array */
/* Create file & retrieve pointer to internal file object */
if (create_file(fapl, &file, &f) < 0)
@@ -1338,18 +1338,18 @@ static unsigned
test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, hsize_t nelmts,
const char *test_str)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5FA_t *fa = NULL; /* Fixed array wrapper */
- void *fiter_info; /* Fixed array iterator info */
- farray_state_t state; /* State of fixed array */
- uint64_t welmt; /* Element to write */
- uint64_t relmt; /* Element to read */
- hsize_t cnt; /* Count of array indices */
- hssize_t sidx; /* Index value of next element in the fixed array */
- hsize_t idx; /* Index value of next element in the fixed array */
- hsize_t fa_nelmts; /* # of elements in fixed array */
- haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5FA_t *fa = NULL; /* Fixed array wrapper */
+ void *fiter_info; /* Fixed array iterator info */
+ farray_state_t state; /* State of fixed array */
+ uint64_t welmt; /* Element to write */
+ uint64_t relmt; /* Element to read */
+ hsize_t cnt; /* Count of array indices */
+ hssize_t sidx; /* Index value of next element in the fixed array */
+ hsize_t idx; /* Index value of next element in the fixed array */
+ hsize_t fa_nelmts; /* # of elements in fixed array */
+ haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
assert(nelmts);
/*
@@ -1494,18 +1494,18 @@ error:
*/
static unsigned
test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, hsize_t skip_elmts,
- hbool_t check_rest, const char *test_str)
+ bool check_rest, const char *test_str)
{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5FA_t *fa = NULL; /* Extensible array wrapper */
- farray_state_t state; /* State of extensible array */
- uint64_t welmt; /* Element to write */
- uint64_t relmt; /* Element to read */
- hsize_t idx; /* Index value of element to get */
- hsize_t cnt; /* Count of array indices */
- hsize_t fa_nelmts; /* # of elements in fixed array */
- haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5FA_t *fa = NULL; /* Extensible array wrapper */
+ farray_state_t state; /* State of extensible array */
+ uint64_t welmt; /* Element to write */
+ uint64_t relmt; /* Element to read */
+ hsize_t idx; /* Index value of element to get */
+ hsize_t cnt; /* Count of array indices */
+ hsize_t fa_nelmts; /* # of elements in fixed array */
+ haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */
/*
* Display testing message
@@ -1622,15 +1622,15 @@ error:
int
main(void)
{
- H5FA_create_t cparam; /* Creation parameters for fixed array */
- farray_test_param_t tparam; /* Testing parameters */
- farray_test_type_t curr_test; /* Current test being worked on */
- farray_iter_type_t curr_iter; /* Current iteration type being worked on */
- hid_t fapl = -1; /* File access property list for data files */
- unsigned nerrors = 0; /* Cumulative error count */
- time_t curr_time; /* Current time, for seeding random number generator */
- int ExpressMode; /* Test express value */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ H5FA_create_t cparam; /* Creation parameters for fixed array */
+ farray_test_param_t tparam; /* Testing parameters */
+ farray_test_type_t curr_test; /* Current test being worked on */
+ farray_iter_type_t curr_iter; /* Current iteration type being worked on */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list for data files */
+ unsigned nerrors = 0; /* Cumulative error count */
+ time_t curr_time; /* Current time, for seeding random number generator */
+ int ExpressMode; /* Test express value */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
/* Reset library */
h5_reset();
@@ -1645,7 +1645,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Seed random #'s */
curr_time = HDtime(NULL);
@@ -1678,12 +1678,12 @@ main(void)
switch (curr_test) {
/* "Normal" testing parameters */
case FARRAY_TEST_NORMAL:
- HDputs("Testing with NORMAL PARAMETERS");
+ puts("Testing with NORMAL PARAMETERS");
break;
/* "Re-open array" testing parameters */
case FARRAY_TEST_REOPEN:
- HDputs("Testing with reopen array flag set");
+ puts("Testing with reopen array flag set");
tparam.reopen_array = FARRAY_TEST_REOPEN;
break;
@@ -1710,25 +1710,25 @@ main(void)
switch (curr_iter) {
/* "Forward" testing parameters */
case FARRAY_ITER_FW:
- HDputs("Testing with forward iteration");
+ puts("Testing with forward iteration");
tparam.fiter = &fa_iter_fw;
break;
/* "Reverse" testing parameters */
case FARRAY_ITER_RV:
- HDputs("Testing with reverse iteration");
+ puts("Testing with reverse iteration");
tparam.fiter = &fa_iter_rv;
break;
/* "Random" testing parameters */
case FARRAY_ITER_RND:
- HDputs("Testing with random iteration");
+ puts("Testing with random iteration");
tparam.fiter = &fa_iter_rnd;
break;
/* "Cyclic" testing parameters */
case FARRAY_ITER_CYC:
- HDputs("Testing with cyclic iteration");
+ puts("Testing with cyclic iteration");
tparam.fiter = &fa_iter_cyc;
break;
@@ -1747,10 +1747,10 @@ main(void)
} /* end for */
/* Check skipping elements */
- nerrors += test_skip_elmts(fapl, &cparam, &tparam, (hsize_t)1, TRUE, "skipping to first element");
+ nerrors += test_skip_elmts(fapl, &cparam, &tparam, (hsize_t)1, true, "skipping to first element");
nerrors += test_skip_elmts(fapl, &cparam, &tparam, ((hsize_t)1 << cparam.max_dblk_page_nelmts_bits),
- TRUE, "skipping to first element in data block page");
- nerrors += test_skip_elmts(fapl, &cparam, &tparam, (hsize_t)(tparam.nelmts - 1), TRUE,
+ true, "skipping to first element in data block page");
+ nerrors += test_skip_elmts(fapl, &cparam, &tparam, (hsize_t)(tparam.nelmts - 1), true,
"skipping to last element");
/* Create Fixed Array */
@@ -1768,7 +1768,7 @@ main(void)
init_cparam(&cparam, &tparam);
/* Set the last element in the Fixed Array */
- nerrors += test_skip_elmts(fapl, &cparam, &tparam, (hsize_t)(tparam.nelmts - 1), FALSE,
+ nerrors += test_skip_elmts(fapl, &cparam, &tparam, (hsize_t)(tparam.nelmts - 1), false,
"skipping to last element");
} /* end for */
@@ -1776,13 +1776,13 @@ main(void)
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
if (nerrors)
goto error;
- HDputs("All fixed array tests passed.");
+ puts("All fixed array tests passed.");
/* Clean up file used */
h5_cleanup(FILENAME, fapl);
@@ -1790,7 +1790,7 @@ main(void)
exit(EXIT_SUCCESS);
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
@@ -1799,7 +1799,7 @@ error:
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/fheap.c b/test/fheap.c
index b8c78da..19a1e6a 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -40,7 +40,7 @@
/* "Small" heap creation parameters */
#define SMALL_DBLOCK_OVERHEAD 21 /* Overhead for direct blocks */
-#define SMALL_CHECKSUM_DBLOCKS TRUE /* Whether to checksum direct blocks */
+#define SMALL_CHECKSUM_DBLOCKS true /* Whether to checksum direct blocks */
#define SMALL_MAN_WIDTH 4 /* Managed obj. table width */
#define SMALL_MAN_START_BLOCK_SIZE 512 /* Managed obj. starting block size */
#define SMALL_MAN_MAX_DIRECT_SIZE (64 * 1024) /* Managed obj. max. direct block size */
@@ -52,7 +52,7 @@
/* "Large" heap creation parameters */
#define LARGE_DBLOCK_OVERHEAD 21 /* Overhead for direct blocks */
/* (coincidentally the same size as for small direct blocks) */
-#define LARGE_CHECKSUM_DBLOCKS FALSE /* Whether to checksum direct blocks */
+#define LARGE_CHECKSUM_DBLOCKS false /* Whether to checksum direct blocks */
#define LARGE_MAN_WIDTH 32 /* Managed obj. table width */
#define LARGE_MAN_START_BLOCK_SIZE 4096 /* Managed obj. starting block size */
#define LARGE_MAN_MAX_DIRECT_SIZE (1024 * 1024) /* Managed obj. max. direct block size */
@@ -376,8 +376,8 @@ add_obj(H5HF_t *fh, size_t obj_off, size_t obj_size, fheap_heap_state_t *state,
/* Check for tracking the heap's state */
if (state) {
- size_t tiny_max_len; /* Max. length of tiny objects */
- hbool_t tiny_len_extended; /* Do tiny objects use two bytes for the length? */
+ size_t tiny_max_len; /* Max. length of tiny objects */
+ bool tiny_len_extended; /* Do tiny objects use two bytes for the length? */
/* Check information about tiny objects */
if (H5HF_get_tiny_info_test(fh, &tiny_max_len, &tiny_len_extended) < 0)
@@ -517,7 +517,7 @@ begin_test(fheap_test_param_t *tparam, const char *base_desc, fheap_heap_ids_t *
*/
size_t test_desc_len = strlen(base_desc) + sizeof(" ") + strlen(del_str);
test_desc = H5MM_malloc(test_desc_len);
- (void)HDsnprintf(test_desc, test_desc_len, "%s %s", base_desc, del_str);
+ (void)snprintf(test_desc, test_desc_len, "%s %s", base_desc, del_str);
TESTING(test_desc);
H5MM_xfree(test_desc);
@@ -1719,7 +1719,7 @@ error:
static unsigned
test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_create_t test_cparam; /* Creation parameters for heap */
@@ -1835,7 +1835,7 @@ error:
static unsigned
test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_create_t test_cparam; /* Creation parameters for heap */
@@ -1845,7 +1845,7 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
h5_stat_size_t file_size; /* File size, after deleting heap */
size_t id_len; /* Size of fractal heap IDs */
fheap_heap_state_t state; /* State of fractal heap */
- hbool_t page = FALSE; /* Paged aggregation strategy or not */
+ bool page = false; /* Paged aggregation strategy or not */
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -1871,7 +1871,7 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
STACK_ERROR;
if (f->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE)
- page = TRUE;
+ page = true;
/* Ignore metadata tags in the file's cache */
if (H5AC_ignore_tags(f) < 0)
@@ -1985,8 +1985,8 @@ error:
static unsigned
test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- hid_t file2 = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t file2 = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5F_t *f2 = NULL; /* Internal file object pointer */
@@ -1998,7 +1998,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
h5_stat_size_t file_size; /* File size, after deleting heap */
size_t id_len; /* Size of fractal heap IDs */
fheap_heap_state_t state; /* State of fractal heap */
- hbool_t page = FALSE; /* Paged aggregation strategy or not */
+ bool page = false; /* Paged aggregation strategy or not */
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2024,7 +2024,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
STACK_ERROR;
if (f->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE)
- page = TRUE;
+ page = true;
/* Ignore metadata tags in the file's cache */
if (H5AC_ignore_tags(f) < 0)
@@ -2160,7 +2160,7 @@ error:
static unsigned
test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_create_t test_cparam; /* Creation parameters for heap */
@@ -2335,7 +2335,7 @@ error:
static unsigned
test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -2343,8 +2343,8 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
unsigned deflate_level; /* Deflation level */
size_t id_len; /* Size of fractal heap IDs */
size_t tiny_max_len; /* Max. length of tiny objects */
- hbool_t tiny_len_extended; /* Do tiny objects use two bytes for the length? */
- hbool_t huge_ids_direct; /* Are 'huge' objects directly accessed? */
+ bool tiny_len_extended; /* Do tiny objects use two bytes for the length? */
+ bool huge_ids_direct; /* Are 'huge' objects directly accessed? */
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2383,11 +2383,11 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR;
if (tiny_max_len != (HEAP_ID_LEN - 1))
TEST_ERROR;
- if (tiny_len_extended != FALSE)
+ if (tiny_len_extended != false)
TEST_ERROR;
if (H5HF_get_huge_info_test(fh, NULL, &huge_ids_direct) < 0)
FAIL_STACK_ERROR;
- if (huge_ids_direct != FALSE)
+ if (huge_ids_direct != false)
TEST_ERROR;
/* Close the fractal heap */
@@ -2412,11 +2412,11 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR;
if (tiny_max_len != 16)
TEST_ERROR;
- if (tiny_len_extended != FALSE)
+ if (tiny_len_extended != false)
TEST_ERROR;
if (H5HF_get_huge_info_test(fh, NULL, &huge_ids_direct) < 0)
FAIL_STACK_ERROR;
- if (huge_ids_direct != TRUE)
+ if (huge_ids_direct != true)
TEST_ERROR;
/* Close the fractal heap */
@@ -2446,11 +2446,11 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR;
if (tiny_max_len != 27)
TEST_ERROR;
- if (tiny_len_extended != TRUE)
+ if (tiny_len_extended != true)
TEST_ERROR;
if (H5HF_get_huge_info_test(fh, NULL, &huge_ids_direct) < 0)
FAIL_STACK_ERROR;
- if (huge_ids_direct != TRUE)
+ if (huge_ids_direct != true)
TEST_ERROR;
/* Close the fractal heap */
@@ -2491,11 +2491,11 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR;
if (tiny_max_len != 7)
TEST_ERROR;
- if (tiny_len_extended != FALSE)
+ if (tiny_len_extended != false)
TEST_ERROR;
if (H5HF_get_huge_info_test(fh, NULL, &huge_ids_direct) < 0)
FAIL_STACK_ERROR;
- if (huge_ids_direct != FALSE)
+ if (huge_ids_direct != false)
TEST_ERROR;
/* Close the fractal heap */
@@ -2521,11 +2521,11 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR;
if (tiny_max_len != 16)
TEST_ERROR;
- if (tiny_len_extended != FALSE)
+ if (tiny_len_extended != false)
TEST_ERROR;
if (H5HF_get_huge_info_test(fh, NULL, &huge_ids_direct) < 0)
FAIL_STACK_ERROR;
- if (huge_ids_direct != TRUE)
+ if (huge_ids_direct != true)
TEST_ERROR;
/* Close the fractal heap */
@@ -2551,11 +2551,11 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR;
if (tiny_max_len != 16)
TEST_ERROR;
- if (tiny_len_extended != FALSE)
+ if (tiny_len_extended != false)
TEST_ERROR;
if (H5HF_get_huge_info_test(fh, NULL, &huge_ids_direct) < 0)
FAIL_STACK_ERROR;
- if (huge_ids_direct != TRUE)
+ if (huge_ids_direct != true)
TEST_ERROR;
/* Close the fractal heap */
@@ -2581,11 +2581,11 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR;
if (tiny_max_len != 17)
TEST_ERROR;
- if (tiny_len_extended != TRUE)
+ if (tiny_len_extended != true)
TEST_ERROR;
if (H5HF_get_huge_info_test(fh, NULL, &huge_ids_direct) < 0)
FAIL_STACK_ERROR;
- if (huge_ids_direct != TRUE)
+ if (huge_ids_direct != true)
TEST_ERROR;
/* Close the fractal heap */
@@ -2611,11 +2611,11 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR;
if (tiny_max_len != 43)
TEST_ERROR;
- if (tiny_len_extended != TRUE)
+ if (tiny_len_extended != true)
TEST_ERROR;
if (H5HF_get_huge_info_test(fh, NULL, &huge_ids_direct) < 0)
FAIL_STACK_ERROR;
- if (huge_ids_direct != TRUE)
+ if (huge_ids_direct != true)
TEST_ERROR;
/* Close the fractal heap */
@@ -2670,7 +2670,7 @@ error:
static unsigned
test_filtered_create(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -2789,7 +2789,7 @@ error:
static unsigned
test_size(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -2928,7 +2928,7 @@ error:
static unsigned
test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
{
- hid_t file1 = -1; /* File ID */
+ hid_t file1 = H5I_INVALID_HID; /* File ID */
hid_t file2 = -2; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
@@ -3057,7 +3057,7 @@ error:
static unsigned
test_man_insert_weird(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3169,7 +3169,7 @@ error:
static unsigned
test_man_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3267,7 +3267,7 @@ error:
static unsigned
test_man_insert_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3360,7 +3360,7 @@ error:
static unsigned
test_man_insert_root_mult(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3456,7 +3456,7 @@ error:
static unsigned
test_man_insert_force_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3559,7 +3559,7 @@ error:
static unsigned
test_man_insert_fill_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3663,7 +3663,7 @@ error:
static unsigned
test_man_insert_third_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3771,7 +3771,7 @@ error:
static unsigned
test_man_fill_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3864,7 +3864,7 @@ error:
static unsigned
test_man_start_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3964,7 +3964,7 @@ error:
static unsigned
test_man_fill_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4062,7 +4062,7 @@ error:
static unsigned
test_man_start_third_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4169,7 +4169,7 @@ error:
static unsigned
test_man_fill_fourth_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4264,7 +4264,7 @@ error:
static unsigned
test_man_fill_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4357,7 +4357,7 @@ error:
static unsigned
test_man_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4456,7 +4456,7 @@ error:
static unsigned
test_man_second_direct_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4563,7 +4563,7 @@ error:
static unsigned
test_man_fill_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4663,7 +4663,7 @@ error:
static unsigned
test_man_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4771,7 +4771,7 @@ error:
static unsigned
test_man_fill_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4876,7 +4876,7 @@ error:
static unsigned
test_man_fill_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4971,7 +4971,7 @@ error:
static unsigned
test_man_start_2nd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5077,7 +5077,7 @@ error:
static unsigned
test_man_recursive_indirect_two_deep(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5177,7 +5177,7 @@ error:
static unsigned
test_man_start_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5284,7 +5284,7 @@ error:
static unsigned
test_man_fill_first_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5392,7 +5392,7 @@ error:
static unsigned
test_man_fill_3rd_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5497,7 +5497,7 @@ error:
static unsigned
test_man_fill_all_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5603,7 +5603,7 @@ error:
static unsigned
test_man_start_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5715,7 +5715,7 @@ error:
static unsigned
test_man_fill_first_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5833,7 +5833,7 @@ error:
static unsigned
test_man_fill_4th_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5942,7 +5942,7 @@ error:
static unsigned
test_man_fill_all_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -6053,7 +6053,7 @@ error:
static unsigned
test_man_start_5th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -6177,7 +6177,7 @@ error:
static unsigned
test_man_remove_bogus(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -6334,7 +6334,7 @@ error:
static unsigned
test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -6495,7 +6495,7 @@ error:
static unsigned
test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -6686,7 +6686,7 @@ error:
static unsigned
test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -6852,7 +6852,7 @@ error:
static unsigned
test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7089,7 +7089,7 @@ error:
static unsigned
test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7384,7 +7384,7 @@ error:
static unsigned
test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7449,7 +7449,7 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
if (H5HF_remove(fh, heap_id[j]) < 0)
FAIL_STACK_ERROR;
- HDsnprintf(obj2.b, sizeof(obj2.b), "%s%2d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", j);
+ snprintf(obj2.b, sizeof(obj2.b), "%s%2d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", j);
if (H5HF_insert(fh, (sizeof(obj2)), &obj2, heap_id[j]) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -7460,7 +7460,7 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
/* Insert object */
memset(heap_id[i], 0, id_len);
- HDsnprintf(obj1.b, sizeof(obj1.b), "%s%2d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", i);
+ snprintf(obj1.b, sizeof(obj1.b), "%s%2d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", i);
if (H5HF_insert(fh, (sizeof(obj1)), &obj1, heap_id[i]) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -7511,7 +7511,7 @@ error:
static unsigned
test_man_remove_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7581,7 +7581,7 @@ error:
static unsigned
test_man_remove_two_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7666,7 +7666,7 @@ error:
static unsigned
test_man_remove_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7733,7 +7733,7 @@ error:
static unsigned
test_man_remove_first_two_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7802,7 +7802,7 @@ error:
static unsigned
test_man_remove_first_four_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7875,7 +7875,7 @@ error:
static unsigned
test_man_remove_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7942,7 +7942,7 @@ error:
static unsigned
test_man_remove_2nd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8013,7 +8013,7 @@ error:
static unsigned
test_man_remove_3rd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8091,7 +8091,7 @@ error:
static unsigned
test_man_skip_start_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8166,7 +8166,7 @@ error:
static unsigned
test_man_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8262,7 +8262,7 @@ error:
static unsigned
test_man_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8369,7 +8369,7 @@ error:
static unsigned
test_man_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8463,7 +8463,7 @@ error:
static unsigned
test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8606,7 +8606,7 @@ static unsigned
test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8769,7 +8769,7 @@ error:
static unsigned
test_man_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8894,7 +8894,7 @@ static unsigned
test_man_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9019,7 +9019,7 @@ static unsigned
test_man_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9141,7 +9141,7 @@ static unsigned
test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9270,7 +9270,7 @@ static unsigned
test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9413,7 +9413,7 @@ static unsigned
test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9573,7 +9573,7 @@ static unsigned
test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9726,7 +9726,7 @@ static unsigned
test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9907,7 +9907,7 @@ static unsigned
test_man_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10035,7 +10035,7 @@ static unsigned
test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10174,7 +10174,7 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h
H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10324,7 +10324,7 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(
H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10478,7 +10478,7 @@ static unsigned
test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10639,7 +10639,7 @@ static unsigned
test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped(
hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10804,7 +10804,7 @@ static unsigned
test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam,
fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10964,7 +10964,7 @@ static unsigned
test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(
hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -11144,7 +11144,7 @@ static unsigned
test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped(
hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -11361,7 +11361,7 @@ static unsigned
test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(
hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -11558,7 +11558,7 @@ static unsigned
test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(
hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -11784,7 +11784,7 @@ error:
static unsigned
test_man_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -11912,7 +11912,7 @@ error:
static unsigned
test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -12080,7 +12080,7 @@ error:
static unsigned
test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -12189,7 +12189,7 @@ error:
static unsigned
test_man_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -12300,7 +12300,7 @@ error:
static unsigned
test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -12447,7 +12447,7 @@ error:
static unsigned
test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -12674,7 +12674,7 @@ error:
static unsigned
test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -12976,7 +12976,7 @@ error:
static unsigned
test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -13396,7 +13396,7 @@ error:
static unsigned
test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -13413,8 +13413,8 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
fheap_heap_state_t state; /* State of fractal heap */
unsigned deflate_level; /* Deflation level */
size_t old_actual_id_len = 0; /* Old actual ID length */
- hbool_t huge_ids_direct; /* Are 'huge' objects directly accessed? */
- hbool_t pline_init = FALSE; /* Whether the I/O pipeline has been initialized */
+ bool huge_ids_direct; /* Are 'huge' objects directly accessed? */
+ bool pline_init = false; /* Whether the I/O pipeline has been initialized */
/* Test description */
const char *base_desc = "insert 'huge' object into heap with I/O filters, then remove";
@@ -13425,7 +13425,7 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
deflate_level = 6;
if (H5Z_append(&tmp_cparam.pline, H5Z_FILTER_DEFLATE, H5Z_FLAG_OPTIONAL, (size_t)1, &deflate_level) < 0)
FAIL_STACK_ERROR;
- pline_init = TRUE;
+ pline_init = true;
/* Adjust actual ID length, if asking for IDs that can directly access 'huge' objects */
if (cparam->id_len == 1) {
@@ -13454,15 +13454,15 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
if (H5HF_get_huge_info_test(fh, NULL, &huge_ids_direct) < 0)
FAIL_STACK_ERROR;
if (cparam->id_len == 1) {
- if (huge_ids_direct != TRUE)
+ if (huge_ids_direct != true)
TEST_ERROR;
} /* end if */
else if (tparam->actual_id_len >= 29) {
- if (huge_ids_direct != TRUE)
+ if (huge_ids_direct != true)
TEST_ERROR;
} /* end if */
else {
- if (huge_ids_direct != FALSE)
+ if (huge_ids_direct != false)
TEST_ERROR;
} /* end else */
@@ -13606,7 +13606,7 @@ error:
static unsigned
test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -13753,7 +13753,7 @@ error:
static unsigned
test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -13981,7 +13981,7 @@ error:
static unsigned
test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -14582,7 +14582,7 @@ error:
static unsigned
test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -14752,7 +14752,7 @@ error:
static unsigned
test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -15079,7 +15079,7 @@ error:
static unsigned
test_random(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -15280,7 +15280,7 @@ error:
static unsigned
test_random_pow2(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -15488,13 +15488,13 @@ error:
*/
/* Custom filter used to verify that the filters are actually called and do not
* just silently fail */
-static hbool_t test_write_filter_called;
+static bool test_write_filter_called;
static size_t
test_write_filter(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts,
const unsigned int H5_ATTR_UNUSED cd_values[], size_t nbytes,
size_t H5_ATTR_UNUSED *buf_size, void H5_ATTR_UNUSED **buf)
{
- test_write_filter_called = TRUE;
+ test_write_filter_called = true;
return nbytes;
} /* end link_filter_filter */
@@ -15502,7 +15502,7 @@ test_write_filter(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_ne
static unsigned
test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -15511,7 +15511,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
size_t id_len; /* Size of fractal heap IDs */
unsigned char tiny_heap_id[HEAP_ID_LEN]; /* Heap ID for 'tiny' object */
unsigned char huge_heap_id[HEAP_ID_LEN]; /* Heap ID for 'huge' object */
- hbool_t id_changed = FALSE; /* Whether the heap ID changed */
+ bool id_changed = false; /* Whether the heap ID changed */
unsigned char *rewrite_obj = NULL; /* Pointer to re-write buffer for objects */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
@@ -15549,8 +15549,8 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
/* Register and append custom filter */
filter_class.version = H5Z_CLASS_T_VERS;
filter_class.id = H5Z_FILTER_RESERVED + 43;
- filter_class.encoder_present = TRUE;
- filter_class.decoder_present = TRUE;
+ filter_class.encoder_present = true;
+ filter_class.decoder_present = true;
filter_class.name = "custom_fheap_filter";
filter_class.can_apply = NULL;
filter_class.set_local = NULL;
@@ -15559,7 +15559,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TEST_ERROR;
if (H5Z_append(&tmp_cparam.pline, H5Z_FILTER_RESERVED + 43, 0, (size_t)0, NULL) < 0)
FAIL_STACK_ERROR;
- test_write_filter_called = FALSE;
+ test_write_filter_called = false;
} /* end if */
/* Perform common file & heap open operations */
@@ -15621,7 +15621,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
if (tparam->comp == FHEAP_TEST_COMPRESS) {
if (!test_write_filter_called)
TEST_ERROR;
- test_write_filter_called = FALSE;
+ test_write_filter_called = false;
} /* end if */
/* Re-open the file */
@@ -15779,7 +15779,7 @@ error:
static unsigned
test_bug1(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -15947,28 +15947,28 @@ error:
int
main(void)
{
- fheap_test_param_t tparam; /* Testing parameters */
- H5HF_create_t small_cparam; /* Creation parameters for "small" heap */
- H5HF_create_t large_cparam; /* Creation parameters for "large" heap */
- hid_t fapl = -1, def_fapl = -1; /* File access property list for data files */
- hid_t pb_fapl = -1; /* File access property list for data files */
- hid_t fcpl = -1, def_fcpl = -1; /* File creation property list for data files */
- fheap_test_type_t curr_test; /* Current test being worked on */
- unsigned u, v; /* Local index variable */
- unsigned nerrors = 0; /* Cumulative error count */
+ fheap_test_param_t tparam; /* Testing parameters */
+ H5HF_create_t small_cparam; /* Creation parameters for "small" heap */
+ H5HF_create_t large_cparam; /* Creation parameters for "large" heap */
+ hid_t fapl = H5I_INVALID_HID, def_fapl = H5I_INVALID_HID; /* File access property list for data files */
+ hid_t pb_fapl = H5I_INVALID_HID; /* File access property list for data files */
+ hid_t fcpl = H5I_INVALID_HID, def_fcpl = H5I_INVALID_HID; /* File creation property list for data files */
+ fheap_test_type_t curr_test; /* Current test being worked on */
+ unsigned u, v; /* Local index variable */
+ unsigned nerrors = 0; /* Cumulative error count */
unsigned num_pb_fs = 1; /* The number of settings to test for page buffering and file space handling */
int ExpressMode; /* Express testing level */
const char *envval; /* Environment variable */
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
/* Don't run this test using certain file drivers */
- envval = HDgetenv(HDF5_DRIVER);
+ envval = getenv(HDF5_DRIVER);
if (envval == NULL)
envval = "nomatch";
/* Current VFD that does not support contiguous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(envval, "split") != 0 && HDstrcmp(envval, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(envval, "split") != 0 && strcmp(envval, "multi") != 0);
/* Reset library */
h5_reset();
@@ -16003,7 +16003,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Allocate space for the shared objects */
shared_obj_size_g = large_cparam.max_man_size + 256;
@@ -16037,12 +16037,12 @@ main(void)
switch (v) {
case 0:
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, false, (hsize_t)1) < 0)
TEST_ERROR;
fapl = def_fapl;
break;
case 1:
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1) < 0)
TEST_ERROR;
fapl = def_fapl;
/* This is a fix for the daily test failure from the checkin for libver bounds. */
@@ -16074,22 +16074,22 @@ main(void)
TEST_ERROR;
break;
case 2:
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1) < 0)
TEST_ERROR;
fapl = def_fapl;
break;
case 3:
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1) < 0)
TEST_ERROR;
fapl = def_fapl;
break;
case 4:
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1) < 0)
TEST_ERROR;
fapl = pb_fapl;
break;
case 5:
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1) < 0)
TEST_ERROR;
fapl = pb_fapl;
break;
@@ -16112,12 +16112,12 @@ main(void)
switch (curr_test) {
/* "Normal" testing parameters */
case FHEAP_TEST_NORMAL:
- HDputs("Testing with normal parameters");
+ puts("Testing with normal parameters");
break;
/* "Re-open heap" testing parameters */
case FHEAP_TEST_REOPEN:
- HDputs("Testing with reopen heap flag set");
+ puts("Testing with reopen heap flag set");
tparam.reopen_heap = FHEAP_TEST_REOPEN;
break;
@@ -16149,12 +16149,12 @@ main(void)
switch (fill) {
/* "Bulk fill" heap blocks with 'large' objects */
case FHEAP_TEST_FILL_LARGE:
- HDputs("Bulk-filling blocks w/large objects");
+ puts("Bulk-filling blocks w/large objects");
break;
/* "Bulk fill" heap blocks with 'single' objects */
case FHEAP_TEST_FILL_SINGLE:
- HDputs("Bulk-filling blocks w/single object");
+ puts("Bulk-filling blocks w/single object");
break;
/* An unknown test? */
@@ -16354,12 +16354,12 @@ main(void)
switch (id_len) {
/* Use "normal" form for 'huge' object's heap IDs */
case 0:
- HDputs("Using 'normal' heap ID format for 'huge' objects");
+ puts("Using 'normal' heap ID format for 'huge' objects");
break;
/* Use "direct" form for 'huge' object's heap IDs */
case 1:
- HDputs("Using 'direct' heap ID format for 'huge' objects");
+ puts("Using 'direct' heap ID format for 'huge' objects");
/* Adjust actual length of heap IDs for directly storing 'huge' object's file
* offset & length in heap ID */
@@ -16369,8 +16369,8 @@ main(void)
/* Use "direct" storage for 'huge' objects and larger IDs for 'tiny' objects */
case 2:
small_cparam.id_len = 37;
- HDputs("Using 'direct' heap ID format for 'huge' objects and larger IDs for "
- "'tiny' objects");
+ puts("Using 'direct' heap ID format for 'huge' objects and larger IDs for "
+ "'tiny' objects");
tparam.actual_id_len = 37;
break;
@@ -16436,7 +16436,7 @@ main(void)
printf("***Express test mode on. Some tests skipped\n");
else {
/* Random tests using "small" heap creation parameters */
- HDputs("Using 'small' heap creation parameters");
+ puts("Using 'small' heap creation parameters");
/* (reduce size of tests when re-opening each time) */
/* XXX: Try to speed things up enough that these tests don't have to be reduced when
@@ -16458,7 +16458,7 @@ main(void)
fapl, &small_cparam, &tparam);
/* Random tests using "large" heap creation parameters */
- HDputs("Using 'large' heap creation parameters");
+ puts("Using 'large' heap creation parameters");
tparam.actual_id_len = LARGE_HEAP_ID_LEN;
/* (reduce size of tests when re-opening each time) */
@@ -16513,7 +16513,7 @@ main(void)
if (nerrors)
goto error;
- HDputs("All fractal heap tests passed.");
+ puts("All fractal heap tests passed.");
/* Release space for the shared objects */
H5MM_xfree(shared_wobj_g);
@@ -16528,9 +16528,9 @@ main(void)
TEST_ERROR;
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
/* Clean up file used */
h5_cleanup(FILENAME, def_fapl);
@@ -16538,7 +16538,7 @@ main(void)
return 0;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
H5MM_xfree(shared_wobj_g);
@@ -16554,7 +16554,7 @@ error:
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
return 1;
} /* end main() */
diff --git a/test/file_image.c b/test/file_image.c
index 2b4e481..81b49d6 100644
--- a/test/file_image.c
+++ b/test/file_image.c
@@ -79,8 +79,8 @@ typedef struct {
static int
test_properties(void)
{
- hid_t fapl_1 = -1;
- hid_t fapl_2 = -1;
+ hid_t fapl_1 = H5I_INVALID_HID;
+ hid_t fapl_2 = H5I_INVALID_HID;
char *buffer = 0;
int count = 10;
void *temp = 0;
@@ -552,10 +552,10 @@ test_core(void)
VERIFY(tmp != NULL, "h5_fixname failed");
/* Append ".copy" to the filename from the source directory */
- VERIFY(HDstrlen(filename) < (1023 - 5), "file name too long.");
- HDstrncpy(copied_filename, filename, (size_t)1023);
+ VERIFY(strlen(filename) < (1023 - 5), "file name too long.");
+ strncpy(copied_filename, filename, (size_t)1023);
copied_filename[1023] = '\0';
- HDstrcat(copied_filename, ".copy");
+ strcat(copied_filename, ".copy");
/* Make a copy of the data file from svn. */
ret = h5_make_local_copy(filename, copied_filename);
@@ -676,31 +676,31 @@ error:
*/
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
static int
-test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl, hbool_t user)
+test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl, bool user)
{
char file_name[1024] = "\0";
void *insertion_ptr = NULL;
void *image_ptr = NULL;
void *file_image_ptr = NULL;
- hbool_t is_family_file = FALSE;
- hbool_t identical;
+ bool is_family_file = false;
+ bool identical;
int data[100];
int i;
int fd = -1;
int result;
- hid_t driver = -1;
- hid_t file_id = -1;
- hid_t dset_id = -1;
- hid_t space_id = -1;
- hid_t core_fapl_id = -1;
- hid_t core_file_id = -1;
+ hid_t driver = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t core_fapl_id = H5I_INVALID_HID;
+ hid_t core_file_id = H5I_INVALID_HID;
herr_t err;
hsize_t dims[2];
ssize_t bytes_read;
ssize_t image_size;
ssize_t file_size;
h5_stat_t stat_buf;
- hid_t fcpl = -1;
+ hid_t fcpl = H5I_INVALID_HID;
herr_t ret;
TESTING(test_banner);
@@ -710,11 +710,11 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
VERIFY(driver >= 0, "H5Pget_driver(fapl) failed");
if (driver == H5FD_FAMILY)
- is_family_file = TRUE;
+ is_family_file = true;
/* setup the file name */
h5_fixname(FILENAME2[file_name_num], fapl, file_name, sizeof(file_name));
- VERIFY(HDstrlen(file_name) > 0, "h5_fixname failed");
+ VERIFY(strlen(file_name) > 0, "h5_fixname failed");
fcpl = H5Pcreate(H5P_FILE_CREATE);
VERIFY(fcpl >= 0, "H5Pcreate");
@@ -783,7 +783,7 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
file_size = 0;
do {
- HDsnprintf(member_file_name, (size_t)1024, file_name, i);
+ snprintf(member_file_name, (size_t)1024, file_name, i);
/* get the size of the member file */
result = HDstat(member_file_name, &stat_buf);
@@ -811,7 +811,7 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
while (size_remaining > 0) {
/* construct the member file name */
- HDsnprintf(member_file_name, 1024, file_name, i);
+ snprintf(member_file_name, 1024, file_name, i);
/* open the test file using standard I/O calls */
fd = HDopen(member_file_name, O_RDONLY);
@@ -871,7 +871,7 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
HDoff_t off;
/* Position at userblock */
- off = HDlseek(fd, (off_t)USERBLOCK_SIZE, SEEK_SET);
+ off = HDlseek(fd, (HDoff_t)USERBLOCK_SIZE, SEEK_SET);
VERIFY(off >= 0, "HDlseek() failed.");
}
@@ -885,11 +885,11 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
}
/* verify that the file and the image contain the same data */
- identical = TRUE;
+ identical = true;
i = 0;
while ((i < (int)image_size) && identical) {
if (((char *)image_ptr)[i] != ((char *)file_image_ptr)[i])
- identical = FALSE;
+ identical = false;
i++;
}
VERIFY(identical, "file and image differ.");
@@ -901,7 +901,7 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
VERIFY(core_fapl_id >= 0, "H5Pcreate() failed");
/* setup core_fapl_id to use the core file driver */
- err = H5Pset_fapl_core(core_fapl_id, (size_t)(64 * 1024), FALSE);
+ err = H5Pset_fapl_core(core_fapl_id, (size_t)(64 * 1024), false);
VERIFY(err == SUCCEED, "H5Pset_fapl_core() failed.");
/* Set file image in core fapl */
@@ -958,10 +958,10 @@ test_get_file_image_error_rejection(void)
void *image_ptr = NULL;
int data[100];
int i;
- hid_t fapl_id = -1;
- hid_t file_id = -1;
- hid_t dset_id = -1;
- hid_t space_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
herr_t err;
hsize_t dims[2];
ssize_t bytes_read;
@@ -994,7 +994,7 @@ test_get_file_image_error_rejection(void)
/* setup the file name */
h5_fixname(FILENAME2[6], fapl_id, file_name, sizeof(file_name));
- VERIFY(HDstrlen(file_name) > 0, "h5_fixname failed");
+ VERIFY(strlen(file_name) > 0, "h5_fixname failed");
/* create the file */
file_id = H5Fcreate(file_name, 0, H5P_DEFAULT, fapl_id);
@@ -1121,12 +1121,12 @@ test_get_file_image_error_rejection(void)
VERIFY(fapl_id >= 0, "H5Pcreate(2) failed");
/* setup the fapl for the multi file driver */
- err = H5Pset_fapl_multi(fapl_id, memb_map, memb_fapl, memb_name, memb_addr, FALSE);
+ err = H5Pset_fapl_multi(fapl_id, memb_map, memb_fapl, memb_name, memb_addr, false);
VERIFY(err >= 0, "H5Pset_fapl_multi failed");
/* setup the file name */
h5_fixname(FILENAME2[4], fapl_id, file_name, sizeof(file_name));
- VERIFY(HDstrlen(file_name) > 0, "h5_fixname failed");
+ VERIFY(strlen(file_name) > 0, "h5_fixname failed");
/* create the file */
file_id = H5Fcreate(file_name, 0, H5P_DEFAULT, fapl_id);
@@ -1188,7 +1188,7 @@ test_get_file_image_error_rejection(void)
/* setup the file name */
h5_fixname(FILENAME2[5], fapl_id, file_name, sizeof(file_name));
- VERIFY(HDstrlen(file_name) > 0, "h5_fixname failed");
+ VERIFY(strlen(file_name) > 0, "h5_fixname failed");
/* create the file */
file_id = H5Fcreate(file_name, 0, H5P_DEFAULT, fapl_id);
@@ -1248,7 +1248,7 @@ test_get_file_image_error_rejection(void)
VERIFY(err >= 0, "H5Pset_fapl_family failed");
h5_fixname(FILENAME2[3], fapl_id, file_name, sizeof(file_name));
- VERIFY(HDstrlen(file_name) > 0, "h5_fixname failed");
+ VERIFY(strlen(file_name) > 0, "h5_fixname failed");
/* create the file */
file_id = H5Fcreate(file_name, 0, H5P_DEFAULT, fapl_id);
@@ -1308,7 +1308,7 @@ main(void)
{
int errors = 0;
hid_t fapl;
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
unsigned user;
h5_reset();
@@ -1325,7 +1325,7 @@ main(void)
}
/* Perform tests with/without user block */
- for (user = FALSE; user <= TRUE; user++) {
+ for (user = false; user <= true; user++) {
/* test H5Fget_file_image() with sec2 driver */
fapl = H5Pcreate(H5P_FILE_ACCESS);
@@ -1343,7 +1343,7 @@ main(void)
/* test H5Fget_file_image() with core driver */
fapl = H5Pcreate(H5P_FILE_ACCESS);
- if (H5Pset_fapl_core(fapl, (size_t)(64 * 1024), TRUE) < 0)
+ if (H5Pset_fapl_core(fapl, (size_t)(64 * 1024), true) < 0)
errors++;
else
errors += test_get_file_image("H5Fget_file_image() with core driver", 2, fapl, user);
diff --git a/test/filenotclosed.c b/test/filenotclosed.c
index 3142d4b..806a7a4 100644
--- a/test/filenotclosed.c
+++ b/test/filenotclosed.c
@@ -49,21 +49,21 @@ catch_signal(int H5_ATTR_UNUSED signo)
int
main(void)
{
- hid_t fapl = -1; /* File access property lists */
- hid_t fid = -1; /* File ID */
- hid_t did = -1; /* Dataset ID */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t sid = -1; /* Dataspace ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property lists */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
hsize_t cur_dim[1] = {5}; /* Current dimension sizes */
hsize_t max_dim[1] = {H5S_UNLIMITED}; /* Maximum dimension sizes */
hsize_t chunk_dim[1] = {10}; /* Chunk dimension sizes */
int buf[5] = {1, 2, 3, 4, 5}; /* The data to be written to the dataset */
char filename[100]; /* File name */
const char *env_h5_drvr; /* File Driver value from environment */
- hbool_t contig_addr_vfd; /* Contiguous address vfd */
+ bool contig_addr_vfd; /* Contiguous address vfd */
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -72,10 +72,10 @@ main(void)
* Further investigation is needed to resolve the test failure with the
* split/multi driver. Please see HDFFV-10160.
*/
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (!contig_addr_vfd) {
SKIPPED();
- HDputs(" Temporary skipped for a spilt/multi driver");
+ puts(" Temporary skipped for a spilt/multi driver");
exit(EXIT_SUCCESS);
}
@@ -135,6 +135,6 @@ main(void)
exit(EXIT_SUCCESS);
error:
- HDputs("*** TEST FAILED ***");
+ puts("*** TEST FAILED ***");
exit(EXIT_FAILURE);
}
diff --git a/test/fillval.c b/test/fillval.c
index 6813233..2e8cb47 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -61,7 +61,7 @@ typedef struct {
static hid_t
create_compound_type(void)
{
- hid_t ret_value = -1;
+ hid_t ret_value = H5I_INVALID_HID;
if ((ret_value = H5Tcreate(H5T_COMPOUND, sizeof(comp_datatype))) < 0)
goto error;
@@ -99,8 +99,8 @@ error:
static hid_t
create_compound_vl_type(void)
{
- hid_t str_id = -1; /* Datatype for VL-string fields */
- hid_t ret_value = -1;
+ hid_t str_id = H5I_INVALID_HID; /* Datatype for VL-string fields */
+ hid_t ret_value = H5I_INVALID_HID;
/* Create a string datatype */
if ((str_id = H5Tcopy(H5T_C_S1)) < 0)
@@ -150,9 +150,9 @@ error:
static int
test_getset(void)
{
- hid_t dcpl = -1;
+ hid_t dcpl = H5I_INVALID_HID;
int fill_i;
- hid_t type_ss = -1, type_si = -1;
+ hid_t type_ss = H5I_INVALID_HID, type_si = H5I_INVALID_HID;
struct fill_si {
int v1, v2;
} fill_si;
@@ -190,7 +190,7 @@ test_getset(void)
H5E_END_TRY
if (fill_i != 0) {
H5_FAILED();
- HDputs(" H5Pget_fill_value() should return default 0");
+ puts(" H5Pget_fill_value() should return default 0");
goto error;
}
@@ -209,8 +209,8 @@ test_getset(void)
goto error;
if (fill_ss.v1 != fill_ss_rd.v1 || fill_ss.v2 != fill_ss_rd.v2) {
H5_FAILED();
- HDputs(" Failed to get fill value using same data type that was ");
- HDputs(" used to set the fill value.");
+ puts(" Failed to get fill value using same data type that was ");
+ puts(" used to set the fill value.");
goto error;
}
@@ -221,8 +221,8 @@ test_getset(void)
goto error;
if (fill_ss.v1 != fill_si.v1 || fill_ss.v2 != fill_si.v2) {
H5_FAILED();
- HDputs(" Failed to get fill value using a data type other than what");
- HDputs(" was used to set the fill value.");
+ puts(" Failed to get fill value using a data type other than what");
+ puts(" was used to set the fill value.");
goto error;
}
@@ -235,7 +235,7 @@ test_getset(void)
goto error;
if (fill_si.v1 != fill_ss.v1 || fill_si.v2 != fill_ss.v2) {
H5_FAILED();
- HDputs(" Resetting the fill value was unsuccessful.");
+ puts(" Resetting the fill value was unsuccessful.");
goto error;
}
@@ -275,12 +275,13 @@ static int
test_getset_vl(hid_t fapl)
{
hsize_t dims[1] = {2};
- hid_t fileid = (-1), spaceid = (-1), dtypeid = (-1), datasetid = (-1), plistid = (-1);
- char fill_value[] = "aaaa";
- char orig_fill_value[] = "aaaa";
- char *f1 = fill_value;
- char *f2;
- char filename[1024];
+ hid_t fileid = (H5I_INVALID_HID), spaceid = (H5I_INVALID_HID), dtypeid = (H5I_INVALID_HID),
+ datasetid = (H5I_INVALID_HID), plistid = (H5I_INVALID_HID);
+ char fill_value[] = "aaaa";
+ char orig_fill_value[] = "aaaa";
+ char *f1 = fill_value;
+ char *f2;
+ char filename[1024];
TESTING("property lists, with variable-length datatype");
@@ -304,7 +305,7 @@ test_getset_vl(hid_t fapl)
TEST_ERROR;
/* Verify that the fill value is the original value */
- if (HDstrcmp(f2, orig_fill_value) != 0)
+ if (strcmp(f2, orig_fill_value) != 0)
TEST_ERROR;
/* Release the fill value retrieved */
@@ -346,7 +347,7 @@ test_getset_vl(hid_t fapl)
TEST_ERROR;
/* Verify that the fill value is the original value */
- if (HDstrcmp(f2, orig_fill_value) != 0)
+ if (strcmp(f2, orig_fill_value) != 0)
TEST_ERROR;
/* Release the fill value retrieved */
@@ -662,12 +663,12 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_LATE) {
H5_FAILED();
- HDputs(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
+ puts(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
printf(" Got %d\n", alloc_time);
}
if (fill_time != H5D_FILL_TIME_ALLOC) {
H5_FAILED();
- HDputs(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
+ puts(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
printf(" Got %d\n", fill_time);
}
if (H5Dclose(dset3) < 0)
@@ -682,7 +683,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (layout == H5D_CONTIGUOUS && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED) {
H5_FAILED();
- HDputs(" Got allocated space instead of unallocated.");
+ puts(" Got allocated space instead of unallocated.");
printf(" Got %d\n", allocation);
goto error;
}
@@ -694,12 +695,12 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_LATE) {
H5_FAILED();
- HDputs(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
+ puts(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
printf(" Got %d\n", alloc_time);
}
if (fill_time != H5D_FILL_TIME_NEVER) {
H5_FAILED();
- HDputs(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
+ puts(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
printf(" Got %d\n", fill_time);
}
if (H5Dclose(dset4) < 0)
@@ -717,7 +718,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (!H5_FLT_ABS_EQUAL(rd_c.a, 0) || !H5_DBL_ABS_EQUAL(rd_c.y, fill_ctype.y) || rd_c.x != 0 ||
rd_c.z != '\0') {
H5_FAILED();
- HDputs(" Got wrong fill value");
+ puts(" Got wrong fill value");
printf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y, rd_c.x,
rd_c.z);
}
@@ -746,14 +747,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_EARLY) {
H5_FAILED();
- HDputs(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
+ puts(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
printf(" Got %d\n", alloc_time);
}
if (H5Pget_fill_time(dcpl, &fill_time) < 0)
goto error;
if (fill_time != H5D_FILL_TIME_NEVER) {
H5_FAILED();
- HDputs(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
+ puts(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
printf(" Got %d\n", fill_time);
}
if (H5Dclose(dset5) < 0)
@@ -786,14 +787,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_EARLY) {
H5_FAILED();
- HDputs(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
+ puts(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
printf(" Got %d\n", alloc_time);
}
if (H5Pget_fill_time(dcpl, &fill_time) < 0)
goto error;
if (fill_time != H5D_FILL_TIME_ALLOC) {
H5_FAILED();
- HDputs(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
+ puts(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
printf(" Got %d\n", fill_time);
}
if (H5Dclose(dset6) < 0)
@@ -811,7 +812,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (!H5_FLT_ABS_EQUAL(rd_c.a, 0) || !H5_DBL_ABS_EQUAL(rd_c.y, fill_ctype.y) || rd_c.x != 0 ||
rd_c.z != '\0') {
H5_FAILED();
- HDputs(" Got wrong fill value");
+ puts(" Got wrong fill value");
printf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y, rd_c.x,
rd_c.z);
}
@@ -872,7 +873,8 @@ static int
test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_fill_time_t fill_time,
H5D_layout_t layout, H5T_class_t datatype, hid_t ctype_id)
{
- hid_t fspace = -1, mspace = -1, dset1 = -1, dset2 = -1;
+ hid_t fspace = H5I_INVALID_HID, mspace = H5I_INVALID_HID, dset1 = H5I_INVALID_HID,
+ dset2 = H5I_INVALID_HID;
hsize_t cur_size[5] = {2, 8, 8, 4, 2};
hsize_t one[5] = {1, 1, 1, 1, 1};
hsize_t hs_size[5], hs_stride[5];
@@ -899,7 +901,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
fill_c.z = ((comp_datatype *)_fillval)->z;
}
else {
- HDputs("Invalid type for test");
+ puts("Invalid type for test");
goto error;
}
@@ -1205,7 +1207,7 @@ static int
test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
{
char filename[1024];
- hid_t file = -1, dcpl = -1, ctype_id = -1;
+ hid_t file = H5I_INVALID_HID, dcpl = H5I_INVALID_HID, ctype_id = H5I_INVALID_HID;
hsize_t ch_size[5] = {2, 8, 8, 4, 2};
int nerrors = 0;
int fillval = 0x4c70f1cd;
@@ -1480,8 +1482,8 @@ test_extend_init_cmpd_vl(void *_buf, size_t nelmts, const void *_val)
*buf = *val;
/* Deep copy string fields */
- buf->a = HDstrdup(val->a);
- buf->b = HDstrdup(val->b);
+ buf->a = strdup(val->a);
+ buf->b = strdup(val->b);
buf++;
nelmts--;
@@ -1509,8 +1511,8 @@ test_extend_verify_cmpd_vl(unsigned lineno, const hsize_t *offset, const void *_
(const comp_vl_datatype *)_compare_val; /* Value to compare against */
/* Verify value */
- if ((test_val->x != compare_val->x) || HDstrcmp(test_val->a, compare_val->a) != 0 ||
- HDstrcmp(test_val->b, compare_val->b) != 0 || (test_val->y != compare_val->y)) {
+ if ((test_val->x != compare_val->x) || strcmp(test_val->a, compare_val->a) != 0 ||
+ strcmp(test_val->b, compare_val->b) != 0 || (test_val->y != compare_val->y)) {
fprintf(stdout, "%u: Value read was not expected.\n", lineno);
fprintf(stdout,
" Elmt = {%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
@@ -1563,10 +1565,10 @@ static int
test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t *ch_size, hsize_t *start_size,
hsize_t *max_size, hid_t dtype, void *fillval)
{
- hid_t fspace = -1, mspace = -1; /* File & memory dataspaces */
- hid_t dset = -1; /* Dataset ID */
- hid_t dcpl = -1; /* Dataset creation property list */
- hsize_t extend_size[5]; /* Dimensions to extend to */
+ hid_t fspace = H5I_INVALID_HID, mspace = H5I_INVALID_HID; /* File & memory dataspaces */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hsize_t extend_size[5]; /* Dimensions to extend to */
hsize_t one[5] = {1, 1, 1, 1, 1}; /* Dimensions of single element dataspace */
hsize_t hs_size[5], hs_stride[5], hs_offset[5];
size_t nelmts;
@@ -1585,8 +1587,8 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t
unsigned i, j; /* Local index variables */
/* Set vl datatype init value strings */
- init_val_c.a = HDstrdup("baz");
- init_val_c.b = HDstrdup("mumble");
+ init_val_c.a = strdup("baz");
+ init_val_c.b = strdup("mumble");
/* Make copy of dataset creation property list */
if ((dcpl = H5Pcopy(_dcpl)) < 0)
@@ -2029,9 +2031,9 @@ error:
static int
test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
{
- hid_t file = -1; /* File ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t cmpd_vl_tid = -1; /* Compound+vl datatype ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t cmpd_vl_tid = H5I_INVALID_HID; /* Compound+vl datatype ID */
hsize_t start_size[5] = {8, 8, 8, 4, 2};
hsize_t max_size[5] = {32, 32, 32, 16, 8};
hsize_t ch_size[5] = {1, 8, 8, 4, 2};
@@ -2050,8 +2052,8 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
TESTING("contiguous dataset extend");
/* Set vl datatype fill value strings */
- fillval_c.a = HDstrdup("foo");
- fillval_c.b = HDstrdup("bar");
+ fillval_c.a = strdup("foo");
+ fillval_c.b = strdup("bar");
/* Create dataset creation property list */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
@@ -2110,7 +2112,7 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
*/
if (H5D_CONTIGUOUS == layout) {
SKIPPED();
- HDputs(" Not implemented yet -- needs H5S_SELECT_DIFF operator");
+ puts(" Not implemented yet -- needs H5S_SELECT_DIFF operator");
goto skip;
}
#endif
@@ -2188,8 +2190,9 @@ skip:
static int
test_compatible(void)
{
- hid_t file = -1, dset1 = -1, dset2 = -1;
- hid_t dcpl1 = -1, dcpl2 = -1, fspace = -1, mspace = -1;
+ hid_t file = H5I_INVALID_HID, dset1 = H5I_INVALID_HID, dset2 = H5I_INVALID_HID;
+ hid_t dcpl1 = H5I_INVALID_HID, dcpl2 = H5I_INVALID_HID, fspace = H5I_INVALID_HID,
+ mspace = H5I_INVALID_HID;
int rd_fill = 0, fill_val = 4444, val_rd = 0;
hsize_t dims[2], one[2] = {1, 1};
hsize_t hs_offset[2] = {3, 4};
@@ -2223,7 +2226,7 @@ test_compatible(void)
goto error;
if (dims[0] != 8 || dims[1] != 8) {
H5_FAILED();
- HDputs(" Got a different dimension size than what was set.");
+ puts(" Got a different dimension size than what was set.");
printf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]);
goto error;
}
@@ -2235,7 +2238,7 @@ test_compatible(void)
goto error;
if (val_rd != 0) {
H5_FAILED();
- HDputs(" Got a different value than what was set.");
+ puts(" Got a different value than what was set.");
printf(" Got %ld, set 0\n", (long)val_rd);
goto error;
}
@@ -2276,7 +2279,7 @@ test_compatible(void)
goto error;
if (dims[0] != 8 || dims[1] != 8) {
H5_FAILED();
- HDputs(" Got a different dimension size than what was set.");
+ puts(" Got a different dimension size than what was set.");
printf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]);
goto error;
}
@@ -2288,7 +2291,7 @@ test_compatible(void)
goto error;
if (val_rd != fill_val) {
H5_FAILED();
- HDputs(" Got a different value than what was set.");
+ puts(" Got a different value than what was set.");
printf(" Got %ld, set %ld\n", (long)val_rd, (long)fill_val);
goto error;
}
@@ -2339,7 +2342,7 @@ error:
static int
test_partalloc_cases(hid_t file, hid_t dcpl, const char *dname, H5D_fill_time_t fill_time)
{
- hid_t fspace = -1, dset1 = -1, rspace = -1;
+ hid_t fspace = H5I_INVALID_HID, dset1 = H5I_INVALID_HID, rspace = H5I_INVALID_HID;
herr_t ret;
hsize_t ds_size[2] = {4, 4};
hsize_t max_size[2] = {H5S_UNLIMITED, 4};
@@ -2461,7 +2464,7 @@ static int
test_partalloc(hid_t fapl, const char *base_name)
{
char filename[1024];
- hid_t file = -1, dcpl = -1;
+ hid_t file = H5I_INVALID_HID, dcpl = H5I_INVALID_HID;
hsize_t ch_size[2] = {1, 4};
int nerrors = 0;
@@ -2603,18 +2606,18 @@ int
main(int argc, char *argv[])
{
int nerrors = 0, argno, test_contig = 1, test_chunk = 1, test_compact = 1;
- hid_t fapl = (-1), fapl2 = (-1); /* File access property lists */
- unsigned new_format; /* Whether to use the new format or not */
- hbool_t driver_is_default_compatible;
+ hid_t fapl = (H5I_INVALID_HID), fapl2 = (H5I_INVALID_HID); /* File access property lists */
+ unsigned new_format; /* Whether to use the new format or not */
+ bool driver_is_default_compatible;
if (argc >= 2) {
test_contig = test_chunk = test_compact = 0;
for (argno = 1; argno < argc; argno++) {
- if (!HDstrcmp(argv[argno], "contiguous"))
+ if (!strcmp(argv[argno], "contiguous"))
test_contig = 1;
- else if (!HDstrcmp(argv[argno], "chunked"))
+ else if (!strcmp(argv[argno], "chunked"))
test_chunk = 1;
- else if (!HDstrcmp(argv[argno], "compact"))
+ else if (!strcmp(argv[argno], "compact"))
test_compact = 1;
else {
fprintf(stderr, "usage: %s [contiguous] [chunked] [compact]\n", argv[0]);
@@ -2642,16 +2645,16 @@ main(int argc, char *argv[])
TEST_ERROR;
/* Loop over using new group format */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl;
/* Set the FAPL for the type of format */
if (new_format) {
- HDputs("\nTesting with new file format:");
+ puts("\nTesting with new file format:");
my_fapl = fapl2;
} /* end if */
else {
- HDputs("Testing with old file format:");
+ puts("Testing with old file format:");
my_fapl = fapl;
} /* end else */
@@ -2689,7 +2692,7 @@ main(int argc, char *argv[])
if (nerrors)
goto error;
- HDputs("All fill value tests passed.");
+ puts("All fill value tests passed.");
if (h5_cleanup(FILENAME, fapl))
HDremove(FILE_NAME_RAW);
@@ -2697,6 +2700,6 @@ main(int argc, char *argv[])
exit(EXIT_SUCCESS);
error:
- HDputs("***** FILL VALUE TESTS FAILED *****");
+ puts("***** FILL VALUE TESTS FAILED *****");
exit(EXIT_FAILURE);
}
diff --git a/test/filter_fail.c b/test/filter_fail.c
index 0044cf9..1029617 100644
--- a/test/filter_fail.c
+++ b/test/filter_fail.c
@@ -91,12 +91,12 @@ filter_fail(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts, const unsigned
*-------------------------------------------------------------------------
*/
static herr_t
-test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled)
+test_filter_write(char *file_name, hid_t my_fapl, bool cache_enabled)
{
- hid_t file = -1;
- hid_t dataset = -1; /* dataset ID */
- hid_t sid = -1; /* dataspace ID */
- hid_t dcpl = -1; /* dataset creation property list ID */
+ hid_t file = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list ID */
hsize_t dims[1] = {DIM}; /* dataspace dimension - 10*/
hsize_t chunk_dims[1] = {FILTER_CHUNK_DIM}; /* chunk dimension - 2*/
int points[DIM]; /* Data */
@@ -129,7 +129,7 @@ test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled)
TEST_ERROR;
/* Check that the filter was registered */
- if (TRUE != H5Zfilter_avail(H5Z_FILTER_FAIL_TEST))
+ if (true != H5Zfilter_avail(H5Z_FILTER_FAIL_TEST))
FAIL_STACK_ERROR;
/* Enable the filter as mandatory */
@@ -159,7 +159,7 @@ test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled)
H5E_END_TRY
if (ret >= 0) {
H5_FAILED();
- HDputs(" Data writing is supposed to fail because the chunk can't be written to file.");
+ puts(" Data writing is supposed to fail because the chunk can't be written to file.");
TEST_ERROR;
}
}
@@ -180,7 +180,7 @@ test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled)
H5E_END_TRY
if (ret >= 0) {
H5_FAILED();
- HDputs(" Dataset is supposed to fail because the chunk can't be flushed to file.");
+ puts(" Dataset is supposed to fail because the chunk can't be flushed to file.");
TEST_ERROR;
}
}
@@ -225,10 +225,10 @@ error:
static herr_t
test_filter_read(char *file_name, hid_t my_fapl)
{
- hid_t file = -1;
- hid_t dataset = -1; /* dataset ID */
- hid_t sid = -1;
- hid_t mspace = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid = H5I_INVALID_HID;
+ hid_t mspace = H5I_INVALID_HID;
hsize_t dims[1] = {DIM}; /* dataspace dimension - 10*/
int rbuf[DIM]; /* Data */
hsize_t dset_size = 0; /* Dataset storage size */
@@ -375,7 +375,7 @@ main(void)
/* The chunk cache is used so that the flushing of data chunks happens
* during H5Dclose. All values are default. */
- nerrors += (test_filter_write(filename, fapl, TRUE) < 0 ? 1 : 0);
+ nerrors += (test_filter_write(filename, fapl, true) < 0 ? 1 : 0);
nerrors += (test_filter_read(filename, fapl) < 0 ? 1 : 0);
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
@@ -386,7 +386,7 @@ main(void)
TEST_ERROR;
/* Run the test again. */
- nerrors += (test_filter_write(filename, fapl, FALSE) < 0 ? 1 : 0);
+ nerrors += (test_filter_write(filename, fapl, false) < 0 ? 1 : 0);
nerrors += (test_filter_read(filename, fapl) < 0 ? 1 : 0);
/* Verify symbol table messages are cached */
diff --git a/test/filter_plugin.c b/test/filter_plugin.c
index 6bd63d5..1571bf2 100644
--- a/test/filter_plugin.c
+++ b/test/filter_plugin.c
@@ -144,11 +144,11 @@ error:
*-------------------------------------------------------------------------
*/
static herr_t
-compare_2D_arrays(int **dset1, int **dset2, const hsize_t *sizes, /*OUT*/ hbool_t *are_same)
+compare_2D_arrays(int **dset1, int **dset2, const hsize_t *sizes, /*OUT*/ bool *are_same)
{
hsize_t i, j; /* index variables */
- *are_same = TRUE;
+ *are_same = true;
/* Check all the array values. This could optionally emit any
* bad data, but it's not clear how that would help debugging.
@@ -156,7 +156,7 @@ compare_2D_arrays(int **dset1, int **dset2, const hsize_t *sizes, /*OUT*/ hbool_
for (i = 0; i < sizes[0]; i++)
for (j = 0; j < sizes[1]; j++)
if (dset1[i][j] != dset2[i][j]) {
- *are_same = FALSE;
+ *are_same = false;
return SUCCEED;
}
@@ -176,19 +176,19 @@ compare_2D_arrays(int **dset1, int **dset2, const hsize_t *sizes, /*OUT*/ hbool_
static herr_t
ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
{
- hid_t did = -1; /* Dataset ID */
- hid_t dxpl_id = -1; /* Dataset xfer property list ID */
- hid_t write_dxpl_id = -1; /* Dataset xfer property list ID for writing */
- hid_t sid = -1; /* Dataspace ID */
- void *tconv_buf = NULL; /* Temporary conversion buffer */
- int **orig = NULL; /* Data written to the dataset */
- int **read = NULL; /* Data read from the dataset */
- size_t r, c; /* Data rows and columns */
- size_t hs_r, hs_c, hs_offr, hs_offc; /* Hypserslab sizes and offsets */
- size_t i, j; /* Local index variables */
- int n = 0; /* Value written to point array */
- hbool_t are_same; /* Output from dataset compare function */
- int ***save_array = NULL; /* (Global) array where the final data go */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset xfer property list ID */
+ hid_t write_dxpl_id = H5I_INVALID_HID; /* Dataset xfer property list ID for writing */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ void *tconv_buf = NULL; /* Temporary conversion buffer */
+ int **orig = NULL; /* Data written to the dataset */
+ int **read = NULL; /* Data read from the dataset */
+ size_t r, c; /* Data rows and columns */
+ size_t hs_r, hs_c, hs_offr, hs_offc; /* Hypserslab sizes and offsets */
+ size_t i, j; /* Local index variables */
+ int n = 0; /* Value written to point array */
+ bool are_same; /* Output from dataset compare function */
+ int ***save_array = NULL; /* (Global) array where the final data go */
/* initialize */
r = (size_t)sizes_g[0];
@@ -222,7 +222,7 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
TESTING(" filters (setup)");
/* Check if all the filters are available */
- if (H5Pall_filters_avail(dcpl_id) != TRUE)
+ if (H5Pall_filters_avail(dcpl_id) != true)
TEST_ERROR;
/* Create the dataset */
@@ -243,7 +243,7 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
/* The input buffer was calloc'd and has not been initialized yet */
if (compare_2D_arrays(orig, read, sizes_g, &are_same) < 0)
TEST_ERROR;
- if (FALSE == are_same)
+ if (false == are_same)
TEST_ERROR;
PASSED();
@@ -278,7 +278,7 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
/* Check that the values read are the same as the values written */
if (compare_2D_arrays(orig, read, sizes_g, &are_same) < 0)
TEST_ERROR;
- if (FALSE == are_same)
+ if (false == are_same)
TEST_ERROR;
PASSED();
@@ -306,7 +306,7 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
/* Check that the values read are the same as the values written */
if (compare_2D_arrays(orig, read, sizes_g, &are_same) < 0)
TEST_ERROR;
- if (FALSE == are_same)
+ if (false == are_same)
TEST_ERROR;
PASSED();
@@ -330,7 +330,7 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
/* Check that the values read are the same as the values written */
if (compare_2D_arrays(orig, read, sizes_g, &are_same) < 0)
TEST_ERROR;
- if (FALSE == are_same)
+ if (false == are_same)
TEST_ERROR;
PASSED();
@@ -366,7 +366,7 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
/* Check that the values read are the same as the values written */
if (compare_2D_arrays(orig, read, sizes_g, &are_same) < 0)
TEST_ERROR;
- if (FALSE == are_same)
+ if (false == are_same)
TEST_ERROR;
PASSED();
@@ -374,13 +374,13 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
/* Save the data written to the file for later comparison when the file
* is reopened for read test.
*/
- if (!HDstrcmp(name, DSET_DEFLATE_NAME))
+ if (!strcmp(name, DSET_DEFLATE_NAME))
save_array = &orig_deflate_g;
- else if (!HDstrcmp(name, DSET_FILTER1_NAME))
+ else if (!strcmp(name, DSET_FILTER1_NAME))
save_array = &orig_dynlib1_g;
- else if (!HDstrcmp(name, DSET_FILTER2_NAME))
+ else if (!strcmp(name, DSET_FILTER2_NAME))
save_array = &orig_dynlib2_g;
- else if (!HDstrcmp(name, DSET_FILTER3_NAME))
+ else if (!strcmp(name, DSET_FILTER3_NAME))
save_array = &orig_dynlib4_g;
else
TEST_ERROR;
@@ -437,9 +437,9 @@ error:
static herr_t
test_dataset_write_with_filters(hid_t fid)
{
- hid_t dcpl_id = -1; /* Dataset creation property list ID */
- unsigned int filter1_data; /* Data used by filter 1 */
- unsigned int libver_values[4]; /* Used w/ the filter that makes HDF5 calls */
+ hid_t dcpl_id = H5I_INVALID_HID; /* Dataset creation property list ID */
+ unsigned int filter1_data; /* Data used by filter 1 */
+ unsigned int libver_values[4]; /* Used w/ the filter that makes HDF5 calls */
#ifdef H5_HAVE_FILTER_DEFLATE
unsigned int compress_level; /* Deflate compression level */
#endif
@@ -448,7 +448,7 @@ test_dataset_write_with_filters(hid_t fid)
* STEP 1: Test deflation by itself.
*----------------------------------------------------------
*/
- HDputs("Testing dataset writes with deflate filter");
+ puts("Testing dataset writes with deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
TEST_ERROR;
@@ -467,14 +467,14 @@ test_dataset_write_with_filters(hid_t fid)
TEST_ERROR;
#else /* H5_HAVE_FILTER_DEFLATE */
SKIPPED();
- HDputs(" Deflate filter not enabled");
+ puts(" Deflate filter not enabled");
#endif /* H5_HAVE_FILTER_DEFLATE */
/*----------------------------------------------------------
* STEP 2: Test filter plugin 1 by itself.
*----------------------------------------------------------
*/
- HDputs(" dataset writes with filter plugin 1");
+ puts(" dataset writes with filter plugin 1");
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
TEST_ERROR;
if (H5Pset_chunk(dcpl_id, 2, chunk_sizes_g) < 0)
@@ -506,7 +506,7 @@ test_dataset_write_with_filters(hid_t fid)
* STEP 3: Test filter plugin 2 by itself.
*----------------------------------------------------------
*/
- HDputs(" dataset writes with filter plugin 2");
+ puts(" dataset writes with filter plugin 2");
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
TEST_ERROR;
if (H5Pset_chunk(dcpl_id, 2, chunk_sizes_g) < 0)
@@ -534,7 +534,7 @@ test_dataset_write_with_filters(hid_t fid)
* (This filter plugin makes HDF5 API calls)
*----------------------------------------------------------
*/
- HDputs(" dataset writes with filter plugin 3");
+ puts(" dataset writes with filter plugin 3");
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
TEST_ERROR;
if (H5Pset_chunk(dcpl_id, 2, chunk_sizes_g) < 0)
@@ -633,7 +633,7 @@ error:
static herr_t
test_dataset_read_with_filters(hid_t fid)
{
- hid_t did = -1; /* Dataset ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
/*----------------------------------------------------------
* STEP 1: Test deflation by itself.
@@ -642,7 +642,7 @@ test_dataset_read_with_filters(hid_t fid)
TESTING("dataset read I/O with deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
- if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != TRUE)
+ if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != true)
TEST_ERROR;
if ((did = H5Dopen2(fid, DSET_DEFLATE_NAME, H5P_DEFAULT)) < 0)
@@ -656,7 +656,7 @@ test_dataset_read_with_filters(hid_t fid)
#else /* H5_HAVE_FILTER_DEFLATE */
SKIPPED();
- HDputs(" Deflate filter not enabled");
+ puts(" Deflate filter not enabled");
#endif /* H5_HAVE_FILTER_DEFLATE */
/*----------------------------------------------------------
@@ -768,8 +768,8 @@ error:
static herr_t
test_no_read_when_plugins_disabled(hid_t fid)
{
- hid_t did = -1; /* Dataset ID */
- unsigned plugin_flags; /* Plugin access flags */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ unsigned plugin_flags; /* Plugin access flags */
TESTING("filter plugin 1 with filter plugins disabled");
@@ -826,9 +826,9 @@ error:
static herr_t
test_creating_groups_using_plugins(hid_t fid)
{
- hid_t gcpl_id = -1;
- hid_t gid = -1;
- hid_t sub_gid = -1;
+ hid_t gcpl_id = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t sub_gid = H5I_INVALID_HID;
int i;
char subgroup_name[256];
@@ -849,8 +849,8 @@ test_creating_groups_using_plugins(hid_t fid)
for (i = 0; i < N_SUBGROUPS; i++) {
char *sp = subgroup_name;
- sp += HDsnprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX);
- HDsprintf(sp, "%d", i);
+ sp += snprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX);
+ sprintf(sp, "%d", i);
if ((sub_gid = H5Gcreate2(gid, subgroup_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
@@ -893,8 +893,8 @@ error:
static herr_t
test_opening_groups_using_plugins(hid_t fid)
{
- hid_t gid = -1;
- hid_t sub_gid = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t sub_gid = H5I_INVALID_HID;
int i;
char subgroup_name[256];
@@ -908,8 +908,8 @@ test_opening_groups_using_plugins(hid_t fid)
for (i = 0; i < N_SUBGROUPS; i++) {
char *sp = subgroup_name;
- sp += HDsnprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX);
- HDsprintf(sp, "%d", i);
+ sp += snprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX);
+ sprintf(sp, "%d", i);
if ((sub_gid = H5Gopen2(gid, subgroup_name, H5P_DEFAULT)) < 0)
TEST_ERROR;
@@ -958,9 +958,9 @@ test_path_api_calls(void)
char path[256];
char temp_name[256];
- HDputs("Testing access to the filter path table");
+ puts("Testing access to the filter path table");
- if (H5Zfilter_avail(FILTER1_ID) != TRUE)
+ if (H5Zfilter_avail(FILTER1_ID) != true)
TEST_ERROR;
/* Set the number of paths to create for this test.
@@ -1017,7 +1017,7 @@ test_path_api_calls(void)
/* Add a bunch of paths to the path table */
for (u = 0; u < n_starting_paths; u++) {
- HDsnprintf(path, sizeof(path), "a_path_%u", u);
+ snprintf(path, sizeof(path), "a_path_%u", u);
if (H5PLappend(path) < 0) {
fprintf(stderr, " at %u: %s\n", u, path);
TEST_ERROR;
@@ -1063,7 +1063,7 @@ test_path_api_calls(void)
fprintf(stderr, " get 0 len: %zd : %s\n", path_len, path);
TEST_ERROR;
}
- if (HDstrcmp(path, "a_path_0") != 0) {
+ if (strcmp(path, "a_path_0") != 0) {
fprintf(stderr, " get 0: %s\n", path);
TEST_ERROR;
}
@@ -1075,7 +1075,7 @@ test_path_api_calls(void)
/* Get path at index 1 */
if ((path_len = H5PLget(1, path, 256)) <= 0)
TEST_ERROR;
- if (HDstrcmp(path, "a_path_1") != 0) {
+ if (strcmp(path, "a_path_1") != 0) {
fprintf(stderr, " get 1: %s\n", path);
TEST_ERROR;
}
@@ -1083,8 +1083,8 @@ test_path_api_calls(void)
/* Get path at the last index */
if ((path_len = H5PLget(n_starting_paths - 1, path, 256)) <= 0)
TEST_ERROR;
- HDsnprintf(temp_name, sizeof(temp_name), "a_path_%u", n_starting_paths - 1);
- if (HDstrcmp(path, temp_name) != 0) {
+ snprintf(temp_name, sizeof(temp_name), "a_path_%u", n_starting_paths - 1);
+ if (strcmp(path, temp_name) != 0) {
fprintf(stderr, " get %u: %s\n", n_starting_paths - 1, path);
TEST_ERROR;
}
@@ -1121,7 +1121,7 @@ test_path_api_calls(void)
/* Verify that the entries were moved */
if ((path_len = H5PLget(8, path, 256)) <= 0)
TEST_ERROR;
- if (HDstrcmp(path, "a_path_9") != 0) {
+ if (strcmp(path, "a_path_9") != 0) {
fprintf(stderr, " get 8: %s\n", path);
TEST_ERROR;
}
@@ -1137,7 +1137,7 @@ test_path_api_calls(void)
TESTING(" prepend");
/* Prepend one path */
- HDsnprintf(path, sizeof(path), "a_path_%d", n_starting_paths + 1);
+ snprintf(path, sizeof(path), "a_path_%d", n_starting_paths + 1);
if (H5PLprepend(path) < 0) {
fprintf(stderr, " prepend %u: %s\n", n_starting_paths + 1, path);
TEST_ERROR;
@@ -1152,7 +1152,7 @@ test_path_api_calls(void)
/* Verify that the entries were moved */
if (H5PLget(8, path, 256) <= 0)
TEST_ERROR;
- if (HDstrcmp(path, "a_path_7") != 0) {
+ if (strcmp(path, "a_path_7") != 0) {
fprintf(stderr, " get 8: %s\n", path);
TEST_ERROR;
}
@@ -1160,8 +1160,8 @@ test_path_api_calls(void)
/* Verify that the path was inserted at index zero */
if (H5PLget(0, path, 256) <= 0)
TEST_ERROR;
- HDsnprintf(temp_name, sizeof(temp_name), "a_path_%d", n_starting_paths + 1);
- if (HDstrcmp(path, temp_name) != 0) {
+ snprintf(temp_name, sizeof(temp_name), "a_path_%d", n_starting_paths + 1);
+ if (strcmp(path, temp_name) != 0) {
fprintf(stderr, " get 0: %s\n", path);
TEST_ERROR;
}
@@ -1175,7 +1175,7 @@ test_path_api_calls(void)
TESTING(" replace");
/* Replace one path at index 1 */
- HDsnprintf(path, sizeof(path), "a_path_%u", n_starting_paths + 4);
+ snprintf(path, sizeof(path), "a_path_%u", n_starting_paths + 4);
if (H5PLreplace(path, 1) < 0) {
fprintf(stderr, " replace 1: %s\n", path);
TEST_ERROR;
@@ -1194,8 +1194,8 @@ test_path_api_calls(void)
/* Check path at index 0 */
if (H5PLget(0, path, 256) <= 0)
TEST_ERROR;
- HDsnprintf(temp_name, sizeof(temp_name), "a_path_%u", n_starting_paths + 1);
- if (HDstrcmp(path, temp_name) != 0) {
+ snprintf(temp_name, sizeof(temp_name), "a_path_%u", n_starting_paths + 1);
+ if (strcmp(path, temp_name) != 0) {
fprintf(stderr, " get 0: %s\n", path);
TEST_ERROR;
}
@@ -1203,7 +1203,7 @@ test_path_api_calls(void)
/* Check path at index 2 */
if (H5PLget(2, path, 256) <= 0)
TEST_ERROR;
- if (HDstrcmp(path, "a_path_1") != 0) {
+ if (strcmp(path, "a_path_1") != 0) {
fprintf(stderr, " get 2: %s\n", path);
TEST_ERROR;
}
@@ -1227,7 +1227,7 @@ test_path_api_calls(void)
/* Verify that the entries were moved */
if (H5PLget(4, path, 256) <= 0)
TEST_ERROR;
- if (HDstrcmp(path, "a_path_4") != 0) {
+ if (strcmp(path, "a_path_4") != 0) {
fprintf(stderr, " get 4: %s\n", path);
TEST_ERROR;
}
@@ -1242,7 +1242,7 @@ test_path_api_calls(void)
TESTING(" insert");
/* Insert one path at index 3*/
- HDsnprintf(path, sizeof(path), "a_path_%d", n_starting_paths + 5);
+ snprintf(path, sizeof(path), "a_path_%d", n_starting_paths + 5);
if (H5PLinsert(path, 3) < 0) {
fprintf(stderr, " insert 3: %s\n", path);
TEST_ERROR;
@@ -1251,7 +1251,7 @@ test_path_api_calls(void)
/* Verify that the entries were moved */
if (H5PLget(4, path, 256) <= 0)
TEST_ERROR;
- if (HDstrcmp(path, "a_path_2") != 0) {
+ if (strcmp(path, "a_path_2") != 0) {
fprintf(stderr, " get 4: %s\n", path);
TEST_ERROR;
}
@@ -1315,7 +1315,7 @@ test_filter_numbers(void)
unsigned int flags;
unsigned int filter_config;
- HDputs("Testing filter number handling");
+ puts("Testing filter number handling");
/* Check that out-of-range filter numbers are handled correctly */
TESTING(" Filter # out of range");
@@ -1433,9 +1433,9 @@ int
main(void)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1;
- hid_t old_ff_fapl_id = -1;
- hid_t new_ff_fapl_id = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t old_ff_fapl_id = H5I_INVALID_HID;
+ hid_t new_ff_fapl_id = H5I_INVALID_HID;
unsigned new_format;
int nerrors = 0;
@@ -1443,7 +1443,7 @@ main(void)
/* ENSURE THAT WRITING TO DATASETS AND CREATING GROUPS WORKS */
/*******************************************************************/
/* Test with old & new format groups */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl_id;
/* Testing setup */
@@ -1462,7 +1462,7 @@ main(void)
/* Set the FAPL for the type of format */
if (new_format) {
- HDputs("\nTesting with new file format:");
+ puts("\nTesting with new file format:");
/* Copy the file access property list and set the latest file format on it */
if ((new_ff_fapl_id = H5Pcopy(old_ff_fapl_id)) < 0)
TEST_ERROR;
@@ -1472,7 +1472,7 @@ main(void)
my_fapl_id = new_ff_fapl_id;
}
else {
- HDputs("Testing with old file format:");
+ puts("Testing with old file format:");
my_fapl_id = old_ff_fapl_id;
}
@@ -1504,7 +1504,7 @@ main(void)
/* ENSURE THAT READING FROM DATASETS AND OPENING GROUPS WORKS */
/*******************************************************************/
- HDputs("\nTesting reading data with with dynamic plugin filters:");
+ puts("\nTesting reading data with with dynamic plugin filters:");
/* Close the library so that all loaded plugin libraries are unloaded */
h5_reset();
diff --git a/test/flush1.c b/test/flush1.c
index 074c76c..566d561 100644
--- a/test/flush1.c
+++ b/test/flush1.c
@@ -38,7 +38,7 @@ static const char *FILENAME[] = {"flush", "flush-swmr", "noflu
/* Number of sub-groups created in the containing group */
#define NGROUPS 100
-static hid_t create_file(const char *filename, hid_t fapl_id, hbool_t swmr);
+static hid_t create_file(const char *filename, hid_t fapl_id, bool swmr);
static herr_t add_dset_to_file(hid_t fid, const char *dset_name);
/*-------------------------------------------------------------------------
@@ -52,14 +52,14 @@ static herr_t add_dset_to_file(hid_t fid, const char *dset_name);
*-------------------------------------------------------------------------
*/
static hid_t
-create_file(const char *filename, hid_t fapl_id, hbool_t swmr)
+create_file(const char *filename, hid_t fapl_id, bool swmr)
{
- hid_t fid = -1; /* file ID */
- hid_t top_gid = -1; /* containing group ID */
- hid_t gid = -1; /* subgroup ID */
- char group_name[32]; /* group name */
- unsigned flags; /* file open flags */
- int i; /* iterator */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t top_gid = H5I_INVALID_HID; /* containing group ID */
+ hid_t gid = H5I_INVALID_HID; /* subgroup ID */
+ char group_name[32]; /* group name */
+ unsigned flags; /* file open flags */
+ int i; /* iterator */
flags = H5F_ACC_TRUNC | (swmr ? H5F_ACC_SWMR_WRITE : 0);
@@ -74,7 +74,7 @@ create_file(const char *filename, hid_t fapl_id, hbool_t swmr)
if ((top_gid = H5Gcreate2(fid, "top_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
STACK_ERROR;
for (i = 0; i < NGROUPS; i++) {
- HDsnprintf(group_name, sizeof(group_name), "group%02d", i);
+ snprintf(group_name, sizeof(group_name), "group%02d", i);
if ((gid = H5Gcreate2(top_gid, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
STACK_ERROR;
if (H5Gclose(gid) < 0)
@@ -110,13 +110,13 @@ error:
static herr_t
add_dset_to_file(hid_t fid, const char *dset_name)
{
- hid_t dcpl_id = -1; /* dataset creation plist ID */
- hid_t sid = -1; /* dataspace ID */
- hid_t did = -1; /* dataset ID */
- int *data = NULL; /* data buffer */
- hsize_t dims[1] = {NELEMENTS}; /* size of dataset */
- hsize_t chunk_dims[1] = {CHUNK_SIZE}; /* chunk size */
- int i; /* iterator */
+ hid_t dcpl_id = H5I_INVALID_HID; /* dataset creation plist ID */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ int *data = NULL; /* data buffer */
+ hsize_t dims[1] = {NELEMENTS}; /* size of dataset */
+ hsize_t chunk_dims[1] = {CHUNK_SIZE}; /* chunk size */
+ int i; /* iterator */
/* Create a chunked dataset */
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
@@ -176,19 +176,19 @@ error:
int
main(void)
{
- char *driver = NULL; /* name of current VFD (from env var) */
- hbool_t vfd_supports_swmr; /* whether the current VFD supports SWMR */
- hid_t fid = -1; /* file ID */
- hid_t fapl_id = -1; /* file access proplist ID */
- char filename[1024]; /* filename */
- hbool_t use_swmr; /* whether or not to use SWMR I/O */
+ char *driver = NULL; /* name of current VFD (from env var) */
+ bool vfd_supports_swmr; /* whether the current VFD supports SWMR */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access proplist ID */
+ char filename[1024]; /* filename */
+ bool use_swmr; /* whether or not to use SWMR I/O */
h5_reset();
if ((fapl_id = h5_fileaccess()) < 0)
TEST_ERROR;
/* Check if the current VFD supports SWMR */
- driver = HDgetenv(HDF5_DRIVER);
+ driver = getenv(HDF5_DRIVER);
vfd_supports_swmr = H5FD__supports_swmr_test(driver);
/*************************************************/
@@ -198,7 +198,7 @@ main(void)
/* Create a file and flush */
TESTING("H5Fflush (part1 with flush)");
h5_fixname(FILENAME[0], fapl_id, filename, sizeof(filename));
- use_swmr = FALSE;
+ use_swmr = false;
if ((fid = create_file(filename, fapl_id, use_swmr)) < 0)
TEST_ERROR;
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
@@ -209,7 +209,7 @@ main(void)
TESTING("H5Fflush (part1 with flush + SWMR)");
if (vfd_supports_swmr) {
h5_fixname(FILENAME[1], fapl_id, filename, sizeof(filename));
- use_swmr = TRUE;
+ use_swmr = true;
if ((fid = create_file(filename, fapl_id, use_swmr)) < 0)
TEST_ERROR;
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
@@ -222,7 +222,7 @@ main(void)
/* Create a file which will not be flushed */
TESTING("H5Fflush (part1 without flush)");
h5_fixname(FILENAME[2], fapl_id, filename, sizeof(filename));
- use_swmr = FALSE;
+ use_swmr = false;
if ((fid = create_file(filename, fapl_id, use_swmr)) < 0)
TEST_ERROR;
PASSED();
@@ -231,7 +231,7 @@ main(void)
TESTING("H5Fflush (part1 without flush + SWMR)");
if (vfd_supports_swmr) {
h5_fixname(FILENAME[3], fapl_id, filename, sizeof(filename));
- use_swmr = TRUE;
+ use_swmr = true;
if ((fid = create_file(filename, fapl_id, use_swmr)) < 0)
TEST_ERROR;
PASSED();
@@ -242,7 +242,7 @@ main(void)
/* Create a file, flush, add a dataset, flush */
TESTING("H5Fflush (part1 with flush and later addition and another flush)");
h5_fixname(FILENAME[4], fapl_id, filename, sizeof(filename));
- use_swmr = FALSE;
+ use_swmr = false;
if ((fid = create_file(filename, fapl_id, use_swmr)) < 0)
TEST_ERROR;
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
@@ -257,7 +257,7 @@ main(void)
TESTING("H5Fflush (part1 with flush and later addition and another flush + SWMR)");
if (vfd_supports_swmr) {
h5_fixname(FILENAME[5], fapl_id, filename, sizeof(filename));
- use_swmr = TRUE;
+ use_swmr = true;
if ((fid = create_file(filename, fapl_id, use_swmr)) < 0)
TEST_ERROR;
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
@@ -274,7 +274,7 @@ main(void)
/* Create a file, flush, add a dataset, (no flush) */
TESTING("H5Fflush (part1 with flush and later addition)");
h5_fixname(FILENAME[6], fapl_id, filename, sizeof(filename));
- use_swmr = FALSE;
+ use_swmr = false;
if ((fid = create_file(filename, fapl_id, use_swmr)) < 0)
TEST_ERROR;
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
@@ -287,7 +287,7 @@ main(void)
TESTING("H5Fflush (part1 with flush and later addition + SWMR)");
if (vfd_supports_swmr) {
h5_fixname(FILENAME[7], fapl_id, filename, sizeof(filename));
- use_swmr = TRUE;
+ use_swmr = true;
if ((fid = create_file(filename, fapl_id, use_swmr)) < 0)
TEST_ERROR;
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
diff --git a/test/flush2.c b/test/flush2.c
index 05beed7..ccec232 100644
--- a/test/flush2.c
+++ b/test/flush2.c
@@ -39,26 +39,26 @@ static const char *FILENAME[] = {"flush", "flush-swmr", "noflu
/* Number of sub-groups created in the containing group */
#define NGROUPS 100
-static hbool_t dset_ok(hid_t fid, const char *dset_name);
-static hbool_t file_ok(const char *filename, hid_t fapl_id, hbool_t check_second_dset);
+static bool dset_ok(hid_t fid, const char *dset_name);
+static bool file_ok(const char *filename, hid_t fapl_id, bool check_second_dset);
/*-------------------------------------------------------------------------
* Function: dset_ok
*
* Purpose: Checks if the data in a dataset is what it is supposed to be.
*
- * Return: TRUE/FALSE
+ * Return: true/false
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
dset_ok(hid_t fid, const char *dset_name)
{
- hid_t sid = -1; /* dataspace ID */
- hid_t did = -1; /* dataset ID */
- int *data = NULL; /* data buffer */
- hsize_t dims[1] = {0}; /* size of dataset */
- int i; /* iterator */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ int *data = NULL; /* data buffer */
+ hsize_t dims[1] = {0}; /* size of dataset */
+ int i; /* iterator */
/* Open the dataset and check size */
if ((did = H5Dopen2(fid, dset_name, H5P_DEFAULT)) < 0)
@@ -86,7 +86,7 @@ dset_ok(hid_t fid, const char *dset_name)
free(data);
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
@@ -98,7 +98,7 @@ error:
free(data);
- return FALSE;
+ return false;
} /* end dset_ok() */
/*-------------------------------------------------------------------------
@@ -106,18 +106,18 @@ error:
*
* Purpose: Checks that the contents of a file are what they should be.
*
- * Return: TRUE/FALSE
+ * Return: true/false
*
*-------------------------------------------------------------------------
*/
-static hbool_t
-file_ok(const char *filename, hid_t fapl_id, hbool_t check_second_dset)
+static bool
+file_ok(const char *filename, hid_t fapl_id, bool check_second_dset)
{
- hid_t fid = -1; /* file ID */
- hid_t top_gid = -1; /* containing group ID */
- hid_t gid = -1; /* subgroup ID */
- char group_name[32]; /* group name */
- int i; /* iterator */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t top_gid = H5I_INVALID_HID; /* containing group ID */
+ hid_t gid = H5I_INVALID_HID; /* subgroup ID */
+ char group_name[32]; /* group name */
+ int i; /* iterator */
/* open file */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl_id)) < 0)
@@ -134,7 +134,7 @@ file_ok(const char *filename, hid_t fapl_id, hbool_t check_second_dset)
if ((top_gid = H5Gopen2(fid, "top_group", H5P_DEFAULT)) < 0)
goto error;
for (i = 0; i < NGROUPS; i++) {
- HDsnprintf(group_name, sizeof(group_name), "group%02d", i);
+ snprintf(group_name, sizeof(group_name), "group%02d", i);
if ((gid = H5Gopen2(top_gid, group_name, H5P_DEFAULT)) < 0)
goto error;
if (H5Gclose(gid) < 0)
@@ -146,7 +146,7 @@ file_ok(const char *filename, hid_t fapl_id, hbool_t check_second_dset)
if (H5Fclose(fid) < 0)
goto error;
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
@@ -157,7 +157,7 @@ error:
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end file_ok() */
/*-------------------------------------------------------------------------
@@ -173,9 +173,9 @@ error:
static herr_t
clear_status_flags(const char *filename, hid_t fapl_id)
{
- hid_t new_fapl_id = -1; /* copy of the file access plist ID */
- hid_t fid = -1; /* file ID */
- hbool_t clear = TRUE;
+ hid_t new_fapl_id = H5I_INVALID_HID; /* copy of the file access plist ID */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ bool clear = true;
/* Get a copy of fapl */
if ((new_fapl_id = H5Pcopy(fapl_id)) < 0)
@@ -223,20 +223,20 @@ error:
int
main(void)
{
- char *driver = NULL; /* name of current VFD (from env var) */
- hbool_t vfd_supports_swmr; /* whether the current VFD supports SWMR */
- hid_t fapl_id = -1; /* file access proplist ID */
- char filename[1024]; /* filename */
- hbool_t check_second_dset; /* whether or not to check the second dset */
- H5E_auto2_t func; /* for shutting off error reporting */
- hbool_t driver_is_default_vfd_compatible;
+ char *driver = NULL; /* name of current VFD (from env var) */
+ bool vfd_supports_swmr; /* whether the current VFD supports SWMR */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access proplist ID */
+ char filename[1024]; /* filename */
+ bool check_second_dset; /* whether or not to check the second dset */
+ H5E_auto2_t func; /* for shutting off error reporting */
+ bool driver_is_default_vfd_compatible;
h5_reset();
if ((fapl_id = h5_fileaccess()) < 0)
PUTS_ERROR("bad vfd-dependent fapl");
/* Check if the current VFD supports SWMR */
- driver = HDgetenv(HDF5_DRIVER);
+ driver = getenv(HDF5_DRIVER);
vfd_supports_swmr = H5FD__supports_swmr_test(driver);
if (h5_driver_is_default_vfd_compatible(fapl_id, &driver_is_default_vfd_compatible) < 0) {
@@ -253,7 +253,7 @@ main(void)
/* Check the case where the file was flushed */
TESTING("H5Fflush (part2 with flush)");
h5_fixname(FILENAME[0], fapl_id, filename, sizeof(filename));
- check_second_dset = FALSE;
+ check_second_dset = false;
if (file_ok(filename, fapl_id, check_second_dset))
PASSED();
else
@@ -264,7 +264,7 @@ main(void)
TESTING("H5Fflush (part2 with flush + SWMR)");
if (vfd_supports_swmr) {
h5_fixname(FILENAME[1], fapl_id, filename, sizeof(filename));
- check_second_dset = FALSE;
+ check_second_dset = false;
if (clear_status_flags(filename, fapl_id) < 0)
TEST_ERROR;
if (file_ok(filename, fapl_id, check_second_dset))
@@ -284,11 +284,11 @@ main(void)
if (H5Eset_auto2(H5E_DEFAULT, NULL, NULL) < 0)
FAIL_STACK_ERROR;
h5_fixname(FILENAME[2], fapl_id, filename, sizeof(filename));
- check_second_dset = FALSE;
+ check_second_dset = false;
if (file_ok(filename, fapl_id, check_second_dset)) {
#if defined H5_HAVE_WIN32_API && !defined(hdf5_EXPORTS)
SKIPPED();
- HDputs(" the DLL will flush the file even when calling _exit, skip this test temporarily");
+ puts(" the DLL will flush the file even when calling _exit, skip this test temporarily");
#else
TEST_ERROR;
#endif
@@ -309,13 +309,13 @@ main(void)
if (H5Eset_auto2(H5E_DEFAULT, NULL, NULL) < 0)
FAIL_STACK_ERROR;
h5_fixname(FILENAME[3], fapl_id, filename, sizeof(filename));
- check_second_dset = FALSE;
+ check_second_dset = false;
if (clear_status_flags(filename, fapl_id) < 0)
TEST_ERROR;
if (file_ok(filename, fapl_id, check_second_dset)) {
#if defined H5_HAVE_WIN32_API && !defined(hdf5_EXPORTS)
SKIPPED();
- HDputs(" the DLL will flush the file even when calling _exit, skip this test temporarily");
+ puts(" the DLL will flush the file even when calling _exit, skip this test temporarily");
#else
TEST_ERROR;
#endif
@@ -334,7 +334,7 @@ main(void)
* added afterward and then flushed
*/
TESTING("H5Fflush (part2 with flush and later addition and another flush)");
- check_second_dset = TRUE;
+ check_second_dset = true;
h5_fixname(FILENAME[4], fapl_id, filename, sizeof(filename));
if (file_ok(filename, fapl_id, check_second_dset))
PASSED();
@@ -347,7 +347,7 @@ main(void)
*/
TESTING("H5Fflush (part2 with flush and later addition and another flush + SWMR)");
if (vfd_supports_swmr) {
- check_second_dset = TRUE;
+ check_second_dset = true;
h5_fixname(FILENAME[5], fapl_id, filename, sizeof(filename));
if (clear_status_flags(filename, fapl_id) < 0)
TEST_ERROR;
@@ -370,11 +370,11 @@ main(void)
if (H5Eset_auto2(H5E_DEFAULT, NULL, NULL) < 0)
FAIL_STACK_ERROR;
h5_fixname(FILENAME[6], fapl_id, filename, sizeof(filename));
- check_second_dset = TRUE;
+ check_second_dset = true;
if (file_ok(filename, fapl_id, check_second_dset)) {
#if defined H5_HAVE_WIN32_API && !defined(hdf5_EXPORTS)
SKIPPED();
- HDputs(" the DLL will flush the file even when calling _exit, skip this test temporarily");
+ puts(" the DLL will flush the file even when calling _exit, skip this test temporarily");
#else
TEST_ERROR;
#endif
@@ -397,13 +397,13 @@ main(void)
if (H5Eset_auto2(H5E_DEFAULT, NULL, NULL) < 0)
FAIL_STACK_ERROR;
h5_fixname(FILENAME[7], fapl_id, filename, sizeof(filename));
- check_second_dset = TRUE;
+ check_second_dset = true;
if (clear_status_flags(filename, fapl_id) < 0)
TEST_ERROR;
if (file_ok(filename, fapl_id, check_second_dset)) {
#if defined H5_HAVE_WIN32_API && !defined(hdf5_EXPORTS)
SKIPPED();
- HDputs(" the DLL will flush the file even when calling _exit, skip this test temporarily");
+ puts(" the DLL will flush the file even when calling _exit, skip this test temporarily");
#else
TEST_ERROR;
#endif
diff --git a/test/flushrefresh.c b/test/flushrefresh.c
index 745b6ef..297db60 100644
--- a/test/flushrefresh.c
+++ b/test/flushrefresh.c
@@ -146,7 +146,7 @@ main(int argc, char *argv[])
* anything. */
/* Determine driver being used */
- envval = HDgetenv(HDF5_DRIVER);
+ envval = getenv(HDF5_DRIVER);
if (envval == NULL || H5FD__supports_swmr_test(envval)) {
if (test_flush() != SUCCEED)
@@ -1054,7 +1054,7 @@ herr_t
flush_verification(const char *obj_pathname, const char *expected)
{
/* Variables */
- hid_t oid = -1, fid = -1;
+ hid_t oid = H5I_INVALID_HID, fid = H5I_INVALID_HID;
herr_t status = 0;
H5O_info2_t oinfo;
@@ -1068,13 +1068,13 @@ flush_verification(const char *obj_pathname, const char *expected)
H5E_END_TRY
/* Compare to expected result */
- if (HDstrcmp(expected, FLUSHED) == 0) {
+ if (strcmp(expected, FLUSHED) == 0) {
if ((oid < 0) || (status < 0)) {
fprintf(stderr, "Error! %s should be on disk, but was NOT!\n", obj_pathname);
PROCESS_ERROR;
} /* end if */
}
- else if (HDstrcmp(expected, NOT_FLUSHED) == 0) {
+ else if (strcmp(expected, NOT_FLUSHED) == 0) {
if ((oid > 0) || (status > 0)) {
fprintf(stderr, "Error! %s not expected to be flushed, but it was found on disk!\n",
obj_pathname);
@@ -1199,7 +1199,7 @@ refresh_verification(const char *obj_pathname)
H5O_native_info_t refreshed_ninfo;
int tries = 800, sleep_tries = 400;
int token_cmp;
- hbool_t ok = FALSE;
+ bool ok = false;
HDremove(SIGNAL_BETWEEN_PROCESSES_2);
@@ -1265,20 +1265,20 @@ refresh_verification(const char *obj_pathname)
* test cases is easy). */
do {
- if ((HDstrcmp(obj_pathname, D1) == 0) || (HDstrcmp(obj_pathname, D2) == 0)) {
+ if ((strcmp(obj_pathname, D1) == 0) || (strcmp(obj_pathname, D2) == 0)) {
if (H5Drefresh(oid) < 0)
PROCESS_ERROR;
} /* end if */
- else if ((HDstrcmp(obj_pathname, G1) == 0) || (HDstrcmp(obj_pathname, G2) == 0)) {
+ else if ((strcmp(obj_pathname, G1) == 0) || (strcmp(obj_pathname, G2) == 0)) {
if (H5Grefresh(oid) < 0)
PROCESS_ERROR;
} /* end if */
- else if ((HDstrcmp(obj_pathname, T1) == 0) || (HDstrcmp(obj_pathname, T2) == 0)) {
+ else if ((strcmp(obj_pathname, T1) == 0) || (strcmp(obj_pathname, T2) == 0)) {
if (H5Trefresh(oid) < 0)
PROCESS_ERROR;
} /* end if */
- else if ((HDstrcmp(obj_pathname, D3) == 0) || (HDstrcmp(obj_pathname, G3) == 0) ||
- (HDstrcmp(obj_pathname, T3) == 0)) {
+ else if ((strcmp(obj_pathname, D3) == 0) || (strcmp(obj_pathname, G3) == 0) ||
+ (strcmp(obj_pathname, T3) == 0)) {
if (H5Orefresh(oid) < 0)
PROCESS_ERROR;
} /* end if */
@@ -1304,7 +1304,7 @@ refresh_verification(const char *obj_pathname)
(flushed_ninfo.hdr.nmesgs != refreshed_ninfo.hdr.nmesgs) &&
(flushed_ninfo.hdr.nchunks != refreshed_ninfo.hdr.nchunks) &&
(flushed_ninfo.hdr.space.total != refreshed_ninfo.hdr.space.total)) {
- ok = TRUE;
+ ok = true;
break;
}
diff --git a/test/freespace.c b/test/freespace.c
index e1628b7..b278d2a 100644
--- a/test/freespace.c
+++ b/test/freespace.c
@@ -276,10 +276,10 @@ TEST_sect_free(H5FS_section_info_t *sect)
/*
* Determine if the section can be shrunk and set _udata accordingly
- * if _udata passed in is NULL, return FALSE
+ * if _udata passed in is NULL, return false
* Otherwise:
- * if section's address+size is the end of file, return TRUE
- * otherwise return FALSE
+ * if section's address+size is the end of file, return true
+ * otherwise return false
*/
static herr_t
TEST_sect_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
@@ -289,15 +289,15 @@ TEST_sect_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
haddr_t end, eoa;
if (can_shrink == NULL)
- return FALSE;
+ return false;
end = sect->sect_info.addr + sect->sect_info.size;
eoa = TEST_get_eoa();
if (end == eoa)
- *can_shrink = TRUE;
+ *can_shrink = true;
else
- *can_shrink = FALSE;
+ *can_shrink = false;
return (htri_t)*can_shrink;
} /* TEST_sect_can_shrink() */
@@ -317,11 +317,11 @@ TEST_sect_shrinking(H5FS_section_info_t **_sect, void *_udata)
if (TEST_sect_free((H5FS_section_info_t *)*sect) < 0)
TEST_ERROR;
*sect = NULL;
- return TRUE;
+ return true;
} /* end if */
error:
- return FALSE;
+ return false;
}
/*
@@ -440,7 +440,7 @@ error:
static unsigned
test_fs_create(hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -581,7 +581,7 @@ error:
static unsigned
test_fs_sect_add(hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -593,7 +593,7 @@ test_fs_sect_add(hid_t fapl)
TEST_free_section_t *sect_node = NULL;
unsigned init_flags = 0;
h5_stat_size_t file_size = 0, tmp_file_size = 0, fr_meta_size = 0;
- unsigned can_shrink = FALSE;
+ unsigned can_shrink = false;
TESTING("adding a section via H5FS_sect_add() to free-space: test 1");
@@ -925,7 +925,7 @@ error:
static unsigned
test_fs_sect_find(hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -936,7 +936,7 @@ test_fs_sect_find(hid_t fapl)
TEST_free_section_t *sect_node1 = NULL, *sect_node2, *sect_node3 = NULL, *sect_node4 = NULL;
TEST_free_section_t *node;
- htri_t node_found = FALSE;
+ htri_t node_found = false;
unsigned init_flags = 0;
TESTING("H5FS_sect_find(): free-space is empty");
@@ -1309,7 +1309,7 @@ error:
static unsigned
test_fs_sect_merge(hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -1320,7 +1320,7 @@ test_fs_sect_merge(hid_t fapl)
TEST_free_section_t *sect_node1 = NULL, *sect_node2 = NULL, *sect_node3 = NULL, *sect_node4 = NULL;
unsigned init_flags = 0;
- htri_t node_found = FALSE;
+ htri_t node_found = false;
TEST_free_section_t *node;
TESTING("the merge of sections when H5FS_sect_add() to free-space: test 1");
@@ -1787,7 +1787,7 @@ error:
static unsigned
test_fs_sect_shrink(hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -1798,8 +1798,8 @@ test_fs_sect_shrink(hid_t fapl)
TEST_free_section_t *sect_node1 = NULL, *sect_node2 = NULL;
unsigned init_flags = 0;
- unsigned can_shrink = FALSE;
- htri_t node_found = FALSE;
+ unsigned can_shrink = false;
+ htri_t node_found = false;
TEST_free_section_t *node;
TESTING("shrinking of sections when H5FS_sect_add() to free-space: test 1");
@@ -1839,7 +1839,7 @@ test_fs_sect_shrink(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50,
TEST_FSPACE_SECT_TYPE_NEW, H5FS_SECT_LIVE);
- can_shrink = FALSE;
+ can_shrink = false;
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR;
@@ -1874,7 +1874,7 @@ test_fs_sect_shrink(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE,
H5FS_SECT_LIVE);
- can_shrink = FALSE;
+ can_shrink = false;
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR;
@@ -2134,7 +2134,7 @@ error:
static unsigned
test_fs_sect_change_class(hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -2422,7 +2422,7 @@ error:
static unsigned
test_fs_sect_extend(hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -2505,7 +2505,7 @@ test_fs_sect_extend(hid_t fapl)
if ((status = H5FS_sect_try_extend(f, frsp, (haddr_t)TEST_SECT_SIZE80, (hsize_t)TEST_SECT_SIZE20,
(hsize_t)TEST_SECT_SIZE40, 0, NULL)) < 0)
FAIL_STACK_ERROR;
- if (FALSE == status)
+ if (false == status)
TEST_ERROR;
/* Succeed in extending the block: free space info is decremented accordingly */
@@ -2582,7 +2582,7 @@ test_fs_sect_extend(hid_t fapl)
if ((status = H5FS_sect_try_extend(f, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20,
(hsize_t)TEST_SECT_SIZE50, 0, NULL)) < 0)
FAIL_STACK_ERROR;
- if (TRUE == status)
+ if (true == status)
TEST_ERROR;
/* Not able to extend the block: free space info remains the same */
@@ -2656,7 +2656,7 @@ test_fs_sect_extend(hid_t fapl)
if ((status = H5FS_sect_try_extend(f, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20,
(hsize_t)TEST_SECT_SIZE30, 0, NULL)) < 0)
TEST_ERROR;
- if (FALSE == status)
+ if (false == status)
TEST_ERROR;
/* Succeed in extending the block: total free space is decreased but other info remains the same */
@@ -2731,7 +2731,7 @@ test_fs_sect_extend(hid_t fapl)
if ((status = H5FS_sect_try_extend(f, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE15,
(hsize_t)TEST_SECT_SIZE40, 0, NULL)) < 0)
TEST_ERROR;
- if (TRUE == status)
+ if (true == status)
TEST_ERROR;
/* Not able to extend the block: free space manager info remains the same */
@@ -2778,7 +2778,7 @@ error:
static unsigned
test_fs_sect_iterate(hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -2874,9 +2874,9 @@ error:
int
main(void)
{
- hid_t fapl = -1; /* File access property list for data files */
- unsigned nerrors = 0; /* Cumulative error count */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list for data files */
+ unsigned nerrors = 0; /* Cumulative error count */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
h5_reset();
@@ -2888,7 +2888,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* make sure alignment is not set for tests to succeed */
if (H5Pset_alignment(fapl, (hsize_t)1, (hsize_t)1) < 0) {
@@ -2910,18 +2910,18 @@ main(void)
if (nerrors)
goto error;
- HDputs("All free-space tests passed.");
+ puts("All free-space tests passed.");
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
h5_cleanup(FILENAME, fapl);
exit(EXIT_SUCCESS);
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
H5Pclose(fapl);
@@ -2929,7 +2929,7 @@ error:
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
exit(EXIT_FAILURE);
} /* main() */
diff --git a/test/gen_bad_offset.c b/test/gen_bad_offset.c
index e9e3393..4f7b959 100644
--- a/test/gen_bad_offset.c
+++ b/test/gen_bad_offset.c
@@ -50,10 +50,10 @@
int
main(void)
{
- hid_t fid = -1, gid1 = -1, gid2 = -1; /* File and group IDs */
- hid_t did = -1, sid = -1; /* Dataset and dataspace IDs */
- int fd = -1; /* File descriptor */
- int64_t val = 999; /* Bad offset value */
+ hid_t fid = H5I_INVALID_HID, gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* File and group IDs */
+ hid_t did = H5I_INVALID_HID, sid = H5I_INVALID_HID; /* Dataset and dataspace IDs */
+ int fd = -1; /* File descriptor */
+ int64_t val = 999; /* Bad offset value */
/* Create the test file */
if ((fid = H5Fcreate(TESTFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
diff --git a/test/gen_bad_ohdr.c b/test/gen_bad_ohdr.c
index d2a9d09..a464867 100644
--- a/test/gen_bad_ohdr.c
+++ b/test/gen_bad_ohdr.c
@@ -29,23 +29,23 @@
#define ATTRNAME2 "Attribute #2"
#endif /* H5O_ENABLE_BAD_MESG_COUNT */
-#ifndef TRUE
-#define TRUE 1
-#endif /* TRUE */
-#ifndef FALSE
-#define FALSE 0
-#endif /* FALSE */
+#ifndef true
+#define true 1
+#endif /* true */
+#ifndef false
+#define false 0
+#endif /* false */
int
main(void)
{
#ifdef H5O_ENABLE_BAD_MESG_COUNT
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t gcpl = -1; /* Group creation property list ID */
- hbool_t store_bad_mesg_count; /* Flag for storing a bad message count */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t gcpl = H5I_INVALID_HID; /* Group creation property list ID */
+ bool store_bad_mesg_count; /* Flag for storing a bad message count */
/* Create test file */
if ((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -56,7 +56,7 @@ main(void)
goto error;
/* Add property for storing bad message count */
- store_bad_mesg_count = TRUE;
+ store_bad_mesg_count = true;
if (H5Pinsert2(gcpl, H5O_BAD_MESG_COUNT_NAME, H5O_BAD_MESG_COUNT_SIZE, &store_bad_mesg_count, NULL, NULL,
NULL, NULL, NULL, NULL) < 0)
goto error;
@@ -109,7 +109,7 @@ error:
}
H5E_END_TRY
#else /* H5O_ENABLE_BAD_MESG_COUNT */
- HDputs("H5O_BAD_MESG_COUNT compiler macro not defined!");
+ puts("H5O_BAD_MESG_COUNT compiler macro not defined!");
#endif /* H5O_ENABLE_BAD_MESG_COUNT */
return 1;
}
diff --git a/test/gen_bogus.c b/test/gen_bogus.c
index adccc5c..67fc630 100644
--- a/test/gen_bogus.c
+++ b/test/gen_bogus.c
@@ -23,12 +23,12 @@
#define FILENAME "tbogus.h5"
#endif /* H5O_ENABLE_BOGUS */
-#ifndef TRUE
-#define TRUE 1
-#endif /* TRUE */
-#ifndef FALSE
-#define FALSE 0
-#endif /* FALSE */
+#ifndef true
+#define true 1
+#endif /* true */
+#ifndef false
+#define false 0
+#endif /* false */
#ifdef H5O_ENABLE_BOGUS
@@ -40,10 +40,10 @@
static int
generate_datasets(hid_t loc_id, unsigned bogus_id)
{
- hid_t sid = -1; /* Dataspace ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t did = -1; /* Dataset ID */
- uint8_t bogus_flags = 0; /* Flags for bogus message */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ uint8_t bogus_flags = 0; /* Flags for bogus message */
/* Create dataspace for datasets */
if ((sid = H5Screate(H5S_SCALAR)) < 0)
@@ -140,8 +140,8 @@ int
main(void)
{
#ifdef H5O_ENABLE_BOGUS
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
/* Create file for test datasets */
if ((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -176,7 +176,7 @@ error:
}
H5E_END_TRY
#else /* H5O_ENABLE_BOGUS */
- HDputs("H5O_ENABLE_BOGUS compiler macro not defined!");
+ puts("H5O_ENABLE_BOGUS compiler macro not defined!");
#endif /* H5O_ENABLE_BOGUS */
return 1;
}
diff --git a/test/gen_bounds.c b/test/gen_bounds.c
index 1198694..53fa436 100644
--- a/test/gen_bounds.c
+++ b/test/gen_bounds.c
@@ -109,12 +109,12 @@
static herr_t
gen_earliest_latest(void)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t space = -1; /* Dataspace ID */
- hid_t dset = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t space = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
float *buf = NULL; /* Buffer for writing data */
float *bufp = NULL; /* Pointer to data buffer */
hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */
@@ -253,12 +253,12 @@ error:
static herr_t
gen_earliest_v18(void)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t space = -1; /* Dataspace ID */
- hid_t dset = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t space = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
float *buf = NULL; /* Buffer for writing data */
float *bufp = NULL; /* Pointer to data buffer */
hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */
@@ -372,11 +372,11 @@ error:
static herr_t
gen_latest_latest(void)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t space = -1; /* Dataspace ID */
- hid_t dset = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t space = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
float *buf = NULL; /* Buffer for writing data */
float *bufp = NULL; /* Pointer to data buffer */
hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */
@@ -480,12 +480,12 @@ error:
static herr_t
gen_v18_latest(void)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t space = -1; /* Dataspace ID */
- hid_t dset = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t space = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
float *buf = NULL; /* Buffer for writing data */
float *bufp = NULL; /* Pointer to data buffer */
hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */
@@ -595,12 +595,12 @@ error:
static herr_t
gen_v18_v18(void)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t space = -1; /* Dataspace ID */
- hid_t dset = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t space = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
float *buf = NULL; /* Buffer for writing data */
float *bufp = NULL; /* Pointer to data buffer */
hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */
diff --git a/test/gen_cross.c b/test/gen_cross.c
index 1bcfd64..77e321e 100644
--- a/test/gen_cross.c
+++ b/test/gen_cross.c
@@ -87,8 +87,8 @@ int create_nbit_dsets_float(hid_t fid, hid_t fsid, hid_t msid);
int
create_normal_dset(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* file and dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* file and dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
float data[NX][NY]; /* data to write */
float fillvalue = -2.2f;
int i, j;
@@ -188,8 +188,8 @@ error:
int
create_scale_offset_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
float data[NX][NY]; /* data to write */
float fillvalue = -2.2f;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
@@ -273,8 +273,8 @@ error:
int
create_scale_offset_dsets_double(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
double data[NX][NY]; /* data to write */
double fillvalue = -2.2;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
@@ -358,8 +358,8 @@ error:
int
create_scale_offset_dsets_char(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
char data[NX][NY]; /* data to write */
char fillvalue = -2;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
@@ -451,8 +451,8 @@ error:
int
create_scale_offset_dsets_short(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
short data[NX][NY]; /* data to write */
short fillvalue = -2;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
@@ -544,8 +544,8 @@ error:
int
create_scale_offset_dsets_int(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
int data[NX][NY]; /* data to write */
int fillvalue = -2;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
@@ -638,8 +638,8 @@ error:
int
create_scale_offset_dsets_long_long(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
long long data[NX][NY]; /* data to write */
long long fillvalue = -2;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
@@ -731,8 +731,8 @@ error:
int
create_fletcher_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
float data[NX][NY]; /* data to write */
float fillvalue = -2.2f;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
@@ -817,8 +817,8 @@ int
create_deflate_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
{
#ifdef H5_HAVE_FILTER_DEFLATE
- hid_t dataset = -1; /* dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
float data[NX][NY]; /* data to write */
float fillvalue = -2.2f;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
@@ -879,7 +879,7 @@ create_deflate_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
#else /* H5_HAVE_FILTER_DEFLATE */
const char *not_supported = "Deflate filter is not enabled. Can't create the dataset.";
- HDputs(not_supported);
+ puts(not_supported);
#endif /* H5_HAVE_FILTER_DEFLATE */
return 0;
@@ -998,8 +998,8 @@ error:
int
create_shuffle_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* dataset handles */
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t dcpl = H5I_INVALID_HID;
float data[NX][NY]; /* data to write */
float fillvalue = -2.2f;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
@@ -1083,9 +1083,9 @@ error:
int
create_nbit_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
{
- hid_t dataset = -1; /* dataset handles */
- hid_t datatype = -1;
- hid_t dcpl = -1;
+ hid_t dataset = H5I_INVALID_HID; /* dataset handles */
+ hid_t datatype = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
size_t precision, offset;
float data[NX][NY]; /* data to write */
float fillvalue = -2.2f;
@@ -1188,9 +1188,9 @@ error:
int
main(void)
{
- hid_t file = -1;
- hid_t filespace = -1;
- hid_t memspace = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
+ hid_t memspace = H5I_INVALID_HID;
hsize_t dimsf[RANK];
hsize_t start[RANK] = {0, 0};
@@ -1263,7 +1263,7 @@ main(void)
if (create_szip_dsets_float(file, filespace, memspace) < 0)
TEST_ERROR;
#else /* H5_HAVE_FILTER_SZIP */
- HDputs("Szip filter is not enabled. Can't create the dataset.");
+ puts("Szip filter is not enabled. Can't create the dataset.");
#endif /* H5_HAVE_FILTER_SZIP */
/* Create a dataset of FLOAT with shuffle filter */
diff --git a/test/gen_deflate.c b/test/gen_deflate.c
index 9c3d20f..b19dcbd 100644
--- a/test/gen_deflate.c
+++ b/test/gen_deflate.c
@@ -40,7 +40,7 @@
int
main(void)
{
- hid_t fid = -1, sid = -1, did = -1, dcpl_id = -1;
+ hid_t fid = H5I_INVALID_HID, sid = H5I_INVALID_HID, did = H5I_INVALID_HID, dcpl_id = H5I_INVALID_HID;
hsize_t dims[SPACE_RANK] = {SPACE_DIM1, SPACE_DIM2};
hsize_t chunk_dims[SPACE_RANK] = {CHUNK_DIM1, CHUNK_DIM2};
size_t i, j; /* Local index variables */
diff --git a/test/gen_file_image.c b/test/gen_file_image.c
index bb86ecc..c5c1510 100644
--- a/test/gen_file_image.c
+++ b/test/gen_file_image.c
@@ -33,7 +33,7 @@
int
main(void)
{
- hid_t fid = -1, sid = -1, did = -1;
+ hid_t fid = H5I_INVALID_HID, sid = H5I_INVALID_HID, did = H5I_INVALID_HID;
hsize_t dims[SPACE_RANK] = {SPACE_DIM1, SPACE_DIM2};
size_t i, j; /* Local index variables */
int *data = NULL; /* Dataset data */
diff --git a/test/gen_filespace.c b/test/gen_filespace.c
index 69c1c1e..27f3d26 100644
--- a/test/gen_filespace.c
+++ b/test/gen_filespace.c
@@ -26,8 +26,8 @@ const char *FILENAMES[] = {
#define DATASET "dset"
#define NUM_ELMTS 100
-#define FALSE 0
-#define TRUE 1
+#define false 0
+#define true 1
/*
* Compile and run this program in the trunk to generate
@@ -46,20 +46,20 @@ const char *FILENAMES[] = {
int
main(void)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
- hid_t did = -1; /* Dataset ID */
- hid_t sid = -1; /* Dataspace ID */
- hsize_t dim[1]; /* Dimension sizes */
- int data[NUM_ELMTS]; /* Buffer for data */
- int i, j; /* Local index variables */
- H5F_fspace_strategy_t fs_strategy; /* File space handling strategy */
- unsigned fs_persist; /* Persisting free-space or not */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dim[1]; /* Dimension sizes */
+ int data[NUM_ELMTS]; /* Buffer for data */
+ int i, j; /* Local index variables */
+ H5F_fspace_strategy_t fs_strategy; /* File space handling strategy */
+ unsigned fs_persist; /* Persisting free-space or not */
j = 0;
for (fs_strategy = H5F_FSPACE_STRATEGY_FSM_AGGR; fs_strategy < H5F_FSPACE_STRATEGY_NTYPES;
fs_strategy++) {
- for (fs_persist = FALSE; fs_persist <= TRUE; fs_persist++) {
+ for (fs_persist = false; fs_persist <= true; fs_persist++) {
if (fs_persist && fs_strategy >= H5F_FSPACE_STRATEGY_AGGR)
continue;
diff --git a/test/gen_filters.c b/test/gen_filters.c
index 2bb458c..6b96dec 100644
--- a/test/gen_filters.c
+++ b/test/gen_filters.c
@@ -41,12 +41,12 @@ static size_t filter_bogus(unsigned int flags, size_t cd_nelmts, const unsigned
static herr_t
test_filters_endianess(void)
{
- hid_t fid = -1; /* file ID */
- hid_t dsid = -1; /* dataset ID */
- hid_t sid = -1; /* dataspace ID */
- hid_t dcpl = -1; /* dataset creation property list ID */
- hsize_t dims[1] = {20}; /* dataspace dimensions */
- hsize_t chunk_dims[1] = {10}; /* chunk dimensions */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t dsid = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list ID */
+ hsize_t dims[1] = {20}; /* dataspace dimensions */
+ hsize_t chunk_dims[1] = {10}; /* chunk dimensions */
int buf[20];
int rank = 1;
int i;
@@ -146,12 +146,12 @@ filter_bogus(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts,
static herr_t
create_file_with_bogus_filter(void)
{
- hid_t fid = -1; /* file ID */
- hid_t dsid = -1; /* dataset ID */
- hid_t sid = -1; /* dataspace ID */
- hid_t dcpl = -1; /* dataset creation property list ID */
- hsize_t dims[1] = {20}; /* dataspace dimensions */
- hsize_t chunk_dims[1] = {10}; /* chunk dimensions */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t dsid = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list ID */
+ hsize_t dims[1] = {20}; /* dataspace dimensions */
+ hsize_t chunk_dims[1] = {10}; /* chunk dimensions */
int buf[20];
int rank = 1;
int i;
diff --git a/test/gen_new_fill.c b/test/gen_new_fill.c
index 955c375..b27daee 100644
--- a/test/gen_new_fill.c
+++ b/test/gen_new_fill.c
@@ -27,7 +27,8 @@
int
main(void)
{
- hid_t file = -1, dcpl = -1, space = -1, dset1 = -1, dset2 = -1;
+ hid_t file = H5I_INVALID_HID, dcpl = H5I_INVALID_HID, space = H5I_INVALID_HID, dset1 = H5I_INVALID_HID,
+ dset2 = H5I_INVALID_HID;
hsize_t cur_size[2] = {8, 8};
H5D_space_status_t allocation;
int fill_val1 = 4444, fill_val2 = 5555;
diff --git a/test/gen_new_group.c b/test/gen_new_group.c
index 31c44cc..e9d55cb 100644
--- a/test/gen_new_group.c
+++ b/test/gen_new_group.c
@@ -28,12 +28,12 @@
int
main(void)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t gid = -1; /* Group creation property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t gid = H5I_INVALID_HID; /* Group creation property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
/* Create file creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
diff --git a/test/gen_old_group.c b/test/gen_old_group.c
index 3ed8a1f..25e2a33 100644
--- a/test/gen_old_group.c
+++ b/test/gen_old_group.c
@@ -30,8 +30,8 @@
int
main(void)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group creation property list ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group creation property list ID */
/* Create file for test groups */
if ((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
diff --git a/test/gen_plist.c b/test/gen_plist.c
index bd94e9c..6d40ae7 100644
--- a/test/gen_plist.c
+++ b/test/gen_plist.c
@@ -48,12 +48,12 @@ main(void)
int little_endian;
int word_length;
H5AC_cache_config_t my_cache_config = {H5AC__CURR_CACHE_CONFIG_VERSION,
- 1 /*TRUE*/,
- 0 /*FALSE*/,
- 0 /*FALSE*/,
+ 1 /*true*/,
+ 0 /*false*/,
+ 0 /*false*/,
"temp",
- 1 /*TRUE*/,
- 0 /*FALSE*/,
+ 1 /*true*/,
+ 0 /*false*/,
(2 * 2048 * 1024),
0.3,
(64 * 1024 * 1024),
@@ -62,7 +62,7 @@ main(void)
H5C_incr__threshold,
0.8,
3.0,
- 1 /*TRUE*/,
+ 1 /*true*/,
(8 * 1024 * 1024),
H5C_flash_incr__add_space,
2.0,
@@ -70,14 +70,14 @@ main(void)
H5C_decr__age_out_with_threshold,
0.997,
0.8,
- 1 /*TRUE*/,
+ 1 /*true*/,
(3 * 1024 * 1024),
3,
- 0 /*FALSE*/,
+ 0 /*false*/,
0.2,
(256 * 2048),
H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY};
- H5AC_cache_image_config_t my_cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, TRUE, FALSE,
+ H5AC_cache_image_config_t my_cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, true, false,
-1};
/* check endianness */
@@ -105,7 +105,7 @@ main(void)
if ((dcpl1 = H5Pcreate(H5P_DATASET_CREATE)) < 0)
assert(dcpl1 > 0);
- if ((ret = encode_plist(dcpl1, little_endian, word_length, "testfiles/plist_files/def_dcpl_")) < 0)
+ if ((ret = encode_plist(dcpl1, little_endian, word_length, "plist_files/def_dcpl_")) < 0)
assert(ret > 0);
if ((ret = H5Pset_chunk(dcpl1, 1, &chunk_size)) < 0)
@@ -119,7 +119,7 @@ main(void)
if ((ret = H5Pset_fill_value(dcpl1, H5T_STD_I32BE, &fill)) < 0)
assert(ret > 0);
- if ((ret = H5Pset_dset_no_attrs_hint(dcpl1, FALSE)) < 0)
+ if ((ret = H5Pset_dset_no_attrs_hint(dcpl1, false)) < 0)
assert(ret > 0);
max_size[0] = 100;
@@ -132,7 +132,7 @@ main(void)
if ((ret = H5Pset_external(dcpl1, "ext4.data", (off_t)0, (hsize_t)(max_size[0] * sizeof(int) / 4))) < 0)
assert(ret > 0);
- if ((ret = encode_plist(dcpl1, little_endian, word_length, "testfiles/plist_files/dcpl_")) < 0)
+ if ((ret = encode_plist(dcpl1, little_endian, word_length, "plist_files/dcpl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -143,13 +143,13 @@ main(void)
if ((dapl1 = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
assert(dapl1 > 0);
- if ((ret = encode_plist(dapl1, little_endian, word_length, "testfiles/plist_files/def_dapl_")) < 0)
+ if ((ret = encode_plist(dapl1, little_endian, word_length, "plist_files/def_dapl_")) < 0)
assert(ret > 0);
if ((ret = H5Pset_chunk_cache(dapl1, nslots, nbytes, w0)) < 0)
assert(ret > 0);
- if ((ret = encode_plist(dapl1, little_endian, word_length, "testfiles/plist_files/dapl_")) < 0)
+ if ((ret = encode_plist(dapl1, little_endian, word_length, "plist_files/dapl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -160,7 +160,7 @@ main(void)
if ((dxpl1 = H5Pcreate(H5P_DATASET_XFER)) < 0)
assert(dxpl1 > 0);
- if ((ret = encode_plist(dxpl1, little_endian, word_length, "testfiles/plist_files/def_dxpl_")) < 0)
+ if ((ret = encode_plist(dxpl1, little_endian, word_length, "plist_files/def_dxpl_")) < 0)
assert(ret > 0);
if ((ret = H5Pset_btree_ratios(dxpl1, 0.2, 0.6, 0.2)) < 0)
@@ -186,10 +186,10 @@ main(void)
if ((ret = H5Pset_selection_io(dxpl1, H5D_SELECTION_IO_MODE_ON)) < 0)
assert(ret > 0);
- if ((ret = H5Pset_modify_write_buf(dxpl1, TRUE)) < 0)
+ if ((ret = H5Pset_modify_write_buf(dxpl1, true)) < 0)
assert(ret > 0);
- if ((ret = encode_plist(dxpl1, little_endian, word_length, "testfiles/plist_files/dxpl_")) < 0)
+ if ((ret = encode_plist(dxpl1, little_endian, word_length, "plist_files/dxpl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -200,7 +200,7 @@ main(void)
if ((gcpl1 = H5Pcreate(H5P_GROUP_CREATE)) < 0)
assert(gcpl1 > 0);
- if ((ret = encode_plist(gcpl1, little_endian, word_length, "testfiles/plist_files/def_gcpl_")) < 0)
+ if ((ret = encode_plist(gcpl1, little_endian, word_length, "plist_files/def_gcpl_")) < 0)
assert(ret > 0);
if ((ret = H5Pset_local_heap_size_hint(gcpl1, 256)) < 0)
@@ -219,7 +219,7 @@ main(void)
if ((ret = H5Pset_link_creation_order(gcpl1, (H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED))) < 0)
assert(ret > 0);
- if ((ret = encode_plist(gcpl1, little_endian, word_length, "testfiles/plist_files/gcpl_")) < 0)
+ if ((ret = encode_plist(gcpl1, little_endian, word_length, "plist_files/gcpl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -230,13 +230,13 @@ main(void)
if ((lcpl1 = H5Pcreate(H5P_LINK_CREATE)) < 0)
assert(lcpl1 > 0);
- if ((ret = encode_plist(lcpl1, little_endian, word_length, "testfiles/plist_files/def_lcpl_")) < 0)
+ if ((ret = encode_plist(lcpl1, little_endian, word_length, "plist_files/def_lcpl_")) < 0)
assert(ret > 0);
- if ((ret = H5Pset_create_intermediate_group(lcpl1, 1 /*TRUE*/)) < 0)
+ if ((ret = H5Pset_create_intermediate_group(lcpl1, 1 /*true*/)) < 0)
assert(ret > 0);
- if ((ret = encode_plist(lcpl1, little_endian, word_length, "testfiles/plist_files/lcpl_")) < 0)
+ if ((ret = encode_plist(lcpl1, little_endian, word_length, "plist_files/lcpl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -247,7 +247,7 @@ main(void)
if ((ocpypl1 = H5Pcreate(H5P_OBJECT_COPY)) < 0)
assert(ocpypl1 > 0);
- if ((ret = encode_plist(ocpypl1, little_endian, word_length, "testfiles/plist_files/def_ocpypl_")) < 0)
+ if ((ret = encode_plist(ocpypl1, little_endian, word_length, "plist_files/def_ocpypl_")) < 0)
assert(ret > 0);
ret = H5Pset_copy_object(ocpypl1, H5O_COPY_EXPAND_EXT_LINK_FLAG);
@@ -259,7 +259,7 @@ main(void)
ret = H5Padd_merge_committed_dtype_path(ocpypl1, "bar");
assert(ret >= 0);
- if ((ret = encode_plist(ocpypl1, little_endian, word_length, "testfiles/plist_files/ocpypl_")) < 0)
+ if ((ret = encode_plist(ocpypl1, little_endian, word_length, "plist_files/ocpypl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -270,7 +270,7 @@ main(void)
if ((ocpl1 = H5Pcreate(H5P_OBJECT_CREATE)) < 0)
assert(ocpl1 > 0);
- if ((ret = encode_plist(ocpl1, little_endian, word_length, "testfiles/plist_files/def_ocpl_")) < 0)
+ if ((ret = encode_plist(ocpl1, little_endian, word_length, "plist_files/def_ocpl_")) < 0)
assert(ret > 0);
if ((ret = H5Pset_attr_creation_order(ocpl1, (H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED))) < 0)
@@ -282,7 +282,7 @@ main(void)
if ((ret = H5Pset_filter(ocpl1, H5Z_FILTER_FLETCHER32, 0, (size_t)0, NULL)) < 0)
assert(ret > 0);
- if ((ret = encode_plist(ocpl1, little_endian, word_length, "testfiles/plist_files/ocpl_")) < 0)
+ if ((ret = encode_plist(ocpl1, little_endian, word_length, "plist_files/ocpl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -293,7 +293,7 @@ main(void)
if ((lapl1 = H5Pcreate(H5P_LINK_ACCESS)) < 0)
assert(lapl1 > 0);
- if ((ret = encode_plist(lapl1, little_endian, word_length, "testfiles/plist_files/def_lapl_")) < 0)
+ if ((ret = encode_plist(lapl1, little_endian, word_length, "plist_files/def_lapl_")) < 0)
assert(ret > 0);
if ((ret = H5Pset_nlinks(lapl1, (size_t)134)) < 0)
@@ -318,7 +318,7 @@ main(void)
if ((ret = H5Pclose(fapl1)) < 0)
assert(ret > 0);
- if ((ret = encode_plist(lapl1, little_endian, word_length, "testfiles/plist_files/lapl_")) < 0)
+ if ((ret = encode_plist(lapl1, little_endian, word_length, "plist_files/lapl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -329,7 +329,7 @@ main(void)
if ((fapl1 = H5Pcreate(H5P_FILE_ACCESS)) < 0)
assert(fapl1 > 0);
- if ((ret = encode_plist(fapl1, little_endian, word_length, "testfiles/plist_files/def_fapl_")) < 0)
+ if ((ret = encode_plist(fapl1, little_endian, word_length, "plist_files/def_fapl_")) < 0)
assert(ret > 0);
if ((ret = H5Pset_family_offset(fapl1, 1024)) < 0)
@@ -359,7 +359,7 @@ main(void)
if ((ret = H5Pset_mdc_image_config(fapl1, &my_cache_image_config)) < 0)
assert(ret > 0);
- if ((ret = encode_plist(fapl1, little_endian, word_length, "testfiles/plist_files/fapl_")) < 0)
+ if ((ret = encode_plist(fapl1, little_endian, word_length, "plist_files/fapl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -370,7 +370,7 @@ main(void)
if ((fcpl1 = H5Pcreate(H5P_FILE_CREATE)) < 0)
assert(fcpl1 > 0);
- if ((ret = encode_plist(fcpl1, little_endian, word_length, "testfiles/plist_files/def_fcpl_")) < 0)
+ if ((ret = encode_plist(fcpl1, little_endian, word_length, "plist_files/def_fcpl_")) < 0)
assert(ret > 0);
if ((ret = H5Pset_userblock(fcpl1, 1024) < 0))
@@ -394,13 +394,13 @@ main(void)
if ((ret = H5Pset_sizes(fcpl1, 8, 4) < 0))
assert(ret > 0);
- if ((ret = H5Pset_file_space_strategy(fcpl1, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1)) < 0)
+ if ((ret = H5Pset_file_space_strategy(fcpl1, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1)) < 0)
assert(ret > 0);
if ((ret = H5Pset_file_space_page_size(fcpl1, (hsize_t)4096)) < 0)
assert(ret > 0);
- if ((ret = encode_plist(fcpl1, little_endian, word_length, "testfiles/plist_files/fcpl_")) < 0)
+ if ((ret = encode_plist(fcpl1, little_endian, word_length, "plist_files/fcpl_")) < 0)
assert(ret > 0);
/* release resource */
@@ -411,13 +411,13 @@ main(void)
strcpl1 = H5Pcreate(H5P_STRING_CREATE);
assert(strcpl1 > 0);
- ret = encode_plist(strcpl1, little_endian, word_length, "testfiles/plist_files/def_strcpl_");
+ ret = encode_plist(strcpl1, little_endian, word_length, "plist_files/def_strcpl_");
assert(ret > 0);
ret = H5Pset_char_encoding(strcpl1, H5T_CSET_UTF8);
assert(ret >= 0);
- ret = encode_plist(strcpl1, little_endian, word_length, "testfiles/plist_files/strcpl_");
+ ret = encode_plist(strcpl1, little_endian, word_length, "plist_files/strcpl_");
assert(ret > 0);
/* release resource */
@@ -428,13 +428,13 @@ main(void)
acpl1 = H5Pcreate(H5P_ATTRIBUTE_CREATE);
assert(acpl1 > 0);
- ret = encode_plist(acpl1, little_endian, word_length, "testfiles/plist_files/def_acpl_");
+ ret = encode_plist(acpl1, little_endian, word_length, "plist_files/def_acpl_");
assert(ret > 0);
ret = H5Pset_char_encoding(acpl1, H5T_CSET_UTF8);
assert(ret >= 0);
- ret = encode_plist(acpl1, little_endian, word_length, "testfiles/plist_files/acpl_");
+ ret = encode_plist(acpl1, little_endian, word_length, "plist_files/acpl_");
assert(ret > 0);
/* release resource */
@@ -455,8 +455,8 @@ encode_plist(hid_t plist_id, int little_endian, int word_length, const char *fil
char filename[1024];
/* Generate filename */
- if ((ret = HDsnprintf(filename, sizeof(filename), "%s%d%s", filename_prefix, word_length,
- little_endian ? "le" : "be")) < 0)
+ if ((ret = snprintf(filename, sizeof(filename), "%s%d%s", filename_prefix, word_length,
+ little_endian ? "le" : "be")) < 0)
assert(ret > 0);
/* first call to encode returns only the size of the buffer needed */
diff --git a/test/gen_udlinks.c b/test/gen_udlinks.c
index 9843fcd..91f938d 100644
--- a/test/gen_udlinks.c
+++ b/test/gen_udlinks.c
@@ -30,9 +30,9 @@
int
main(void)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
- hid_t gid = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
char filename1[NAME_BUF_SIZE];
char filename2[NAME_BUF_SIZE];
diff --git a/test/genall5.c b/test/genall5.c
index 005e944..67e76d1 100644
--- a/test/genall5.c
+++ b/test/genall5.c
@@ -32,7 +32,7 @@
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -43,15 +43,15 @@
void
ns_grp_0(hid_t fid, const char *group_name)
{
- hid_t gid = -1;
- hid_t gcpl = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t gcpl = H5I_INVALID_HID;
herr_t ret;
if (pass) {
gcpl = H5Pcreate(H5P_GROUP_CREATE);
if (gcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_0: H5Pcreate() failed";
}
assert(gcpl > 0);
@@ -61,7 +61,7 @@ ns_grp_0(hid_t fid, const char *group_name)
ret = H5Pset_link_creation_order(gcpl, H5P_CRT_ORDER_TRACKED);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_0: H5Pset_link_creation_order() failed";
}
assert(ret >= 0);
@@ -71,7 +71,7 @@ ns_grp_0(hid_t fid, const char *group_name)
gid = H5Gcreate2(fid, group_name, H5P_DEFAULT, gcpl, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_0: H5Gcreate2() failed";
}
assert(gid > 0);
@@ -81,7 +81,7 @@ ns_grp_0(hid_t fid, const char *group_name)
ret = H5Pclose(gcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_0: H5Pclose(gcpl) failed";
}
assert(ret >= 0);
@@ -91,7 +91,7 @@ ns_grp_0(hid_t fid, const char *group_name)
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_0: H5Gclose(gid) failed";
}
assert(ret >= 0);
@@ -107,7 +107,7 @@ ns_grp_0(hid_t fid, const char *group_name)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -118,8 +118,8 @@ ns_grp_0(hid_t fid, const char *group_name)
void
vrfy_ns_grp_0(hid_t fid, const char *group_name)
{
- hid_t gid = -1;
- hid_t gcpl = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t gcpl = H5I_INVALID_HID;
H5G_info_t grp_info;
unsigned crt_order_flags = 0;
herr_t ret;
@@ -128,7 +128,7 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
gid = H5Gopen2(fid, group_name, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: H5Gopen2() failed";
}
assert(gid > 0);
@@ -138,7 +138,7 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
gcpl = H5Gget_create_plist(gid);
if (gcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: H5Gget_create_plist() failed";
}
assert(gcpl > 0);
@@ -148,11 +148,11 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
ret = H5Pget_link_creation_order(gcpl, &crt_order_flags);
if (gcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: H5Pget_link_creation_order() failed";
}
else if (H5P_CRT_ORDER_TRACKED != crt_order_flags) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: H5P_CRT_ORDER_TRACKED != crt_order_flags";
}
assert(ret >= 0);
@@ -163,7 +163,7 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
ret = H5Pclose(gcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: H5Pclose() failed";
}
assert(ret >= 0);
@@ -174,38 +174,38 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
ret = H5Gget_info(gid, &grp_info);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: H5Gget_info() failed";
}
else if (H5G_STORAGE_TYPE_COMPACT != grp_info.storage_type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: H5G_STORAGE_TYPE_COMPACT != grp_info.storage_type";
}
else if (0 != grp_info.nlinks) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: 0 != grp_info.nlinks";
}
else if (0 != grp_info.max_corder) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: 0 != grp_info.max_corder";
}
- else if (FALSE != grp_info.mounted) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_0: FALSE != grp_info.mounted";
+ else if (false != grp_info.mounted) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_0: false != grp_info.mounted";
}
assert(ret >= 0);
assert(H5G_STORAGE_TYPE_COMPACT == grp_info.storage_type);
assert(0 == grp_info.nlinks);
assert(0 == grp_info.max_corder);
- assert(FALSE == grp_info.mounted);
+ assert(false == grp_info.mounted);
}
if (pass) {
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_0: H5Gclose() failed";
}
assert(ret >= 0);
@@ -221,7 +221,7 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -232,8 +232,8 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
void
ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
{
- hid_t gid = -1;
- hid_t gcpl = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t gcpl = H5I_INVALID_HID;
unsigned max_compact;
unsigned u;
herr_t ret;
@@ -242,7 +242,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
gcpl = H5Pcreate(H5P_GROUP_CREATE);
if (gcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: H5Pcreate(H5P_GROUP_CREATE) failed";
}
assert(gcpl > 0);
@@ -252,7 +252,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pset_link_creation_order(gcpl, H5P_CRT_ORDER_TRACKED);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: H5Pset_link_creation_order() failed";
}
assert(ret >= 0);
@@ -262,7 +262,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
gid = H5Gcreate2(fid, group_name, H5P_DEFAULT, gcpl, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: H5Gcreate2() failed";
}
assert(gid > 0);
@@ -273,15 +273,15 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pget_link_phase_change(gcpl, &max_compact, NULL);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: H5Pget_link_phase_change() failed";
}
else if (nlinks <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: nlinks <= 0";
}
else if (nlinks >= max_compact) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: nlinks >= max_compact";
}
@@ -294,13 +294,13 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
while ((pass) && (u < nlinks)) {
char linkname[16];
- HDsnprintf(linkname, sizeof(linkname), "%u", u);
+ snprintf(linkname, sizeof(linkname), "%u", u);
if (0 == (u % 3)) {
ret = H5Lcreate_soft(group_name, gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: H5Lcreate_soft() failed";
}
assert(ret >= 0);
@@ -309,7 +309,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Lcreate_hard(fid, "/", gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: H5Lcreate_hard() failed";
}
assert(ret >= 0);
@@ -319,7 +319,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Lcreate_external("external.h5", "/ext", gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: H5Lcreate_external() failed";
}
assert(ret >= 0);
@@ -332,7 +332,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pclose(gcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: H5Pclose(gcpl) failed";
}
assert(ret >= 0);
@@ -342,7 +342,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_c: H5Gclose(gid) failed";
}
assert(ret >= 0);
@@ -358,7 +358,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -369,8 +369,8 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
void
vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
{
- hid_t gid = -1;
- hid_t gcpl = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t gcpl = H5I_INVALID_HID;
H5G_info_t grp_info;
unsigned crt_order_flags = 0;
unsigned u;
@@ -380,7 +380,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
gid = H5Gopen2(fid, group_name, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Gopen2() failed";
}
assert(gid > 0);
@@ -390,7 +390,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
gcpl = H5Gget_create_plist(gid);
if (gcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Gget_create_plist(gid) failed";
}
assert(gcpl > 0);
@@ -400,11 +400,11 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pget_link_creation_order(gcpl, &crt_order_flags);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Pget_link_creation_order() failed";
}
else if (H5P_CRT_ORDER_TRACKED != crt_order_flags) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5P_CRT_ORDER_TRACKED != crt_order_flags";
}
assert(ret >= 0);
@@ -415,7 +415,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pclose(gcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Pclose() failed";
}
assert(ret >= 0);
@@ -426,31 +426,31 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Gget_info(gid, &grp_info);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Gget_info() failed";
}
else if (H5G_STORAGE_TYPE_COMPACT != grp_info.storage_type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5G_STORAGE_TYPE_COMPACT != grp_info.storage_type";
}
else if (nlinks != grp_info.nlinks) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: nlinks != grp_info.nlinks";
}
else if (nlinks != grp_info.max_corder) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: nlinks != grp_info.max_corder";
}
- else if (FALSE != grp_info.mounted) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_c: FALSE != grp_info.mounted";
+ else if (false != grp_info.mounted) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_c: false != grp_info.mounted";
}
assert(ret >= 0);
assert(H5G_STORAGE_TYPE_COMPACT == grp_info.storage_type);
assert(nlinks == grp_info.nlinks);
assert(nlinks == grp_info.max_corder);
- assert(FALSE == grp_info.mounted);
+ assert(false == grp_info.mounted);
}
u = 0;
@@ -459,11 +459,11 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
char linkname[16];
htri_t link_exists;
- HDsnprintf(linkname, sizeof(linkname), "%u", u);
+ snprintf(linkname, sizeof(linkname), "%u", u);
link_exists = H5Lexists(gid, linkname, H5P_DEFAULT);
if (link_exists < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Lexists() failed";
}
assert(link_exists >= 0);
@@ -472,23 +472,23 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Lget_info2(gid, linkname, &lnk_info, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Lget_info() failed";
}
- else if (TRUE != lnk_info.corder_valid) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_c: TRUE != lnk_info.corder_valid";
+ else if (true != lnk_info.corder_valid) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_c: true != lnk_info.corder_valid";
}
else if (u != lnk_info.corder) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: u != lnk_info.corder";
}
else if (H5T_CSET_ASCII != lnk_info.cset) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5T_CSET_ASCII != lnk_info.cset";
}
assert(ret >= 0);
- assert(TRUE == lnk_info.corder_valid);
+ assert(true == lnk_info.corder_valid);
assert(u == lnk_info.corder);
assert(H5T_CSET_ASCII == lnk_info.cset);
@@ -496,35 +496,35 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
char *slinkval;
if (H5L_TYPE_SOFT != lnk_info.type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5L_TYPE_SOFT != lnk_info.type";
}
- else if ((HDstrlen(group_name) + 1) != lnk_info.u.val_size) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_c: (HDstrlen(group_name) + 1) != lnk_info.u.val_size";
+ else if ((strlen(group_name) + 1) != lnk_info.u.val_size) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_c: (strlen(group_name) + 1) != lnk_info.u.val_size";
}
assert(H5L_TYPE_SOFT == lnk_info.type);
- assert((HDstrlen(group_name) + 1) == lnk_info.u.val_size);
+ assert((strlen(group_name) + 1) == lnk_info.u.val_size);
slinkval = (char *)malloc(lnk_info.u.val_size);
if (!slinkval) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: malloc of slinkval failed";
}
assert(slinkval);
ret = H5Lget_val(gid, linkname, slinkval, lnk_info.u.val_size, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Lget_val() failed";
}
- else if (0 != HDstrcmp(slinkval, group_name)) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_c: 0 != HDstrcmp(slinkval, group_name)";
+ else if (0 != strcmp(slinkval, group_name)) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_c: 0 != strcmp(slinkval, group_name)";
}
assert(ret >= 0);
- assert(0 == HDstrcmp(slinkval, group_name));
+ assert(0 == strcmp(slinkval, group_name));
free(slinkval);
} /* end if */
@@ -533,7 +533,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
int token_cmp = 0;
if (H5L_TYPE_HARD != lnk_info.type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5L_TYPE_HARD != lnk_info.type";
}
assert(H5L_TYPE_HARD == lnk_info.type);
@@ -542,17 +542,17 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Oget_info3(fid, &root_oinfo, H5O_INFO_BASIC);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Oget_info() failed.";
}
else {
if (H5Otoken_cmp(fid, &root_oinfo.token, &lnk_info.u.token, &token_cmp) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Otoken_cmp() failed.";
}
if (token_cmp) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: root_oinfo.token != lnk_info.u.token";
}
}
@@ -567,7 +567,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
assert(2 == (u % 3));
if (H5L_TYPE_EXTERNAL != lnk_info.type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5L_TYPE_EXTERNAL != lnk_info.type";
}
assert(H5L_TYPE_EXTERNAL == lnk_info.type);
@@ -575,34 +575,34 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
elinkval = malloc(lnk_info.u.val_size);
if (!elinkval) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: malloc of elinkval failed.";
}
assert(elinkval);
ret = H5Lget_val(gid, linkname, elinkval, lnk_info.u.val_size, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Lget_val() failed.";
}
assert(ret >= 0);
ret = H5Lunpack_elink_val(elinkval, lnk_info.u.val_size, NULL, &file, &path);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Lunpack_elink_val() failed.";
}
- else if (0 != HDstrcmp(file, "external.h5")) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_c: 0 != HDstrcmp(file, \"external.h5\")";
+ else if (0 != strcmp(file, "external.h5")) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_c: 0 != strcmp(file, \"external.h5\")";
}
- else if (0 != HDstrcmp(path, "/ext")) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_c: 0 != HDstrcmp(path, \"/ext\")";
+ else if (0 != strcmp(path, "/ext")) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_c: 0 != strcmp(path, \"/ext\")";
}
assert(ret >= 0);
- assert(0 == HDstrcmp(file, "external.h5"));
- assert(0 == HDstrcmp(path, "/ext"));
+ assert(0 == strcmp(file, "external.h5"));
+ assert(0 == strcmp(path, "/ext"));
free(elinkval);
} /* end else */
@@ -614,7 +614,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Gclose() failed.";
}
assert(ret >= 0);
@@ -630,7 +630,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -641,8 +641,8 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
void
ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
{
- hid_t gid = -1;
- hid_t gcpl = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t gcpl = H5I_INVALID_HID;
unsigned max_compact;
unsigned u;
herr_t ret;
@@ -651,7 +651,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
gcpl = H5Pcreate(H5P_GROUP_CREATE);
if (gcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: H5Pcreate() failed.";
}
assert(gcpl > 0);
@@ -661,7 +661,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pset_link_creation_order(gcpl, H5P_CRT_ORDER_TRACKED);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: H5Pset_link_creation_order() failed.";
}
assert(ret >= 0);
@@ -671,7 +671,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
gid = H5Gcreate2(fid, group_name, H5P_DEFAULT, gcpl, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: H5Gcreate2() failed.";
}
assert(gid > 0);
@@ -682,11 +682,11 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pget_link_phase_change(gcpl, &max_compact, NULL);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: H5Pget_link_phase_change() failed.";
}
else if (nlinks <= max_compact) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: nlinks <= max_compact";
}
assert(ret >= 0);
@@ -697,13 +697,13 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
while ((pass) && (u < nlinks)) {
char linkname[16];
- HDsnprintf(linkname, sizeof(linkname), "%u", u);
+ snprintf(linkname, sizeof(linkname), "%u", u);
if (0 == (u % 3)) {
ret = H5Lcreate_soft(group_name, gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: H5Lcreate_soft() failed.";
}
assert(ret >= 0);
@@ -712,7 +712,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Lcreate_hard(fid, "/", gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: H5Lcreate_hard() failed.";
}
assert(ret >= 0);
@@ -723,7 +723,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Lcreate_external("external.h5", "/ext", gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: H5Lcreate_external() failed.";
}
assert(ret >= 0);
@@ -736,7 +736,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pclose(gcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: H5Pclose() failed.";
}
assert(ret >= 0);
@@ -746,7 +746,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ns_grp_d: H5Gclose() failed.";
}
assert(ret >= 0);
@@ -762,7 +762,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -773,8 +773,8 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
void
vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
{
- hid_t gid = -1;
- hid_t gcpl = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t gcpl = H5I_INVALID_HID;
H5G_info_t grp_info;
unsigned crt_order_flags = 0;
unsigned u;
@@ -784,7 +784,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
gid = H5Gopen2(fid, group_name, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Gopen2() failed.";
}
assert(gid > 0);
@@ -794,7 +794,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
gcpl = H5Gget_create_plist(gid);
if (gcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Gget_create_plist() failed.";
}
assert(gcpl > 0);
@@ -804,11 +804,11 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pget_link_creation_order(gcpl, &crt_order_flags);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Pget_link_creation_order() failed.";
}
else if (H5P_CRT_ORDER_TRACKED != crt_order_flags) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5P_CRT_ORDER_TRACKED != crt_order_flags";
}
assert(ret >= 0);
@@ -819,7 +819,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Pclose(gcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Pclose() failed.";
}
assert(ret >= 0);
@@ -830,30 +830,30 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Gget_info(gid, &grp_info);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Gget_info() failed.";
}
else if (H5G_STORAGE_TYPE_DENSE != grp_info.storage_type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5G_STORAGE_TYPE_DENSE != grp_info.storage_type";
}
else if (nlinks != grp_info.nlinks) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: nlinks != grp_info.nlinks";
}
else if (nlinks != grp_info.max_corder) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: nlinks != grp_info.max_corder";
}
- else if (FALSE != grp_info.mounted) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_d: FALSE != grp_info.mounted";
+ else if (false != grp_info.mounted) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_d: false != grp_info.mounted";
}
assert(ret >= 0);
assert(H5G_STORAGE_TYPE_DENSE == grp_info.storage_type);
assert(nlinks == grp_info.nlinks);
assert(nlinks == grp_info.max_corder);
- assert(FALSE == grp_info.mounted);
+ assert(false == grp_info.mounted);
}
u = 0;
@@ -862,11 +862,11 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
char linkname[16];
htri_t link_exists;
- HDsnprintf(linkname, sizeof(linkname), "%u", u);
+ snprintf(linkname, sizeof(linkname), "%u", u);
link_exists = H5Lexists(gid, linkname, H5P_DEFAULT);
if (link_exists < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Lexists() failed.";
}
assert(link_exists >= 0);
@@ -875,23 +875,23 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Lget_info2(gid, linkname, &lnk_info, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Lget_info() failed.";
}
- else if (TRUE != lnk_info.corder_valid) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_d: TRUE != lnk_info.corder_valid";
+ else if (true != lnk_info.corder_valid) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_d: true != lnk_info.corder_valid";
}
else if (u != lnk_info.corder) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: u != lnk_info.corder";
}
else if (H5T_CSET_ASCII != lnk_info.cset) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5T_CSET_ASCII != lnk_info.cset";
}
assert(ret >= 0);
- assert(TRUE == lnk_info.corder_valid);
+ assert(true == lnk_info.corder_valid);
assert(u == lnk_info.corder);
assert(H5T_CSET_ASCII == lnk_info.cset);
@@ -899,35 +899,35 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
char *slinkval;
if (H5L_TYPE_SOFT != lnk_info.type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5L_TYPE_SOFT != lnk_info.type";
}
- else if ((HDstrlen(group_name) + 1) != lnk_info.u.val_size) {
- pass = FALSE;
+ else if ((strlen(group_name) + 1) != lnk_info.u.val_size) {
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5L_TYPE_SOFT != lnk_info.type";
}
assert(H5L_TYPE_SOFT == lnk_info.type);
- assert((HDstrlen(group_name) + 1) == lnk_info.u.val_size);
+ assert((strlen(group_name) + 1) == lnk_info.u.val_size);
slinkval = (char *)malloc(lnk_info.u.val_size);
if (!slinkval) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: malloc of slinkval failed";
}
assert(slinkval);
ret = H5Lget_val(gid, linkname, slinkval, lnk_info.u.val_size, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Lget_val() failed";
}
- else if (0 != HDstrcmp(slinkval, group_name)) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_d: 0 != HDstrcmp(slinkval, group_name)";
+ else if (0 != strcmp(slinkval, group_name)) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_d: 0 != strcmp(slinkval, group_name)";
}
assert(ret >= 0);
- assert(0 == HDstrcmp(slinkval, group_name));
+ assert(0 == strcmp(slinkval, group_name));
free(slinkval);
} /* end if */
@@ -936,7 +936,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
int token_cmp = 0;
if (H5L_TYPE_HARD != lnk_info.type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5L_TYPE_HARD != lnk_info.type";
}
assert(H5L_TYPE_HARD == lnk_info.type);
@@ -944,17 +944,17 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
memset(&root_oinfo, 0, sizeof(root_oinfo));
ret = H5Oget_info3(fid, &root_oinfo, H5O_INFO_BASIC);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Oget_info() failed.";
}
else {
if (H5Otoken_cmp(fid, &root_oinfo.token, &lnk_info.u.token, &token_cmp) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Otoken_cmp() failed.";
}
if (token_cmp) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: root_oinfo.token != lnk_info.u.token";
}
}
@@ -969,7 +969,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
assert(2 == (u % 3));
if (H5L_TYPE_EXTERNAL != lnk_info.type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5L_TYPE_EXTERNAL != lnk_info.type";
}
assert(H5L_TYPE_EXTERNAL == lnk_info.type);
@@ -977,34 +977,34 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
elinkval = malloc(lnk_info.u.val_size);
if (!elinkval) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: malloc of elinkval failed.";
}
assert(elinkval);
ret = H5Lget_val(gid, linkname, elinkval, lnk_info.u.val_size, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Lget_val failed.";
}
assert(ret >= 0);
ret = H5Lunpack_elink_val(elinkval, lnk_info.u.val_size, NULL, &file, &path);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Lunpack_elink_val failed.";
}
- else if (0 != HDstrcmp(file, "external.h5")) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_d: 0 != HDstrcmp(file, \"external.h5\").";
+ else if (0 != strcmp(file, "external.h5")) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_d: 0 != strcmp(file, \"external.h5\").";
}
- else if (0 != HDstrcmp(path, "/ext")) {
- pass = FALSE;
- failure_mssg = "vrfy_ns_grp_d: 0 != HDstrcmp(path, \"/ext\")";
+ else if (0 != strcmp(path, "/ext")) {
+ pass = false;
+ failure_mssg = "vrfy_ns_grp_d: 0 != strcmp(path, \"/ext\")";
}
assert(ret >= 0);
- assert(0 == HDstrcmp(file, "external.h5"));
- assert(0 == HDstrcmp(path, "/ext"));
+ assert(0 == strcmp(file, "external.h5"));
+ assert(0 == strcmp(path, "/ext"));
free(elinkval);
} /* end else */
@@ -1016,7 +1016,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Gclose() failed.";
}
assert(ret >= 0);
@@ -1031,7 +1031,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -1042,8 +1042,8 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
void
os_grp_0(hid_t fid, const char *group_name)
{
- hid_t gid = -1;
- hid_t fapl = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
H5F_libver_t low = H5F_LIBVER_ERROR, high = H5F_LIBVER_ERROR;
herr_t ret;
@@ -1051,7 +1051,7 @@ os_grp_0(hid_t fid, const char *group_name)
if (pass) { /* get the file's file access property list */
fapl = H5Fget_access_plist(fid);
if (fapl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_0: H5Fget_access_plist() failed.";
}
assert(fapl > 0);
@@ -1060,7 +1060,7 @@ os_grp_0(hid_t fid, const char *group_name)
if (pass) { /* get low and high bounds from fapl */
ret = H5Pget_libver_bounds(fapl, &low, &high);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_0: H5Pget_libver_bounds() failed(1).";
}
assert(ret >= 0);
@@ -1070,7 +1070,7 @@ os_grp_0(hid_t fid, const char *group_name)
if (low >= H5F_LIBVER_V18) {
ret = H5Fset_libver_bounds(fid, H5F_LIBVER_EARLIEST, high);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_0: H5Fset_libver_bounds() failed(1).";
}
assert(ret >= 0);
@@ -1080,7 +1080,7 @@ os_grp_0(hid_t fid, const char *group_name)
if (pass) {
gid = H5Gcreate2(fid, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_0: H5Gcreate2() failed.";
}
assert(gid > 0);
@@ -1090,7 +1090,7 @@ os_grp_0(hid_t fid, const char *group_name)
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_0: H5Gclose() failed.";
}
assert(ret >= 0);
@@ -1100,7 +1100,7 @@ os_grp_0(hid_t fid, const char *group_name)
if (low >= H5F_LIBVER_V18) {
ret = H5Fset_libver_bounds(fid, low, high);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_0: H5Fset_libver_bounds() failed(1).";
}
assert(ret >= 0);
@@ -1116,7 +1116,7 @@ os_grp_0(hid_t fid, const char *group_name)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -1127,8 +1127,8 @@ os_grp_0(hid_t fid, const char *group_name)
void
vrfy_os_grp_0(hid_t fid, const char *group_name)
{
- hid_t gid = -1;
- hid_t gcpl = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t gcpl = H5I_INVALID_HID;
H5G_info_t grp_info;
unsigned crt_order_flags = 0;
herr_t ret;
@@ -1137,7 +1137,7 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
gid = H5Gopen2(fid, group_name, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: H5Gopen2() failed.";
}
assert(gid > 0);
@@ -1147,7 +1147,7 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
gcpl = H5Gget_create_plist(gid);
if (gcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: H5Gget_create_plist() failed.";
}
assert(gcpl > 0);
@@ -1158,11 +1158,11 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
ret = H5Pget_link_creation_order(gcpl, &crt_order_flags);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: H5Pget_link_creation_order() failed";
}
else if (0 != crt_order_flags) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: 0 != crt_order_flags";
}
assert(ret >= 0);
@@ -1173,7 +1173,7 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
ret = H5Pclose(gcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: H5Pclose() failed.";
}
assert(ret >= 0);
@@ -1184,37 +1184,37 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
ret = H5Gget_info(gid, &grp_info);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: H5Gget_info() failed.";
}
else if (H5G_STORAGE_TYPE_SYMBOL_TABLE != grp_info.storage_type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: H5G_STORAGE_TYPE_SYMBOL_TABLE != grp_info.storage_type";
}
else if (0 != grp_info.nlinks) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: 0 != grp_info.nlinks";
}
else if (0 != grp_info.max_corder) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: 0 != grp_info.max_corder";
}
- else if (FALSE != grp_info.mounted) {
- pass = FALSE;
- failure_mssg = "vrfy_os_grp_0: FALSE != grp_info.mounted";
+ else if (false != grp_info.mounted) {
+ pass = false;
+ failure_mssg = "vrfy_os_grp_0: false != grp_info.mounted";
}
assert(ret >= 0);
assert(H5G_STORAGE_TYPE_SYMBOL_TABLE == grp_info.storage_type);
assert(0 == grp_info.nlinks);
assert(0 == grp_info.max_corder);
- assert(FALSE == grp_info.mounted);
+ assert(false == grp_info.mounted);
}
if (pass) {
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_0: H5Gclose() failed.";
}
assert(ret >= 0);
@@ -1230,7 +1230,7 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -1241,16 +1241,16 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
void
os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
{
- hid_t gid = -1;
+ hid_t gid = H5I_INVALID_HID;
unsigned u;
- hid_t fapl = -1;
+ hid_t fapl = H5I_INVALID_HID;
H5F_libver_t low = H5F_LIBVER_ERROR, high = H5F_LIBVER_ERROR;
herr_t ret;
if (pass) { /* get the file's file access property list */
fapl = H5Fget_access_plist(fid);
if (fapl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_n: H5Fget_access_plist() failed.";
}
assert(fapl > 0);
@@ -1259,7 +1259,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
if (pass) { /* get low and high bounds from fapl */
ret = H5Pget_libver_bounds(fapl, &low, &high);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_0: H5Pget_libver_bounds() failed(1).";
}
assert(ret >= 0);
@@ -1269,7 +1269,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
if (low >= H5F_LIBVER_V18) {
ret = H5Fset_libver_bounds(fid, H5F_LIBVER_EARLIEST, high);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_0: H5Fset_libver_bounds() failed(1).";
}
assert(ret >= 0);
@@ -1279,7 +1279,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
if (pass) {
gid = H5Gcreate2(fid, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_n: H5Gcreate2() failed.";
}
assert(gid > 0);
@@ -1291,12 +1291,12 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
while ((pass) && (u < nlinks)) {
char linkname[32];
- HDsnprintf(linkname, sizeof(linkname), "ln%d_%u", proc_num, u);
+ snprintf(linkname, sizeof(linkname), "ln%d_%u", proc_num, u);
if (0 == (u % 2)) {
ret = H5Lcreate_soft(group_name, gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_n: H5Lcreate_soft() failed.";
}
assert(ret >= 0);
@@ -1306,7 +1306,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
ret = H5Lcreate_hard(fid, "/", gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_n: H5Lcreate_hard() failed.";
}
assert(ret >= 0);
@@ -1319,7 +1319,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_n: H5Gclose() failed.";
}
assert(ret >= 0);
@@ -1329,7 +1329,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
if (low >= H5F_LIBVER_V18) {
ret = H5Fset_libver_bounds(fid, low, high);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "os_grp_n: H5Fset_libver_bounds() failed(2).";
}
assert(ret >= 0);
@@ -1346,7 +1346,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -1356,8 +1356,8 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
void
vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
{
- hid_t gid = -1;
- hid_t gcpl = -1;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t gcpl = H5I_INVALID_HID;
H5G_info_t grp_info;
unsigned crt_order_flags = 0;
unsigned u;
@@ -1367,7 +1367,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
gid = H5Gopen2(fid, group_name, H5P_DEFAULT);
if (gid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Gopen2() failed";
}
assert(gid > 0);
@@ -1377,7 +1377,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
gcpl = H5Gget_create_plist(gid);
if (gcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Gget_create_plist() failed";
}
assert(gcpl > 0);
@@ -1387,11 +1387,11 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
ret = H5Pget_link_creation_order(gcpl, &crt_order_flags);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Pget_link_creation_order";
}
else if (0 != crt_order_flags) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: 0 != crt_order_flags";
}
assert(ret >= 0);
@@ -1402,7 +1402,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
ret = H5Pclose(gcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Pclose() failed";
}
assert(ret >= 0);
@@ -1414,30 +1414,30 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
ret = H5Gget_info(gid, &grp_info);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Gget_info() failed";
}
else if (H5G_STORAGE_TYPE_SYMBOL_TABLE != grp_info.storage_type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5G_STORAGE_TYPE_SYMBOL_TABLE != grp_info.storage_type";
}
else if (nlinks != grp_info.nlinks) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: nlinks != grp_info.nlinks";
}
else if (0 != grp_info.max_corder) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: 0 != grp_info.max_corder";
}
- else if (FALSE != grp_info.mounted) {
- pass = FALSE;
- failure_mssg = "vrfy_os_grp_n: FALSE != grp_info.mounted";
+ else if (false != grp_info.mounted) {
+ pass = false;
+ failure_mssg = "vrfy_os_grp_n: false != grp_info.mounted";
}
assert(ret >= 0);
assert(H5G_STORAGE_TYPE_SYMBOL_TABLE == grp_info.storage_type);
assert(nlinks == grp_info.nlinks);
assert(0 == grp_info.max_corder);
- assert(FALSE == grp_info.mounted);
+ assert(false == grp_info.mounted);
}
u = 0;
@@ -1446,11 +1446,11 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
char linkname[32];
htri_t link_exists;
- HDsnprintf(linkname, sizeof(linkname), "ln%d_%u", proc_num, u);
+ snprintf(linkname, sizeof(linkname), "ln%d_%u", proc_num, u);
link_exists = H5Lexists(gid, linkname, H5P_DEFAULT);
if (link_exists < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Lexists() failed";
}
assert(link_exists >= 0);
@@ -1459,39 +1459,39 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
ret = H5Lget_info2(gid, linkname, &lnk_info, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Lget_info() failed";
}
- else if (FALSE != lnk_info.corder_valid) {
- pass = FALSE;
- failure_mssg = "vrfy_os_grp_n: FALSE != lnk_info.corder_valid";
+ else if (false != lnk_info.corder_valid) {
+ pass = false;
+ failure_mssg = "vrfy_os_grp_n: false != lnk_info.corder_valid";
}
else if (H5T_CSET_ASCII != lnk_info.cset) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5T_CSET_ASCII != lnk_info.cset";
}
assert(ret >= 0);
- assert(FALSE == lnk_info.corder_valid);
+ assert(false == lnk_info.corder_valid);
assert(H5T_CSET_ASCII == lnk_info.cset);
if (0 == (u % 2)) {
char *slinkval;
if (H5L_TYPE_SOFT != lnk_info.type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5L_TYPE_SOFT != lnk_info.type";
}
- else if ((HDstrlen(group_name) + 1) != lnk_info.u.val_size) {
- pass = FALSE;
- failure_mssg = "vrfy_os_grp_n: (HDstrlen(group_name) + 1) != lnk_info.u.val_size";
+ else if ((strlen(group_name) + 1) != lnk_info.u.val_size) {
+ pass = false;
+ failure_mssg = "vrfy_os_grp_n: (strlen(group_name) + 1) != lnk_info.u.val_size";
}
assert(H5L_TYPE_SOFT == lnk_info.type);
- assert((HDstrlen(group_name) + 1) == lnk_info.u.val_size);
+ assert((strlen(group_name) + 1) == lnk_info.u.val_size);
slinkval = (char *)malloc(lnk_info.u.val_size);
if (!slinkval) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: malloc of slinkval failed";
}
assert(slinkval);
@@ -1499,15 +1499,15 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
ret = H5Lget_val(gid, linkname, slinkval, lnk_info.u.val_size, H5P_DEFAULT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Lget_val() failed";
}
- else if (0 != HDstrcmp(slinkval, group_name)) {
- pass = FALSE;
- failure_mssg = "vrfy_os_grp_n: 0 != HDstrcmp(slinkval, group_name)";
+ else if (0 != strcmp(slinkval, group_name)) {
+ pass = false;
+ failure_mssg = "vrfy_os_grp_n: 0 != strcmp(slinkval, group_name)";
}
assert(ret >= 0);
- assert(0 == HDstrcmp(slinkval, group_name));
+ assert(0 == strcmp(slinkval, group_name));
free(slinkval);
} /* end if */
@@ -1518,7 +1518,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
assert(1 == (u % 2));
if (H5L_TYPE_HARD != lnk_info.type) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5L_TYPE_HARD != lnk_info.type";
}
assert(H5L_TYPE_HARD == lnk_info.type);
@@ -1527,17 +1527,17 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
ret = H5Oget_info3(fid, &root_oinfo, H5O_INFO_BASIC);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Oget_info() failed.";
}
else {
if (H5Otoken_cmp(fid, &root_oinfo.token, &lnk_info.u.token, &token_cmp) < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Otoken_cmp() failed.";
}
if (token_cmp) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: root_oinfo.token != lnk_info.u.token";
}
}
@@ -1552,7 +1552,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
ret = H5Gclose(gid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_os_grp_n: H5Gclose() failed.";
}
assert(ret >= 0);
@@ -1569,7 +1569,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -1577,12 +1577,12 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
*-------------------------------------------------------------------------
*/
void
-ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
+ds_ctg_i(hid_t fid, const char *dset_name, bool write_data)
{
int *wdata = NULL;
unsigned u;
- hid_t dsid = -1;
- hid_t sid = -1;
+ hid_t dsid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
hsize_t dims[1] = {DSET_DIMS};
herr_t ret;
@@ -1590,7 +1590,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
sid = H5Screate_simple(1, dims, NULL);
if (sid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_i: H5Screate_simple() failed";
}
assert(sid > 0);
@@ -1600,7 +1600,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
dsid = H5Dcreate2(fid, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (dsid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_i: H5Dcreate2() failed";
}
assert(dsid > 0);
@@ -1610,7 +1610,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sclose(sid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_i: H5Sclose() failed";
}
assert(ret >= 0);
@@ -1620,7 +1620,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
wdata = (int *)malloc(sizeof(int) * DSET_DIMS);
if (!wdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_i: malloc of wdata failed.";
}
assert(wdata);
@@ -1633,7 +1633,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_i: H5Dwrite() failed.";
}
assert(ret >= 0);
@@ -1645,7 +1645,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dclose(dsid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_i: H5Dclose() failed";
}
assert(ret >= 0);
@@ -1661,7 +1661,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -1669,14 +1669,14 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
*-------------------------------------------------------------------------
*/
void
-vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
+vrfy_ds_ctg_i(hid_t fid, const char *dset_name, bool write_data)
{
int *rdata = NULL;
unsigned u;
- hid_t dsid = -1;
- hid_t sid = -1;
- hid_t tid = -1;
- hid_t dcpl = -1;
+ hid_t dsid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
H5D_space_status_t allocation;
H5D_layout_t layout;
int ndims;
@@ -1688,7 +1688,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
dsid = H5Dopen2(fid, dset_name, H5P_DEFAULT);
if (dsid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Dopen2() failed.";
}
assert(dsid > 0);
@@ -1698,7 +1698,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
sid = H5Dget_space(dsid);
if (sid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Dget_space() failed.";
}
assert(sid > 0);
@@ -1708,7 +1708,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ndims = H5Sget_simple_extent_ndims(sid);
if (1 != ndims) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: 1 != ndims";
}
assert(1 == ndims);
@@ -1718,15 +1718,15 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sget_simple_extent_dims(sid, dims, max_dims);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Sget_simple_extent_dims() failed";
}
else if (DSET_DIMS != dims[0]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: DSET_DIMS != dims[0]";
}
else if (DSET_DIMS != max_dims[0]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: DSET_DIMS != max_dims[0]";
}
assert(ret >= 0);
@@ -1738,7 +1738,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sclose(sid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Sclose() failed.";
}
assert(ret >= 0);
@@ -1748,7 +1748,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
tid = H5Dget_type(dsid);
if (tid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Dget_type() failed.";
}
assert(tid > 0);
@@ -1758,7 +1758,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
type_equal = H5Tequal(tid, H5T_NATIVE_INT);
if (1 != type_equal) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: type not H5T_NATIVE_INT";
}
assert(1 == type_equal);
@@ -1768,7 +1768,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Tclose(tid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Tclose() failed.";
}
assert(ret >= 0);
@@ -1778,15 +1778,15 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dget_space_status(dsid, &allocation);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Dget_space_status() failed.";
}
else if (write_data && (allocation != H5D_SPACE_STATUS_ALLOCATED)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: write_data && allocation != H5D_SPACE_STATUS_ALLOCATED";
}
else if (!write_data && (allocation != H5D_SPACE_STATUS_NOT_ALLOCATED)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: !write_data && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED";
}
assert(ret >= 0);
@@ -1798,7 +1798,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
dcpl = H5Dget_create_plist(dsid);
if (dcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Dget_create_plist() failed.";
}
assert(dcpl > 0);
@@ -1808,7 +1808,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
layout = H5Pget_layout(dcpl);
if (H5D_CONTIGUOUS != layout) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5D_CONTIGUOUS != layout";
}
assert(H5D_CONTIGUOUS == layout);
@@ -1818,7 +1818,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Pclose(dcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Pclose() failed.";
}
assert(ret >= 0);
@@ -1828,7 +1828,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
rdata = (int *)malloc(sizeof(int) * DSET_DIMS);
if (!rdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: malloc of rdata failed.";
}
assert(rdata);
@@ -1837,7 +1837,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
if ((pass) && (write_data)) {
ret = H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Dread() failed.";
}
assert(ret >= 0);
@@ -1846,7 +1846,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
if ((pass) && (write_data)) {
for (u = 0; u < DSET_DIMS; u++) {
if ((int)u != rdata[u]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: u != rdata[u].";
break;
}
@@ -1860,7 +1860,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dclose(dsid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_i: H5Dclose() failed";
}
assert(ret >= 0);
@@ -1877,7 +1877,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -1885,13 +1885,13 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
*-------------------------------------------------------------------------
*/
void
-ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
+ds_chk_i(hid_t fid, const char *dset_name, bool write_data)
{
int *wdata = NULL;
unsigned u;
- hid_t dsid = -1;
- hid_t dcpl = -1;
- hid_t sid = -1;
+ hid_t dsid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
hsize_t dims[1] = {DSET_DIMS};
hsize_t chunk_dims[1] = {DSET_CHUNK_DIMS};
herr_t ret;
@@ -1900,7 +1900,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
sid = H5Screate_simple(1, dims, NULL);
if (sid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_chk_i: H5Screate_simple() failed.";
}
assert(sid > 0);
@@ -1910,7 +1910,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
dcpl = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_chk_i: H5Pcreate() failed.";
}
assert(dcpl > 0);
@@ -1920,7 +1920,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Pset_chunk(dcpl, 1, chunk_dims);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_chk_i: H5Pset_chunk() failed.";
}
assert(ret >= 0);
@@ -1930,7 +1930,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
dsid = H5Dcreate2(fid, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
if (dsid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_chk_i: H5Dcreate2() failed";
}
assert(dsid > 0);
@@ -1940,7 +1940,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Pclose(dcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_chk_i: H5Pclose() failed.";
}
assert(ret >= 0);
@@ -1950,7 +1950,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sclose(sid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_chk_i: H5Sclose() failed.";
}
assert(ret >= 0);
@@ -1960,7 +1960,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
wdata = (int *)malloc(sizeof(int) * DSET_DIMS);
if (!wdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_chk_i: malloc of wdata failed.";
}
assert(wdata);
@@ -1972,7 +1972,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_chk_i: H5Dwrite() failed.";
}
assert(ret >= 0);
@@ -1983,7 +1983,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dclose(dsid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_chk_i: H5Dclose() failed.";
}
assert(ret >= 0);
@@ -1999,7 +1999,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -2007,14 +2007,14 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
*-------------------------------------------------------------------------
*/
void
-vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
+vrfy_ds_chk_i(hid_t fid, const char *dset_name, bool write_data)
{
int *rdata = NULL;
unsigned u;
- hid_t dsid = -1;
- hid_t sid = -1;
- hid_t tid = -1;
- hid_t dcpl = -1;
+ hid_t dsid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
H5D_space_status_t allocation;
H5D_layout_t layout;
int ndims;
@@ -2026,7 +2026,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
dsid = H5Dopen2(fid, dset_name, H5P_DEFAULT);
if (dsid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Dopen2() failed.";
}
assert(dsid > 0);
@@ -2036,7 +2036,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
sid = H5Dget_space(dsid);
if (sid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Dget_space() failed.";
}
assert(sid > 0);
@@ -2046,7 +2046,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ndims = H5Sget_simple_extent_ndims(sid);
if (1 != ndims) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: 1 != ndims";
}
assert(1 == ndims);
@@ -2056,15 +2056,15 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sget_simple_extent_dims(sid, dims, max_dims);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Sget_simple_extent_dims() failed";
}
else if (DSET_DIMS != dims[0]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: DSET_DIMS != dims[0]";
}
else if (DSET_DIMS != max_dims[0]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: DSET_DIMS != max_dims[0]";
}
assert(ret >= 0);
@@ -2076,7 +2076,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sclose(sid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Sclose() failed.";
}
assert(ret >= 0);
@@ -2086,7 +2086,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
tid = H5Dget_type(dsid);
if (tid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Dget_type() failed.";
}
assert(tid > 0);
@@ -2096,7 +2096,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
type_equal = H5Tequal(tid, H5T_NATIVE_INT);
if (1 != type_equal) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: tid != H5T_NATIVE_INT";
}
assert(1 == type_equal);
@@ -2106,7 +2106,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Tclose(tid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Tclose() failed.";
}
assert(ret >= 0);
@@ -2116,15 +2116,15 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dget_space_status(dsid, &allocation);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Dget_space_status() failed.";
}
else if (write_data && (allocation != H5D_SPACE_STATUS_ALLOCATED)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: write_data && allocation != H5D_SPACE_STATUS_ALLOCATED";
}
else if (!write_data && (allocation != H5D_SPACE_STATUS_NOT_ALLOCATED)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: !write_data && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED";
}
assert(ret >= 0);
@@ -2136,7 +2136,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
dcpl = H5Dget_create_plist(dsid);
if (dcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Dget_create_plist() failed.";
}
assert(dcpl > 0);
@@ -2146,7 +2146,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
layout = H5Pget_layout(dcpl);
if (H5D_CHUNKED != layout) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5D_CHUNKED != layout";
}
assert(H5D_CHUNKED == layout);
@@ -2156,11 +2156,11 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Pget_chunk(dcpl, 1, chunk_dims);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Pget_chunk";
}
else if (DSET_CHUNK_DIMS != chunk_dims[0]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: ";
}
assert(ret >= 0);
@@ -2171,7 +2171,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Pclose(dcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Pclose() failed.";
}
assert(ret >= 0);
@@ -2181,7 +2181,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
rdata = (int *)malloc(sizeof(int) * DSET_DIMS);
if (!rdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: malloc of rdata failed.";
}
assert(rdata);
@@ -2190,7 +2190,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
if ((pass) && (write_data)) {
ret = H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Dread() failed.";
}
assert(ret >= 0);
@@ -2199,7 +2199,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
if ((pass) && (write_data)) {
for (u = 0; u < DSET_DIMS; u++) {
if ((int)u != rdata[u]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: u != rdata[u]";
break;
}
@@ -2213,7 +2213,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dclose(dsid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_chk_i: H5Dclose() failed.";
}
assert(ret >= 0);
@@ -2230,7 +2230,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -2238,13 +2238,13 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
*-------------------------------------------------------------------------
*/
void
-ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
+ds_cpt_i(hid_t fid, const char *dset_name, bool write_data)
{
int *wdata = NULL;
unsigned u;
- hid_t dsid = -1;
- hid_t dcpl = -1;
- hid_t sid = -1;
+ hid_t dsid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
hsize_t dims[1] = {DSET_COMPACT_DIMS};
herr_t ret;
@@ -2252,7 +2252,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
sid = H5Screate_simple(1, dims, NULL);
if (sid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_cpt_i: H5Screate_simple() failed.";
}
assert(sid > 0);
@@ -2262,7 +2262,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
dcpl = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_cpt_i: H5Pcreate() failed.";
}
assert(dcpl > 0);
@@ -2272,7 +2272,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Pset_layout(dcpl, H5D_COMPACT);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_cpt_i: H5Pset_layout() failed.";
}
assert(ret >= 0);
@@ -2282,7 +2282,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
dsid = H5Dcreate2(fid, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
if (dsid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_cpt_i: H5Dcreate2() failed.";
}
assert(dsid > 0);
@@ -2292,7 +2292,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Pclose(dcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_cpt_i: H5Pclose() failed.";
}
assert(ret >= 0);
@@ -2302,7 +2302,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sclose(sid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_cpt_i: H5Sclose() failed.";
}
assert(ret >= 0);
@@ -2312,7 +2312,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
wdata = (int *)malloc(sizeof(int) * DSET_COMPACT_DIMS);
if (!wdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_cpt_i: malloc of wdata failed.";
}
assert(wdata);
@@ -2325,7 +2325,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_cpt_i: H5Dwrite() failed.";
}
assert(ret >= 0);
@@ -2337,7 +2337,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dclose(dsid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_cpt_i: H5Dclose() failed.";
}
assert(ret >= 0);
@@ -2353,7 +2353,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -2361,14 +2361,14 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
*-------------------------------------------------------------------------
*/
void
-vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
+vrfy_ds_cpt_i(hid_t fid, const char *dset_name, bool write_data)
{
int *rdata = NULL;
unsigned u;
- hid_t dsid = -1;
- hid_t sid = -1;
- hid_t tid = -1;
- hid_t dcpl = -1;
+ hid_t dsid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
H5D_space_status_t allocation;
H5D_layout_t layout;
int ndims;
@@ -2380,7 +2380,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
dsid = H5Dopen2(fid, dset_name, H5P_DEFAULT);
if (dsid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Dopen2() failed.";
}
assert(dsid > 0);
@@ -2390,7 +2390,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
sid = H5Dget_space(dsid);
if (sid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Dget_space() failed.";
}
assert(sid > 0);
@@ -2400,7 +2400,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ndims = H5Sget_simple_extent_ndims(sid);
if (1 != ndims) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: 1 != ndims";
}
assert(1 == ndims);
@@ -2410,15 +2410,15 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sget_simple_extent_dims(sid, dims, max_dims);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Sget_simple_extent_dims() failed";
}
else if (DSET_COMPACT_DIMS != dims[0]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: DSET_COMPACT_DIMS != dims[0]";
}
else if (DSET_COMPACT_DIMS != max_dims[0]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: DSET_COMPACT_DIMS != max_dims[0]";
}
assert(ret >= 0);
@@ -2430,7 +2430,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sclose(sid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Sclose() failed.";
}
assert(ret >= 0);
@@ -2440,7 +2440,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
tid = H5Dget_type(dsid);
if (tid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Dget_type() failed.";
}
assert(tid > 0);
@@ -2450,7 +2450,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
type_equal = H5Tequal(tid, H5T_NATIVE_INT);
if (1 != type_equal) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: type != H5T_NATIVE_INT";
}
assert(1 == type_equal);
@@ -2460,7 +2460,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Tclose(tid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Tclose() failed.";
}
assert(ret >= 0);
@@ -2470,11 +2470,11 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dget_space_status(dsid, &allocation);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Dget_space_status() failed.";
}
else if (H5D_SPACE_STATUS_ALLOCATED != allocation) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5D_SPACE_STATUS_ALLOCATED != allocation";
}
assert(ret >= 0);
@@ -2485,7 +2485,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
dcpl = H5Dget_create_plist(dsid);
if (dcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Dget_create_plist() failed.";
}
assert(dcpl > 0);
@@ -2495,7 +2495,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
layout = H5Pget_layout(dcpl);
if (H5D_COMPACT != layout) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5D_COMPACT != layout";
}
assert(H5D_COMPACT == layout);
@@ -2505,7 +2505,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Pclose(dcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Pclose() failed.";
}
assert(ret >= 0);
@@ -2515,7 +2515,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
rdata = (int *)malloc(sizeof(int) * DSET_COMPACT_DIMS);
if (!rdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: malloc of rdata failed.";
}
assert(rdata);
@@ -2524,7 +2524,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
if ((pass) && (write_data)) {
ret = H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Dread() failed.";
}
assert(ret >= 0);
@@ -2533,7 +2533,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
if ((pass) && (write_data)) {
for (u = 0; u < DSET_COMPACT_DIMS; u++) {
if ((int)u != rdata[u]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: (int)u != rdata[u]";
break;
}
@@ -2547,7 +2547,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dclose(dsid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_cpt_i: H5Dclose() failed.";
}
assert(ret >= 0);
@@ -2564,7 +2564,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -2572,11 +2572,11 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
*-------------------------------------------------------------------------
*/
void
-ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
+ds_ctg_v(hid_t fid, const char *dset_name, bool write_data)
{
- hid_t dsid = -1;
- hid_t sid = -1;
- hid_t tid = -1;
+ hid_t dsid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
hsize_t dims[1] = {DSET_SMALL_DIMS};
herr_t ret;
hvl_t *wdata = NULL;
@@ -2586,7 +2586,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
sid = H5Screate_simple(1, dims, NULL);
if (sid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: H5Screate_simple";
}
assert(sid > 0);
@@ -2596,7 +2596,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
tid = H5Tvlen_create(H5T_NATIVE_INT);
if (tid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: H5Tvlen_create() failed.";
}
assert(tid > 0);
@@ -2606,7 +2606,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
dsid = H5Dcreate2(fid, dset_name, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (dsid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: H5Dcreate2() failed.";
}
assert(dsid > 0);
@@ -2616,7 +2616,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
wdata = (hvl_t *)malloc(sizeof(hvl_t) * DSET_SMALL_DIMS);
if (!wdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: malloc of wdata failed.";
}
assert(wdata);
@@ -2632,7 +2632,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
tdata = (int *)malloc(sizeof(int) * len);
if (!tdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: malloc of tdata failed.";
break;
}
@@ -2650,7 +2650,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dwrite(dsid, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: H5Dwrite() failed.";
}
assert(ret >= 0);
@@ -2660,7 +2660,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Treclaim(tid, sid, H5P_DEFAULT, wdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: H5Treclaim() failed.";
}
assert(ret >= 0);
@@ -2672,7 +2672,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sclose(sid);
if (sid < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: H5Sclose() failed.";
}
assert(ret >= 0);
@@ -2682,7 +2682,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Tclose(tid);
if (tid < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: H5Tclose() failed.";
}
assert(ret >= 0);
@@ -2692,7 +2692,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dclose(dsid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "ds_ctg_v: H5Dclose() failed.";
}
assert(ret >= 0);
@@ -2708,7 +2708,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* Return: void
@@ -2716,13 +2716,13 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
*-------------------------------------------------------------------------
*/
void
-vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
+vrfy_ds_ctg_v(hid_t fid, const char *dset_name, bool write_data)
{
- hid_t dsid = -1;
- hid_t sid = -1;
- hid_t tid = -1;
- hid_t tmp_tid = -1;
- hid_t dcpl = -1;
+ hid_t dsid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t tmp_tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
H5D_space_status_t allocation;
H5D_layout_t layout;
int ndims;
@@ -2736,7 +2736,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
dsid = H5Dopen2(fid, dset_name, H5P_DEFAULT);
if (dsid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Dopen2() failed.";
}
assert(dsid > 0);
@@ -2746,7 +2746,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
sid = H5Dget_space(dsid);
if (sid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Dget_space() failed";
}
assert(sid > 0);
@@ -2756,7 +2756,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ndims = H5Sget_simple_extent_ndims(sid);
if (1 != ndims) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: 1 != ndims";
}
assert(1 == ndims);
@@ -2766,15 +2766,15 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sget_simple_extent_dims(sid, dims, max_dims);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Sget_simple_extent_dims() failed.";
}
else if (DSET_SMALL_DIMS != dims[0]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: DSET_SMALL_DIMS != dims[0]";
}
else if (DSET_SMALL_DIMS != max_dims[0]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: DSET_SMALL_DIMS != max_dims[0]";
}
assert(ret >= 0);
@@ -2786,7 +2786,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
tid = H5Dget_type(dsid);
if (tid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Dget_type() failed.";
}
assert(tid > 0);
@@ -2796,7 +2796,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
tmp_tid = H5Tvlen_create(H5T_NATIVE_INT);
if (tmp_tid <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Tvlen_create() failed.";
}
assert(tmp_tid > 0);
@@ -2806,7 +2806,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
type_equal = H5Tequal(tid, tmp_tid);
if (1 != type_equal) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: type != vlen H5T_NATIVE_INT";
}
assert(1 == type_equal);
@@ -2816,7 +2816,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Tclose(tmp_tid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Tclose() failed.";
}
assert(ret >= 0);
@@ -2826,15 +2826,15 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dget_space_status(dsid, &allocation);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Dget_space_status() failed";
}
else if (write_data && (allocation != H5D_SPACE_STATUS_ALLOCATED)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: write_data && allocation != H5D_SPACE_STATUS_ALLOCATED";
}
else if (!write_data && (allocation != H5D_SPACE_STATUS_NOT_ALLOCATED)) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: !write_data && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED";
}
assert(ret >= 0);
@@ -2846,7 +2846,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
dcpl = H5Dget_create_plist(dsid);
if (dcpl <= 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Dget_create_plist() failed.";
}
assert(dcpl > 0);
@@ -2856,7 +2856,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
layout = H5Pget_layout(dcpl);
if (H5D_CONTIGUOUS != layout) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5D_CONTIGUOUS != layout";
}
assert(H5D_CONTIGUOUS == layout);
@@ -2866,7 +2866,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Pclose(dcpl);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Pclose() failed.";
}
assert(ret >= 0);
@@ -2876,7 +2876,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
rdata = (hvl_t *)malloc(sizeof(hvl_t) * DSET_SMALL_DIMS);
if (!rdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: malloc of rdata failed.";
}
assert(rdata);
@@ -2886,7 +2886,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dread(dsid, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Dread() failed.";
}
assert(ret >= 0);
@@ -2902,12 +2902,12 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
int *tdata = (int *)rdata[u].p;
if (!tdata) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: !tdata";
break;
}
else if ((int)(u + v) != tdata[v]) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: (int)(u + v) != tdata[v]";
break;
}
@@ -2921,7 +2921,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Treclaim(tid, sid, H5P_DEFAULT, rdata);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Treclaim() failed.";
}
assert(ret >= 0);
@@ -2933,7 +2933,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Sclose(sid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Sclose() failed.";
}
assert(ret >= 0);
@@ -2943,7 +2943,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Tclose(tid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Tclose() failed.";
}
assert(ret >= 0);
@@ -2953,7 +2953,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
ret = H5Dclose(dsid);
if (ret < 0) {
- pass = FALSE;
+ pass = false;
failure_mssg = "vrfy_ds_ctg_v: H5Dclose() failed.";
}
assert(ret >= 0);
@@ -2971,7 +2971,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* This function was initially created to assist in testing
@@ -2996,27 +2996,27 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
/* Add & verify an empty "new style" group */
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/A", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/A", base_path);
+ assert(strlen(full_path) < 1024);
ns_grp_0(fid, full_path);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/A", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/A", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ns_grp_0(fid, full_path);
}
/* Add & verify a compact "new style" group (3 link messages) */
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/B", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/B", base_path);
+ assert(strlen(full_path) < 1024);
ns_grp_c(fid, full_path, 3);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/B", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/B", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ns_grp_c(fid, full_path, 3);
}
@@ -3024,27 +3024,27 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
* fractal heap)
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/C", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/C", base_path);
+ assert(strlen(full_path) < 1024);
ns_grp_d(fid, full_path, 300);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/C", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/C", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ns_grp_d(fid, full_path, 300);
}
/* Add & verify an empty "old style" group to file */
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/D", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/D", base_path);
+ assert(strlen(full_path) < 1024);
os_grp_0(fid, full_path);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/D", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/D", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_os_grp_0(fid, full_path);
}
@@ -3052,14 +3052,14 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
* local heap) to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/E", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/E", base_path);
+ assert(strlen(full_path) < 1024);
os_grp_n(fid, full_path, proc_num, 300);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/E", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/E", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_os_grp_n(fid, full_path, proc_num, 300);
}
@@ -3067,120 +3067,120 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
* to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/F", base_path);
- assert(HDstrlen(full_path) < 1024);
- ds_ctg_i(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/F", base_path);
+ assert(strlen(full_path) < 1024);
+ ds_ctg_i(fid, full_path, false);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/F", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_ctg_i(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/F", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_ctg_i(fid, full_path, false);
}
/* Add & verify a contiguous dataset w/integer datatype (with data)
* to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/G", base_path);
- assert(HDstrlen(full_path) < 1024);
- ds_ctg_i(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/G", base_path);
+ assert(strlen(full_path) < 1024);
+ ds_ctg_i(fid, full_path, true);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/G", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_ctg_i(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/G", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_ctg_i(fid, full_path, true);
}
/* Add & verify a chunked dataset w/integer datatype (but no data)
* to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/H", base_path);
- assert(HDstrlen(full_path) < 1024);
- ds_chk_i(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/H", base_path);
+ assert(strlen(full_path) < 1024);
+ ds_chk_i(fid, full_path, false);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/H", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_chk_i(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/H", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_chk_i(fid, full_path, false);
}
/* Add & verify a chunked dataset w/integer datatype (and data)
* to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/I", base_path);
- assert(HDstrlen(full_path) < 1024);
- ds_chk_i(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/I", base_path);
+ assert(strlen(full_path) < 1024);
+ ds_chk_i(fid, full_path, true);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/I", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_chk_i(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/I", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_chk_i(fid, full_path, true);
}
/* Add & verify a compact dataset w/integer datatype (but no data)
* to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/J", base_path);
- assert(HDstrlen(full_path) < 1024);
- ds_cpt_i(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/J", base_path);
+ assert(strlen(full_path) < 1024);
+ ds_cpt_i(fid, full_path, false);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/J", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_cpt_i(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/J", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_cpt_i(fid, full_path, false);
}
/* Add & verify a compact dataset w/integer datatype (and data)
* to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/K", base_path);
- assert(HDstrlen(full_path) < 1024);
- ds_cpt_i(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/K", base_path);
+ assert(strlen(full_path) < 1024);
+ ds_cpt_i(fid, full_path, true);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/K", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_cpt_i(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/K", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_cpt_i(fid, full_path, true);
}
/* Add & verify a contiguous dataset w/variable-length datatype
* (but no data) to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/L", base_path);
- assert(HDstrlen(full_path) < 1024);
- ds_ctg_v(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/L", base_path);
+ assert(strlen(full_path) < 1024);
+ ds_ctg_v(fid, full_path, false);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/L", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_ctg_v(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/L", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_ctg_v(fid, full_path, false);
}
/* Add & verify a contiguous dataset w/variable-length datatype
* (and data) to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/M", base_path);
- assert(HDstrlen(full_path) < 1024);
- ds_ctg_v(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/M", base_path);
+ assert(strlen(full_path) < 1024);
+ ds_ctg_v(fid, full_path, true);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/M", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_ctg_v(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/M", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_ctg_v(fid, full_path, true);
}
} /* create_zoo() */
@@ -3193,7 +3193,7 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
*
* If pass is false on entry, do nothing.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to false, and set
* failure_mssg to point to an appropriate error message.
*
* This function was initially created to assist in testing
@@ -3218,15 +3218,15 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
/* validate an empty "new style" group */
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/A", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/A", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ns_grp_0(fid, full_path);
}
/* validate a compact "new style" group (3 link messages) */
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/B", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/B", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ns_grp_c(fid, full_path, 3);
}
@@ -3234,15 +3234,15 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
* fractal heap)
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/C", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/C", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ns_grp_d(fid, full_path, 300);
}
/* validate an empty "old style" group in file */
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/D", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/D", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_os_grp_0(fid, full_path);
}
@@ -3250,8 +3250,8 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
* local heap)
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/E", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/E", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_os_grp_n(fid, full_path, proc_num, 300);
}
@@ -3259,72 +3259,72 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
* in file.
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/F", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_ctg_i(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/F", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_ctg_i(fid, full_path, false);
}
/* validate a contiguous dataset w/integer datatype (with data)
* in file.
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/G", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_ctg_i(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/G", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_ctg_i(fid, full_path, true);
}
/* validate a chunked dataset w/integer datatype (but no data)
* in file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/H", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_chk_i(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/H", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_chk_i(fid, full_path, false);
}
/* validate a chunked dataset w/integer datatype (and data)
* in file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/I", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_chk_i(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/I", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_chk_i(fid, full_path, true);
}
/* Validate a compact dataset w/integer datatype (but no data)
* in file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/J", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_cpt_i(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/J", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_cpt_i(fid, full_path, false);
}
/* validate a compact dataset w/integer datatype (and data)
* in file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/K", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_cpt_i(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/K", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_cpt_i(fid, full_path, true);
}
/* validate a contiguous dataset w/variable-length datatype
* (but no data) to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/L", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_ctg_v(fid, full_path, FALSE);
+ snprintf(full_path, sizeof(full_path), "%s/L", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_ctg_v(fid, full_path, false);
}
/* validate a contiguous dataset w/variable-length datatype
* (and data) to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/M", base_path);
- assert(HDstrlen(full_path) < 1024);
- vrfy_ds_ctg_v(fid, full_path, TRUE);
+ snprintf(full_path, sizeof(full_path), "%s/M", base_path);
+ assert(strlen(full_path) < 1024);
+ vrfy_ds_ctg_v(fid, full_path, true);
}
} /* validate_zoo() */
diff --git a/test/genall5.h b/test/genall5.h
index bd365d7..e299c83 100644
--- a/test/genall5.h
+++ b/test/genall5.h
@@ -33,14 +33,14 @@ void vrfy_os_grp_0(hid_t fid, const char *group_name);
void os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks);
void vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks);
-void ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data);
-void vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data);
+void ds_ctg_i(hid_t fid, const char *dset_name, bool write_data);
+void vrfy_ds_ctg_i(hid_t fid, const char *dset_name, bool write_data);
-void ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data);
-void vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data);
+void ds_chk_i(hid_t fid, const char *dset_name, bool write_data);
+void vrfy_ds_chk_i(hid_t fid, const char *dset_name, bool write_data);
-void ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data);
-void vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data);
+void ds_cpt_i(hid_t fid, const char *dset_name, bool write_data);
+void vrfy_ds_cpt_i(hid_t fid, const char *dset_name, bool write_data);
-void ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data);
-void vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data);
+void ds_ctg_v(hid_t fid, const char *dset_name, bool write_data);
+void vrfy_ds_ctg_v(hid_t fid, const char *dset_name, bool write_data);
diff --git a/test/getname.c b/test/getname.c
index 12f85d0..6802ae3 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -64,15 +64,15 @@ check_name(hid_t id, const char *chk_name, const char *chk_user_path)
TEST_ERROR;
/* Check on name from H5Iget_name() */
- if (HDstrcmp(name, chk_name) != 0)
+ if (strcmp(name, chk_name) != 0)
goto error;
/* Check on user path */
- if (HDstrcmp(user_path, chk_user_path) != 0)
+ if (strcmp(user_path, chk_user_path) != 0)
goto error;
/* Check that if user path is hidden, the name from H5Iget_name() and the user path should be different */
- if (user_path_hidden && !HDstrcmp(chk_name, chk_user_path))
+ if (user_path_hidden && !strcmp(chk_name, chk_user_path))
TEST_ERROR;
/* Everything matches */
@@ -1435,7 +1435,7 @@ test_main(hid_t file_id, hid_t fapl)
/* Check that name is longer */
if (name_len <= SMALL_NAME_BUF_SIZE)
TEST_ERROR;
- if (HDstrcmp(name2, "/") != 0)
+ if (strcmp(name2, "/") != 0)
TEST_ERROR;
}
@@ -1477,7 +1477,7 @@ test_main(hid_t file_id, hid_t fapl)
TEST_ERROR;
/* Verify */
- if (HDstrcmp(name3, "/g17") != 0)
+ if (strcmp(name3, "/g17") != 0)
TEST_ERROR;
*name3 = '\0';
@@ -1487,7 +1487,7 @@ test_main(hid_t file_id, hid_t fapl)
TEST_ERROR;
/* Verify */
- if (HDstrcmp(name3, "/g") != 0)
+ if (strcmp(name3, "/g") != 0)
TEST_ERROR;
free(name3);
@@ -3306,7 +3306,7 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(dataset2, (char *)buf, sizeof(buf));
if (H5Dclose(dataset2) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Dataset3") == 0) && (namelen == 9)))
+ if (!((strcmp(buf, "/Dataset3") == 0) && (namelen == 9)))
TEST_ERROR;
*buf = '\0';
@@ -3320,7 +3320,7 @@ test_obj_ref(hid_t fapl)
TEST_ERROR;
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[0], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Dataset3") == 0) && (namelen == 9)))
+ if (!((strcmp(buf, "/Dataset3") == 0) && (namelen == 9)))
TEST_ERROR;
PASSED();
@@ -3332,11 +3332,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(dataset2, (char *)buf, sizeof(buf));
if (H5Dclose(dataset2) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Group1/Dataset2") == 0) && (namelen == 16)))
+ if (!((strcmp(buf, "/Group1/Dataset2") == 0) && (namelen == 16)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[1], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Group1/Dataset2") == 0) && (namelen == 16)))
+ if (!((strcmp(buf, "/Group1/Dataset2") == 0) && (namelen == 16)))
TEST_ERROR;
PASSED();
@@ -3348,11 +3348,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(group, (char *)buf, sizeof(buf));
if (H5Gclose(group) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Group1") == 0) && (namelen == 7)))
+ if (!((strcmp(buf, "/Group1") == 0) && (namelen == 7)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[2], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Group1") == 0) && (namelen == 7)))
+ if (!((strcmp(buf, "/Group1") == 0) && (namelen == 7)))
TEST_ERROR;
PASSED();
@@ -3364,11 +3364,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(tid1, (char *)buf, sizeof(buf));
if (H5Tclose(tid1) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Group1/Datatype1") == 0) && (namelen == 17)))
+ if (!((strcmp(buf, "/Group1/Datatype1") == 0) && (namelen == 17)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[3], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Group1/Datatype1") == 0) && (namelen == 17)))
+ if (!((strcmp(buf, "/Group1/Datatype1") == 0) && (namelen == 17)))
TEST_ERROR;
PASSED();
@@ -3380,11 +3380,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(dataset2, (char *)buf, sizeof(buf));
if (H5Dclose(dataset2) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Group1/Group2/Dataset4") == 0) && (namelen == 23)))
+ if (!((strcmp(buf, "/Group1/Group2/Dataset4") == 0) && (namelen == 23)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[4], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Group1/Group2/Dataset4") == 0) && (namelen == 23)))
+ if (!((strcmp(buf, "/Group1/Group2/Dataset4") == 0) && (namelen == 23)))
TEST_ERROR;
PASSED();
@@ -3396,11 +3396,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(group, (char *)buf, sizeof(buf));
if (H5Gclose(group) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Group1/Group2") == 0) && (namelen == 14)))
+ if (!((strcmp(buf, "/Group1/Group2") == 0) && (namelen == 14)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[5], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Group1/Group2") == 0) && (namelen == 14)))
+ if (!((strcmp(buf, "/Group1/Group2") == 0) && (namelen == 14)))
TEST_ERROR;
PASSED();
@@ -3412,11 +3412,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(dataset2, (char *)buf, sizeof(buf));
if (H5Dclose(dataset2) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Group1/Dataset5") == 0) && (namelen == 16)))
+ if (!((strcmp(buf, "/Group1/Dataset5") == 0) && (namelen == 16)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[6], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Group1/Dataset5") == 0) && (namelen == 16)))
+ if (!((strcmp(buf, "/Group1/Dataset5") == 0) && (namelen == 16)))
TEST_ERROR;
PASSED();
@@ -3428,11 +3428,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(group, (char *)buf, sizeof(buf));
if (H5Gclose(group) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/") == 0) && (namelen == 1)))
+ if (!((strcmp(buf, "/") == 0) && (namelen == 1)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[7], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/") == 0) && (namelen == 1)))
+ if (!((strcmp(buf, "/") == 0) && (namelen == 1)))
TEST_ERROR;
PASSED();
@@ -3600,7 +3600,7 @@ test_reg_ref(hid_t fapl)
TEST_ERROR;
name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[0], (char *)buf1, NAME_BUF_SIZE);
- if (!((HDstrcmp(buf1, "/MATRIX") == 0) && (name_size1 == 7)))
+ if (!((strcmp(buf1, "/MATRIX") == 0) && (name_size1 == 7)))
TEST_ERROR;
PASSED();
@@ -3612,7 +3612,7 @@ test_reg_ref(hid_t fapl)
/* Get name of the dataset the first region reference points using H5Iget_name */
*buf2 = '\0';
name_size2 = H5Iget_name(dsetv_id, (char *)buf2, NAME_BUF_SIZE);
- if (!((HDstrcmp(buf2, "/MATRIX") == 0) && (name_size2 == 7)))
+ if (!((strcmp(buf2, "/MATRIX") == 0) && (name_size2 == 7)))
TEST_ERROR;
if (H5Dclose(dsetv_id) < 0)
@@ -3624,7 +3624,7 @@ test_reg_ref(hid_t fapl)
TESTING("H5Rget_name to get name from region reference(pnt selec)");
*buf1 = '\0';
name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[1], (char *)buf1, NAME_BUF_SIZE);
- if (!((HDstrcmp(buf1, "/MATRIX") == 0) && (name_size1 == 7)))
+ if (!((strcmp(buf1, "/MATRIX") == 0) && (name_size1 == 7)))
TEST_ERROR;
PASSED();
@@ -3637,7 +3637,7 @@ test_reg_ref(hid_t fapl)
/* Get name of the dataset the first region reference points using H5Iget_name */
*buf2 = '\0';
name_size2 = H5Iget_name(dsetv_id, (char *)buf2, NAME_BUF_SIZE);
- if (!((HDstrcmp(buf2, "/MATRIX") == 0) && (name_size2 == 7)))
+ if (!((strcmp(buf2, "/MATRIX") == 0) && (name_size2 == 7)))
TEST_ERROR;
if (H5Dclose(dsetv_id) < 0)
@@ -3676,7 +3676,7 @@ test_elinks(hid_t fapl)
hid_t group, group2; /* Group IDs */
char name[NAME_BUF_SIZE]; /* Buffer for storing object's name */
ssize_t namelen; /* Length of object's name */
- hbool_t name_cached; /* Indicate if name is cached */
+ bool name_cached; /* Indicate if name is cached */
/* Initialize the file names */
h5_fixname(FILENAME[1], fapl, filename1, sizeof filename1);
@@ -3711,9 +3711,9 @@ test_elinks(hid_t fapl)
/* Query the external link object's name */
*name = '\0';
- name_cached = FALSE;
+ name_cached = false;
namelen = H5I__get_name_test(group, (char *)name, sizeof(name), &name_cached);
- if (!((HDstrcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached))
+ if (!((strcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached))
TEST_ERROR;
/* Close Group */
@@ -3726,9 +3726,9 @@ test_elinks(hid_t fapl)
/* Query the external link to external link object's name */
*name = '\0';
- name_cached = FALSE;
+ name_cached = false;
namelen = H5I__get_name_test(group, (char *)name, sizeof(name), &name_cached);
- if (!((HDstrcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached))
+ if (!((strcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached))
TEST_ERROR;
/* Close Group */
@@ -3750,11 +3750,11 @@ error:
int
main(void)
{
- hid_t file_id = (-1);
- int nerrors = 0;
- hid_t fapl;
- char filename0[1024];
- hbool_t driver_is_parallel;
+ hid_t file_id = (H5I_INVALID_HID);
+ int nerrors = 0;
+ hid_t fapl;
+ char filename0[1024];
+ bool driver_is_parallel;
/* Reset the library and get the file access property list */
h5_reset();
@@ -3788,7 +3788,7 @@ main(void)
if (nerrors)
goto error;
- HDputs("All getname tests passed.");
+ puts("All getname tests passed.");
h5_cleanup(FILENAME, fapl);
@@ -3801,7 +3801,7 @@ error:
}
H5E_END_TRY
- HDputs("***** GET NAME TESTS FAILED *****");
+ puts("***** GET NAME TESTS FAILED *****");
return 1;
}
diff --git a/test/gheap.c b/test/gheap.c
index 714ba27..782c80c 100644
--- a/test/gheap.c
+++ b/test/gheap.c
@@ -38,9 +38,9 @@
nerrors++; \
if (nerrors <= GHEAP_REPEATED_ERR_LIM) { \
H5_FAILED(); \
- HDputs(MSG); \
+ puts(MSG); \
if (nerrors == GHEAP_REPEATED_ERR_LIM) \
- HDputs(" Suppressing further errors..."); \
+ puts(" Suppressing further errors..."); \
} /* end if */ \
} while (0) /* end GHEAP_REPEATED_ERR */
@@ -84,7 +84,7 @@ test_1(hid_t fapl)
goto error;
if (NULL == (f = (H5F_t *)H5VL_object(file))) {
H5_FAILED();
- HDputs(" Unable to create file");
+ puts(" Unable to create file");
goto error;
}
@@ -100,12 +100,12 @@ test_1(hid_t fapl)
status = H5HG_insert(f, size, out, obj + u);
if (status < 0) {
H5_FAILED();
- HDputs(" Unable to insert object into global heap");
+ puts(" Unable to insert object into global heap");
nerrors++;
}
else if (u && H5_addr_gt(obj[u - 1].addr, obj[u].addr)) {
H5_FAILED();
- HDputs(" Collection addresses are not monotonically increasing");
+ puts(" Collection addresses are not monotonically increasing");
nerrors++;
}
}
@@ -119,12 +119,12 @@ test_1(hid_t fapl)
H5Eclear2(H5E_DEFAULT);
if (NULL == H5HG_read(f, obj + u, in, NULL)) {
H5_FAILED();
- HDputs(" Unable to read object");
+ puts(" Unable to read object");
nerrors++;
}
else if (memcmp(in, out, size) != 0) {
H5_FAILED();
- HDputs(" Value read doesn't match value written");
+ puts(" Value read doesn't match value written");
nerrors++;
}
}
@@ -189,7 +189,7 @@ test_2(hid_t fapl)
goto error;
if (NULL == (f = (H5F_t *)H5VL_object(file))) {
H5_FAILED();
- HDputs(" Unable to create file");
+ puts(" Unable to create file");
goto error;
}
@@ -202,7 +202,7 @@ test_2(hid_t fapl)
H5Eclear2(H5E_DEFAULT);
if (H5HG_insert(f, size, out, obj + u) < 0) {
H5_FAILED();
- HDputs(" Unable to insert object into global heap");
+ puts(" Unable to insert object into global heap");
nerrors++;
}
}
@@ -216,12 +216,12 @@ test_2(hid_t fapl)
H5Eclear2(H5E_DEFAULT);
if (NULL == H5HG_read(f, obj + u, in, NULL)) {
H5_FAILED();
- HDputs(" Unable to read object");
+ puts(" Unable to read object");
nerrors++;
}
else if (memcmp(in, out, size) != 0) {
H5_FAILED();
- HDputs(" Value read doesn't match value written");
+ puts(" Value read doesn't match value written");
nerrors++;
}
}
@@ -286,7 +286,7 @@ test_3(hid_t fapl)
goto error;
if (NULL == (f = (H5F_t *)H5VL_object(file))) {
H5_FAILED();
- HDputs(" Unable to create file");
+ puts(" Unable to create file");
goto error;
}
@@ -298,7 +298,7 @@ test_3(hid_t fapl)
status = H5HG_insert(f, size, out, obj + u);
if (status < 0) {
H5_FAILED();
- HDputs(" Unable to insert object into global heap");
+ puts(" Unable to insert object into global heap");
nerrors++;
}
}
@@ -308,7 +308,7 @@ test_3(hid_t fapl)
status = H5HG_remove(f, obj + u);
if (status < 0) {
H5_FAILED();
- HDputs(" Unable to remove object");
+ puts(" Unable to remove object");
nerrors++;
}
}
@@ -374,7 +374,7 @@ test_4(hid_t fapl)
goto error;
if (NULL == (f = (H5F_t *)H5VL_object(file))) {
H5_FAILED();
- HDputs(" Unable to create file");
+ puts(" Unable to create file");
goto error;
}
@@ -386,7 +386,7 @@ test_4(hid_t fapl)
status = H5HG_insert(f, size, out, obj + u);
if (status < 0) {
H5_FAILED();
- HDputs(" Unable to insert object into global heap");
+ puts(" Unable to insert object into global heap");
nerrors++;
}
@@ -399,7 +399,7 @@ test_4(hid_t fapl)
status = H5HG_remove(f, obj + u - 1);
if (status < 0) {
H5_FAILED();
- HDputs(" Unable to remove object");
+ puts(" Unable to remove object");
nerrors++;
}
memset(obj + u - 1, 0, sizeof *obj);
@@ -465,7 +465,7 @@ test_ooo_indices(hid_t fapl)
goto error;
if (NULL == (f = (H5F_t *)H5VL_object(file))) {
H5_FAILED();
- HDputs(" Unable to create file");
+ puts(" Unable to create file");
goto error;
}
@@ -509,7 +509,7 @@ test_ooo_indices(hid_t fapl)
goto error;
if (NULL == (f = (H5F_t *)H5VL_object(file))) {
H5_FAILED();
- HDputs(" Unable to open file");
+ puts(" Unable to open file");
goto error;
} /* end if */
@@ -519,7 +519,7 @@ test_ooo_indices(hid_t fapl)
goto error;
if (i != j) {
H5_FAILED();
- HDputs(" Incorrect read value");
+ puts(" Incorrect read value");
goto error;
}
}
@@ -557,9 +557,9 @@ error:
int
main(void)
{
- int nerrors = 0;
- hid_t fapl_id = H5I_INVALID_HID;
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ int nerrors = 0;
+ hid_t fapl_id = H5I_INVALID_HID;
+ bool api_ctx_pushed = false; /* Whether API context pushed */
h5_reset();
if ((fapl_id = h5_fileaccess()) < 0)
@@ -568,7 +568,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
nerrors += test_1(fapl_id);
nerrors += test_2(fapl_id);
@@ -582,12 +582,12 @@ main(void)
if (nerrors)
goto error;
- HDputs("All global heap tests passed.");
+ puts("All global heap tests passed.");
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
h5_cleanup(FILENAME, fapl_id);
exit(EXIT_SUCCESS);
@@ -600,8 +600,8 @@ error:
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/h5test.c b/test/h5test.c
index 0628643..0482088 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -118,7 +118,7 @@ uint64_t vol_cap_flags_g = H5VL_CAP_FLAG_NONE;
static herr_t h5_errors(hid_t estack, void *client_data);
static char *h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fullname,
- size_t size, hbool_t nest_printf, hbool_t subst_for_superblock);
+ size_t size, bool nest_printf, bool subst_for_superblock);
/*-------------------------------------------------------------------------
* Function: h5_errors
@@ -361,7 +361,7 @@ h5_test_init(void)
char *
h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
{
- return (h5_fixname_real(base_name, fapl, ".h5", fullname, size, FALSE, FALSE));
+ return (h5_fixname_real(base_name, fapl, ".h5", fullname, size, false, false));
}
/*-------------------------------------------------------------------------
@@ -383,7 +383,7 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
char *
h5_fixname_superblock(const char *base_name, hid_t fapl_id, char *fullname, size_t size)
{
- return (h5_fixname_real(base_name, fapl_id, ".h5", fullname, size, FALSE, TRUE));
+ return (h5_fixname_real(base_name, fapl_id, ".h5", fullname, size, false, true));
}
/*-------------------------------------------------------------------------
@@ -402,7 +402,7 @@ h5_fixname_superblock(const char *base_name, hid_t fapl_id, char *fullname, size
char *
h5_fixname_no_suffix(const char *base_name, hid_t fapl, char *fullname, size_t size)
{
- return (h5_fixname_real(base_name, fapl, NULL, fullname, size, FALSE, FALSE));
+ return (h5_fixname_real(base_name, fapl, NULL, fullname, size, false, false));
}
/*-------------------------------------------------------------------------
@@ -424,7 +424,7 @@ h5_fixname_no_suffix(const char *base_name, hid_t fapl, char *fullname, size_t s
char *
h5_fixname_printf(const char *base_name, hid_t fapl, char *fullname, size_t size)
{
- return (h5_fixname_real(base_name, fapl, ".h5", fullname, size, TRUE, FALSE));
+ return (h5_fixname_real(base_name, fapl, ".h5", fullname, size, true, false));
}
/*-------------------------------------------------------------------------
@@ -448,14 +448,14 @@ h5_fixname_printf(const char *base_name, hid_t fapl, char *fullname, size_t size
*/
static char *
h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fullname, size_t size,
- hbool_t nest_printf, hbool_t subst_for_superblock)
+ bool nest_printf, bool subst_for_superblock)
{
const char *prefix = NULL;
const char *driver_env_var = NULL; /* HDF5_DRIVER environment variable */
char *ptr, last = '\0';
const char *suffix = _suffix;
size_t i, j;
- hid_t driver = -1;
+ hid_t driver = H5I_INVALID_HID;
int isppdriver = 0; /* if the driver is MPI parallel */
if (!base_name || !fullname || size < 1)
@@ -466,7 +466,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
/* Determine if driver is set by environment variable. If it is,
* only generate a suffix if fixing the filename for the superblock
* file. */
- driver_env_var = HDgetenv(HDF5_DRIVER);
+ driver_env_var = getenv(HDF5_DRIVER);
if (driver_env_var && (H5P_DEFAULT == fapl) && subst_for_superblock)
fapl = H5P_FILE_ACCESS_DEFAULT;
@@ -479,8 +479,14 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
if (H5FD_FAMILY == driver) {
if (subst_for_superblock)
suffix = "-000000.h5";
- else
- suffix = nest_printf ? "-%%06d.h5" : "-%06d.h5";
+ else {
+ if (nest_printf) {
+ suffix = "-%%06d.h5";
+ }
+ else {
+ suffix = "-%06d.h5";
+ }
+ }
}
else if (H5FD_MULTI == driver) {
@@ -493,7 +499,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
if (!driver_env_var)
driver_env_var = HDF5_DRIVER;
#endif
- if (driver_env_var && !HDstrcmp(driver_env_var, "split")) {
+ if (driver_env_var && !strcmp(driver_env_var, "split")) {
/* split VFD */
if (subst_for_superblock)
suffix = ".h5.meta";
@@ -525,7 +531,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
#endif /* H5_HAVE_PARALLEL */
}
else {
- if (HDgetenv(HDF5_NOCLEANUP))
+ if (getenv(HDF5_NOCLEANUP))
SetTestNoCleanup();
}
@@ -561,7 +567,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
" export HDF5_PARAPREFIX\n"
"*** End of Hint ***\n");
- explained = TRUE;
+ explained = true;
#ifdef HDF5_PARAPREFIX
prefix = HDF5_PARAPREFIX;
#endif /* HDF5_PARAPREFIX */
@@ -573,7 +579,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
* For serial:
* First use the environment variable, then try the constant
*/
- prefix = HDgetenv("HDF5_PREFIX");
+ prefix = getenv("HDF5_PREFIX");
#ifdef HDF5_PREFIX
if (!prefix)
@@ -587,7 +593,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
/* This is a parallel system */
char *subdir;
- if (!HDstrcmp(prefix, HDF5_PARAPREFIX)) {
+ if (!strcmp(prefix, HDF5_PARAPREFIX)) {
/*
* If the prefix specifies the HDF5_PARAPREFIX directory, then
* default to using the "/tmp/$USER" or "/tmp/$LOGIN"
@@ -595,8 +601,8 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
*/
char *user, *login;
- user = HDgetenv("USER");
- login = HDgetenv("LOGIN");
+ user = getenv("USER");
+ login = getenv("LOGIN");
subdir = (user ? user : login);
if (subdir) {
@@ -612,11 +618,11 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
if (!fullname[0]) {
/* We didn't append the prefix yet */
- HDstrncpy(fullname, prefix, size);
+ strncpy(fullname, prefix, size);
fullname[size - 1] = '\0';
}
- if (HDstrlen(fullname) + HDstrlen(base_name) + 1 < size) {
+ if (strlen(fullname) + strlen(base_name) + 1 < size) {
/*
* Append the base_name with a slash first. Multiple
* slashes are handled below.
@@ -631,10 +637,10 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
* subdirectory. Default to PREFIX's original
* prefix value.
*/
- HDstrcpy(fullname, prefix);
+ strcpy(fullname, prefix);
- HDstrcat(fullname, "/");
- HDstrcat(fullname, base_name);
+ strcat(fullname, "/");
+ strcat(fullname, base_name);
}
else {
/* Buffer is too small */
@@ -642,25 +648,25 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
}
}
else {
- if (HDsnprintf(fullname, size, "%s/%s", prefix, base_name) == (int)size)
+ if (snprintf(fullname, size, "%s/%s", prefix, base_name) == (int)size)
/* Buffer is too small */
return NULL;
}
}
- else if (HDstrlen(base_name) >= size) {
+ else if (strlen(base_name) >= size) {
/* Buffer is too small */
return NULL;
}
else {
- HDstrcpy(fullname, base_name);
+ strcpy(fullname, base_name);
}
/* Append a suffix */
if (suffix) {
- if (HDstrlen(fullname) + HDstrlen(suffix) >= size)
+ if (strlen(fullname) + strlen(suffix) >= size)
return NULL;
- HDstrcat(fullname, suffix);
+ strcat(fullname, suffix);
}
/* Remove any double slashes in the filename */
@@ -694,7 +700,7 @@ h5_rmprefix(const char *filename)
{
const char *ret_ptr;
- if ((ret_ptr = HDstrstr(filename, ":")) == NULL)
+ if ((ret_ptr = strstr(filename, ":")) == NULL)
ret_ptr = filename;
else
ret_ptr++;
@@ -786,7 +792,7 @@ h5_get_libver_fapl(hid_t fapl)
char buf[1024]; /* buffer for tokenizing HDF5_DRIVER */
/* Get the environment variable, if it exists */
- env = HDgetenv("HDF5_LIBVER_BOUNDS");
+ env = getenv("HDF5_LIBVER_BOUNDS");
#ifdef HDF5_LIBVER_BOUNDS
/* Use the environment variable, then the compile-time constant */
if (!env)
@@ -803,12 +809,12 @@ h5_get_libver_fapl(hid_t fapl)
* If it's nothing (environment variable was whitespace)
* just return the default fapl.
*/
- HDstrncpy(buf, env, sizeof(buf));
+ strncpy(buf, env, sizeof(buf));
buf[sizeof(buf) - 1] = '\0';
if (NULL == (tok = HDstrtok_r(buf, " \t\n\r", &lasts)))
goto done;
- if (!HDstrcmp(tok, "latest")) {
+ if (!strcmp(tok, "latest")) {
/* use the latest format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
goto error;
@@ -924,10 +930,10 @@ h5_set_info_object(void)
int ret_value = 0;
/* handle any MPI INFO hints via $HDF5_MPI_INFO */
- if ((envp = HDgetenv("HDF5_MPI_INFO")) != NULL) {
+ if ((envp = getenv("HDF5_MPI_INFO")) != NULL) {
char *next, *valp;
- valp = envp = next = HDstrdup(envp);
+ valp = envp = next = strdup(envp);
if (!valp)
return 0;
@@ -944,7 +950,7 @@ h5_set_info_object(void)
valp++;
/* copy key/value pair into temporary buffer */
- len = HDstrcspn(valp, ";");
+ len = strcspn(valp, ";");
next = &valp[len];
if (NULL == (key_val = (char *)calloc(1, len + 1)))
return -1;
@@ -953,7 +959,7 @@ h5_set_info_object(void)
if (*next == ';')
++next;
- namep = HDstrncpy(key_val, valp, len);
+ namep = strncpy(key_val, valp, len);
/* pass up any beginning whitespaces */
while (*namep && (*namep == ' ' || *namep == '\t'))
@@ -963,13 +969,13 @@ h5_set_info_object(void)
continue; /* was all white space, so move to next k/v pair */
/* eat up any ending white spaces */
- endp = &namep[HDstrlen(namep) - 1];
+ endp = &namep[strlen(namep) - 1];
while (endp && (*endp == ' ' || *endp == '\t'))
*endp-- = '\0';
/* find the '=' */
- valp = HDstrchr(namep, '=');
+ valp = strchr(namep, '=');
if (valp != NULL) { /* it's a valid key/value pairing */
char *tmp_val = valp + 1;
@@ -1087,18 +1093,18 @@ h5_get_file_size(const char *filename, hid_t fapl)
h5_stat_size_t tot_size = 0;
char *driver_env_var = NULL;
- driver_env_var = HDgetenv(HDF5_DRIVER);
- if (driver_env_var && !HDstrcmp(driver_env_var, "split")) {
+ driver_env_var = getenv(HDF5_DRIVER);
+ if (driver_env_var && !strcmp(driver_env_var, "split")) {
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
if (mt != H5FD_MEM_DRAW && mt != H5FD_MEM_SUPER)
continue;
/* Create the filename to query */
if (mt == H5FD_MEM_DRAW) {
- HDsnprintf(temp, sizeof temp, "%s.raw", filename);
+ snprintf(temp, sizeof temp, "%s.raw", filename);
}
else {
- HDsnprintf(temp, sizeof temp, "%s.meta", filename);
+ snprintf(temp, sizeof temp, "%s.meta", filename);
}
/* Check for existence of file */
@@ -1113,10 +1119,10 @@ h5_get_file_size(const char *filename, hid_t fapl)
} /* end for */
}
else {
- assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+ assert(strlen(multi_letters) == H5FD_MEM_NTYPES);
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
/* Create the filename to query */
- HDsnprintf(temp, sizeof temp, "%s-%c.h5", filename, multi_letters[mt]);
+ snprintf(temp, sizeof temp, "%s-%c.h5", filename, multi_letters[mt]);
/* Check for existence of file */
if (0 == HDaccess(temp, F_OK)) {
@@ -1158,7 +1164,7 @@ h5_get_file_size(const char *filename, hid_t fapl)
/* Try all filenames possible, until we find one that's missing */
for (j = 0; /*void*/; j++) {
/* Create the filename to query */
- HDsnprintf(temp, sizeof temp, filename, j);
+ snprintf(temp, sizeof temp, filename, j);
/* Check for existence of file */
if (HDaccess(temp, F_OK) < 0)
@@ -1215,7 +1221,7 @@ print_func(const char *format, ...)
int ret_value;
va_start(arglist, format);
- ret_value = HDvprintf(format, arglist);
+ ret_value = vprintf(format, arglist);
va_end(arglist);
return ret_value;
}
@@ -1301,9 +1307,9 @@ getenv_all(MPI_Comm comm, int root, const char *name)
/* The root task does the getenv call
* and sends the result to the other tasks */
if (mpi_rank == root) {
- env = HDgetenv(name);
+ env = getenv(name);
if (env) {
- len = (int)HDstrlen(env);
+ len = (int)strlen(env);
MPI_Bcast(&len, 1, MPI_INT, root, comm);
MPI_Bcast(env, len, MPI_CHAR, root, comm);
}
@@ -1318,7 +1324,7 @@ getenv_all(MPI_Comm comm, int root, const char *name)
if (len >= 0) {
if (env == NULL)
env = (char *)malloc((size_t)len + 1);
- else if (HDstrlen(env) < (size_t)len)
+ else if (strlen(env) < (size_t)len)
env = (char *)realloc(env, (size_t)len + 1);
MPI_Bcast(env, len, MPI_CHAR, root, comm);
@@ -1338,7 +1344,7 @@ getenv_all(MPI_Comm comm, int root, const char *name)
/* use original getenv */
if (env)
free(env);
- env = HDgetenv(name);
+ env = getenv(name);
} /* end if */
return env;
@@ -1445,7 +1451,7 @@ h5_verify_cached_stabs_cb(hid_t oid, const char H5_ATTR_UNUSED *name, const H5O_
herr_t
h5_verify_cached_stabs(const char *base_name[], hid_t fapl)
{
- hid_t file = -1;
+ hid_t file = H5I_INVALID_HID;
char filename[1024];
int i = 0;
@@ -1893,9 +1899,9 @@ H5_get_srcdir_filename(const char *filename)
/* Build path to test file. We're checking the length so suppress
* the gcc format-truncation warning.
*/
- if ((HDstrlen(srcdir) + HDstrlen(filename) + 1) < sizeof(srcdir_testpath)) {
+ if ((strlen(srcdir) + strlen("testfiles/") + strlen(filename) + 1) < sizeof(srcdir_testpath)) {
H5_GCC_DIAG_OFF("format-truncation")
- HDsnprintf(srcdir_testpath, sizeof(srcdir_testpath), "%s%s", srcdir, filename);
+ snprintf(srcdir_testpath, sizeof(srcdir_testpath), "%stestfiles/%s", srcdir, filename);
H5_GCC_DIAG_ON("format-truncation")
return srcdir_testpath;
}
@@ -1916,15 +1922,15 @@ H5_get_srcdir_filename(const char *filename)
const char *
H5_get_srcdir(void)
{
- const char *srcdir = HDgetenv("srcdir");
+ const char *srcdir = getenv("srcdir");
/* Check for using the srcdir from configure time */
if (NULL == srcdir)
srcdir = config_srcdir;
/* Build path to all test files */
- if ((HDstrlen(srcdir) + 2) < sizeof(srcdir_path)) {
- HDsnprintf(srcdir_path, sizeof(srcdir_path), "%s/", srcdir);
+ if ((strlen(srcdir) + 2) < sizeof(srcdir_path)) {
+ snprintf(srcdir_path, sizeof(srcdir_path), "%s/", srcdir);
return (srcdir_path);
} /* end if */
else
@@ -2004,19 +2010,19 @@ done:
* Purpose: Checks if file locking is enabled on this file system.
*
* Return: SUCCEED/FAIL
- * are_enabled will be FALSE if file locking is disabled on
+ * are_enabled will be false if file locking is disabled on
* the file system of if there were errors.
*
*-------------------------------------------------------------------------
*/
herr_t
-h5_check_if_file_locking_enabled(hbool_t *is_enabled)
+h5_check_if_file_locking_enabled(bool *is_enabled)
{
const char *filename = "locking_test_file";
int pmode = O_RDWR | O_CREAT | O_TRUNC;
int fd = -1;
- *is_enabled = TRUE;
+ *is_enabled = true;
if ((fd = HDopen(filename, pmode, H5_POSIX_CREATE_MODE_RW)) < 0)
goto error;
@@ -2032,7 +2038,7 @@ h5_check_if_file_locking_enabled(hbool_t *is_enabled)
* error condition.
*/
errno = 0;
- *is_enabled = FALSE;
+ *is_enabled = false;
}
else
goto error;
@@ -2048,7 +2054,7 @@ h5_check_if_file_locking_enabled(hbool_t *is_enabled)
return SUCCEED;
error:
- *is_enabled = FALSE;
+ *is_enabled = false;
if (fd > -1) {
HDclose(fd);
HDremove(filename);
@@ -2063,22 +2069,22 @@ error:
* default VFD. If `drv_name` is NULL, the HDF5_DRIVER
* environment is checked instead (if it is set).
*
- * Return: TRUE/FALSE
+ * Return: true/false
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
h5_using_default_driver(const char *drv_name)
{
- hbool_t ret_val = TRUE;
+ bool ret_val = true;
assert(H5_DEFAULT_VFD == H5FD_SEC2);
if (!drv_name)
- drv_name = HDgetenv(HDF5_DRIVER);
+ drv_name = getenv(HDF5_DRIVER);
if (drv_name)
- return (!HDstrcmp(drv_name, "sec2") || !HDstrcmp(drv_name, "nomatch"));
+ return (!strcmp(drv_name, "sec2") || !strcmp(drv_name, "nomatch"));
return ret_val;
}
@@ -2093,12 +2099,12 @@ h5_using_default_driver(const char *drv_name)
* which are not currently supported for parallel HDF5, such
* as writing of VL or region reference datatypes.
*
- * Return: TRUE/FALSE
+ * Return: true/false
*
*-------------------------------------------------------------------------
*/
herr_t
-h5_using_parallel_driver(hid_t fapl_id, hbool_t *driver_is_parallel)
+h5_using_parallel_driver(hid_t fapl_id, bool *driver_is_parallel)
{
unsigned long feat_flags = 0;
hid_t driver_id = H5I_INVALID_HID;
@@ -2141,7 +2147,7 @@ h5_using_parallel_driver(hid_t fapl_id, hbool_t *driver_is_parallel)
*-------------------------------------------------------------------------
*/
herr_t
-h5_driver_is_default_vfd_compatible(hid_t fapl_id, hbool_t *default_vfd_compatible)
+h5_driver_is_default_vfd_compatible(hid_t fapl_id, bool *default_vfd_compatible)
{
unsigned long feat_flags = 0;
hid_t driver_id = H5I_INVALID_HID;
@@ -2186,28 +2192,28 @@ h5_driver_is_default_vfd_compatible(hid_t fapl_id, hbool_t *default_vfd_compatib
* Eventually, this should become a VFD feature flag so this
* check is less fragile.
*
- * Return: TRUE/FALSE
+ * Return: true/false
*
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
h5_driver_uses_multiple_files(const char *drv_name, unsigned flags)
{
- hbool_t ret_val = FALSE;
+ bool ret_val = false;
if (!drv_name)
- drv_name = HDgetenv(HDF5_DRIVER);
+ drv_name = getenv(HDF5_DRIVER);
if (drv_name) {
if ((flags & H5_EXCLUDE_MULTIPART_DRIVERS) == 0) {
- if (!HDstrcmp(drv_name, "split") || !HDstrcmp(drv_name, "multi") ||
- !HDstrcmp(drv_name, "family") || !HDstrcmp(drv_name, H5FD_SUBFILING_NAME))
- return TRUE;
+ if (!strcmp(drv_name, "split") || !strcmp(drv_name, "multi") || !strcmp(drv_name, "family") ||
+ !strcmp(drv_name, H5FD_SUBFILING_NAME))
+ return true;
}
if ((flags & H5_EXCLUDE_NON_MULTIPART_DRIVERS) == 0) {
- if (!HDstrcmp(drv_name, "splitter"))
- return TRUE;
+ if (!strcmp(drv_name, "splitter"))
+ return true;
}
}
diff --git a/test/h5test.h b/test/h5test.h
index 27d90af..8bba077 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -113,30 +113,30 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */
} while (0)
#define PASSED() \
do { \
- HDputs(" PASSED"); \
+ puts(" PASSED"); \
fflush(stdout); \
n_tests_passed_g++; \
} while (0)
#define H5_FAILED() \
do { \
- HDputs("*FAILED*"); \
+ puts("*FAILED*"); \
fflush(stdout); \
n_tests_failed_g++; \
} while (0)
#define H5_WARNING() \
do { \
- HDputs("*WARNING*"); \
+ puts("*WARNING*"); \
fflush(stdout); \
} while (0)
#define SKIPPED() \
do { \
- HDputs(" -SKIP-"); \
+ puts(" -SKIP-"); \
fflush(stdout); \
n_tests_skipped_g++; \
} while (0)
#define PUTS_ERROR(s) \
do { \
- HDputs(s); \
+ puts(s); \
AT(); \
goto error; \
} while (0)
@@ -162,7 +162,7 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */
do { \
H5_FAILED(); \
AT(); \
- HDputs(s); \
+ puts(s); \
goto error; \
} while (0)
@@ -172,7 +172,7 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */
#define TESTING_MULTIPART(WHAT) \
do { \
printf("Testing %-62s", WHAT); \
- HDputs(""); \
+ puts(""); \
fflush(stdout); \
} while (0)
@@ -289,11 +289,11 @@ H5TEST_DLL H5VL_class_t *h5_get_dummy_vol_class(void);
H5TEST_DLL const char *h5_get_version_string(H5F_libver_t libver);
H5TEST_DLL int h5_compare_file_bytes(char *fname1, char *fname2);
H5TEST_DLL int h5_duplicate_file_by_bytes(const char *orig, const char *dest);
-H5TEST_DLL herr_t h5_check_if_file_locking_enabled(hbool_t *are_enabled);
-H5TEST_DLL hbool_t h5_using_default_driver(const char *drv_name);
-H5TEST_DLL herr_t h5_using_parallel_driver(hid_t fapl_id, hbool_t *driver_is_parallel);
-H5TEST_DLL herr_t h5_driver_is_default_vfd_compatible(hid_t fapl_id, hbool_t *default_vfd_compatible);
-H5TEST_DLL hbool_t h5_driver_uses_multiple_files(const char *drv_name, unsigned flags);
+H5TEST_DLL herr_t h5_check_if_file_locking_enabled(bool *are_enabled);
+H5TEST_DLL bool h5_using_default_driver(const char *drv_name);
+H5TEST_DLL herr_t h5_using_parallel_driver(hid_t fapl_id, bool *driver_is_parallel);
+H5TEST_DLL herr_t h5_driver_is_default_vfd_compatible(hid_t fapl_id, bool *default_vfd_compatible);
+H5TEST_DLL bool h5_driver_uses_multiple_files(const char *drv_name, unsigned flags);
/* Functions that will replace components of a FAPL */
H5TEST_DLL herr_t h5_get_libver_fapl(hid_t fapl_id);
@@ -353,6 +353,7 @@ H5TEST_DLLVAR size_t n_tests_passed_g;
H5TEST_DLLVAR size_t n_tests_failed_g;
H5TEST_DLLVAR size_t n_tests_skipped_g;
H5TEST_DLLVAR uint64_t vol_cap_flags_g;
+H5TEST_DLLVAR int mpi_rank_framework_g;
H5TEST_DLL void h5_send_message(const char *file, const char *arg1, const char *arg2);
H5TEST_DLL herr_t h5_wait_message(const char *file);
diff --git a/test/hdfs.c b/test/hdfs.c
index 52e2eae..857a54c 100644
--- a/test/hdfs.c
+++ b/test/hdfs.c
@@ -274,7 +274,7 @@
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(expected, actual, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -313,7 +313,7 @@
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(actual, expected, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -374,7 +374,7 @@ test_fapl_config_validation(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS fapl configuration validation");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -397,7 +397,7 @@ test_fapl_config_validation(void)
* test-local variables *
************************/
- hid_t fapl_id = -1; /* file access property list ID */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
H5FD_hdfs_fapl_t config;
H5FD_hdfs_fapl_t fa_fetch;
herr_t success = SUCCEED;
@@ -579,7 +579,7 @@ test_hdfs_fapl(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS fapl ");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -588,9 +588,9 @@ test_hdfs_fapl(void)
* test-local variables *
************************/
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
H5FD_hdfs_fapl_t hdfs_fa_0 = {
1, /* version*/
"", /* node name */
@@ -662,7 +662,7 @@ test_vfd_open(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD-level open");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -687,7 +687,7 @@ test_vfd_open(void)
unsigned flags;
int which_fapl;
haddr_t maxaddr;
- hbool_t might_use_other_driver;
+ bool might_use_other_driver;
};
/************************
@@ -701,7 +701,7 @@ test_vfd_open(void)
H5F_ACC_RDONLY,
FAPL_H5P_DEFAULT,
MAXADDR,
- TRUE,
+ true,
},
{
"generic file access property list is invalid",
@@ -709,7 +709,7 @@ test_vfd_open(void)
H5F_ACC_RDONLY,
FAPL_UNCONFIGURED,
MAXADDR,
- TRUE,
+ true,
},
{
"filename cannot be null",
@@ -717,7 +717,7 @@ test_vfd_open(void)
H5F_ACC_RDONLY,
FAPL_HDFS,
MAXADDR,
- FALSE,
+ false,
},
{
"filename cannot be empty",
@@ -725,7 +725,7 @@ test_vfd_open(void)
H5F_ACC_RDONLY,
FAPL_HDFS,
MAXADDR,
- FALSE,
+ false,
},
{
"file at filename must exist",
@@ -733,7 +733,7 @@ test_vfd_open(void)
H5F_ACC_RDONLY,
FAPL_HDFS,
MAXADDR,
- FALSE,
+ false,
},
{
"read-write flag not supported",
@@ -741,7 +741,7 @@ test_vfd_open(void)
H5F_ACC_RDWR,
FAPL_HDFS,
MAXADDR,
- FALSE,
+ false,
},
{
"truncate flag not supported",
@@ -749,7 +749,7 @@ test_vfd_open(void)
H5F_ACC_TRUNC,
FAPL_HDFS,
MAXADDR,
- FALSE,
+ false,
},
{
"create flag not supported",
@@ -757,7 +757,7 @@ test_vfd_open(void)
H5F_ACC_CREAT,
FAPL_HDFS,
MAXADDR,
- FALSE,
+ false,
},
{
"EXCL flag not supported",
@@ -765,7 +765,7 @@ test_vfd_open(void)
H5F_ACC_EXCL,
FAPL_HDFS,
MAXADDR,
- FALSE,
+ false,
},
{
"maxaddr cannot be 0 (caught in `H5FD_open()`)",
@@ -773,14 +773,14 @@ test_vfd_open(void)
H5F_ACC_RDONLY,
FAPL_HDFS,
0,
- FALSE,
+ false,
},
};
unsigned i = 0;
unsigned failing_conditions_count = 10;
H5FD_t *fd = NULL;
- hid_t fapl_hdfs = -1;
- hid_t fapl_unconfigured = -1;
+ hid_t fapl_hdfs = H5I_INVALID_HID;
+ hid_t fapl_unconfigured = H5I_INVALID_HID;
TESTING("HDFS VFD-level open");
@@ -820,7 +820,7 @@ test_vfd_open(void)
}
H5E_END_TRY
if (NULL != fd) {
- if (TRUE == T.might_use_other_driver && H5FD_HDFS != fd->driver_id) {
+ if (true == T.might_use_other_driver && H5FD_HDFS != fd->driver_id) {
fprintf(stderr, "\n!!!!! WARNING !!!!!\n"
" Successful open of file on local system "
"with non-HDFS VFD.\n");
@@ -915,7 +915,7 @@ test_eof_eoa(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS eof/eoa gets and sets");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -934,7 +934,7 @@ test_eof_eoa(void)
************************/
H5FD_t *fd_shakespeare = NULL;
- hid_t fapl_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
TESTING("HDFS eof/eoa gets and sets");
@@ -1025,7 +1025,7 @@ test_H5FDread_without_eoa_set_fails(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD read-eoa temporal coupling library limitation");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -1034,7 +1034,7 @@ test_H5FDread_without_eoa_set_fails(void)
char buffer[HDFS_TEST_MAX_BUF_SIZE];
unsigned int i = 0;
H5FD_t *file_shakespeare = NULL;
- hid_t fapl_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
TESTING("HDFS VFD read-eoa temporal coupling library limitation");
@@ -1124,7 +1124,7 @@ test_read(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD read/range-gets");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -1206,7 +1206,7 @@ test_read(void)
char buffer[HDFS_TEST_MAX_BUF_SIZE];
unsigned int i = 0;
H5FD_t *file_raven = NULL;
- hid_t fapl_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
TESTING("HDFS VFD read/range-gets");
@@ -1331,7 +1331,7 @@ test_noops_and_autofails(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD always-fail and no-op routines");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -1349,7 +1349,7 @@ test_noops_and_autofails(void)
* test-local variables *
************************/
- hid_t fapl_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
H5FD_t *file = NULL;
const char data[36] = "The Force shall be with you, always";
@@ -1379,10 +1379,10 @@ test_noops_and_autofails(void)
H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDwrite(file, H5FD_MEM_DRAW, H5P_DEFAULT, 1000, 35, data),
"write must fail")} H5E_END_TRY
- H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, FALSE), "truncate must fail")} H5E_END_TRY
+ H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, false), "truncate must fail")} H5E_END_TRY
H5E_BEGIN_TRY{
- JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, TRUE), "truncate must fail (closing)")} H5E_END_TRY
+ JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, true), "truncate must fail (closing)")} H5E_END_TRY
/************
* TEARDOWN *
@@ -1467,7 +1467,7 @@ test_H5F_integration(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS file access through HD5F library (H5F API)");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -1485,8 +1485,8 @@ test_H5F_integration(void)
* test-local variables *
************************/
- hid_t file = -1;
- hid_t fapl_id = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
TESTING("HDFS file access through HD5F library (H5F API)");
@@ -1579,13 +1579,13 @@ main(void)
static char hdfs_namenode_name[HDFS_NAMENODE_NAME_MAX_SIZE] = "";
const char *hdfs_namenode_name_env = NULL;
- hdfs_namenode_name_env = HDgetenv("HDFS_TEST_NAMENODE_NAME");
+ hdfs_namenode_name_env = getenv("HDFS_TEST_NAMENODE_NAME");
if (hdfs_namenode_name_env == NULL || hdfs_namenode_name_env[0] == '\0') {
- HDstrncpy(hdfs_namenode_name, "localhost", HDFS_NAMENODE_NAME_MAX_SIZE);
+ strncpy(hdfs_namenode_name, "localhost", HDFS_NAMENODE_NAME_MAX_SIZE);
}
else {
- HDstrncpy(/* TODO: error-check? */
- default_fa.namenode_name, hdfs_namenode_name_env, HDFS_NAMENODE_NAME_MAX_SIZE);
+ strncpy(/* TODO: error-check? */
+ default_fa.namenode_name, hdfs_namenode_name_env, HDFS_NAMENODE_NAME_MAX_SIZE);
}
#endif /* H5_HAVE_LIBHDFS */
diff --git a/test/hyperslab.c b/test/hyperslab.c
index e2ca4f1..2777e04 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -148,19 +148,19 @@ test_fill(size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_t dk, size
if (0 == ny) {
ndims = 1;
ny = nz = 1;
- HDsnprintf(dim, sizeof(dim), "%lu", (unsigned long)nx);
+ snprintf(dim, sizeof(dim), "%lu", (unsigned long)nx);
} /* end if */
else {
ndims = 2;
nz = 1;
- HDsnprintf(dim, sizeof(dim), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
+ snprintf(dim, sizeof(dim), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
} /* end else */
} /* end if */
else {
ndims = 3;
- HDsnprintf(dim, sizeof(dim), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz);
+ snprintf(dim, sizeof(dim), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz);
} /* end else */
- HDsnprintf(s, sizeof(s), "Testing hyperslab fill %-11s variable hyperslab", dim);
+ snprintf(s, sizeof(s), "Testing hyperslab fill %-11s variable hyperslab", dim);
printf("%-70s", s);
fflush(stdout);
@@ -303,17 +303,17 @@ test_copy(int mode, size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_
if (0 == ny) {
ndims = 1;
ny = nz = 1;
- HDsnprintf(dim, sizeof(dim), "%lu", (unsigned long)nx);
+ snprintf(dim, sizeof(dim), "%lu", (unsigned long)nx);
} /* end if */
else {
ndims = 2;
nz = 1;
- HDsnprintf(dim, sizeof(dim), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
+ snprintf(dim, sizeof(dim), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
} /* end else */
} /* end if */
else {
ndims = 3;
- HDsnprintf(dim, sizeof(dim), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz);
+ snprintf(dim, sizeof(dim), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz);
} /* end else */
switch (mode) {
@@ -346,7 +346,7 @@ test_copy(int mode, size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_
HDabort();
} /* end switch */
- HDsnprintf(s, sizeof(s), "Testing hyperslab copy %-11s %s", dim, sub);
+ snprintf(s, sizeof(s), "Testing hyperslab copy %-11s %s", dim, sub);
printf("%-70s", s);
fflush(stdout);
@@ -597,15 +597,15 @@ test_multifill(size_t nx)
s[0] = '\0';
for (i = 0; i < nx; i++) {
if (dst[i].left != 3333333)
- HDsnprintf(s, sizeof(s), "bad dst[%lu].left", (unsigned long)i);
+ snprintf(s, sizeof(s), "bad dst[%lu].left", (unsigned long)i);
else if (!H5_DBL_ABS_EQUAL(dst[i].mid, fill.mid))
/* Check if two DOUBLE values are equal. If their difference
* is smaller than the EPSILON value for double, they are
* considered equal. See the definition in h5test.h.
*/
- HDsnprintf(s, sizeof(s), "bad dst[%lu].mid", (unsigned long)i);
+ snprintf(s, sizeof(s), "bad dst[%lu].mid", (unsigned long)i);
else if (dst[i].right != 4444444)
- HDsnprintf(s, sizeof(s), "bad dst[%lu].right", (unsigned long)i);
+ snprintf(s, sizeof(s), "bad dst[%lu].right", (unsigned long)i);
if (s[0]) {
H5_FAILED();
if (!HDisatty(1)) {
@@ -744,8 +744,7 @@ test_transpose(size_t nx, size_t ny)
char s[256];
hsize_t i, j;
- HDsnprintf(s, sizeof(s), "Testing 2d transpose by stride %4lux%-lud", (unsigned long)nx,
- (unsigned long)ny);
+ snprintf(s, sizeof(s), "Testing 2d transpose by stride %4lux%-lud", (unsigned long)nx, (unsigned long)ny);
printf("%-70s", s);
fflush(stdout);
@@ -840,8 +839,8 @@ test_sub_super(size_t nx, size_t ny)
hsize_t i, j;
char s[256];
- HDsnprintf(s, sizeof(s), "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)(2 * nx),
- (unsigned long)(2 * ny), (unsigned long)nx, (unsigned long)ny);
+ snprintf(s, sizeof(s), "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)(2 * nx),
+ (unsigned long)(2 * ny), (unsigned long)nx, (unsigned long)ny);
printf("%-70s", s);
fflush(stdout);
@@ -890,8 +889,8 @@ test_sub_super(size_t nx, size_t ny)
* Test replicating pixels to produce an image twice as large in each
* dimension.
*/
- HDsnprintf(s, sizeof(s), "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)nx,
- (unsigned long)ny, (unsigned long)(2 * nx), (unsigned long)(2 * ny));
+ snprintf(s, sizeof(s), "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)nx,
+ (unsigned long)ny, (unsigned long)(2 * nx), (unsigned long)(2 * ny));
printf("%-70s", s);
fflush(stdout);
@@ -917,17 +916,17 @@ test_sub_super(size_t nx, size_t ny)
for (i = 0; i < nx; i++) {
for (j = 0; j < ny; j++) {
if (half[i * ny + j] != twice[4 * i * ny + 2 * j])
- HDsnprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
- (unsigned long)j, (unsigned long)i * 2, (unsigned long)j * 2);
+ snprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
+ (unsigned long)j, (unsigned long)i * 2, (unsigned long)j * 2);
else if (half[i * ny + j] != twice[4 * i * ny + 2 * j + 1])
- HDsnprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
- (unsigned long)j, (unsigned long)i * 2, (unsigned long)j * 2 + 1);
+ snprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
+ (unsigned long)j, (unsigned long)i * 2, (unsigned long)j * 2 + 1);
else if (half[i * ny + j] != twice[(2 * i + 1) * 2 * ny + 2 * j])
- HDsnprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
- (unsigned long)j, (unsigned long)i * 2 + 1, (unsigned long)j * 2);
+ snprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
+ (unsigned long)j, (unsigned long)i * 2 + 1, (unsigned long)j * 2);
else if (half[i * ny + j] != twice[(2 * i + 1) * 2 * ny + 2 * j + 1])
- HDsnprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
- (unsigned long)j, (unsigned long)i * 2 + 1, (unsigned long)j * 2 + 1);
+ snprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
+ (unsigned long)j, (unsigned long)i * 2 + 1, (unsigned long)j * 2 + 1);
if (s[0]) {
H5_FAILED();
if (!HDisatty(1)) {
@@ -982,7 +981,7 @@ test_array_fill(size_t lo, size_t hi)
size_t u, v, w; /* Local index variables */
char s[256];
- HDsnprintf(s, sizeof(s), "array filling %4lu-%-4lu elements", (unsigned long)lo, (unsigned long)hi);
+ snprintf(s, sizeof(s), "array filling %4lu-%-4lu elements", (unsigned long)lo, (unsigned long)hi);
TESTING(s);
/* Initialize */
@@ -1043,8 +1042,8 @@ test_array_offset_n_calc(size_t n, size_t x, size_t y, size_t z)
hsize_t new_coords[ARRAY_OFFSET_NDIMS]; /* X, Y & X coordinates of offset */
char s[256];
- HDsnprintf(s, sizeof(s), "array offset %4lux%4lux%4lu elements", (unsigned long)z, (unsigned long)y,
- (unsigned long)x);
+ snprintf(s, sizeof(s), "array offset %4lux%4lux%4lu elements", (unsigned long)z, (unsigned long)y,
+ (unsigned long)x);
TESTING(s);
/* Initialize */
@@ -1126,9 +1125,9 @@ main(int argc, char *argv[])
int i;
for (i = 1, size_of_test = 0; i < argc; i++) {
- if (!HDstrcmp(argv[i], "small"))
+ if (!strcmp(argv[i], "small"))
size_of_test |= TEST_SMALL;
- else if (!HDstrcmp(argv[i], "medium"))
+ else if (!strcmp(argv[i], "medium"))
size_of_test |= TEST_MEDIUM;
else {
printf("unrecognized argument: %s\n", argv[i]);
diff --git a/test/istore.c b/test/istore.c
index 8dcc205..33032d1 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -62,7 +62,7 @@ is_sparse(void)
if ((fd = HDopen("x.h5", O_RDWR | O_TRUNC | O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0)
return 0;
- if (HDlseek(fd, (off_t)(1024 * 1024), SEEK_SET) != 1024 * 1024)
+ if (HDlseek(fd, (HDoff_t)(1024 * 1024), SEEK_SET) != 1024 * 1024)
return 0;
if (5 != HDwrite(fd, "hello", (size_t)5))
return 0;
@@ -194,7 +194,7 @@ test_create(hid_t f, const char *prefix)
dims[u] = my_chunk_dims[u] = 2;
/* Create chunked dataset of this dimensionality */
- HDsnprintf(name, sizeof name, "%s_%02u", prefix, u);
+ snprintf(name, sizeof name, "%s_%02u", prefix, u);
if ((dataset = new_object(f, name, (int)u, dims, my_chunk_dims)) < 0)
return FAIL;
@@ -240,21 +240,20 @@ test_extend(hid_t f, const char *prefix, size_t nx, size_t ny, size_t nz)
if (!ny) {
ndims = 1;
ny = nz = 1;
- HDsnprintf(dims, sizeof(dims), "%lu", (unsigned long)nx);
+ snprintf(dims, sizeof(dims), "%lu", (unsigned long)nx);
}
else {
ndims = 2;
nz = 1;
- HDsnprintf(dims, sizeof(dims), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
+ snprintf(dims, sizeof(dims), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
}
}
else {
ndims = 3;
- HDsnprintf(dims, sizeof(dims), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny,
- (unsigned long)nz);
+ snprintf(dims, sizeof(dims), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz);
}
- HDsnprintf(s, sizeof(s), "istore extend: %s", dims);
+ snprintf(s, sizeof(s), "istore extend: %s", dims);
TESTING(s);
buf = (uint8_t *)malloc(nx * ny * nz);
check = (uint8_t *)malloc(nx * ny * nz);
@@ -268,7 +267,7 @@ test_extend(hid_t f, const char *prefix, size_t nx, size_t ny, size_t nz)
max_corner[2] = 0;
/* Build the new empty object */
- HDsnprintf(name, sizeof(name), "%s_%s", prefix, dims);
+ snprintf(name, sizeof(name), "%s_%s", prefix, dims);
if ((dataset = new_object(f, name, ndims, whole_size, whole_size)) < 0) {
fprintf(stderr, " Cannot create %u-d object `%s'\n", ndims, name);
goto error;
@@ -433,21 +432,20 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks, size_t nx, size_t ny, s
if (!ny) {
ndims = 1;
ny = nz = 1;
- HDsnprintf(dims, sizeof(dims), "%lu", (unsigned long)nx);
+ snprintf(dims, sizeof(dims), "%lu", (unsigned long)nx);
}
else {
ndims = 2;
nz = 1;
- HDsnprintf(dims, sizeof(dims), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
+ snprintf(dims, sizeof(dims), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
}
}
else {
ndims = 3;
- HDsnprintf(dims, sizeof(dims), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny,
- (unsigned long)nz);
+ snprintf(dims, sizeof(dims), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz);
}
- HDsnprintf(s, sizeof(s), "istore sparse: %s", dims);
+ snprintf(s, sizeof(s), "istore sparse: %s", dims);
TESTING(s);
if (skip_test) {
SKIPPED();
@@ -466,7 +464,7 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks, size_t nx, size_t ny, s
size[2] = nz;
/* Build the new empty object */
- HDsnprintf(name, sizeof(name), "%s_%s", prefix, dims);
+ snprintf(name, sizeof(name), "%s_%s", prefix, dims);
if ((dataset = new_object(f, name, ndims, whole_size, chunk_dims)) < 0) {
printf(" Cannot create %u-d object `%s'\n", ndims, name);
goto error;
@@ -543,7 +541,7 @@ error:
int
main(int argc, char *argv[])
{
- hid_t fapl = -1, file = -1, fcpl = -1;
+ hid_t fapl = H5I_INVALID_HID, file = H5I_INVALID_HID, fcpl = H5I_INVALID_HID;
herr_t status;
int nerrors = 0;
unsigned size_of_test;
@@ -559,13 +557,13 @@ main(int argc, char *argv[])
else {
int i;
for (i = 1, size_of_test = 0; i < argc; i++) {
- if (!HDstrcmp(argv[i], "small")) {
+ if (!strcmp(argv[i], "small")) {
size_of_test |= TEST_SMALL;
}
- else if (!HDstrcmp(argv[i], "medium")) {
+ else if (!strcmp(argv[i], "medium")) {
size_of_test |= TEST_MEDIUM;
}
- else if (!HDstrcmp(argv[i], "large")) {
+ else if (!strcmp(argv[i], "large")) {
size_of_test |= TEST_LARGE;
}
else {
diff --git a/test/lheap.c b/test/lheap.c
index 5f99c43..7b98634 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -42,7 +42,7 @@ int
main(void)
{
hid_t fapl = H5P_DEFAULT; /* file access properties */
- hid_t file = -1; /* hdf5 file */
+ hid_t file = H5I_INVALID_HID; /* hdf5 file */
H5F_t *f = NULL; /* hdf5 file pointer */
char filename[1024]; /* file name */
haddr_t heap_addr; /* local heap address */
@@ -51,8 +51,8 @@ main(void)
int i, j; /* miscellaneous counters */
char buf[1024]; /* the value to store */
const char *s; /* value to read */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- hbool_t driver_is_default_compatible;
+ bool api_ctx_pushed = false; /* Whether API context pushed */
+ bool driver_is_default_compatible;
/* Reset library */
h5_reset();
@@ -61,7 +61,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/*
* Test writing to the heap...
@@ -91,13 +91,13 @@ main(void)
goto error;
}
for (i = 0; i < NOBJS; i++) {
- HDsnprintf(buf, sizeof(buf), "%03d-", i);
+ snprintf(buf, sizeof(buf), "%03d-", i);
for (j = 4; j < i; j++)
buf[j] = (char)('0' + j % 10);
if (j > 4)
buf[j] = '\0';
- if (H5HL_insert(f, heap, HDstrlen(buf) + 1, buf, &obj[i]) < 0) {
+ if (H5HL_insert(f, heap, strlen(buf) + 1, buf, &obj[i]) < 0) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -131,7 +131,7 @@ main(void)
goto error;
}
for (i = 0; i < NOBJS; i++) {
- HDsnprintf(buf, sizeof(buf), "%03d-", i);
+ snprintf(buf, sizeof(buf), "%03d-", i);
for (j = 4; j < i; j++)
buf[j] = (char)('0' + j % 10);
if (j > 4)
@@ -149,7 +149,7 @@ main(void)
goto error;
}
- if (HDstrcmp(s, buf) != 0) {
+ if (strcmp(s, buf) != 0) {
H5_FAILED();
printf(" i=%d, heap offset=%lu\n", i, (unsigned long)(obj[i]));
printf(" got: \"%s\"\n", s);
@@ -176,7 +176,7 @@ main(void)
TESTING("opening pre-created file with non-default sizes");
{
const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */
- hid_t dset = -1;
+ hid_t dset = H5I_INVALID_HID;
file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
if (file >= 0) {
if ((dset = H5Dopen2(file, "/Dataset1", H5P_DEFAULT)) < 0)
@@ -200,17 +200,17 @@ main(void)
TEST_ERROR;
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
- HDputs("All local heap tests passed.");
+ puts("All local heap tests passed.");
h5_cleanup(FILENAME, fapl);
return EXIT_SUCCESS;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
H5Fclose(file);
@@ -218,7 +218,7 @@ error:
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
return EXIT_FAILURE;
}
diff --git a/test/links.c b/test/links.c
index 8f6af5b..6f07d32 100644
--- a/test/links.c
+++ b/test/links.c
@@ -160,7 +160,7 @@ typedef struct {
int stop; /* # of iterations to stop after */
int64_t curr; /* Current creation order value */
size_t max_visit; /* Size of "visited link" flag array */
- hbool_t *visited; /* Pointer to array of "visited link" flags */
+ bool *visited; /* Pointer to array of "visited link" flags */
} link_iter_info_t;
/* Link visit structs */
@@ -400,9 +400,9 @@ const H5L_class_t UD_plist_class[1] = {{
static void
fix_ext_filename(char *path_name, char *cwd, const char *file_name)
{
- HDstrcpy(path_name, cwd);
- HDstrcat(path_name, "/");
- HDstrcat(path_name, file_name);
+ strcpy(path_name, cwd);
+ strcat(path_name, "/");
+ strcat(path_name, file_name);
}
/*-------------------------------------------------------------------------
@@ -415,7 +415,7 @@ fix_ext_filename(char *path_name, char *cwd, const char *file_name)
*-------------------------------------------------------------------------
*/
static int
-mklinks(hid_t fapl, hbool_t new_format)
+mklinks(hid_t fapl, bool new_format)
{
hid_t file, scalar, grp, d1;
hsize_t size[1] = {1};
@@ -484,12 +484,13 @@ error:
*-------------------------------------------------------------------------
*/
static int
-new_links(hid_t fapl, hbool_t new_format)
+new_links(hid_t fapl, bool new_format)
{
- hid_t file_a, file_b = (-1);
- hid_t grp1_a = (-1), grp1_b = (-1), grp2_a = (-1), grp2_b = (-1);
- hid_t scalar = (-1);
- hid_t dset1 = (-1), dset2 = (-1);
+ hid_t file_a, file_b = (H5I_INVALID_HID);
+ hid_t grp1_a = (H5I_INVALID_HID), grp1_b = (H5I_INVALID_HID), grp2_a = (H5I_INVALID_HID),
+ grp2_b = (H5I_INVALID_HID);
+ hid_t scalar = (H5I_INVALID_HID);
+ hid_t dset1 = (H5I_INVALID_HID), dset2 = (H5I_INVALID_HID);
char filename[NAME_BUF_SIZE];
hsize_t size[1] = {1};
@@ -610,7 +611,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-cklinks(hid_t fapl, hbool_t new_format)
+cklinks(hid_t fapl, bool new_format)
{
hid_t file;
H5O_info2_t oinfo1, oinfo2;
@@ -649,19 +650,19 @@ cklinks(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (token_cmp) {
H5_FAILED();
- HDputs(" Hard link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Hard link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
} /* end if */
- if (H5Lexists(file, "/", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "/", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
- if (H5Lexists(file, "d1", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "d1", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
- if (H5Lexists(file, "grp1/hard", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "grp1/hard", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
- if (H5Lexists(file, "/grp1", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "/grp1", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
- if (H5Lexists(file, "/grp1/hard", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "/grp1/hard", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
H5E_BEGIN_TRY
{
@@ -670,7 +671,7 @@ cklinks(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" H5Lexists() should have failed for a path with missing components.");
+ puts(" H5Lexists() should have failed for a path with missing components.");
TEST_ERROR;
} /* end if */
H5E_BEGIN_TRY
@@ -680,7 +681,7 @@ cklinks(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" H5Lexists() should have failed for a path with missing components.");
+ puts(" H5Lexists() should have failed for a path with missing components.");
TEST_ERROR;
} /* end if */
@@ -696,18 +697,18 @@ cklinks(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (token_cmp) {
H5_FAILED();
- HDputs(" Soft link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Soft link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
} /* end if */
if (H5Lget_val(file, "grp1/soft", linkval, sizeof linkval, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(linkval, "/d1") != 0) {
+ if (strcmp(linkval, "/d1") != 0) {
H5_FAILED();
- HDputs(" Soft link test failed. Wrong link value");
+ puts(" Soft link test failed. Wrong link value");
TEST_ERROR;
} /* end if */
- if (H5Lexists(file, "grp1/soft", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "grp1/soft", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
/* Dangling link */
@@ -718,7 +719,7 @@ cklinks(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" H5Oget_info_by_name() should have failed for a dangling link.");
+ puts(" H5Oget_info_by_name() should have failed for a dangling link.");
TEST_ERROR;
} /* end if */
if (H5Lget_info2(file, "grp1/dangle", &linfo, H5P_DEFAULT) < 0)
@@ -733,12 +734,12 @@ cklinks(hid_t fapl, hbool_t new_format)
printf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR;
} /* end if */
- if (HDstrcmp(linkval, "foobar") != 0) {
+ if (strcmp(linkval, "foobar") != 0) {
H5_FAILED();
- HDputs(" Dangling link test failed. Wrong link value");
+ puts(" Dangling link test failed. Wrong link value");
TEST_ERROR;
} /* end if */
- if (H5Lexists(file, "grp1/dangle", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "grp1/dangle", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
/* Recursive link */
@@ -749,7 +750,7 @@ cklinks(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" H5Oget_info_by_name() should have failed for a recursive link.");
+ puts(" H5Oget_info_by_name() should have failed for a recursive link.");
TEST_ERROR;
} /* end if */
if (H5Lget_info2(file, "grp1/recursive", &linfo, H5P_DEFAULT) < 0)
@@ -764,14 +765,14 @@ cklinks(hid_t fapl, hbool_t new_format)
printf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR;
} /* end if */
- if (HDstrcmp(linkval, "/grp1/recursive") != 0) {
+ if (strcmp(linkval, "/grp1/recursive") != 0) {
H5_FAILED();
- HDputs(" Recursive link test failed. Wrong link value");
+ puts(" Recursive link test failed. Wrong link value");
TEST_ERROR;
} /* end if */
/* Non-existent link */
- if (H5Lexists(file, "foobar", H5P_DEFAULT) == TRUE)
+ if (H5Lexists(file, "foobar", H5P_DEFAULT) == true)
FAIL_STACK_ERROR;
/* Cleanup */
@@ -796,7 +797,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-ck_new_links(hid_t fapl, hbool_t new_format)
+ck_new_links(hid_t fapl, bool new_format)
{
hid_t file;
H5O_info2_t oi_dset, oi_hard1, oi_hard2;
@@ -834,8 +835,8 @@ ck_new_links(hid_t fapl, hbool_t new_format)
TEST_ERROR;
if (token_cmp1 || token_cmp2) {
H5_FAILED();
- HDputs(" Hard link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Hard link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
}
@@ -860,13 +861,13 @@ error:
*-------------------------------------------------------------------------
*/
static int
-long_links(hid_t fapl, hbool_t new_format)
+long_links(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t gid2 = -1; /* Datatype ID */
- char *objname = NULL; /* Name of object [Long] */
- size_t u; /* Local index variable */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t gid2 = H5I_INVALID_HID; /* Datatype ID */
+ char *objname = NULL; /* Name of object [Long] */
+ size_t u; /* Local index variable */
char filename[NAME_BUF_SIZE];
if (new_format)
@@ -939,11 +940,11 @@ error:
*-------------------------------------------------------------------------
*/
static int
-toomany(hid_t fapl, hbool_t new_format)
+toomany(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename[NAME_BUF_SIZE];
if (new_format)
@@ -1063,7 +1064,7 @@ toomany(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/hard21") != 0)
+ if (strcmp(objname, "/hard21") != 0)
TEST_ERROR;
/* Create object in hard-linked group */
@@ -1086,7 +1087,7 @@ toomany(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (gid >= 0) {
H5_FAILED();
- HDputs(" Should have failed for sequence of too many nested links.");
+ puts(" Should have failed for sequence of too many nested links.");
TEST_ERROR;
} /* end if */
@@ -1097,7 +1098,7 @@ toomany(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/soft16") != 0)
+ if (strcmp(objname, "/soft16") != 0)
TEST_ERROR;
/* Create object using soft links */
@@ -1138,14 +1139,14 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_lcpl(hid_t fapl, hbool_t new_format)
+test_lcpl(hid_t fapl, bool new_format)
{
- hid_t file_id = -1;
- hid_t group_id = -1;
- hid_t space_id = -1;
- hid_t dset_id = -1;
- hid_t type_id = -1;
- hid_t lcpl_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t type_id = H5I_INVALID_HID;
+ hid_t lcpl_id = H5I_INVALID_HID;
H5L_info2_t linfo;
char filename[1024];
hsize_t dims[2];
@@ -1351,11 +1352,12 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_move(hid_t fapl, hbool_t new_format)
+test_move(hid_t fapl, bool new_format)
{
- hid_t file_a = -1, file_b = -1;
- hid_t grp_1 = -1, grp_2 = -1, grp_move = -1, moved_grp = -1;
- char filename[1024];
+ hid_t file_a = H5I_INVALID_HID, file_b = H5I_INVALID_HID;
+ hid_t grp_1 = H5I_INVALID_HID, grp_2 = H5I_INVALID_HID, grp_move = H5I_INVALID_HID,
+ moved_grp = H5I_INVALID_HID;
+ char filename[1024];
if (new_format)
TESTING("H5Lmove (w/new group format)");
@@ -1407,13 +1409,13 @@ test_move(hid_t fapl, hbool_t new_format)
/* Move a soft link across files. Should succeed. */
if (H5Lmove(grp_2, "soft", file_b, "soft_new_name", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (H5Lexists(file_b, "soft_new_name", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file_b, "soft_new_name", H5P_DEFAULT) != true)
TEST_ERROR;
/* Move an external link across files. Should succeed. */
if (H5Lmove(grp_2, "ext", file_b, "ext_new_name", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (H5Lexists(file_b, "ext_new_name", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file_b, "ext_new_name", H5P_DEFAULT) != true)
TEST_ERROR;
/* Move a group across groups in the same file while renaming it. */
@@ -1434,7 +1436,7 @@ test_move(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (moved_grp >= 0) {
H5_FAILED();
- HDputs(" Group still in original location?");
+ puts(" Group still in original location?");
TEST_ERROR;
} /* end if */
@@ -1518,11 +1520,12 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy(hid_t fapl, hbool_t new_format)
+test_copy(hid_t fapl, bool new_format)
{
- hid_t file_a = -1, file_b = -1;
- hid_t grp_1 = -1, grp_2 = -1, grp_move = -1, moved_grp = -1;
- char filename[1024];
+ hid_t file_a = H5I_INVALID_HID, file_b = H5I_INVALID_HID;
+ hid_t grp_1 = H5I_INVALID_HID, grp_2 = H5I_INVALID_HID, grp_move = H5I_INVALID_HID,
+ moved_grp = H5I_INVALID_HID;
+ char filename[1024];
if (new_format)
TESTING("H5Lcopy (w/new group format)");
@@ -1574,13 +1577,13 @@ test_copy(hid_t fapl, hbool_t new_format)
/* Copy a soft link across files. Should succeed. */
if (H5Lcopy(grp_2, "soft", file_b, "soft_new_name", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (H5Lexists(file_b, "soft_new_name", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file_b, "soft_new_name", H5P_DEFAULT) != true)
TEST_ERROR;
/* Copy an external link across files. Should succeed. */
if (H5Lcopy(grp_2, "ext", file_b, "ext_new_name", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (H5Lexists(file_b, "ext_new_name", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file_b, "ext_new_name", H5P_DEFAULT) != true)
TEST_ERROR;
/* Move a group across groups in the same file while renaming it. */
@@ -1693,13 +1696,13 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_move_preserves(hid_t fapl_id, hbool_t new_format)
+test_move_preserves(hid_t fapl_id, bool new_format)
{
- hid_t file_id = -1;
- hid_t group_id = -1;
- hid_t fcpl_id = -1; /* Group creation property list ID */
- hid_t lcpl_id = -1;
- hid_t lcpl2_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t fcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ hid_t lcpl_id = H5I_INVALID_HID;
+ hid_t lcpl2_id = H5I_INVALID_HID;
H5O_info2_t oinfo;
H5L_info2_t linfo;
H5T_cset_t old_cset;
@@ -1756,7 +1759,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
old_cset = linfo.cset;
if (old_cset != H5T_CSET_UTF8)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
old_corder = linfo.corder;
if (old_corder != 0)
@@ -1783,7 +1786,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (old_cset != linfo.cset)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (old_corder != linfo.corder)
TEST_ERROR;
@@ -1800,7 +1803,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (old_corder == linfo.corder)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 1)
TEST_ERROR;
@@ -1819,7 +1822,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info2(file_id, "group_copied", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 2)
TEST_ERROR;
@@ -1837,7 +1840,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info2(file_id, "group_copied2", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 3)
TEST_ERROR;
@@ -1853,7 +1856,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info2(file_id, "group", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (old_corder != linfo.corder)
TEST_ERROR;
@@ -1871,7 +1874,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info2(file_id, "group_moved", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 4)
TEST_ERROR;
@@ -1889,7 +1892,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info2(file_id, "group_moved_again", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 5)
TEST_ERROR;
@@ -1933,11 +1936,11 @@ error:
*/
#ifndef H5_NO_DEPRECATED_SYMBOLS
static int
-test_deprec(hid_t fapl, hbool_t new_format)
+test_deprec(hid_t fapl, bool new_format)
{
- hid_t file_id = -1;
- hid_t group1_id = -1;
- hid_t group2_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t group1_id = H5I_INVALID_HID;
+ hid_t group2_id = H5I_INVALID_HID;
H5G_stat_t sb_hard1, sb_hard2, sb_soft1, sb_soft2;
H5G_obj_t obj_type; /* Object type */
hsize_t num_objs; /* Number of objects in a group */
@@ -1966,7 +1969,7 @@ test_deprec(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5Gget_comment(file_id, "group1", sizeof(tmpstr), tmpstr) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(tmpstr, "comment") != 0)
+ if (strcmp(tmpstr, "comment") != 0)
TEST_ERROR;
/* Create links using H5Glink and H5Glink2 */
@@ -1982,7 +1985,7 @@ test_deprec(hid_t fapl, hbool_t new_format)
/* Test getting the names for objects */
if (H5Gget_objname_by_idx(group1_id, (hsize_t)0, tmpstr, sizeof(tmpstr)) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(tmpstr, "link_to_group2") != 0)
+ if (strcmp(tmpstr, "link_to_group2") != 0)
TEST_ERROR;
H5E_BEGIN_TRY
{
@@ -2014,63 +2017,63 @@ test_deprec(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Test that H5Glink created hard links properly */
- if (H5Gget_objinfo(file_id, "/group2", TRUE, &sb_hard1) < 0)
+ if (H5Gget_objinfo(file_id, "/group2", true, &sb_hard1) < 0)
FAIL_STACK_ERROR;
- if (H5Gget_objinfo(file_id, "/group1/link_to_group2", TRUE, &sb_hard2) < 0)
+ if (H5Gget_objinfo(file_id, "/group1/link_to_group2", true, &sb_hard2) < 0)
FAIL_STACK_ERROR;
if (memcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) {
H5_FAILED();
- HDputs(" Hard link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Hard link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
} /* end if */
/* Test for the other hard link created */
- if (H5Gget_objinfo(file_id, "/group1", TRUE, &sb_hard1) < 0)
+ if (H5Gget_objinfo(file_id, "/group1", true, &sb_hard1) < 0)
FAIL_STACK_ERROR;
- if (H5Gget_objinfo(file_id, "/group2/link_to_group1", TRUE, &sb_hard2) < 0)
+ if (H5Gget_objinfo(file_id, "/group2/link_to_group1", true, &sb_hard2) < 0)
FAIL_STACK_ERROR;
if (memcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) {
H5_FAILED();
- HDputs(" Hard link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Hard link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
} /* end if */
/* Test the soft link */
- if (H5Gget_objinfo(file_id, "/group2/soft_link_to_group1", FALSE, &sb_soft1) < 0)
+ if (H5Gget_objinfo(file_id, "/group2/soft_link_to_group1", false, &sb_soft1) < 0)
FAIL_STACK_ERROR;
if (sb_soft1.type != H5G_LINK)
TEST_ERROR;
- if (sb_soft1.linklen != HDstrlen("link_to_group1") + 1)
+ if (sb_soft1.linklen != strlen("link_to_group1") + 1)
TEST_ERROR;
if (H5Gget_linkval(group2_id, "soft_link_to_group1", sb_soft1.linklen, tmpstr) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp("link_to_group1", tmpstr) != 0)
+ if (strcmp("link_to_group1", tmpstr) != 0)
TEST_ERROR;
/* Test non-existing links with H5Gget_objinfo */
H5E_BEGIN_TRY
{
- if (H5Gget_objinfo(file_id, "/group2/soft_link_no_exist", TRUE, NULL) >= 0)
+ if (H5Gget_objinfo(file_id, "/group2/soft_link_no_exist", true, NULL) >= 0)
FAIL_STACK_ERROR;
}
H5E_END_TRY
/* Test the dangling soft link */
- if (H5Gget_objinfo(file_id, "/group2/dangle_soft_link", FALSE, &sb_soft2) < 0)
+ if (H5Gget_objinfo(file_id, "/group2/dangle_soft_link", false, &sb_soft2) < 0)
FAIL_STACK_ERROR;
if (sb_soft2.type != H5G_LINK)
TEST_ERROR;
- if (sb_soft2.linklen != HDstrlen("dangle") + 1)
+ if (sb_soft2.linklen != strlen("dangle") + 1)
TEST_ERROR;
if (H5Gget_linkval(group2_id, "dangle_soft_link", sb_soft2.linklen, tmpstr) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp("dangle", tmpstr) != 0)
+ if (strcmp("dangle", tmpstr) != 0)
TEST_ERROR;
/* Test H5Gmove and H5Gmove2 */
@@ -2135,7 +2138,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-cklinks_deprec(hid_t fapl, hbool_t new_format)
+cklinks_deprec(hid_t fapl, bool new_format)
{
hid_t file;
H5O_info1_t oinfo1, oinfo2;
@@ -2167,19 +2170,19 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
} /* end if */
if (H5_addr_ne(oinfo1.addr, oinfo2.addr)) {
H5_FAILED();
- HDputs(" Hard link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Hard link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
} /* end if */
- if (H5Lexists(file, "/", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "/", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
- if (H5Lexists(file, "d1", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "d1", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
- if (H5Lexists(file, "grp1/hard", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "grp1/hard", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
- if (H5Lexists(file, "/grp1", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "/grp1", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
- if (H5Lexists(file, "/grp1/hard", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "/grp1/hard", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
H5E_BEGIN_TRY
{
@@ -2188,7 +2191,7 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (exists >= 0) {
H5_FAILED();
- HDputs(" H5Lexists() should have failed for a path with missing components.");
+ puts(" H5Lexists() should have failed for a path with missing components.");
TEST_ERROR;
} /* end if */
H5E_BEGIN_TRY
@@ -2198,7 +2201,7 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (exists >= 0) {
H5_FAILED();
- HDputs(" H5Lexists() should have failed for a path with missing components.");
+ puts(" H5Lexists() should have failed for a path with missing components.");
TEST_ERROR;
} /* end if */
@@ -2212,18 +2215,18 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
} /* end if */
if (H5_addr_ne(oinfo1.addr, oinfo2.addr)) {
H5_FAILED();
- HDputs(" Soft link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Soft link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
} /* end if */
if (H5Lget_val(file, "grp1/soft", linkval, sizeof linkval, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(linkval, "/d1") != 0) {
+ if (strcmp(linkval, "/d1") != 0) {
H5_FAILED();
- HDputs(" Soft link test failed. Wrong link value");
+ puts(" Soft link test failed. Wrong link value");
TEST_ERROR;
} /* end if */
- if (H5Lexists(file, "grp1/soft", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "grp1/soft", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
/* Dangling link */
@@ -2234,7 +2237,7 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" H5Oget_info_by_name() should have failed for a dangling link.");
+ puts(" H5Oget_info_by_name() should have failed for a dangling link.");
TEST_ERROR;
} /* end if */
if (H5Lget_info1(file, "grp1/dangle", &linfo, H5P_DEFAULT) < 0)
@@ -2249,12 +2252,12 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
printf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR;
} /* end if */
- if (HDstrcmp(linkval, "foobar") != 0) {
+ if (strcmp(linkval, "foobar") != 0) {
H5_FAILED();
- HDputs(" Dangling link test failed. Wrong link value");
+ puts(" Dangling link test failed. Wrong link value");
TEST_ERROR;
} /* end if */
- if (H5Lexists(file, "grp1/dangle", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(file, "grp1/dangle", H5P_DEFAULT) != true)
FAIL_STACK_ERROR;
/* Recursive link */
@@ -2265,7 +2268,7 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" H5Oget_info_by_name() should have failed for a recursive link.");
+ puts(" H5Oget_info_by_name() should have failed for a recursive link.");
TEST_ERROR;
} /* end if */
if (H5Lget_info1(file, "grp1/recursive", &linfo, H5P_DEFAULT) < 0)
@@ -2280,14 +2283,14 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
printf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR;
} /* end if */
- if (HDstrcmp(linkval, "/grp1/recursive") != 0) {
+ if (strcmp(linkval, "/grp1/recursive") != 0) {
H5_FAILED();
- HDputs(" Recursive link test failed. Wrong link value");
+ puts(" Recursive link test failed. Wrong link value");
TEST_ERROR;
} /* end if */
/* Non-existent link */
- if (H5Lexists(file, "foobar", H5P_DEFAULT) == TRUE)
+ if (H5Lexists(file, "foobar", H5P_DEFAULT) == true)
FAIL_STACK_ERROR;
/* Cleanup */
@@ -2311,14 +2314,14 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_lcpl_deprec(hid_t fapl, hbool_t new_format)
+test_lcpl_deprec(hid_t fapl, bool new_format)
{
- hid_t file_id = -1;
- hid_t group_id = -1;
- hid_t space_id = -1;
- hid_t dset_id = -1;
- hid_t type_id = -1;
- hid_t lcpl_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t type_id = H5I_INVALID_HID;
+ hid_t lcpl_id = H5I_INVALID_HID;
H5L_info1_t linfo;
char filename[1024];
hsize_t dims[2];
@@ -2525,13 +2528,13 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_move_preserves_deprec(hid_t fapl_id, hbool_t new_format)
+test_move_preserves_deprec(hid_t fapl_id, bool new_format)
{
- hid_t file_id = -1;
- hid_t group_id = -1;
- hid_t fcpl_id = -1; /* Group creation property list ID */
- hid_t lcpl_id = -1;
- hid_t lcpl2_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t fcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ hid_t lcpl_id = H5I_INVALID_HID;
+ hid_t lcpl2_id = H5I_INVALID_HID;
H5O_info1_t oinfo;
H5L_info1_t linfo;
H5T_cset_t old_cset;
@@ -2589,7 +2592,7 @@ test_move_preserves_deprec(hid_t fapl_id, hbool_t new_format)
old_cset = linfo.cset;
if (old_cset != H5T_CSET_UTF8)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
old_corder = linfo.corder;
if (old_corder != 0)
@@ -2616,7 +2619,7 @@ test_move_preserves_deprec(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (old_cset != linfo.cset)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (old_corder != linfo.corder)
TEST_ERROR;
@@ -2633,7 +2636,7 @@ test_move_preserves_deprec(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (old_corder == linfo.corder)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 1)
TEST_ERROR;
@@ -2652,7 +2655,7 @@ test_move_preserves_deprec(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info1(file_id, "group_copied", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 2)
TEST_ERROR;
@@ -2670,7 +2673,7 @@ test_move_preserves_deprec(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info1(file_id, "group_copied2", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 3)
TEST_ERROR;
@@ -2686,7 +2689,7 @@ test_move_preserves_deprec(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info1(file_id, "group", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (old_corder != linfo.corder)
TEST_ERROR;
@@ -2704,7 +2707,7 @@ test_move_preserves_deprec(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info1(file_id, "group_moved", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 4)
TEST_ERROR;
@@ -2722,7 +2725,7 @@ test_move_preserves_deprec(hid_t fapl_id, hbool_t new_format)
TEST_ERROR;
if (H5Lget_info1(file_id, "group_moved_again", &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != 5)
TEST_ERROR;
@@ -2765,12 +2768,12 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_root_deprec(hid_t fapl, hbool_t new_format)
+external_link_root_deprec(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- H5L_info1_t linfo; /* Link information */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ H5L_info1_t linfo; /* Link information */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE];
char filename2[NAME_BUF_SIZE];
const char *file; /* File from external link */
@@ -2794,7 +2797,7 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Check that external links are registered with the library */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
/* Create file with link to first file */
@@ -2810,21 +2813,21 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format)
goto error;
if (H5L_TYPE_EXTERNAL != linfo.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been an external link");
+ puts(" Unexpected object type - should have been an external link");
goto error;
}
if (H5Lget_val(fid, "ext_link", objname, sizeof(objname), H5P_DEFAULT) < 0)
TEST_ERROR;
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR;
- if (HDstrcmp(file, filename1) != 0) {
+ if (strcmp(file, filename1) != 0) {
H5_FAILED();
- HDputs(" External link file name incorrect");
+ puts(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/") != 0) {
+ if (strcmp(path, "/") != 0) {
H5_FAILED();
- HDputs(" External link path incorrect");
+ puts(" External link path incorrect");
goto error;
}
@@ -2838,21 +2841,21 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format)
goto error;
if (H5L_TYPE_EXTERNAL != linfo.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been an external link");
+ puts(" Unexpected object type - should have been an external link");
goto error;
}
if (H5Lget_val(fid, "ext_link", objname, sizeof(objname), H5P_DEFAULT) < 0)
TEST_ERROR;
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR;
- if (HDstrcmp(file, filename1) != 0) {
+ if (strcmp(file, filename1) != 0) {
H5_FAILED();
- HDputs(" External link file name incorrect");
+ puts(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/") != 0) {
+ if (strcmp(path, "/") != 0) {
H5_FAILED();
- HDputs(" External link path incorrect");
+ puts(" External link path incorrect");
goto error;
}
@@ -2869,7 +2872,7 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/") != 0)
+ if (strcmp(objname, "/") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -2914,11 +2917,11 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format)
/* Check names */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/new_group") != 0)
+ if (strcmp(objname, "/new_group") != 0)
TEST_ERROR;
if (H5Iget_name(gid2, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/newer_group") != 0)
+ if (strcmp(objname, "/newer_group") != 0)
TEST_ERROR;
/* Close opened objects */
@@ -2984,14 +2987,14 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_query_deprec(hid_t fapl, hbool_t new_format)
+external_link_query_deprec(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
- const char *file_name; /* Name of the file the external link points to */
- const char *object_name; /* Name of the object the external link points to */
- H5O_info1_t oi; /* Object information */
- H5L_info1_t li; /* Link information */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
+ const char *file_name; /* Name of the file the external link points to */
+ const char *object_name; /* Name of the object the external link points to */
+ H5O_info1_t oi; /* Object information */
+ H5L_info1_t li; /* Link information */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], /* Names of files to externally link across */
query_buf[NAME_BUF_SIZE]; /* Buffer to hold query result */
@@ -3016,11 +3019,11 @@ external_link_query_deprec(hid_t fapl, hbool_t new_format)
/* Get size of buffer for external link */
if (H5Lget_info1(fid, "src", &li, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (li.u.val_size != (1 + (HDstrlen(filename2) + 1) + (HDstrlen("/dst") + 1)))
+ if (li.u.val_size != (1 + (strlen(filename2) + 1) + (strlen("/dst") + 1)))
TEST_ERROR;
if (H5L_TYPE_EXTERNAL != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been an external link");
+ puts(" Unexpected link class - should have been an external link");
goto error;
}
@@ -3049,11 +3052,11 @@ external_link_query_deprec(hid_t fapl, hbool_t new_format)
/* Get size of buffer for external link */
if (H5Lget_info1(fid, "src", &li, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (li.u.val_size != (1 + (HDstrlen(filename2) + 1) + (HDstrlen("/dst") + 1)))
+ if (li.u.val_size != (1 + (strlen(filename2) + 1) + (strlen("/dst") + 1)))
TEST_ERROR;
if (H5L_TYPE_EXTERNAL != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been an external link");
+ puts(" Unexpected link class - should have been an external link");
goto error;
}
@@ -3066,9 +3069,9 @@ external_link_query_deprec(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Compare the file and object names */
- if (HDstrcmp(file_name, filename2) != 0)
+ if (strcmp(file_name, filename2) != 0)
TEST_ERROR;
- if (HDstrcmp(object_name, "/dst") != 0)
+ if (strcmp(object_name, "/dst") != 0)
TEST_ERROR;
/* Query information about object that external link points to */
@@ -3076,7 +3079,7 @@ external_link_query_deprec(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5O_TYPE_GROUP != oi.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been a group");
+ puts(" Unexpected object type - should have been a group");
goto error;
}
@@ -3138,11 +3141,13 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_closing_deprec(hid_t fapl, hbool_t new_format)
+external_link_closing_deprec(hid_t fapl, bool new_format)
{
- hid_t fid1 = (-1), fid2 = (-1), fid3 = (-1), fid4 = (-1);
- hid_t gid = (-1), tid = (-1), tid2 = (-1), sid = (-1), did = (-1);
- hid_t lcpl_id = (-1);
+ hid_t fid1 = (H5I_INVALID_HID), fid2 = (H5I_INVALID_HID), fid3 = (H5I_INVALID_HID),
+ fid4 = (H5I_INVALID_HID);
+ hid_t gid = (H5I_INVALID_HID), tid = (H5I_INVALID_HID), tid2 = (H5I_INVALID_HID), sid = (H5I_INVALID_HID),
+ did = (H5I_INVALID_HID);
+ hid_t lcpl_id = (H5I_INVALID_HID);
hsize_t dims[2];
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE],
filename4[NAME_BUF_SIZE], /* Names of files to externally link across */
@@ -3262,7 +3267,7 @@ external_link_closing_deprec(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5Oget_comment_by_name(fid1, "elink/elink/elink/group1_moved", buf, sizeof(buf), H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(buf, "comment") != 0)
+ if (strcmp(buf, "comment") != 0)
TEST_ERROR;
/* Test H5*open */
@@ -3366,7 +3371,7 @@ external_link_closing_deprec(hid_t fapl, hbool_t new_format)
/* Add a few regular groups and a soft link in file2 using intermediate group creation */
if ((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0)
TEST_ERROR;
- if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0)
+ if (H5Pset_create_intermediate_group(lcpl_id, true) < 0)
TEST_ERROR;
if (H5Lcreate_soft("/elink2", fid1, "elink/file2group1/file2group2/slink", lcpl_id, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -3449,7 +3454,7 @@ UD_hard_create_deprec(const char H5_ATTR_UNUSED *link_name, hid_t loc_group, con
size_t udata_size, hid_t H5_ATTR_UNUSED lcpl_id)
{
haddr_t addr;
- hid_t target_obj = -1;
+ hid_t target_obj = H5I_INVALID_HID;
herr_t ret_value = 0;
if (udata_size != sizeof(haddr_t)) {
@@ -3523,7 +3528,7 @@ UD_hard_traverse_deprec(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, c
size_t udata_size, hid_t H5_ATTR_UNUSED lapl_id, hid_t H5_ATTR_UNUSED dxpl_id)
{
haddr_t addr;
- hid_t ret_value = -1;
+ hid_t ret_value = H5I_INVALID_HID;
if (udata_size != sizeof(haddr_t))
return FAIL;
@@ -3540,7 +3545,7 @@ static herr_t
UD_hard_delete_deprec(const char H5_ATTR_UNUSED *link_name, hid_t file, const void *udata, size_t udata_size)
{
haddr_t addr;
- hid_t target_obj = -1;
+ hid_t target_obj = H5I_INVALID_HID;
herr_t ret_value = 0;
if (udata_size != sizeof(haddr_t)) {
@@ -3611,11 +3616,11 @@ done:
static int
ud_hard_links_deprec(hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- H5L_info1_t li; /* Link information */
- char objname[NAME_BUF_SIZE]; /* Object name */
- h5_stat_size_t empty_size; /* Size of an empty file */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ H5L_info1_t li; /* Link information */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ h5_stat_size_t empty_size; /* Size of an empty file */
char filename[NAME_BUF_SIZE];
TESTING("user-defined hard link using deprecated routines (w/new group format)");
@@ -3636,9 +3641,9 @@ ud_hard_links_deprec(hid_t fapl)
TEST_ERROR;
/* Check that external links are registered and UD hard links are not */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
TEST_ERROR;
/* Register "user-defined hard links" with the library */
@@ -3646,9 +3651,9 @@ ud_hard_links_deprec(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are now registered */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
TEST_ERROR;
/* Create a group for the UD hard link to point to */
@@ -3681,7 +3686,7 @@ ud_hard_links_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/group") != 0)
+ if (strcmp(objname, "/group") != 0)
TEST_ERROR;
/* Create object in group */
@@ -3701,7 +3706,7 @@ ud_hard_links_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/group/new_group") != 0)
+ if (strcmp(objname, "/group/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -3716,7 +3721,7 @@ ud_hard_links_deprec(hid_t fapl)
TEST_ERROR;
if (UD_HARD_TYPE != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been a UD hard link");
+ puts(" Unexpected link class - should have been a UD hard link");
goto error;
} /* end if */
@@ -3768,10 +3773,10 @@ error:
static int
ud_link_reregister_deprec(hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- H5L_info1_t li; /* Link information */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ H5L_info1_t li; /* Link information */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename[NAME_BUF_SIZE];
h5_stat_size_t empty_size; /* Size of an empty file */
@@ -3793,7 +3798,7 @@ ud_link_reregister_deprec(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are not registered */
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
TEST_ERROR;
/* Register "user-defined hard links" with the library */
@@ -3801,7 +3806,7 @@ ud_link_reregister_deprec(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are registered */
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
TEST_ERROR;
/* Point a UD defined hard link to a group in the same way as the previous test */
@@ -3827,7 +3832,7 @@ ud_link_reregister_deprec(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are no longer registered */
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
TEST_ERROR;
/* Verify that we can't traverse the ud link anymore */
@@ -3852,7 +3857,7 @@ ud_link_reregister_deprec(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are registered again */
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
TEST_ERROR;
/* Open a group through the ud link (now a different class of link).
@@ -3864,7 +3869,7 @@ ud_link_reregister_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/" REREG_TARGET_NAME) != 0)
+ if (strcmp(objname, "/" REREG_TARGET_NAME) != 0)
TEST_ERROR;
/* Create object in group */
@@ -3884,7 +3889,7 @@ ud_link_reregister_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/rereg_target/new_group") != 0)
+ if (strcmp(objname, "/rereg_target/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -3901,7 +3906,7 @@ ud_link_reregister_deprec(hid_t fapl)
* other link type */
if (H5Lregister(UD_hard_class_deprec) < 0)
FAIL_STACK_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
FAIL_STACK_ERROR;
/* Ensure we can open the group through the UD link (now that UD hard
@@ -3932,7 +3937,7 @@ ud_link_reregister_deprec(hid_t fapl)
if (H5Lunregister((H5L_type_t)UD_HARD_TYPE) < 0)
FAIL_STACK_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
FAIL_STACK_ERROR;
PASSED();
@@ -3950,11 +3955,11 @@ error:
} /* end ud_link_reregister_deprec() */
static int
-ud_callbacks_deprec(hid_t fapl, hbool_t new_format)
+ud_callbacks_deprec(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t lcpl = -1; /* Link Creation PL */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t lcpl = H5I_INVALID_HID; /* Link Creation PL */
H5L_info1_t li; /* Link information */
char ud_target_name[] = UD_CB_TARGET; /* Link target name */
char filename[NAME_BUF_SIZE];
@@ -3972,11 +3977,11 @@ ud_callbacks_deprec(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Check that registered link classes are, and unregistered ones aren't */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_CB_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_CB_TYPE) != false)
TEST_ERROR;
/* Hit two birds with one stone: register UD hard links from previous
@@ -3990,11 +3995,11 @@ ud_callbacks_deprec(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Check that registered link classes are, and unregistered ones aren't */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_CB_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_CB_TYPE) != true)
TEST_ERROR;
/* Create a group for the UD link to point to */
@@ -4021,14 +4026,14 @@ ud_callbacks_deprec(hid_t fapl, hbool_t new_format)
TEST_ERROR;
if (UD_CB_TYPE != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been a UD hard link");
+ puts(" Unexpected link class - should have been a UD hard link");
goto error;
}
/* Fill the query buffer */
if (H5Lget_val(fid, UD_CB_LINK_NAME, query_buf, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(query_buf, "query succeeded") != 0)
+ if (strcmp(query_buf, "query succeeded") != 0)
TEST_ERROR;
/* Move the link */
@@ -4127,14 +4132,14 @@ error:
*-------------------------------------------------------------------------
*/
static int
-lapl_nlinks_deprec(hid_t fapl, hbool_t new_format)
+lapl_nlinks_deprec(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t plist = -1; /* lapl ID */
- hid_t tid = -1, sid = -1, did = -1; /* Other IDs */
- hid_t gapl = -1, dapl = -1, tapl = -1; /* Other property lists */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t plist = H5I_INVALID_HID; /* lapl ID */
+ hid_t tid = H5I_INVALID_HID, sid = H5I_INVALID_HID, did = H5I_INVALID_HID; /* Other IDs */
+ hid_t gapl = H5I_INVALID_HID, dapl = H5I_INVALID_HID, tapl = H5I_INVALID_HID; /* Other property lists */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename[NAME_BUF_SIZE];
size_t nlinks; /* nlinks for H5Pset_nlinks */
hsize_t dims[2];
@@ -4228,7 +4233,7 @@ lapl_nlinks_deprec(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/soft17") != 0)
+ if (strcmp(objname, "/soft17") != 0)
TEST_ERROR;
/* Create group using soft link */
@@ -4261,7 +4266,7 @@ lapl_nlinks_deprec(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (gid >= 0) {
H5_FAILED();
- HDputs(" Should have failed for sequence of too many nested links.");
+ puts(" Should have failed for sequence of too many nested links.");
goto error;
}
@@ -4272,7 +4277,7 @@ lapl_nlinks_deprec(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/soft4") != 0)
+ if (strcmp(objname, "/soft4") != 0)
TEST_ERROR;
/* Test other functions that should use a LAPL */
@@ -4434,13 +4439,13 @@ error:
*-------------------------------------------------------------------------
*/
static int
-linkinfo_deprec(hid_t fapl, hbool_t new_format)
+linkinfo_deprec(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t tid = -1; /* Type ID */
- hid_t sid = -1, did = -1; /* Dataspace and dataset IDs */
- H5L_info1_t li; /* Link information */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t tid = H5I_INVALID_HID; /* Type ID */
+ hid_t sid = H5I_INVALID_HID, did = H5I_INVALID_HID; /* Dataspace and dataset IDs */
+ H5L_info1_t li; /* Link information */
char filename[NAME_BUF_SIZE];
if (new_format)
@@ -4549,15 +4554,15 @@ error:
static int
corder_create_compact_deprec(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- unsigned nlinks; /* Number of link messages in group's header */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- unsigned u; /* Local index variable */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ unsigned nlinks; /* Number of link messages in group's header */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ unsigned u; /* Local index variable */
TESTING("creating compact group with creation order indexing using deprecated routines");
@@ -4579,11 +4584,11 @@ corder_create_compact_deprec(hid_t fapl)
TEST_ERROR;
/* Check on group's initial status */
- if (H5G__is_empty_test(group_id) != TRUE)
+ if (H5G__is_empty_test(group_id) != true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Query the group creation properties */
@@ -4592,20 +4597,20 @@ corder_create_compact_deprec(hid_t fapl)
/* Create several links, but keep group in compact form */
for (u = 0; u < max_compact; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, &nlinks) != TRUE)
+ if (H5G__has_links_test(group_id, &nlinks) != true)
TEST_ERROR;
if (nlinks != (u + 1))
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
} /* end for */
@@ -4630,13 +4635,13 @@ corder_create_compact_deprec(hid_t fapl)
FAIL_STACK_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, &nlinks) != TRUE)
+ if (H5G__has_links_test(group_id, &nlinks) != true)
TEST_ERROR;
if (nlinks != max_compact)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Loop through links, checking their creation order values */
@@ -4645,12 +4650,12 @@ corder_create_compact_deprec(hid_t fapl)
H5L_info1_t linfo; /* Link information */
/* Retrieve information for link */
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Lget_info1(group_id, objname, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
/* Verify creation order of link */
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != u)
TEST_ERROR;
@@ -4691,17 +4696,17 @@ error:
static int
corder_create_dense_deprec(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- unsigned nlinks; /* Number of link messages in group's header */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- unsigned u; /* Local index variable */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ unsigned nlinks; /* Number of link messages in group's header */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ unsigned u; /* Local index variable */
TESTING("creating dense group with creation order indexing using deprecated routines");
@@ -4723,11 +4728,11 @@ corder_create_dense_deprec(hid_t fapl)
TEST_ERROR;
/* Check on group's initial status */
- if (H5G__is_empty_test(group_id) != TRUE)
+ if (H5G__is_empty_test(group_id) != true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Query the group creation properties */
@@ -4736,36 +4741,36 @@ corder_create_dense_deprec(hid_t fapl)
/* Create several links, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, &nlinks) != TRUE)
+ if (H5G__has_links_test(group_id, &nlinks) != true)
TEST_ERROR;
if (nlinks != (u + 1))
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
} /* end for */
/* Create another link, to push group into dense form */
- HDsnprintf(objname, sizeof(objname), "filler %u", max_compact);
+ snprintf(objname, sizeof(objname), "filler %u", max_compact);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Retrieve & verify # of records in the name & creation order indices */
@@ -4795,11 +4800,11 @@ corder_create_dense_deprec(hid_t fapl)
FAIL_STACK_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Loop through links, checking their creation order values */
@@ -4808,12 +4813,12 @@ corder_create_dense_deprec(hid_t fapl)
H5L_info1_t linfo; /* Link information */
/* Retrieve information for link */
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Lget_info1(group_id, objname, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
/* Verify creation order of link */
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != u)
TEST_ERROR;
@@ -4855,8 +4860,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, hbool_t hard_link,
- hbool_t use_index)
+link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, bool hard_link, bool use_index)
{
char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
char valname[NAME_BUF_SIZE]; /* Link value name */
@@ -4864,7 +4868,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
H5L_info1_t linfo; /* Link info struct */
/* Make link value for increasing/native order queries */
- HDsnprintf(valname, sizeof(valname), "value %02u", (unsigned)n);
+ snprintf(valname, sizeof(valname), "value %02u", (unsigned)n);
/* Verify the link information for first link, in increasing creation order */
memset(&linfo, 0, sizeof(linfo));
@@ -4887,7 +4891,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -4896,7 +4900,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Don't test "native" order if there is no creation order index, since
@@ -4926,7 +4930,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -4935,7 +4939,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
} /* end if */
@@ -4960,7 +4964,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -4969,7 +4973,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Verify the link information for first link, in increasing link name order */
@@ -4992,7 +4996,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpval, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -5001,7 +5005,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Don't test "native" order queries on link name order, since there's not
@@ -5028,7 +5032,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -5037,7 +5041,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Success */
@@ -5061,26 +5065,26 @@ error:
static int
link_info_by_idx_deprec(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- unsigned hard_link; /* Create hard or soft link? */
- unsigned use_index; /* Use index on creation order values */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- H5L_info1_t linfo; /* Link info struct */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char valname[NAME_BUF_SIZE]; /* Link value name */
- char filename[NAME_BUF_SIZE]; /* File name */
- char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
- unsigned u; /* Local index variable */
- ssize_t name_len; /* Length of name */
- herr_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ unsigned hard_link; /* Create hard or soft link? */
+ unsigned use_index; /* Use index on creation order values */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ H5L_info1_t linfo; /* Link info struct */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char valname[NAME_BUF_SIZE]; /* Link value name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
+ unsigned u; /* Local index variable */
+ ssize_t name_len; /* Length of name */
+ herr_t ret; /* Generic return value */
/* Loop over creating hard or soft links */
- for (hard_link = FALSE; hard_link <= TRUE; hard_link++) {
+ for (hard_link = false; hard_link <= true; hard_link++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
if (hard_link) {
if (use_index)
TESTING("querying info by index w/creation order index, using hard links and deprecated "
@@ -5141,7 +5145,7 @@ link_info_by_idx_deprec(hid_t fapl)
/* Create several links, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Check for creating hard or soft link */
if (hard_link) {
@@ -5156,7 +5160,7 @@ link_info_by_idx_deprec(hid_t fapl)
} /* end if */
else {
/* Make value for link */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Create soft link */
if (H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -5169,7 +5173,7 @@ link_info_by_idx_deprec(hid_t fapl)
} /* end for */
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) != TRUE)
+ if (H5G__has_links_test(group_id, NULL) != true)
TEST_ERROR;
/* Check for out of bound offset queries */
@@ -5201,7 +5205,7 @@ link_info_by_idx_deprec(hid_t fapl)
/* Create more links, to push group into dense form */
for (; u < (max_compact * 2); u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Check for creating hard or soft link */
if (hard_link) {
@@ -5216,7 +5220,7 @@ link_info_by_idx_deprec(hid_t fapl)
} /* end if */
else {
/* Make value for link */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Create soft link */
if (H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -5224,7 +5228,7 @@ link_info_by_idx_deprec(hid_t fapl)
} /* end else */
/* Verify state of group */
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Verify link information for new link */
@@ -5300,22 +5304,22 @@ error:
static int
link_info_by_idx_old_deprec(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
- unsigned hard_link; /* Create hard or soft link? */
- H5L_info1_t linfo; /* Link info struct */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char valname[NAME_BUF_SIZE]; /* Link value name */
- char filename[NAME_BUF_SIZE]; /* File name */
- haddr_t objno[CORDER_NLINKS]; /* Addresses of the objects created */
- char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
- char tmpval[NAME_BUF_SIZE]; /* Temporary link value */
- unsigned u; /* Local index variable */
- ssize_t name_len; /* Length of name */
- herr_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
+ unsigned hard_link; /* Create hard or soft link? */
+ H5L_info1_t linfo; /* Link info struct */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char valname[NAME_BUF_SIZE]; /* Link value name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ haddr_t objno[CORDER_NLINKS]; /* Addresses of the objects created */
+ char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
+ char tmpval[NAME_BUF_SIZE]; /* Temporary link value */
+ unsigned u; /* Local index variable */
+ ssize_t name_len; /* Length of name */
+ herr_t ret; /* Generic return value */
/* Loop over creating hard or soft links */
- for (hard_link = FALSE; hard_link <= TRUE; hard_link++) {
+ for (hard_link = false; hard_link <= true; hard_link++) {
if (hard_link)
TESTING("querying info by index in old-style group, using hard links and deprecated routines");
else
@@ -5333,7 +5337,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
/* Create several links */
for (u = 0; u < CORDER_NLINKS; u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Check for creating hard or soft link */
if (hard_link) {
@@ -5354,7 +5358,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
} /* end if */
else {
/* Make value for link */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Create soft link */
if (H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -5367,10 +5371,10 @@ link_info_by_idx_old_deprec(hid_t fapl)
unsigned dec_u = CORDER_NLINKS - (u + 1); /* Decreasing mapped index */
/* Make link name for increasing/native order queries */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Make link value for increasing/native order queries */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Verify link information (in increasing order) */
if (hard_link) {
@@ -5384,7 +5388,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end else */
@@ -5392,7 +5396,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, tmpname) != 0)
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
/* Verify link information (in native order - native is increasing) */
@@ -5407,7 +5411,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end else */
@@ -5415,14 +5419,14 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, tmpname) != 0)
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
/* Make link name for decreasing order queries */
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
/* Make link value for decreasing order queries */
- HDsnprintf(valname, sizeof(valname), "value %02u", dec_u);
+ snprintf(valname, sizeof(valname), "value %02u", dec_u);
/* Verify link information (in decreasing order) */
if (hard_link) {
@@ -5436,7 +5440,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end else */
@@ -5444,7 +5448,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, tmpname) != 0)
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -5467,7 +5471,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Close the group */
@@ -5506,27 +5510,27 @@ error:
static int
delete_by_idx_deprec(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- unsigned use_index; /* Use index on creation order values */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- H5L_info1_t linfo; /* Link info struct */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ unsigned use_index; /* Use index on creation order values */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ H5L_info1_t linfo; /* Link info struct */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Loop over operating on different indices on link fields */
for (idx_type = H5_INDEX_NAME; idx_type <= H5_INDEX_CRT_ORDER; idx_type++) {
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_DEC; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -5614,7 +5618,7 @@ delete_by_idx_deprec(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -5624,12 +5628,12 @@ delete_by_idx_deprec(hid_t fapl)
TEST_ERROR;
/* Verify link information for new link */
- if (link_info_by_idx_check_deprec(group_id, objname, (hsize_t)u, TRUE, use_index) < 0)
+ if (link_info_by_idx_check_deprec(group_id, objname, (hsize_t)u, true, use_index) < 0)
TEST_ERROR;
} /* end for */
/* Verify state of group (compact) */
- if (H5G__has_links_test(group_id, NULL) != TRUE)
+ if (H5G__has_links_test(group_id, NULL) != true)
TEST_ERROR;
/* Check for out of bound deletion */
@@ -5667,10 +5671,10 @@ delete_by_idx_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", (max_compact - (u + 2)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", (max_compact - (u + 2)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -5679,7 +5683,7 @@ delete_by_idx_deprec(hid_t fapl)
TEST_ERROR;
/* Verify state of group (empty) */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
/* Create more links, to push group into dense form */
@@ -5687,7 +5691,7 @@ delete_by_idx_deprec(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -5698,11 +5702,11 @@ delete_by_idx_deprec(hid_t fapl)
/* Verify state of group (dense) */
if (u >= max_compact)
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Verify link information for new link */
- if (link_info_by_idx_check_deprec(group_id, objname, (hsize_t)u, TRUE, use_index) < 0)
+ if (link_info_by_idx_check_deprec(group_id, objname, (hsize_t)u, true, use_index) < 0)
TEST_ERROR;
} /* end for */
@@ -5741,10 +5745,10 @@ delete_by_idx_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - (u + 2)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - (u + 2)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -5753,9 +5757,9 @@ delete_by_idx_deprec(hid_t fapl)
TEST_ERROR;
/* Verify state of group (empty) */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Check for deletion on empty group again */
@@ -5774,7 +5778,7 @@ delete_by_idx_deprec(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -5785,11 +5789,11 @@ delete_by_idx_deprec(hid_t fapl)
/* Verify state of group (dense) */
if (u >= max_compact)
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Verify link information for new link */
- if (link_info_by_idx_check_deprec(group_id, objname, (hsize_t)u, TRUE, use_index) < 0)
+ if (link_info_by_idx_check_deprec(group_id, objname, (hsize_t)u, true, use_index) < 0)
TEST_ERROR;
} /* end for */
@@ -5819,11 +5823,11 @@ delete_by_idx_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u",
- ((max_compact * 2) - ((u * 2) + 2)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u",
+ ((max_compact * 2) - ((u * 2) + 2)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -5853,11 +5857,11 @@ delete_by_idx_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u",
- ((max_compact * 2) - ((u * 2) + 4)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u",
+ ((max_compact * 2) - ((u * 2) + 4)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -5866,9 +5870,9 @@ delete_by_idx_deprec(hid_t fapl)
TEST_ERROR;
/* Verify state of group (empty) */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Close the group */
@@ -5914,16 +5918,16 @@ error:
static int
delete_by_idx_old_deprec(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
- H5L_info1_t linfo; /* Link info struct */
- H5_iter_order_t order; /* Order within in the index */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- haddr_t objno[CORDER_NLINKS]; /* Addresses of the objects created */
- char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
+ H5L_info1_t linfo; /* Link info struct */
+ H5_iter_order_t order; /* Order within in the index */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ haddr_t objno[CORDER_NLINKS]; /* Addresses of the objects created */
+ char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_DEC; order++) {
@@ -5960,7 +5964,7 @@ delete_by_idx_old_deprec(hid_t fapl)
H5O_info1_t oi; /* Buffer for querying object's info */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create group */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -6021,10 +6025,10 @@ delete_by_idx_old_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -6042,7 +6046,7 @@ delete_by_idx_old_deprec(hid_t fapl)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Delete links in middle */
@@ -6052,7 +6056,7 @@ delete_by_idx_old_deprec(hid_t fapl)
H5O_info1_t oi; /* Buffer for querying object's info */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create group */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -6095,10 +6099,10 @@ delete_by_idx_old_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -6129,10 +6133,10 @@ delete_by_idx_old_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -6141,7 +6145,7 @@ delete_by_idx_old_deprec(hid_t fapl)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Close the group */
@@ -6213,8 +6217,8 @@ link_iterate_deprec_cb(hid_t group_id, const char *link_name, const H5L_info1_t
} /* end if */
/* Verify name of link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", (unsigned)my_info.corder);
- if (HDstrcmp(link_name, objname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", (unsigned)my_info.corder);
+ if (strcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */
@@ -6222,7 +6226,7 @@ link_iterate_deprec_cb(hid_t group_id, const char *link_name, const H5L_info1_t
return H5_ITER_ERROR;
if (op_data->visited[op_data->curr])
return H5_ITER_ERROR;
- op_data->visited[op_data->curr] = TRUE;
+ op_data->visited[op_data->curr] = true;
/* Advance to next value, in correct direction */
if (op_data->order != H5_ITER_DEC)
@@ -6295,7 +6299,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Literate1(group_id, idx_type, order, &skip, link_iterate_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6303,7 +6307,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
if (skip != max_links)
TEST_ERROR;
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
/* Iterate over links in group, with H5Giterate */
@@ -6312,7 +6316,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6320,7 +6324,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
if (gskip != (int)max_links)
TEST_ERROR;
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
/* Skip over some links in group */
@@ -6329,7 +6333,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = (int64_t)(order != H5_ITER_DEC ? skip : ((max_links - 1) - skip));
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Literate1(group_id, idx_type, order, &skip, link_iterate_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6338,12 +6342,12 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
TEST_ERROR;
if (order == H5_ITER_INC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v + (max_links / 2)] == FALSE)
+ if (iter_info->visited[v + (max_links / 2)] == false)
TEST_ERROR;
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
} /* end if */
else {
@@ -6351,7 +6355,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
if (nvisit != (max_links / 2))
@@ -6364,7 +6368,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - (unsigned)gskip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6373,12 +6377,12 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
TEST_ERROR;
if (order == H5_ITER_INC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v + (max_links / 2)] == FALSE)
+ if (iter_info->visited[v + (max_links / 2)] == false)
TEST_ERROR;
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
} /* end if */
else {
@@ -6386,7 +6390,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
if (nvisit != (max_links / 2))
@@ -6399,7 +6403,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if ((ret = H5Literate1(group_id, idx_type, order, &skip, link_iterate_deprec_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -6413,7 +6417,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if ((ret = H5Giterate(group_id, ".", &gskip, group_iterate_deprec_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -6452,21 +6456,21 @@ error:
static int
link_iterate_deprec(hid_t fapl)
{
- hid_t file_id = (-1); /* File ID */
- hid_t group_id = (-1); /* Group ID */
- hid_t gcpl_id = (-1); /* Group creation property list ID */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- unsigned use_index; /* Use index on creation order values */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- link_iter_info_t iter_info; /* Iterator info */
- hbool_t *visited = NULL; /* Array of flags for visiting links */
- hsize_t skip; /* # of links to skip in group */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t file_id = (H5I_INVALID_HID); /* File ID */
+ hid_t group_id = (H5I_INVALID_HID); /* Group ID */
+ hid_t gcpl_id = (H5I_INVALID_HID); /* Group creation property list ID */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ unsigned use_index; /* Use index on creation order values */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ link_iter_info_t iter_info; /* Iterator info */
+ bool *visited = NULL; /* Array of flags for visiting links */
+ hsize_t skip; /* # of links to skip in group */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Create group creation property list */
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
@@ -6478,7 +6482,7 @@ link_iterate_deprec(hid_t fapl)
/* Allocate the "visited link" array */
iter_info.max_visit = max_compact * 2;
- if (NULL == (visited = (hbool_t *)malloc(sizeof(hbool_t) * iter_info.max_visit)))
+ if (NULL == (visited = (bool *)malloc(sizeof(bool) * iter_info.max_visit)))
TEST_ERROR;
iter_info.visited = visited;
@@ -6487,7 +6491,7 @@ link_iterate_deprec(hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_NATIVE; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -6570,7 +6574,7 @@ link_iterate_deprec(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -6581,7 +6585,7 @@ link_iterate_deprec(hid_t fapl)
} /* end for */
/* Verify state of group (compact) */
- if (H5G__has_links_test(group_id, NULL) != TRUE)
+ if (H5G__has_links_test(group_id, NULL) != true)
TEST_ERROR;
/* Check for out of bound iteration on compact group */
@@ -6603,7 +6607,7 @@ link_iterate_deprec(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -6614,7 +6618,7 @@ link_iterate_deprec(hid_t fapl)
} /* end for */
/* Verify state of group (dense) */
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound iteration on dense group */
@@ -6709,9 +6713,9 @@ link_iterate_old_deprec_cb(hid_t group_id, const char *link_name, const H5L_info
} /* end if */
/* Verify name of link */
- HDsnprintf(objname, sizeof(objname), "filler %02u",
- (info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped)));
- if (HDstrcmp(link_name, objname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u",
+ (info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped)));
+ if (strcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */
@@ -6719,7 +6723,7 @@ link_iterate_old_deprec_cb(hid_t group_id, const char *link_name, const H5L_info
return H5_ITER_ERROR;
if (op_data->visited[op_data->curr])
return H5_ITER_ERROR;
- op_data->visited[op_data->curr] = TRUE;
+ op_data->visited[op_data->curr] = true;
/* Advance to next value, in correct direction */
if (op_data->order != H5_ITER_DEC)
@@ -6775,7 +6779,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Literate1(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6783,7 +6787,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
if (skip != max_links)
TEST_ERROR;
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
/* Iterate over links in group, with H5Giterate */
@@ -6792,7 +6796,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_old_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6800,7 +6804,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
if (gskip != (int)max_links)
TEST_ERROR;
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
/* Skip over some links in group */
@@ -6809,7 +6813,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = (int64_t)(order != H5_ITER_DEC ? skip : ((max_links - 1) - skip));
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Literate1(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6818,12 +6822,12 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
TEST_ERROR;
if (order == H5_ITER_INC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v + (max_links / 2)] == FALSE)
+ if (iter_info->visited[v + (max_links / 2)] == false)
TEST_ERROR;
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
} /* end if */
else {
@@ -6831,7 +6835,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
if (nvisit != (max_links / 2))
@@ -6844,7 +6848,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - (unsigned)gskip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_old_deprec_cb, iter_info) < 0)
TEST_ERROR;
@@ -6853,12 +6857,12 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
TEST_ERROR;
if (order == H5_ITER_INC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v + (max_links / 2)] == FALSE)
+ if (iter_info->visited[v + (max_links / 2)] == false)
TEST_ERROR;
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
} /* end if */
else {
@@ -6866,7 +6870,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
if (nvisit != (max_links / 2))
@@ -6879,7 +6883,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if ((ret = H5Literate1(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_deprec_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -6893,7 +6897,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if ((ret = H5Giterate(group_id, ".", &gskip, group_iterate_old_deprec_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -6915,7 +6919,8 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
skip = 0;
H5E_BEGIN_TRY
{
- ret = H5Literate1((hid_t)(-1), H5_INDEX_NAME, order, &skip, link_iterate_fail_deprec_cb, NULL);
+ ret = H5Literate1((hid_t)(H5I_INVALID_HID), H5_INDEX_NAME, order, &skip, link_iterate_fail_deprec_cb,
+ NULL);
}
H5E_END_TRY
if (ret >= 0)
@@ -6923,7 +6928,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma
H5E_BEGIN_TRY
{
- ret = H5Giterate((hid_t)(-1), ".", &gskip, group_iterate_old_deprec_cb, iter_info);
+ ret = H5Giterate((hid_t)(H5I_INVALID_HID), ".", &gskip, group_iterate_old_deprec_cb, iter_info);
}
H5E_END_TRY
if (ret >= 0)
@@ -6948,20 +6953,20 @@ error:
static int
link_iterate_old_deprec(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- H5_iter_order_t order; /* Order within in the index */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- link_iter_info_t iter_info; /* Iterator info */
- hbool_t *visited = NULL; /* Array of flags for visiting links */
- hsize_t skip; /* # of links to skip in group */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ H5_iter_order_t order; /* Order within in the index */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ link_iter_info_t iter_info; /* Iterator info */
+ bool *visited = NULL; /* Array of flags for visiting links */
+ hsize_t skip; /* # of links to skip in group */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Allocate the "visited link" array */
iter_info.max_visit = CORDER_NLINKS;
- if (NULL == (visited = (hbool_t *)malloc(sizeof(hbool_t) * iter_info.max_visit)))
+ if (NULL == (visited = (bool *)malloc(sizeof(bool) * iter_info.max_visit)))
TEST_ERROR;
iter_info.visited = visited;
@@ -7001,7 +7006,7 @@ link_iterate_old_deprec(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -7011,7 +7016,7 @@ link_iterate_old_deprec(hid_t fapl)
} /* end for */
/* Verify state of group (symbol table) */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound iteration on old-style group */
@@ -7082,12 +7087,12 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_root(hid_t fapl, hbool_t new_format)
+external_link_root(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- H5L_info2_t linfo; /* Link information */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ H5L_info2_t linfo; /* Link information */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE];
char filename2[NAME_BUF_SIZE];
const char *file; /* File from external link */
@@ -7111,7 +7116,7 @@ external_link_root(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Check that external links are registered with the library */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
/* Create file with link to first file */
@@ -7127,21 +7132,21 @@ external_link_root(hid_t fapl, hbool_t new_format)
goto error;
if (H5L_TYPE_EXTERNAL != linfo.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been an external link");
+ puts(" Unexpected object type - should have been an external link");
goto error;
}
if (H5Lget_val(fid, "ext_link", objname, sizeof(objname), H5P_DEFAULT) < 0)
TEST_ERROR;
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR;
- if (HDstrcmp(file, filename1) != 0) {
+ if (strcmp(file, filename1) != 0) {
H5_FAILED();
- HDputs(" External link file name incorrect");
+ puts(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/") != 0) {
+ if (strcmp(path, "/") != 0) {
H5_FAILED();
- HDputs(" External link path incorrect");
+ puts(" External link path incorrect");
goto error;
}
@@ -7155,21 +7160,21 @@ external_link_root(hid_t fapl, hbool_t new_format)
goto error;
if (H5L_TYPE_EXTERNAL != linfo.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been an external link");
+ puts(" Unexpected object type - should have been an external link");
goto error;
}
if (H5Lget_val(fid, "ext_link", objname, sizeof(objname), H5P_DEFAULT) < 0)
TEST_ERROR;
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR;
- if (HDstrcmp(file, filename1) != 0) {
+ if (strcmp(file, filename1) != 0) {
H5_FAILED();
- HDputs(" External link file name incorrect");
+ puts(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/") != 0) {
+ if (strcmp(path, "/") != 0) {
H5_FAILED();
- HDputs(" External link path incorrect");
+ puts(" External link path incorrect");
goto error;
}
@@ -7186,7 +7191,7 @@ external_link_root(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/") != 0)
+ if (strcmp(objname, "/") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -7231,11 +7236,11 @@ external_link_root(hid_t fapl, hbool_t new_format)
/* Check names */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/new_group") != 0)
+ if (strcmp(objname, "/new_group") != 0)
TEST_ERROR;
if (H5Iget_name(gid2, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/newer_group") != 0)
+ if (strcmp(objname, "/newer_group") != 0)
TEST_ERROR;
/* Close opened objects */
@@ -7301,11 +7306,11 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_path(hid_t fapl, hbool_t new_format)
+external_link_path(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE];
char filename2[NAME_BUF_SIZE];
@@ -7357,7 +7362,7 @@ external_link_path(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/B/C") != 0)
+ if (strcmp(objname, "/A/B/C") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -7387,7 +7392,7 @@ external_link_path(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/B/C/new_group") != 0)
+ if (strcmp(objname, "/A/B/C/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -7423,11 +7428,11 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_mult(hid_t fapl, hbool_t new_format)
+external_link_mult(hid_t fapl, bool new_format)
{
- hid_t fid = -1, fid2 = -1; /* File IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE],
filename4[NAME_BUF_SIZE]; /* Names of files to externally link across */
@@ -7529,7 +7534,7 @@ external_link_mult(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/B/C") != 0)
+ if (strcmp(objname, "/A/B/C") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -7559,7 +7564,7 @@ external_link_mult(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/B/C/new_group") != 0)
+ if (strcmp(objname, "/A/B/C/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -7621,12 +7626,12 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_self(hid_t fapl, hbool_t new_format)
+external_link_self(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t lcpl_id = -1; /* Link Creation Property List ID */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t lcpl_id = H5I_INVALID_HID; /* Link Creation Property List ID */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE];
char filename2[NAME_BUF_SIZE];
char filename3[NAME_BUF_SIZE];
@@ -7648,7 +7653,7 @@ external_link_self(hid_t fapl, hbool_t new_format)
/* Create an lcpl with intermediate group creation set */
if ((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0)
TEST_ERROR;
- if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0)
+ if (H5Pset_create_intermediate_group(lcpl_id, true) < 0)
TEST_ERROR;
/* Create a series of groups within the file: /A/B and /X/Y/Z */
@@ -7675,7 +7680,7 @@ external_link_self(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/X") != 0)
+ if (strcmp(objname, "/X") != 0)
TEST_ERROR;
/* Create object through external link */
@@ -7697,7 +7702,7 @@ external_link_self(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/X/new_group") != 0)
+ if (strcmp(objname, "/X/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -7812,10 +7817,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_pingpong(hid_t fapl, hbool_t new_format)
+external_link_pingpong(hid_t fapl, bool new_format)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1), gid2 = (-1); /* Group IDs */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID), gid2 = (H5I_INVALID_HID); /* Group IDs */
char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE]; /* Names of files to externally link across */
@@ -7877,7 +7882,7 @@ external_link_pingpong(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/final") != 0)
+ if (strcmp(objname, "/final") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -7907,7 +7912,7 @@ external_link_pingpong(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/final/new_group") != 0)
+ if (strcmp(objname, "/final/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -7964,10 +7969,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_toomany(hid_t fapl, hbool_t new_format)
+external_link_toomany(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE]; /* Names of files to externally link across */
@@ -8069,7 +8074,7 @@ external_link_toomany(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/final") != 0)
+ if (strcmp(objname, "/final") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -8113,12 +8118,12 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_dangling(hid_t fapl, hbool_t new_format)
+external_link_dangling(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
- hid_t rid = -1; /* Root Group ID */
- hid_t status = -1; /* Status */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
+ hid_t rid = H5I_INVALID_HID; /* Root Group ID */
+ hid_t status = H5I_INVALID_HID; /* Status */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE]; /* Names of files to externally link across */
if (new_format)
@@ -8168,7 +8173,7 @@ external_link_dangling(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (gid >= 0) {
H5_FAILED();
- HDputs(" Should have failed for sequence of too many nested links.");
+ puts(" Should have failed for sequence of too many nested links.");
goto error;
}
@@ -8180,7 +8185,7 @@ external_link_dangling(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (gid >= 0) {
H5_FAILED();
- HDputs(" Should have failed for sequence of too many nested links.");
+ puts(" Should have failed for sequence of too many nested links.");
goto error;
}
@@ -8192,7 +8197,7 @@ external_link_dangling(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(
+ puts(
" Retrieving name of object by index through dangling file external link should have failed.");
} /* end if */
@@ -8233,11 +8238,11 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_prefix(hid_t fapl, hbool_t new_format)
+external_link_prefix(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
- hid_t gapl_id = -1;
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
+ hid_t gapl_id = H5I_INVALID_HID;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE];
if (new_format)
@@ -8293,7 +8298,7 @@ external_link_prefix(hid_t fapl, hbool_t new_format)
/* should be able to find the target file from pathnames set via H5Pset_elink_prefix() */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links directory.");
+ puts(" Should have found the file in tmp_links directory.");
goto error;
}
@@ -8330,10 +8335,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_abs_mainpath(hid_t fapl, hbool_t new_format)
+external_link_abs_mainpath(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE],
cwdpath[NAME_BUF_SIZE];
@@ -8390,7 +8395,7 @@ external_link_abs_mainpath(hid_t fapl, hbool_t new_format)
/* should be able to find the target file from absolute path set for main file */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links directory.");
+ puts(" Should have found the file in tmp_links directory.");
goto error;
}
@@ -8426,10 +8431,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_rel_mainpath(hid_t fapl, hbool_t new_format)
+external_link_rel_mainpath(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE];
if (new_format)
@@ -8478,7 +8483,7 @@ external_link_rel_mainpath(hid_t fapl, hbool_t new_format)
/* should be able to find the target file from the main file's relative pathname */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in current working directory");
+ puts(" Should have found the file in current working directory");
goto error;
}
@@ -8514,10 +8519,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_cwd(hid_t fapl, hbool_t new_format)
+external_link_cwd(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE], cwdpath[NAME_BUF_SIZE];
if (new_format)
@@ -8571,7 +8576,7 @@ external_link_cwd(hid_t fapl, hbool_t new_format)
/* should be able to find the target file from the current working directory */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in current working directory");
+ puts(" Should have found the file in current working directory");
goto error;
}
@@ -8608,10 +8613,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_abstar(hid_t fapl, hbool_t new_format)
+external_link_abstar(hid_t fapl, bool new_format)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group IDs */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE],
cwdpath[NAME_BUF_SIZE];
@@ -8669,7 +8674,7 @@ external_link_abstar(hid_t fapl, hbool_t new_format)
/* should be able to find the target file with absolute path */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links directory.");
+ puts(" Should have found the file in tmp_links directory.");
goto error;
}
@@ -8706,10 +8711,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_abstar_cur(hid_t fapl, hbool_t new_format)
+external_link_abstar_cur(hid_t fapl, bool new_format)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group IDs */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE],
cwdpath[NAME_BUF_SIZE];
@@ -8767,7 +8772,7 @@ external_link_abstar_cur(hid_t fapl, hbool_t new_format)
/* should be able to find the target file from main file's current working directory */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in current working directory.");
+ puts(" Should have found the file in current working directory.");
goto error;
}
@@ -8803,10 +8808,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_reltar(hid_t fapl, hbool_t new_format)
+external_link_reltar(hid_t fapl, bool new_format)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group IDs */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE];
if (new_format)
@@ -8848,7 +8853,7 @@ external_link_reltar(hid_t fapl, hbool_t new_format)
/* Open object through external link */
if ((gid = H5Gopen2(fid, "ext_link", H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links directory.");
+ puts(" Should have found the file in tmp_links directory.");
goto error;
} /* end if */
@@ -8886,10 +8891,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_chdir(hid_t fapl, hbool_t new_format)
+external_link_chdir(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE];
if (new_format)
@@ -8948,7 +8953,7 @@ external_link_chdir(hid_t fapl, hbool_t new_format)
*/
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links directory.");
+ puts(" Should have found the file in tmp_links directory.");
goto error;
}
@@ -8992,16 +8997,16 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_set_elink_fapl1(hid_t fapl, hbool_t new_format)
+external_set_elink_fapl1(hid_t fapl, bool new_format)
{
- hid_t fid = (-1);
- hid_t fidA = (-1), fidB = (-1);
- hid_t gidA = (-1), gidB = (-1);
- hid_t oidA = (-1), oidB = (-1);
+ hid_t fid = (H5I_INVALID_HID);
+ hid_t fidA = (H5I_INVALID_HID), fidB = (H5I_INVALID_HID);
+ hid_t gidA = (H5I_INVALID_HID), gidB = (H5I_INVALID_HID);
+ hid_t oidA = (H5I_INVALID_HID), oidB = (H5I_INVALID_HID);
char filename1[NAME_BUF_SIZE], filename2A[NAME_BUF_SIZE], filename2B[NAME_BUF_SIZE],
tmpname[NAME_BUF_SIZE], cwdpath[NAME_BUF_SIZE];
- hid_t fam_fapl = -1, multi_fapl = -1;
- hid_t lapl_idA = -1, lapl_idB = -1;
+ hid_t fam_fapl = H5I_INVALID_HID, multi_fapl = H5I_INVALID_HID;
+ hid_t lapl_idA = H5I_INVALID_HID, lapl_idB = H5I_INVALID_HID;
hid_t memb_fapl[H5FD_MEM_NTYPES];
char sv[H5FD_MEM_NTYPES][64];
H5FD_mem_t mt, memb_map[H5FD_MEM_NTYPES];
@@ -9051,33 +9056,33 @@ external_set_elink_fapl1(hid_t fapl, hbool_t new_format)
memb_map[H5FD_MEM_GHEAP] = H5FD_MEM_GHEAP;
memb_map[H5FD_MEM_LHEAP] = H5FD_MEM_LHEAP;
- HDsnprintf(sv[H5FD_MEM_SUPER], sizeof(sv[H5FD_MEM_SUPER]), "%%s-%c.h5", 's');
+ snprintf(sv[H5FD_MEM_SUPER], sizeof(sv[H5FD_MEM_SUPER]), "%%s-%c.h5", 's');
memb_name[H5FD_MEM_SUPER] = sv[H5FD_MEM_SUPER];
memb_addr[H5FD_MEM_SUPER] = 0;
- HDsnprintf(sv[H5FD_MEM_BTREE], sizeof(sv[H5FD_MEM_BTREE]), "%%s-%c.h5", 'b');
+ snprintf(sv[H5FD_MEM_BTREE], sizeof(sv[H5FD_MEM_BTREE]), "%%s-%c.h5", 'b');
memb_name[H5FD_MEM_BTREE] = sv[H5FD_MEM_BTREE];
memb_addr[H5FD_MEM_BTREE] = HADDR_MAX / 6;
- HDsnprintf(sv[H5FD_MEM_DRAW], sizeof(sv[H5FD_MEM_DRAW]), "%%s-%c.h5", 'r');
+ snprintf(sv[H5FD_MEM_DRAW], sizeof(sv[H5FD_MEM_DRAW]), "%%s-%c.h5", 'r');
memb_name[H5FD_MEM_DRAW] = sv[H5FD_MEM_DRAW];
memb_addr[H5FD_MEM_DRAW] = HADDR_MAX / 3;
- HDsnprintf(sv[H5FD_MEM_GHEAP], sizeof(sv[H5FD_MEM_GHEAP]), "%%s-%c.h5", 'g');
+ snprintf(sv[H5FD_MEM_GHEAP], sizeof(sv[H5FD_MEM_GHEAP]), "%%s-%c.h5", 'g');
memb_name[H5FD_MEM_GHEAP] = sv[H5FD_MEM_GHEAP];
memb_addr[H5FD_MEM_GHEAP] = HADDR_MAX / 2;
- HDsnprintf(sv[H5FD_MEM_LHEAP], sizeof(sv[H5FD_MEM_LHEAP]), "%%s-%c.h5", 'l');
+ snprintf(sv[H5FD_MEM_LHEAP], sizeof(sv[H5FD_MEM_LHEAP]), "%%s-%c.h5", 'l');
memb_name[H5FD_MEM_LHEAP] = sv[H5FD_MEM_LHEAP];
memb_addr[H5FD_MEM_LHEAP] = (HADDR_MAX / 3) * 2;
- HDsnprintf(sv[H5FD_MEM_OHDR], sizeof(sv[H5FD_MEM_OHDR]), "%%s-%c.h5", 'o');
+ snprintf(sv[H5FD_MEM_OHDR], sizeof(sv[H5FD_MEM_OHDR]), "%%s-%c.h5", 'o');
memb_name[H5FD_MEM_OHDR] = sv[H5FD_MEM_OHDR];
memb_addr[H5FD_MEM_OHDR] = (HADDR_MAX / 6) * 5;
/* create "multi" fapl */
multi_fapl = h5_fileaccess();
- if (H5Pset_fapl_multi(multi_fapl, memb_map, memb_fapl, memb_name, memb_addr, TRUE) < 0)
+ if (H5Pset_fapl_multi(multi_fapl, memb_map, memb_fapl, memb_name, memb_addr, true) < 0)
TEST_ERROR;
/* set up name for external linked target file B: "extlinks16B" */
@@ -9129,7 +9134,7 @@ external_set_elink_fapl1(hid_t fapl, hbool_t new_format)
/* should succeed in opening the target object A in the current working directory */
if (oidA < 0) {
H5_FAILED();
- HDputs(" Should succeed in opening family target file A in current working directory");
+ puts(" Should succeed in opening family target file A in current working directory");
goto error;
}
@@ -9145,7 +9150,7 @@ external_set_elink_fapl1(hid_t fapl, hbool_t new_format)
/* should succeed in opening the target object B in the current working directory */
if (oidB < 0) {
H5_FAILED();
- HDputs(" Should succeed in opening multi target file B in current working directory");
+ puts(" Should succeed in opening multi target file B in current working directory");
goto error;
}
@@ -9209,7 +9214,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_set_elink_fapl2(hid_t fapl, hbool_t new_format)
+external_set_elink_fapl2(hid_t fapl, bool new_format)
{
hid_t fid = H5I_INVALID_HID;
hid_t gid = H5I_INVALID_HID;
@@ -9267,7 +9272,7 @@ external_set_elink_fapl2(hid_t fapl, hbool_t new_format)
/* create fapl for the target file to be a "core" file */
core_fapl = h5_fileaccess();
- if (H5Pset_fapl_core(core_fapl, (size_t)CORE_INCREMENT, TRUE) < 0)
+ if (H5Pset_fapl_core(core_fapl, (size_t)CORE_INCREMENT, true) < 0)
TEST_ERROR;
/* set up name for external linked target file: "extlinks17" */
@@ -9323,7 +9328,7 @@ external_set_elink_fapl2(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* create fapl to be a "core" file without backing store */
- if (H5Pset_fapl_core(core_fapl, (size_t)CORE_INCREMENT, FALSE) < 0)
+ if (H5Pset_fapl_core(core_fapl, (size_t)CORE_INCREMENT, false) < 0)
TEST_ERROR;
/* Set file access property list for link access to use the "core" driver */
@@ -9336,7 +9341,7 @@ external_set_elink_fapl2(hid_t fapl, hbool_t new_format)
did = H5Dopen2(fid, "ext_link", dapl_id);
if (did < 0) {
H5_FAILED();
- HDputs(" Should succeed in opening the target dataset");
+ puts(" Should succeed in opening the target dataset");
goto error;
}
@@ -9427,10 +9432,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_set_elink_fapl3(hbool_t new_format)
+external_set_elink_fapl3(bool new_format)
{
- hid_t core_fapl = -1, stdio_fapl = -1;
- hid_t lapl_id = -1, new_lapl_id = -1, l_fapl = -1, out_fapl;
+ hid_t core_fapl = H5I_INVALID_HID, stdio_fapl = H5I_INVALID_HID;
+ hid_t lapl_id = H5I_INVALID_HID, new_lapl_id = H5I_INVALID_HID, l_fapl = H5I_INVALID_HID, out_fapl;
if (new_format)
TESTING("H5Pset/get_fapl() (w/new group format)");
@@ -9439,7 +9444,7 @@ external_set_elink_fapl3(hbool_t new_format)
/* create fapl for the target file to be a "core" file */
core_fapl = h5_fileaccess();
- if (H5Pset_fapl_core(core_fapl, (size_t)CORE_INCREMENT, TRUE) < 0)
+ if (H5Pset_fapl_core(core_fapl, (size_t)CORE_INCREMENT, true) < 0)
TEST_ERROR;
stdio_fapl = h5_fileaccess();
@@ -9529,9 +9534,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_set_elink_acc_flags(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
+external_set_elink_acc_flags(const char *env_h5_drvr, hid_t fapl, bool new_format)
{
- hid_t file1 = -1, file2 = -1, group = -1, subgroup = -1, gapl = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID, group = H5I_INVALID_HID,
+ subgroup = H5I_INVALID_HID, gapl = H5I_INVALID_HID;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE];
herr_t ret;
unsigned flags;
@@ -9840,13 +9846,13 @@ external_set_elink_cb_cb(const char *parent_file, const char *parent_group, cons
set_elink_cb_t *op_data = (set_elink_cb_t *)_op_data;
/* Verify file and object names are correct */
- if (HDstrcmp(parent_file, op_data->parent_file) != 0)
+ if (strcmp(parent_file, op_data->parent_file) != 0)
return FAIL;
- if (HDstrcmp(parent_group, "/group1") != 0)
+ if (strcmp(parent_group, "/group1") != 0)
return FAIL;
- if (HDstrcmp(target_file, op_data->target_file) != 0)
+ if (strcmp(target_file, op_data->target_file) != 0)
return FAIL;
- if (HDstrcmp(target_obj, "/") != 0)
+ if (strcmp(target_obj, "/") != 0)
return FAIL;
/* Set flags to be read-write */
@@ -9867,10 +9873,11 @@ external_set_elink_cb_cb(const char *parent_file, const char *parent_group, cons
/* Main test function */
static int
-external_set_elink_cb(hid_t fapl, hbool_t new_format)
+external_set_elink_cb(hid_t fapl, bool new_format)
{
- hid_t file1 = -1, file2 = -1, group = -1, gapl = -1, fam_fapl = -1, ret_fapl = -1, base_driver;
- set_elink_cb_t op_data, *op_data_p;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID, group = H5I_INVALID_HID, gapl = H5I_INVALID_HID,
+ fam_fapl = H5I_INVALID_HID, ret_fapl = H5I_INVALID_HID, base_driver;
+ set_elink_cb_t op_data, *op_data_p;
H5L_elink_traverse_t cb;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE];
unsigned flags;
@@ -9886,7 +9893,7 @@ external_set_elink_cb(hid_t fapl, hbool_t new_format)
/* Core file driver has issues when used as the member file driver for a family file */
/* Family file driver cannot be used with family or multi drivers for member files */
/* Also disable parallel member drivers, because H5F_HAS_FEATURE(H5FD_FEAT_HAS_MPI)
- would report FALSE, causing problems */
+ would report false, causing problems */
base_driver = H5Pget_driver(fapl);
op_data.base_fapl =
(base_driver == H5FD_FAMILY || base_driver == H5FD_MULTI || base_driver == H5FD_MPIO ||
@@ -10098,10 +10105,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_win1(hid_t fapl, hbool_t new_format)
+external_link_win1(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE],
cwdpath[NAME_BUF_SIZE];
@@ -10117,9 +10124,9 @@ external_link_win1(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* set up name for target link: "/CWD/tmp_links/extlinks10" */
- HDstrcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it rel drive but absolute path */
- HDstrcat(tmpname, "/");
- HDstrcat(tmpname, FILENAME[30]);
+ strcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it rel drive but absolute path */
+ strcat(tmpname, "/");
+ strcat(tmpname, FILENAME[30]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "extlinks10" */
@@ -10155,7 +10162,7 @@ external_link_win1(hid_t fapl, hbool_t new_format)
/* should be able to find the target file via main file's CWD*/
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in CWD.");
+ puts(" Should have found the file in CWD.");
goto error;
}
@@ -10192,10 +10199,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_win2(hid_t fapl, hbool_t new_format)
+external_link_win2(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE],
cwdpath[NAME_BUF_SIZE];
@@ -10213,10 +10220,9 @@ external_link_win2(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* set up name for target link: "/CWD/tmp_links/extlinks11" */
- HDstrcpy(tmpname,
- &cwdpath[2]); /* stripped the drive letter to make it relative drive but absolute path */
- HDstrcat(tmpname, "/");
- HDstrcat(tmpname, FILENAME[31]);
+ strcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it relative drive but absolute path */
+ strcat(tmpname, "/");
+ strcat(tmpname, FILENAME[31]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "tmp_links/extlinks11" */
@@ -10252,7 +10258,7 @@ external_link_win2(hid_t fapl, hbool_t new_format)
/* should be able to find the target file directly */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links.");
+ puts(" Should have found the file in tmp_links.");
goto error;
}
@@ -10289,10 +10295,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_win3(hid_t fapl, hbool_t new_format)
+external_link_win3(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
int drive = 0;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE];
@@ -10310,7 +10316,7 @@ external_link_win3(hid_t fapl, hbool_t new_format)
/* set up name for target link: "<drive-letter>:tmp_links/extlinks12" */
drive = HDgetdrive();
- HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[32]);
+ snprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[32]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "tmp_links/extlinks12" */
@@ -10346,7 +10352,7 @@ external_link_win3(hid_t fapl, hbool_t new_format)
/* should be able to find the target file directly */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links.");
+ puts(" Should have found the file in tmp_links.");
goto error;
}
@@ -10383,10 +10389,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_win4(hid_t fapl, hbool_t new_format)
+external_link_win4(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
int drive = 0;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE];
@@ -10397,11 +10403,11 @@ external_link_win4(hid_t fapl, hbool_t new_format)
/* set up name for main file: "<drive-letter>:tmp_links/extlinks0" */
drive = HDgetdrive();
- HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[13]);
+ snprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[13]);
h5_fixname(tmpname, fapl, filename1, sizeof filename1);
/* set up name for target link: "<drive-letter>:extlinks13" */
- HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[33]);
+ snprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[33]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "tmp_links/extlinks13" */
@@ -10437,7 +10443,7 @@ external_link_win4(hid_t fapl, hbool_t new_format)
/* should be able to find the target file via main file's absolute drive/relative path */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in CWD.");
+ puts(" Should have found the file in CWD.");
goto error;
}
@@ -10474,10 +10480,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_win5(hid_t fapl, hbool_t new_format)
+external_link_win5(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
int drive = 0;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE],
cwdpath[NAME_BUF_SIZE];
@@ -10496,13 +10502,13 @@ external_link_win5(hid_t fapl, hbool_t new_format)
drive += 1;
/* set up name for main file: "/CWD/extlinks0" */
- HDstrcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it rel drive but absolute path */
- HDstrcat(tmpname, "/");
- HDstrcat(tmpname, FILENAME[12]);
+ strcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it rel drive but absolute path */
+ strcat(tmpname, "/");
+ strcat(tmpname, FILENAME[12]);
h5_fixname(tmpname, fapl, filename1, sizeof filename1);
/* set up name for target link: "<drive-letter+1>:tmp_links/extlinks14" */
- HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[35]);
+ snprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[35]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "tmp_links/extlinks14" */
@@ -10538,7 +10544,7 @@ external_link_win5(hid_t fapl, hbool_t new_format)
/* should be able to find the target file via main file's rel drive/abs path */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in CWD.");
+ puts(" Should have found the file in CWD.");
goto error;
}
@@ -10575,10 +10581,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_win6(hid_t fapl, hbool_t new_format)
+external_link_win6(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
int drive = 0;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE];
@@ -10600,7 +10606,7 @@ external_link_win6(hid_t fapl, hbool_t new_format)
h5_fixname(FILENAME[12], fapl, filename1, sizeof filename1);
/* set up name for target link: "<drive-letter+1>:tmp_links/extlinks15" */
- HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[36]);
+ snprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[36]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "tmp/extlinks15" */
@@ -10636,7 +10642,7 @@ external_link_win6(hid_t fapl, hbool_t new_format)
/* should be able to find the target file via target file's rel path in current drive */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links.");
+ puts(" Should have found the file in tmp_links.");
goto error;
}
@@ -10673,10 +10679,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_win7(hid_t fapl, hbool_t new_format)
+external_link_win7(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE],
cwdpath[NAME_BUF_SIZE];
@@ -10693,9 +10699,9 @@ external_link_win7(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* set up name for target link: "\\127.0.0.1\c$/tmp_links/extlinks10" */
- HDstrcpy(tmpname, "\\\\127.0.0.1\\c$"); /* absolute path */
- HDstrcat(tmpname, "/");
- HDstrcat(tmpname, FILENAME[30]);
+ strcpy(tmpname, "\\\\127.0.0.1\\c$"); /* absolute path */
+ strcat(tmpname, "/");
+ strcat(tmpname, FILENAME[30]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "extlinks15" */
@@ -10731,7 +10737,7 @@ external_link_win7(hid_t fapl, hbool_t new_format)
/* should be able to find the target file via main file's local host/main drive*/
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in local host/main drive.");
+ puts(" Should have found the file in local host/main drive.");
goto error;
}
@@ -10769,10 +10775,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_win8(hid_t fapl, hbool_t new_format)
+external_link_win8(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
int drive = 0;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE],
cwdpath[NAME_BUF_SIZE];
@@ -10795,7 +10801,7 @@ external_link_win8(hid_t fapl, hbool_t new_format)
/* set up name for target link: "<drive-letter>:\CWD\extlinks10" */
drive = HDgetdrive();
- HDsnprintf(tmpname, sizeof(tmpname), "\\\\?\\%c:%s\\%s", (drive + 'A' - 1), &cwdpath[2], FILENAME[30]);
+ snprintf(tmpname, sizeof(tmpname), "\\\\?\\%c:%s\\%s", (drive + 'A' - 1), &cwdpath[2], FILENAME[30]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "extlinks10" */
@@ -10831,7 +10837,7 @@ external_link_win8(hid_t fapl, hbool_t new_format)
/* should be able to find the target file directly */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links.");
+ puts(" Should have found the file in tmp_links.");
goto error;
}
@@ -10868,10 +10874,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_win9(hid_t fapl, hbool_t new_format)
+external_link_win9(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE], tmpname[NAME_BUF_SIZE],
cwdpath[NAME_BUF_SIZE];
@@ -10888,9 +10894,9 @@ external_link_win9(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* set up name for target link: "\\?\UNC\127.0.0.1\c$/tmp_links/extlinks10" */
- HDstrcpy(tmpname, "\\\\?\\UNC\127.0.0.1\\c$"); /* absolute path */
- HDstrcat(tmpname, "/");
- HDstrcat(tmpname, FILENAME[30]);
+ strcpy(tmpname, "\\\\?\\UNC\127.0.0.1\\c$"); /* absolute path */
+ strcat(tmpname, "/");
+ strcat(tmpname, FILENAME[30]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "extlinks15" */
@@ -10926,7 +10932,7 @@ external_link_win9(hid_t fapl, hbool_t new_format)
/* should be able to find the target file via main file's local host/main drive*/
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in local host/main drive.");
+ puts(" Should have found the file in local host/main drive.");
goto error;
}
@@ -10961,10 +10967,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_recursive(hid_t fapl, hbool_t new_format)
+external_link_recursive(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE]; /* Names of files to externally link across */
if (new_format)
@@ -10999,7 +11005,7 @@ external_link_recursive(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (gid >= 0) {
H5_FAILED();
- HDputs(" Should have failed for recursive external links.");
+ puts(" Should have failed for recursive external links.");
goto error;
}
@@ -11031,14 +11037,14 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_query(hid_t fapl, hbool_t new_format)
+external_link_query(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
- const char *file_name; /* Name of the file the external link points to */
- const char *object_name; /* Name of the object the external link points to */
- H5O_info2_t oi; /* Object information */
- H5L_info2_t li; /* Link information */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
+ const char *file_name; /* Name of the file the external link points to */
+ const char *object_name; /* Name of the object the external link points to */
+ H5O_info2_t oi; /* Object information */
+ H5L_info2_t li; /* Link information */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], /* Names of files to externally link across */
query_buf[NAME_BUF_SIZE]; /* Buffer to hold query result */
@@ -11063,11 +11069,11 @@ external_link_query(hid_t fapl, hbool_t new_format)
/* Get size of buffer for external link */
if (H5Lget_info2(fid, "src", &li, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (li.u.val_size != (1 + (HDstrlen(filename2) + 1) + (HDstrlen("/dst") + 1)))
+ if (li.u.val_size != (1 + (strlen(filename2) + 1) + (strlen("/dst") + 1)))
TEST_ERROR;
if (H5L_TYPE_EXTERNAL != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been an external link");
+ puts(" Unexpected link class - should have been an external link");
goto error;
}
@@ -11096,11 +11102,11 @@ external_link_query(hid_t fapl, hbool_t new_format)
/* Get size of buffer for external link */
if (H5Lget_info2(fid, "src", &li, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (li.u.val_size != (1 + (HDstrlen(filename2) + 1) + (HDstrlen("/dst") + 1)))
+ if (li.u.val_size != (1 + (strlen(filename2) + 1) + (strlen("/dst") + 1)))
TEST_ERROR;
if (H5L_TYPE_EXTERNAL != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been an external link");
+ puts(" Unexpected link class - should have been an external link");
goto error;
}
@@ -11113,9 +11119,9 @@ external_link_query(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Compare the file and object names */
- if (HDstrcmp(file_name, filename2) != 0)
+ if (strcmp(file_name, filename2) != 0)
TEST_ERROR;
- if (HDstrcmp(object_name, "/dst") != 0)
+ if (strcmp(object_name, "/dst") != 0)
TEST_ERROR;
/* Query information about object that external link points to */
@@ -11123,7 +11129,7 @@ external_link_query(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5O_TYPE_GROUP != oi.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been a group");
+ puts(" Unexpected object type - should have been a group");
goto error;
}
@@ -11184,10 +11190,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_unlink_compact(hid_t fapl, hbool_t new_format)
+external_link_unlink_compact(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE]; /* Names of files to externally link across */
if (new_format)
@@ -11277,11 +11283,11 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_unlink_dense(hid_t fapl, hbool_t new_format)
+external_link_unlink_dense(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gcpl = -1; /* Group creation property list ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gcpl = H5I_INVALID_HID; /* Group creation property list ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE]; /* Names of files to externally link across */
unsigned nmsgs; /* Number of messages in group's header */
@@ -11307,7 +11313,7 @@ external_link_unlink_dense(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Check on root group's status */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Query the group creation properties */
@@ -11323,18 +11329,18 @@ external_link_unlink_dense(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Check on root group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, &nmsgs) != TRUE)
+ if (H5G__has_links_test(gid, &nmsgs) != true)
TEST_ERROR;
if (nmsgs != 1)
TEST_ERROR;
- if (H5G__has_stab_test(gid) == TRUE)
+ if (H5G__has_stab_test(gid) == true)
TEST_ERROR;
/* Create enough objects in the root group to change it into a "dense" group */
for (u = 0; u < max_compact; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(gid2) < 0)
@@ -11342,11 +11348,11 @@ external_link_unlink_dense(hid_t fapl, hbool_t new_format)
} /* end for */
/* Check on root group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Close group creation property list */
@@ -11389,21 +11395,21 @@ external_link_unlink_dense(hid_t fapl, hbool_t new_format)
/* Remove enough objects in the root group to change it into a "compact" group */
for (u = 0; u < ((max_compact - min_dense) + 1); u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
/* Check on root group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, &nmsgs) != TRUE)
+ if (H5G__has_links_test(gid, &nmsgs) != true)
TEST_ERROR;
if (nmsgs != (min_dense - 1))
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) == TRUE)
+ if (H5G__is_new_dense_test(gid) == true)
TEST_ERROR;
- if (H5G__has_stab_test(gid) == TRUE)
+ if (H5G__has_stab_test(gid) == true)
TEST_ERROR;
/* Close root group */
@@ -11454,10 +11460,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_move(hid_t fapl, hbool_t new_format)
+external_link_move(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE]; /* Names of files to externally link across */
@@ -11512,7 +11518,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/dst") != 0)
+ if (strcmp(objname, "/dst") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -11572,7 +11578,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/dst") != 0)
+ if (strcmp(objname, "/dst") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -11619,7 +11625,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/dst") != 0)
+ if (strcmp(objname, "/dst") != 0)
TEST_ERROR;
/* Move external link back to original location */
@@ -11629,7 +11635,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/dst") != 0)
+ if (strcmp(objname, "/dst") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -11689,11 +11695,11 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_ride(hid_t fapl, hbool_t new_format)
+external_link_ride(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gcpl = -1; /* Group creation property list ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gcpl = H5I_INVALID_HID; /* Group creation property list ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE]; /* Names of files to externally link across */
unsigned nmsgs; /* Number of messages in group's header */
@@ -11719,7 +11725,7 @@ external_link_ride(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Check on root group's status */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Query the group creation properties */
@@ -11730,7 +11736,7 @@ external_link_ride(hid_t fapl, hbool_t new_format)
/* Create enough objects in the root group to change it into a "dense" group */
for (u = 0; u < (max_compact + 1); u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(gid2) < 0)
@@ -11738,16 +11744,16 @@ external_link_ride(hid_t fapl, hbool_t new_format)
} /* end for */
/* Check on root group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
if (new_format) {
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
} /* end if */
else {
- if (H5G__has_stab_test(gid) != TRUE)
+ if (H5G__has_stab_test(gid) != true)
TEST_ERROR;
} /* end else */
@@ -11757,11 +11763,11 @@ external_link_ride(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Check on root group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Close group creation property list */
@@ -11803,7 +11809,7 @@ external_link_ride(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/dst") != 0)
+ if (strcmp(objname, "/dst") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -11824,21 +11830,21 @@ external_link_ride(hid_t fapl, hbool_t new_format)
/* Remove enough objects in the root group to change it into a "compact" group */
for (u = 0; u < ((max_compact - min_dense) + 3); u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
/* Check on root group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, &nmsgs) != TRUE)
+ if (H5G__has_links_test(gid, &nmsgs) != true)
TEST_ERROR;
if (nmsgs != (min_dense - 1))
TEST_ERROR;
- if (H5G__has_stab_test(gid) == TRUE)
+ if (H5G__has_stab_test(gid) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) == TRUE)
+ if (H5G__is_new_dense_test(gid) == true)
TEST_ERROR;
/* Close root group */
@@ -11852,7 +11858,7 @@ external_link_ride(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/dst") != 0)
+ if (strcmp(objname, "/dst") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -11921,11 +11927,13 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_closing(hid_t fapl, hbool_t new_format)
+external_link_closing(hid_t fapl, bool new_format)
{
- hid_t fid1 = (-1), fid2 = (-1), fid3 = (-1), fid4 = (-1);
- hid_t gid = (-1), tid = (-1), tid2 = (-1), sid = (-1), did = (-1);
- hid_t lcpl_id = (-1);
+ hid_t fid1 = (H5I_INVALID_HID), fid2 = (H5I_INVALID_HID), fid3 = (H5I_INVALID_HID),
+ fid4 = (H5I_INVALID_HID);
+ hid_t gid = (H5I_INVALID_HID), tid = (H5I_INVALID_HID), tid2 = (H5I_INVALID_HID), sid = (H5I_INVALID_HID),
+ did = (H5I_INVALID_HID);
+ hid_t lcpl_id = (H5I_INVALID_HID);
hsize_t dims[2];
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE],
filename4[NAME_BUF_SIZE], /* Names of files to externally link across */
@@ -12045,7 +12053,7 @@ external_link_closing(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5Oget_comment_by_name(fid1, "elink/elink/elink/group1_moved", buf, sizeof(buf), H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(buf, "comment") != 0)
+ if (strcmp(buf, "comment") != 0)
TEST_ERROR;
/* Test H5*open */
@@ -12149,7 +12157,7 @@ external_link_closing(hid_t fapl, hbool_t new_format)
/* Add a few regular groups and a soft link in file2 using intermediate group creation */
if ((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0)
TEST_ERROR;
- if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0)
+ if (H5Pset_create_intermediate_group(lcpl_id, true) < 0)
TEST_ERROR;
if (H5Lcreate_soft("/elink2", fid1, "elink/file2group1/file2group2/slink", lcpl_id, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -12237,12 +12245,12 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_endian(hbool_t new_format)
+external_link_endian(bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t lapl_id = -1; /* Prop List ID */
- const char *pathbuf = H5_get_srcdir(); /* Path to the files */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t lapl_id = H5I_INVALID_HID; /* Prop List ID */
+ const char *pathbuf = H5_get_srcdir(); /* Path to the files */
const char *namebuf;
if (new_format)
@@ -12322,12 +12330,12 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_strong(hid_t fapl, hbool_t new_format)
+external_link_strong(hid_t fapl, bool new_format)
{
- hid_t my_fapl = (-1); /* File access property list */
- hid_t fid1 = (-1), fid2 = (-1); /* File ID */
- hid_t gid1 = (-1), gid2 = (-1); /* Group IDs */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t my_fapl = (H5I_INVALID_HID); /* File access property list */
+ hid_t fid1 = (H5I_INVALID_HID), fid2 = (H5I_INVALID_HID); /* File ID */
+ hid_t gid1 = (H5I_INVALID_HID), gid2 = (H5I_INVALID_HID); /* Group IDs */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE];
if (new_format)
@@ -12388,7 +12396,7 @@ external_link_strong(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
if (H5Iget_name(gid2, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/B/C") != 0)
+ if (strcmp(objname, "/A/B/C") != 0)
TEST_ERROR;
if (H5Gclose(gid2) < 0)
TEST_ERROR;
@@ -12427,31 +12435,31 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
+external_symlink(const char *env_h5_drvr, hid_t fapl, bool new_format)
{
#ifdef H5_HAVE_SYMLINK
- hid_t file1 = H5I_INVALID_HID;
- hid_t file2 = H5I_INVALID_HID;
- hid_t file3 = H5I_INVALID_HID;
- hid_t file4 = H5I_INVALID_HID;
- hid_t file5 = H5I_INVALID_HID;
- hid_t group2 = H5I_INVALID_HID;
- hid_t group3 = H5I_INVALID_HID;
- hid_t group4 = H5I_INVALID_HID;
- hid_t group5 = H5I_INVALID_HID;
- char *filename1 = NULL;
- char *filename2a = NULL;
- char *filename2b = NULL;
- char *filename3a = NULL;
- char *filename3b = NULL;
- char *filename4a = NULL;
- char *filename4b = NULL;
- char *filename5a = NULL;
- char *filename5b = NULL;
- char *tmpname = NULL;
- char *cwdpath = NULL;
- hbool_t have_posix_compat_vfd; /* Whether VFD used is compatible w/POSIX I/O calls */
-#endif /* H5_HAVE_SYMLINK */
+ hid_t file1 = H5I_INVALID_HID;
+ hid_t file2 = H5I_INVALID_HID;
+ hid_t file3 = H5I_INVALID_HID;
+ hid_t file4 = H5I_INVALID_HID;
+ hid_t file5 = H5I_INVALID_HID;
+ hid_t group2 = H5I_INVALID_HID;
+ hid_t group3 = H5I_INVALID_HID;
+ hid_t group4 = H5I_INVALID_HID;
+ hid_t group5 = H5I_INVALID_HID;
+ char *filename1 = NULL;
+ char *filename2a = NULL;
+ char *filename2b = NULL;
+ char *filename3a = NULL;
+ char *filename3b = NULL;
+ char *filename4a = NULL;
+ char *filename4b = NULL;
+ char *filename5a = NULL;
+ char *filename5b = NULL;
+ char *tmpname = NULL;
+ char *cwdpath = NULL;
+ bool have_posix_compat_vfd; /* Whether VFD used is compatible w/POSIX I/O calls */
+#endif /* H5_HAVE_SYMLINK */
if (new_format)
TESTING("external links w/symlink files (w/new group format)");
@@ -12462,11 +12470,11 @@ external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
/* Skip test when using VFDs that can't provide a POSIX compatible file
* descriptor.
*/
- have_posix_compat_vfd = (hbool_t)(!HDstrcmp(env_h5_drvr, "sec2") || !HDstrcmp(env_h5_drvr, "core") ||
- !HDstrcmp(env_h5_drvr, "nomatch"));
+ have_posix_compat_vfd = (bool)(!strcmp(env_h5_drvr, "sec2") || !strcmp(env_h5_drvr, "core") ||
+ !strcmp(env_h5_drvr, "nomatch"));
if (!have_posix_compat_vfd) {
SKIPPED();
- HDputs(" Current VFD doesn't support POSIX I/O calls");
+ puts(" Current VFD doesn't support POSIX I/O calls");
return SUCCEED;
}
@@ -12707,7 +12715,7 @@ error:
#else /* H5_HAVE_SYMLINK */
SKIPPED();
- HDputs(" Current file system or operating system doesn't support symbolic links");
+ puts(" Current file system or operating system doesn't support symbolic links");
return SUCCEED;
#endif /* H5_HAVE_SYMLINK */
@@ -12726,11 +12734,11 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_copy_invalid_object(hid_t fapl, hbool_t new_format)
+external_copy_invalid_object(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t ocpyplid = -1; /* Object copy plist ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t ocpyplid = H5I_INVALID_HID; /* Object copy plist ID */
char filename[NAME_BUF_SIZE];
if (new_format)
@@ -12806,11 +12814,11 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_dont_fail_to_source(hid_t fapl, hbool_t new_format)
+external_dont_fail_to_source(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t oid = -1; /* Object ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t oid = H5I_INVALID_HID; /* Object ID */
char filename[NAME_BUF_SIZE];
if (new_format)
@@ -12875,14 +12883,14 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_file_cache(hid_t fapl, hbool_t new_format)
+external_file_cache(hid_t fapl, bool new_format)
{
- hid_t my_fapl = -1; /* Temporary FAPL */
- hid_t fid1 = -1; /* File ID */
- hid_t fid2 = -1; /* File ID */
- hid_t fid3 = -1; /* File ID */
- hid_t fid4 = -1; /* File ID */
- hid_t oid = -1; /* Object ID */
+ hid_t my_fapl = H5I_INVALID_HID; /* Temporary FAPL */
+ hid_t fid1 = H5I_INVALID_HID; /* File ID */
+ hid_t fid2 = H5I_INVALID_HID; /* File ID */
+ hid_t fid3 = H5I_INVALID_HID; /* File ID */
+ hid_t fid4 = H5I_INVALID_HID; /* File ID */
+ hid_t oid = H5I_INVALID_HID; /* Object ID */
unsigned efc_size;
char filename1[NAME_BUF_SIZE];
char filename2[NAME_BUF_SIZE];
@@ -13233,14 +13241,14 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_open_twice(hid_t fapl, hbool_t new_format)
+external_open_twice(hid_t fapl, bool new_format)
{
- hid_t fid1 = -1; /* File ID */
- hid_t fid2 = -1; /* File ID */
- hid_t oid1 = -1; /* Object ID */
- hid_t oid2 = -1; /* Object ID */
- hid_t type = -1; /* Datatype ID */
- hid_t space = -1; /* Dataspace ID */
+ hid_t fid1 = H5I_INVALID_HID; /* File ID */
+ hid_t fid2 = H5I_INVALID_HID; /* File ID */
+ hid_t oid1 = H5I_INVALID_HID; /* Object ID */
+ hid_t oid2 = H5I_INVALID_HID; /* Object ID */
+ hid_t type = H5I_INVALID_HID; /* Datatype ID */
+ hid_t space = H5I_INVALID_HID; /* Dataspace ID */
char filename1[NAME_BUF_SIZE];
char filename2[NAME_BUF_SIZE];
@@ -13448,26 +13456,26 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_with_committed_datatype(hid_t fapl, hbool_t new_format)
+external_link_with_committed_datatype(hid_t fapl, bool new_format)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gid1 = -1, gid2 = -1; /* Group IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t sid2 = -1; /* Dataspace ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t atid = -1; /* Attribute's datatype ID */
- hid_t did = -1; /* Dataset ID */
- hid_t dtid = -1; /* Dataset's datatype ID */
- hid_t dcpl = -1; /* Dataset creation property list */
- int wdata = 99; /* Attribute data written */
- int wbuf[60]; /* Data buffer for writing */
- int rbuf[60]; /* Data buffer for reading */
- int i; /* Local index variable */
- char filename1[NAME_BUF_SIZE]; /* File name for main file */
- char filename2[NAME_BUF_SIZE]; /* File name for target file */
- hsize_t dims[2] = {5, 12}; /* Dimension sizes */
- hsize_t chunks[2] = {3, 7}; /* Chunk sizes */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t sid2 = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t atid = H5I_INVALID_HID; /* Attribute's datatype ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t dtid = H5I_INVALID_HID; /* Dataset's datatype ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ int wdata = 99; /* Attribute data written */
+ int wbuf[60]; /* Data buffer for writing */
+ int rbuf[60]; /* Data buffer for reading */
+ int i; /* Local index variable */
+ char filename1[NAME_BUF_SIZE]; /* File name for main file */
+ char filename2[NAME_BUF_SIZE]; /* File name for target file */
+ hsize_t dims[2] = {5, 12}; /* Dimension sizes */
+ hsize_t chunks[2] = {3, 7}; /* Chunk sizes */
if (new_format)
TESTING("attach committed datatype to external group's attribute/dataset(w/new group format)");
@@ -13529,7 +13537,7 @@ external_link_with_committed_datatype(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Verify the datatype is not committed */
- if (H5Tcommitted(atid) == TRUE)
+ if (H5Tcommitted(atid) == true)
FAIL_STACK_ERROR;
/* Close the attribute */
@@ -13568,7 +13576,7 @@ external_link_with_committed_datatype(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Verify the datatype is not committed */
- if (H5Tcommitted(dtid) == TRUE)
+ if (H5Tcommitted(dtid) == true)
FAIL_STACK_ERROR;
/* Close the dataset */
@@ -13610,7 +13618,7 @@ external_link_with_committed_datatype(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Verify the datatype is committed */
- if (H5Tcommitted(tid) == FALSE)
+ if (H5Tcommitted(tid) == false)
FAIL_STACK_ERROR;
/* Open the group which is externally linked to target file */
@@ -13626,7 +13634,7 @@ external_link_with_committed_datatype(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Verify the attribute's datatype is not committed */
- if (H5Tcommitted(atid) == TRUE)
+ if (H5Tcommitted(atid) == true)
FAIL_STACK_ERROR;
/* Close the attribute */
@@ -13646,7 +13654,7 @@ external_link_with_committed_datatype(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Verify the dataset's datatype is not committed */
- if (H5Tcommitted(dtid) == TRUE)
+ if (H5Tcommitted(dtid) == true)
FAIL_STACK_ERROR;
/* Read the dataset */
@@ -13715,9 +13723,9 @@ error:
*-------------------------------------------------------------------------
*/
static int
-external_link_public_macros(hid_t fapl, hbool_t new_format)
+external_link_public_macros(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
H5L_info2_t linfo; /* Link information */
char objname[NAME_BUF_SIZE]; /* Object name */
char filename1[NAME_BUF_SIZE];
@@ -13744,7 +13752,7 @@ external_link_public_macros(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Check that external links are registered with the library */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
/* Create file with link to first file */
@@ -13761,7 +13769,7 @@ external_link_public_macros(hid_t fapl, hbool_t new_format)
if (H5L_TYPE_EXTERNAL != linfo.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been an external link");
+ puts(" Unexpected object type - should have been an external link");
goto error;
}
@@ -13771,22 +13779,22 @@ external_link_public_macros(hid_t fapl, hbool_t new_format)
if (H5Lunpack_elink_val(objname, linfo.u.val_size, &flags, &file, &path) < 0)
TEST_ERROR;
- if (HDstrcmp(file, filename1) != 0) {
+ if (strcmp(file, filename1) != 0) {
H5_FAILED();
- HDputs(" External link file name incorrect");
+ puts(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/") != 0) {
+ if (strcmp(path, "/") != 0) {
H5_FAILED();
- HDputs(" External link path incorrect");
+ puts(" External link path incorrect");
goto error;
}
/* External link version & flags */
if (flags != ((H5L_EXT_VERSION << 4) | H5L_EXT_FLAGS_ALL)) {
H5_FAILED();
- HDputs(" External link version or flags are incorrect");
+ puts(" External link version or flags are incorrect");
goto error;
}
@@ -13828,7 +13836,7 @@ UD_hard_create(const char H5_ATTR_UNUSED *link_name, hid_t loc_group, const void
hid_t H5_ATTR_UNUSED lcpl_id)
{
H5O_token_t token;
- hid_t target_obj = -1;
+ hid_t target_obj = H5I_INVALID_HID;
herr_t ret_value = 0;
if (udata_size != sizeof(H5O_token_t)) {
@@ -13902,7 +13910,7 @@ UD_hard_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, const vo
hid_t H5_ATTR_UNUSED lapl_id, hid_t H5_ATTR_UNUSED dxpl_id)
{
H5O_token_t token;
- hid_t ret_value = -1;
+ hid_t ret_value = H5I_INVALID_HID;
if (udata_size != sizeof(H5O_token_t))
return FAIL;
@@ -13920,7 +13928,7 @@ static herr_t
UD_hard_delete(const char H5_ATTR_UNUSED *link_name, hid_t file, const void *udata, size_t udata_size)
{
H5O_token_t token;
- hid_t target_obj = -1;
+ hid_t target_obj = H5I_INVALID_HID;
herr_t ret_value = 0;
if (udata_size != sizeof(H5O_token_t)) {
@@ -13991,11 +13999,11 @@ done:
static int
ud_hard_links(hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- H5L_info2_t li; /* Link information */
- char objname[NAME_BUF_SIZE]; /* Object name */
- h5_stat_size_t empty_size; /* Size of an empty file */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ H5L_info2_t li; /* Link information */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ h5_stat_size_t empty_size; /* Size of an empty file */
char filename[NAME_BUF_SIZE];
TESTING("user-defined hard link (w/new group format)");
@@ -14016,9 +14024,9 @@ ud_hard_links(hid_t fapl)
TEST_ERROR;
/* Check that external links are registered and UD hard links are not */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
TEST_ERROR;
/* Register "user-defined hard links" with the library */
@@ -14026,9 +14034,9 @@ ud_hard_links(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are now registered */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
TEST_ERROR;
/* Create a group for the UD hard link to point to */
@@ -14061,7 +14069,7 @@ ud_hard_links(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/group") != 0)
+ if (strcmp(objname, "/group") != 0)
TEST_ERROR;
/* Create object in group */
@@ -14081,7 +14089,7 @@ ud_hard_links(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/group/new_group") != 0)
+ if (strcmp(objname, "/group/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -14096,7 +14104,7 @@ ud_hard_links(hid_t fapl)
TEST_ERROR;
if (UD_HARD_TYPE != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been a UD hard link");
+ puts(" Unexpected link class - should have been a UD hard link");
goto error;
} /* end if */
@@ -14176,10 +14184,10 @@ error:
static int
ud_link_reregister(hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- H5L_info2_t li; /* Link information */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ H5L_info2_t li; /* Link information */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename[NAME_BUF_SIZE];
h5_stat_size_t empty_size; /* Size of an empty file */
@@ -14201,7 +14209,7 @@ ud_link_reregister(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are not registered */
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
TEST_ERROR;
/* Register "user-defined hard links" with the library */
@@ -14209,7 +14217,7 @@ ud_link_reregister(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are registered */
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
TEST_ERROR;
/* Point a UD defined hard link to a group in the same way as the previous test */
@@ -14235,7 +14243,7 @@ ud_link_reregister(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are no longer registered */
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
TEST_ERROR;
/* Verify that we can't traverse the ud link anymore */
@@ -14260,7 +14268,7 @@ ud_link_reregister(hid_t fapl)
TEST_ERROR;
/* Check that UD hard links are registered again */
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
TEST_ERROR;
/* Open a group through the ud link (now a different class of link).
@@ -14272,7 +14280,7 @@ ud_link_reregister(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/" REREG_TARGET_NAME) != 0)
+ if (strcmp(objname, "/" REREG_TARGET_NAME) != 0)
TEST_ERROR;
/* Create object in group */
@@ -14292,7 +14300,7 @@ ud_link_reregister(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/rereg_target/new_group") != 0)
+ if (strcmp(objname, "/rereg_target/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -14309,7 +14317,7 @@ ud_link_reregister(hid_t fapl)
* other link type */
if (H5Lregister(UD_hard_class) < 0)
FAIL_STACK_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
FAIL_STACK_ERROR;
/* Ensure we can open the group through the UD link (now that UD hard
@@ -14340,7 +14348,7 @@ ud_link_reregister(hid_t fapl)
if (H5Lunregister((H5L_type_t)UD_HARD_TYPE) < 0)
FAIL_STACK_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
FAIL_STACK_ERROR;
PASSED();
@@ -14381,9 +14389,9 @@ UD_cb_create(const char *link_name, hid_t loc_group, const void *udata, size_t u
if (lcpl_id < 0)
TEST_ERROR;
- if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0 && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
+ if (strcmp(link_name, UD_CB_LINK_NAME) != 0 && strcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR;
- if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
+ if (strcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR;
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR;
@@ -14408,9 +14416,9 @@ UD_cb_traverse(const char *link_name, hid_t cur_group, const void *udata, size_t
if (udata_size > 0 && !udata)
TEST_ERROR;
- if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0 && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
+ if (strcmp(link_name, UD_CB_LINK_NAME) != 0 && strcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR;
- if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
+ if (strcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR;
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR;
@@ -14435,9 +14443,9 @@ UD_cb_move(const char *new_name, hid_t new_loc, const void *udata, size_t udata_
if (udata_size > 0 && !udata)
TEST_ERROR;
- if (HDstrcmp(new_name, NEW_UD_CB_LINK_NAME) != 0)
+ if (strcmp(new_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR;
- if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
+ if (strcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR;
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR;
@@ -14459,9 +14467,9 @@ UD_cb_delete(const char *link_name, hid_t file, const void *udata, size_t udata_
if (udata_size > 0 && !udata)
TEST_ERROR;
- if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0 && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
+ if (strcmp(link_name, UD_CB_LINK_NAME) != 0 && strcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR;
- if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
+ if (strcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR;
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR;
@@ -14481,9 +14489,9 @@ UD_cb_query(const char *link_name, const void *udata, size_t udata_size, void *b
if (udata_size > 0 && !udata)
TEST_ERROR;
- if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0)
+ if (strcmp(link_name, UD_CB_LINK_NAME) != 0)
TEST_ERROR;
- if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
+ if (strcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR;
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR;
@@ -14491,7 +14499,7 @@ UD_cb_query(const char *link_name, const void *udata, size_t udata_size, void *b
if (buf) {
if (buf_size < 16)
TEST_ERROR;
- HDstrcpy((char *)buf, "query succeeded");
+ strcpy((char *)buf, "query succeeded");
} /* end if */
/* There are 15 characters and a NULL in "query succeeded" */
@@ -14502,11 +14510,11 @@ error:
} /* end UD_cb_query() */
static int
-ud_callbacks(hid_t fapl, hbool_t new_format)
+ud_callbacks(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t lcpl = -1; /* Link Creation PL */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t lcpl = H5I_INVALID_HID; /* Link Creation PL */
H5L_info2_t li; /* Link information */
char ud_target_name[] = UD_CB_TARGET; /* Link target name */
char filename[NAME_BUF_SIZE];
@@ -14524,11 +14532,11 @@ ud_callbacks(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Check that registered link classes are, and unregistered ones aren't */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != false)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_CB_TYPE) != FALSE)
+ if (H5Lis_registered((H5L_type_t)UD_CB_TYPE) != false)
TEST_ERROR;
/* Hit two birds with one stone: register UD hard links from previous
@@ -14542,11 +14550,11 @@ ud_callbacks(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Check that registered link classes are, and unregistered ones aren't */
- if (H5Lis_registered(H5L_TYPE_EXTERNAL) != TRUE)
+ if (H5Lis_registered(H5L_TYPE_EXTERNAL) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_HARD_TYPE) != true)
TEST_ERROR;
- if (H5Lis_registered((H5L_type_t)UD_CB_TYPE) != TRUE)
+ if (H5Lis_registered((H5L_type_t)UD_CB_TYPE) != true)
TEST_ERROR;
/* Create a group for the UD link to point to */
@@ -14573,14 +14581,14 @@ ud_callbacks(hid_t fapl, hbool_t new_format)
TEST_ERROR;
if (UD_CB_TYPE != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been a UD hard link");
+ puts(" Unexpected link class - should have been a UD hard link");
goto error;
}
/* Fill the query buffer */
if (H5Lget_val(fid, UD_CB_LINK_NAME, query_buf, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(query_buf, "query succeeded") != 0)
+ if (strcmp(query_buf, "query succeeded") != 0)
TEST_ERROR;
/* Move the link */
@@ -14702,11 +14710,11 @@ error:
} /* end UD_plist_traverse() */
static int
-lapl_udata(hid_t fapl, hbool_t new_format)
+lapl_udata(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t plist_id = -1; /* Property List ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t plist_id = H5I_INVALID_HID; /* Property List ID */
char group_a_name[NAME_BUF_SIZE];
char group_b_name[NAME_BUF_SIZE];
char filename[NAME_BUF_SIZE];
@@ -14758,7 +14766,7 @@ lapl_udata(hid_t fapl, hbool_t new_format)
/* Create a non-default lapl with a new property pointing to group a*/
if ((plist_id = H5Pcreate(H5P_LINK_ACCESS)) < 0)
TEST_ERROR;
- HDstrcpy(group_a_name, "group_a");
+ strcpy(group_a_name, "group_a");
if (H5Pinsert2(plist_id, DEST_PROP_NAME, (size_t)NAME_BUF_SIZE, group_a_name, NULL, NULL, NULL, NULL,
NULL, NULL) < 0)
TEST_ERROR;
@@ -14780,7 +14788,7 @@ lapl_udata(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Now use the same ud link to access group_b */
- HDstrcpy(group_b_name, "group_b");
+ strcpy(group_b_name, "group_b");
if (H5Pset(plist_id, DEST_PROP_NAME, group_b_name) < 0)
TEST_ERROR;
@@ -14936,7 +14944,7 @@ UD_cbsucc_query(const char H5_ATTR_UNUSED *link_name, const void H5_ATTR_UNUSED
*/
if (buf != NULL && buf_size >= 8)
- HDstrcpy((char *)buf, "succeed");
+ strcpy((char *)buf, "succeed");
return 8;
} /* end UD_cbsucc_query() */
@@ -15027,10 +15035,10 @@ const H5L_class_t UD_error4_class[1] = {{
}};
static int
-ud_link_errors(hid_t fapl, hbool_t new_format)
+ud_link_errors(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
char group_name[NAME_BUF_SIZE];
char filename[NAME_BUF_SIZE];
char query_buf[NAME_BUF_SIZE];
@@ -15094,8 +15102,8 @@ ud_link_errors(hid_t fapl, hbool_t new_format)
H5E_END_TRY
/* Create a user-defined link to the group. */
- HDstrcpy(group_name, "/group");
- if (H5Lcreate_ud(fid, "/ud_link", (H5L_type_t)UD_CBFAIL_TYPE, &group_name, HDstrlen(group_name) + 1,
+ strcpy(group_name, "/group");
+ if (H5Lcreate_ud(fid, "/ud_link", (H5L_type_t)UD_CBFAIL_TYPE, &group_name, strlen(group_name) + 1,
H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
@@ -15173,7 +15181,7 @@ ud_link_errors(hid_t fapl, hbool_t new_format)
TEST_ERROR;
if (H5Lget_val(fid, "ud_link", query_buf, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(query_buf, "succeed") != 0)
+ if (strcmp(query_buf, "succeed") != 0)
TEST_ERROR;
/* Moving and copying should both succeed */
@@ -15214,14 +15222,14 @@ error:
*-------------------------------------------------------------------------
*/
static int
-lapl_nlinks(hid_t fapl, hbool_t new_format)
+lapl_nlinks(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t plist = -1; /* lapl ID */
- hid_t tid = -1, sid = -1, did = -1; /* Other IDs */
- hid_t gapl = -1, dapl = -1, tapl = -1; /* Other property lists */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t plist = H5I_INVALID_HID; /* lapl ID */
+ hid_t tid = H5I_INVALID_HID, sid = H5I_INVALID_HID, did = H5I_INVALID_HID; /* Other IDs */
+ hid_t gapl = H5I_INVALID_HID, dapl = H5I_INVALID_HID, tapl = H5I_INVALID_HID; /* Other property lists */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename[NAME_BUF_SIZE];
size_t nlinks; /* nlinks for H5Pset_nlinks */
hsize_t dims[2];
@@ -15315,7 +15323,7 @@ lapl_nlinks(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/soft17") != 0)
+ if (strcmp(objname, "/soft17") != 0)
TEST_ERROR;
/* Create group using soft link */
@@ -15348,7 +15356,7 @@ lapl_nlinks(hid_t fapl, hbool_t new_format)
H5E_END_TRY
if (gid >= 0) {
H5_FAILED();
- HDputs(" Should have failed for sequence of too many nested links.");
+ puts(" Should have failed for sequence of too many nested links.");
goto error;
}
@@ -15359,7 +15367,7 @@ lapl_nlinks(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/soft4") != 0)
+ if (strcmp(objname, "/soft4") != 0)
TEST_ERROR;
/* Test other functions that should use a LAPL */
@@ -15521,13 +15529,13 @@ error:
*-------------------------------------------------------------------------
*/
static int
-linkinfo(hid_t fapl, hbool_t new_format)
+linkinfo(hid_t fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t tid = -1; /* Type ID */
- hid_t sid = -1, did = -1; /* Dataspace and dataset IDs */
- H5L_info2_t li; /* Link information */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t tid = H5I_INVALID_HID; /* Type ID */
+ hid_t sid = H5I_INVALID_HID, did = H5I_INVALID_HID; /* Dataspace and dataset IDs */
+ H5L_info2_t li; /* Link information */
char filename[NAME_BUF_SIZE];
if (new_format)
@@ -15638,9 +15646,9 @@ error:
*-------------------------------------------------------------------------
*/
static int
-check_all_closed(hid_t fapl, hbool_t new_format, int stopat)
+check_all_closed(hid_t fapl, bool new_format, int stopat)
{
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
char filename[NAME_BUF_SIZE];
int x;
@@ -15687,11 +15695,11 @@ error:
static hid_t
build_visit_file(hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t tid = -1; /* Datatype ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
char filename[NAME_BUF_SIZE];
const char *pathname = H5_get_srcdir_filename(LINKED_FILE); /* Corrected test file name */
@@ -15819,7 +15827,7 @@ visit_link_cb(hid_t H5_ATTR_UNUSED group_id, const char *name, const H5L_info2_t
lvisit_ud_t *op_data = (lvisit_ud_t *)_op_data;
/* Check for correct link information */
- if (HDstrcmp(op_data->info[op_data->idx].path, name) != 0)
+ if (strcmp(op_data->info[op_data->idx].path, name) != 0)
return (H5_ITER_ERROR);
if (op_data->info[op_data->idx].type != linfo->type)
return (H5_ITER_ERROR);
@@ -15840,11 +15848,11 @@ visit_link_cb(hid_t H5_ATTR_UNUSED group_id, const char *name, const H5L_info2_t
*-------------------------------------------------------------------------
*/
static int
-link_visit(hid_t fapl, hbool_t new_format)
+link_visit(hid_t fapl, bool new_format)
{
lvisit_ud_t udata; /* User-data for visiting */
- hid_t fid = -1;
- hid_t gid = -1; /* Group ID */
+ hid_t fid = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
if (new_format)
TESTING("link visiting (w/new group format)");
@@ -15917,11 +15925,11 @@ error:
*-------------------------------------------------------------------------
*/
static int
-link_visit_by_name(hid_t fapl, hbool_t new_format)
+link_visit_by_name(hid_t fapl, bool new_format)
{
lvisit_ud_t udata; /* User-data for visiting */
- hid_t fid = -1;
- hid_t gid = -1; /* Group ID */
+ hid_t fid = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
if (new_format)
TESTING("link visiting by name (w/new group format)");
@@ -16010,7 +16018,7 @@ visit_obj_cb(hid_t H5_ATTR_UNUSED group_id, const char *name, const H5O_info2_t
ovisit_ud_t *op_data = (ovisit_ud_t *)_op_data;
/* Check for correct object information */
- if (HDstrcmp(op_data->info[op_data->idx].path, name) != 0)
+ if (strcmp(op_data->info[op_data->idx].path, name) != 0)
return (H5_ITER_ERROR);
if (op_data->info[op_data->idx].type != oinfo->type)
return (H5_ITER_ERROR);
@@ -16031,11 +16039,11 @@ visit_obj_cb(hid_t H5_ATTR_UNUSED group_id, const char *name, const H5O_info2_t
*-------------------------------------------------------------------------
*/
static int
-obj_visit(hid_t fapl, hbool_t new_format)
+obj_visit(hid_t fapl, bool new_format)
{
ovisit_ud_t udata; /* User-data for visiting */
- hid_t fid = -1;
- hid_t gid = -1; /* Group ID */
+ hid_t fid = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
if (new_format)
TESTING("object visiting (w/new group format)");
@@ -16112,11 +16120,11 @@ error:
*-------------------------------------------------------------------------
*/
static int
-obj_visit_by_name(hid_t fapl, hbool_t new_format)
+obj_visit_by_name(hid_t fapl, bool new_format)
{
ovisit_ud_t udata; /* User-data for visiting */
- hid_t fid = -1;
- hid_t gid = -1; /* Group ID */
+ hid_t fid = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
if (new_format)
TESTING("object visiting by name (w/new group format)");
@@ -16230,10 +16238,10 @@ visit_obj_stop_cb(hid_t H5_ATTR_UNUSED group_id, const char H5_ATTR_UNUSED *name
*-------------------------------------------------------------------------
*/
static int
-obj_visit_stop(hid_t fapl, hbool_t new_format)
+obj_visit_stop(hid_t fapl, bool new_format)
{
unsigned nvisited; /* User-data for visiting */
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
herr_t ret; /* Return value */
if (new_format)
@@ -16359,17 +16367,17 @@ link_filter_filter(unsigned int flags, size_t cd_nelmts, const unsigned int cd_v
} /* end link_filter_filter */
static int
-link_filters(hid_t fapl, hbool_t new_format)
+link_filters(hid_t fapl, bool new_format)
{
- hid_t fid = -1, fcpl = -1;
- hid_t gid1 = -1, gid2 = -1, gcpl1 = -1, gcpl2 = -1;
- hid_t lcpl = -1;
- size_t cd_nelmts = 1;
- unsigned cd_value = 2112;
- unsigned cd_value_out;
- unsigned flags_out;
- unsigned filter_config_out;
- int nfilters = 0;
+ hid_t fid = H5I_INVALID_HID, fcpl = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID, gcpl1 = H5I_INVALID_HID, gcpl2 = H5I_INVALID_HID;
+ hid_t lcpl = H5I_INVALID_HID;
+ size_t cd_nelmts = 1;
+ unsigned cd_value = 2112;
+ unsigned cd_value_out;
+ unsigned flags_out;
+ unsigned filter_config_out;
+ int nfilters = 0;
H5Z_class2_t filter_class;
char name_out[24];
char filename[NAME_BUF_SIZE];
@@ -16418,8 +16426,8 @@ link_filters(hid_t fapl, hbool_t new_format)
/* Register and add custom filter */
filter_class.version = H5Z_CLASS_T_VERS;
filter_class.id = H5Z_FILTER_RESERVED + 42;
- filter_class.encoder_present = TRUE;
- filter_class.decoder_present = TRUE;
+ filter_class.encoder_present = true;
+ filter_class.decoder_present = true;
filter_class.name = "custom_link_filter";
filter_class.can_apply = link_filter_can_apply;
filter_class.set_local = link_filter_set_local;
@@ -16433,7 +16441,7 @@ link_filters(hid_t fapl, hbool_t new_format)
/* Test various other filter functions for use on gcpl's */
if (H5Pget_nfilters(gcpl1) != nfilters)
TEST_ERROR;
- if (H5Pall_filters_avail(gcpl1) != TRUE)
+ if (H5Pall_filters_avail(gcpl1) != true)
TEST_ERROR;
/* Create a group using this filter, add some soft links to it */
@@ -16489,13 +16497,13 @@ link_filters(hid_t fapl, hbool_t new_format)
TEST_ERROR;
/* Verify that all links have been copied */
- if (H5Lexists(gid2, "link1", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(gid2, "link1", H5P_DEFAULT) != true)
TEST_ERROR;
- if (H5Lexists(gid2, "link2", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(gid2, "link2", H5P_DEFAULT) != true)
TEST_ERROR;
- if (H5Lexists(gid2, "link3", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(gid2, "link3", H5P_DEFAULT) != true)
TEST_ERROR;
- if (H5Lexists(gid2, "link4", H5P_DEFAULT) != TRUE)
+ if (H5Lexists(gid2, "link4", H5P_DEFAULT) != true)
TEST_ERROR;
/* Retrieve gcpl, verify number of filters */
@@ -16547,13 +16555,13 @@ link_filters(hid_t fapl, hbool_t new_format)
if (H5Pget_filter_by_id2(gcpl2, H5Z_FILTER_RESERVED + 42, &flags_out, &cd_nelmts, &cd_value_out,
(size_t)24, name_out, &filter_config_out) < 0)
TEST_ERROR;
- if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) != 0 ||
+ if (flags_out != 0 || cd_value_out != cd_value || strcmp(filter_class.name, name_out) != 0 ||
filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED))
TEST_ERROR;
if (H5Pget_filter2(gcpl2, (unsigned)(nfilters - 1), &flags_out, &cd_nelmts, &cd_value_out, (size_t)24,
name_out, &filter_config_out) < 0)
TEST_ERROR;
- if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) != 0 ||
+ if (flags_out != 0 || cd_value_out != cd_value || strcmp(filter_class.name, name_out) != 0 ||
filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED))
TEST_ERROR;
@@ -16564,7 +16572,7 @@ link_filters(hid_t fapl, hbool_t new_format)
if (H5Pget_filter_by_id2(gcpl2, H5Z_FILTER_RESERVED + 42, &flags_out, &cd_nelmts, &cd_value_out,
(size_t)24, name_out, &filter_config_out) < 0)
TEST_ERROR;
- if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) != 0 ||
+ if (flags_out != 0 || cd_value_out != cd_value || strcmp(filter_class.name, name_out) != 0 ||
filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED))
TEST_ERROR;
@@ -16596,7 +16604,7 @@ link_filters(hid_t fapl, hbool_t new_format)
/* Create lcpl, setting the "create intermediate groups" flag */
if ((lcpl = H5Pcreate(H5P_LINK_CREATE)) < 0)
TEST_ERROR;
- if (H5Pset_create_intermediate_group(lcpl, (unsigned)TRUE) < 0)
+ if (H5Pset_create_intermediate_group(lcpl, (unsigned)true) < 0)
TEST_ERROR;
/* Create new group, with missing intermediate groups, in compressed group */
@@ -16770,11 +16778,11 @@ error:
*-------------------------------------------------------------------------
*/
static int
-obj_exists(hid_t fapl, hbool_t new_format)
+obj_exists(hid_t fapl, bool new_format)
{
char filename[NAME_BUF_SIZE]; /* Buffer for file name */
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
herr_t status; /* Generic return value */
if (new_format)
@@ -16805,7 +16813,7 @@ obj_exists(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Verify that H5Oexists_by_name() succeeds for hard linked object */
- if (TRUE != H5Oexists_by_name(fid, "group", H5P_DEFAULT))
+ if (true != H5Oexists_by_name(fid, "group", H5P_DEFAULT))
TEST_ERROR;
/* Verify that H5Oexists_by_name() returns false for non-existent object in non-root group */
@@ -16822,32 +16830,32 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_soft("dangle", fid, "soft1", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE for dangling soft-link in root group */
- if (FALSE != H5Oexists_by_name(fid, "soft1", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false for dangling soft-link in root group */
+ if (false != H5Oexists_by_name(fid, "soft1", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in root group that points to object */
if (H5Lcreate_soft("/group", fid, "soft2", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE for soft-link in root group that points to object */
- if (TRUE != H5Oexists_by_name(fid, "soft2", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true for soft-link in root group that points to object */
+ if (true != H5Oexists_by_name(fid, "soft2", H5P_DEFAULT))
TEST_ERROR;
/* Create dangling soft-link in non-root group */
if (H5Lcreate_soft("dangle", fid, "group/soft1", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE for dangling soft-link in non-root group */
- if (FALSE != H5Oexists_by_name(fid, "group/soft1", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false for dangling soft-link in non-root group */
+ if (false != H5Oexists_by_name(fid, "group/soft1", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in non-root group that points to object */
if (H5Lcreate_soft("/group", fid, "group/soft2", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE for soft-link in non-root group that points to object */
- if (TRUE != H5Oexists_by_name(fid, "group/soft2", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true for soft-link in non-root group that points to object */
+ if (true != H5Oexists_by_name(fid, "group/soft2", H5P_DEFAULT))
TEST_ERROR;
/* External links */
@@ -16855,53 +16863,53 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_external("nofile", "dangle", fid, "external1", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE for dangling (file doesn't exist) external link in root
+ /* Verify that H5Oexists_by_name() returns false for dangling (file doesn't exist) external link in root
* group */
- if (FALSE != H5Oexists_by_name(fid, "external1", H5P_DEFAULT))
+ if (false != H5Oexists_by_name(fid, "external1", H5P_DEFAULT))
TEST_ERROR;
/* Create dangling (object doesn't exist) external link in root group */
if (H5Lcreate_external(filename, "dangle", fid, "external2", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE for dangling (object doesn't exist) external link in root
+ /* Verify that H5Oexists_by_name() returns false for dangling (object doesn't exist) external link in root
* group */
- if (FALSE != H5Oexists_by_name(fid, "external2", H5P_DEFAULT))
+ if (false != H5Oexists_by_name(fid, "external2", H5P_DEFAULT))
TEST_ERROR;
/* Create external link in root group that points to object */
if (H5Lcreate_external(filename, "group", fid, "external3", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE for external link in root group that points to object */
- if (TRUE != H5Oexists_by_name(fid, "external3", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true for external link in root group that points to object */
+ if (true != H5Oexists_by_name(fid, "external3", H5P_DEFAULT))
TEST_ERROR;
/* Create dangling (file doesn't exist) external link in non-root group */
if (H5Lcreate_external("nofile", "dangle", fid, "group/external1", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE for dangling (file doesn't exist) external link in
+ /* Verify that H5Oexists_by_name() returns false for dangling (file doesn't exist) external link in
* non-root group */
- if (FALSE != H5Oexists_by_name(fid, "group/external1", H5P_DEFAULT))
+ if (false != H5Oexists_by_name(fid, "group/external1", H5P_DEFAULT))
TEST_ERROR;
/* Create dangling (object doesn't exist) external link in non-root group */
if (H5Lcreate_external(filename, "dangle", fid, "group/external2", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE for dangling (object doesn't exist) external link in
+ /* Verify that H5Oexists_by_name() returns false for dangling (object doesn't exist) external link in
* non-root group */
- if (FALSE != H5Oexists_by_name(fid, "group/external2", H5P_DEFAULT))
+ if (false != H5Oexists_by_name(fid, "group/external2", H5P_DEFAULT))
TEST_ERROR;
/* Create external link in non-root group that points to object */
if (H5Lcreate_external(filename, "group", fid, "group/external3", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE for external link in non-root group that points to object
+ /* Verify that H5Oexists_by_name() returns true for external link in non-root group that points to object
*/
- if (TRUE != H5Oexists_by_name(fid, "group/external3", H5P_DEFAULT))
+ if (true != H5Oexists_by_name(fid, "group/external3", H5P_DEFAULT))
TEST_ERROR;
/* Soft->External links */
@@ -16909,24 +16917,24 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_soft("external1", fid, "soft-elink1", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "soft-elink1", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "soft-elink1", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in root group that points to dangling (object doesn't exist) external link */
if (H5Lcreate_soft("external2", fid, "soft-elink2", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "soft-elink2", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "soft-elink2", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in root group that points to external link that points to object */
if (H5Lcreate_soft("external3", fid, "soft-elink3", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "soft-elink3", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true */
+ if (true != H5Oexists_by_name(fid, "soft-elink3", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in root group that points to dangling (file doesn't exist) external link in non-root
@@ -16934,8 +16942,8 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_soft("group/external1", fid, "soft-elink4", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "soft-elink4", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "soft-elink4", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in root group that points to dangling (object doesn't exist) external link in non-root
@@ -16943,40 +16951,40 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_soft("group/external2", fid, "soft-elink5", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "soft-elink5", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "soft-elink5", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in root group that points to external link in non-root group that points to object */
if (H5Lcreate_soft("group/external3", fid, "soft-elink6", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "soft-elink6", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true */
+ if (true != H5Oexists_by_name(fid, "soft-elink6", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in non-root group that points to dangling (file doesn't exist) external link */
if (H5Lcreate_soft("/external1", fid, "group/soft-elink1", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "group/soft-elink1", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "group/soft-elink1", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in non-root group that points to dangling (object doesn't exist) external link */
if (H5Lcreate_soft("/external2", fid, "group/soft-elink2", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "group/soft-elink2", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "group/soft-elink2", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in non-root group that points to external link that points to object */
if (H5Lcreate_soft("/external3", fid, "group/soft-elink3", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "group/soft-elink3", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true */
+ if (true != H5Oexists_by_name(fid, "group/soft-elink3", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in non-root group that points to dangling (file doesn't exist) external link in
@@ -16984,8 +16992,8 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_soft("/group/external1", fid, "group/soft-elink4", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "group/soft-elink4", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "group/soft-elink4", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in non-root group that points to dangling (object doesn't exist) external link in
@@ -16993,8 +17001,8 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_soft("/group/external2", fid, "group/soft-elink5", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "group/soft-elink5", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "group/soft-elink5", H5P_DEFAULT))
TEST_ERROR;
/* Create soft-link in non-root group that points to external link in non-root group that points to object
@@ -17002,8 +17010,8 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_soft("/group/external3", fid, "group/soft-elink6", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "group/soft-elink6", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true */
+ if (true != H5Oexists_by_name(fid, "group/soft-elink6", H5P_DEFAULT))
TEST_ERROR;
/* External->Soft links */
@@ -17011,56 +17019,56 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_external(filename, "soft1", fid, "elink-soft1", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "elink-soft1", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "elink-soft1", H5P_DEFAULT))
TEST_ERROR;
/* Create external link in root group that points to soft link in root group that points to object */
if (H5Lcreate_external(filename, "soft2", fid, "elink-soft2", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "elink-soft2", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true */
+ if (true != H5Oexists_by_name(fid, "elink-soft2", H5P_DEFAULT))
TEST_ERROR;
/* Create external link in root group that points to dangling soft link in non-root group */
if (H5Lcreate_external(filename, "group/soft1", fid, "elink-soft3", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "elink-soft3", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "elink-soft3", H5P_DEFAULT))
TEST_ERROR;
/* Create external link in root group that points to soft link in root group that points to object */
if (H5Lcreate_external(filename, "group/soft2", fid, "elink-soft4", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "elink-soft4", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true */
+ if (true != H5Oexists_by_name(fid, "elink-soft4", H5P_DEFAULT))
TEST_ERROR;
/* Create external link in non-root group that points to dangling soft link in root group */
if (H5Lcreate_external(filename, "soft1", fid, "group/elink-soft1", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "group/elink-soft1", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "group/elink-soft1", H5P_DEFAULT))
TEST_ERROR;
/* Create external link in non-root group that points to soft link in root group that points to object */
if (H5Lcreate_external(filename, "soft2", fid, "group/elink-soft2", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "group/elink-soft2", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true */
+ if (true != H5Oexists_by_name(fid, "group/elink-soft2", H5P_DEFAULT))
TEST_ERROR;
/* Create external link in non-root group that points to dangling soft link in non-root group */
if (H5Lcreate_external(filename, "group/soft1", fid, "group/elink-soft3", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns FALSE */
- if (FALSE != H5Oexists_by_name(fid, "group/elink-soft3", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns false */
+ if (false != H5Oexists_by_name(fid, "group/elink-soft3", H5P_DEFAULT))
TEST_ERROR;
/* Create external link in non-root group that points to soft link in non-root group that points to object
@@ -17068,8 +17076,8 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (H5Lcreate_external(filename, "group/soft2", fid, "group/elink-soft4", H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "group/elink-soft4", H5P_DEFAULT))
+ /* Verify that H5Oexists_by_name() returns true */
+ if (true != H5Oexists_by_name(fid, "group/elink-soft4", H5P_DEFAULT))
TEST_ERROR;
/* Close file created */
@@ -17101,12 +17109,12 @@ error:
static int
corder_create_empty(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- unsigned crt_order_flags; /* Status of creation order info for GCPL */
- herr_t ret; /* Generic return value */
- char filename[NAME_BUF_SIZE]; /* File name */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ unsigned crt_order_flags; /* Status of creation order info for GCPL */
+ herr_t ret; /* Generic return value */
+ char filename[NAME_BUF_SIZE]; /* File name */
TESTING("creating empty group with creation order indexing");
@@ -17133,7 +17141,7 @@ corder_create_empty(hid_t fapl)
H5E_END_TRY
if (ret > 0) {
H5_FAILED();
- HDputs(
+ puts(
" H5Pset_link_create_order() should have failed for a creation order index with no tracking.");
TEST_ERROR;
} /* end if */
@@ -17155,7 +17163,7 @@ corder_create_empty(hid_t fapl)
TEST_ERROR;
/* Check on group's status */
- if (H5G__is_empty_test(group_id) != TRUE)
+ if (H5G__is_empty_test(group_id) != true)
TEST_ERROR;
/* Close the group */
@@ -17179,7 +17187,7 @@ corder_create_empty(hid_t fapl)
FAIL_STACK_ERROR;
/* Check on group's status */
- if (H5G__is_empty_test(group_id) != TRUE)
+ if (H5G__is_empty_test(group_id) != true)
TEST_ERROR;
/* Retrieve group creation property list for group */
@@ -17231,15 +17239,15 @@ error:
static int
corder_create_compact(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- unsigned nlinks; /* Number of link messages in group's header */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- unsigned u; /* Local index variable */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ unsigned nlinks; /* Number of link messages in group's header */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ unsigned u; /* Local index variable */
TESTING("creating compact group with creation order indexing");
@@ -17261,11 +17269,11 @@ corder_create_compact(hid_t fapl)
TEST_ERROR;
/* Check on group's initial status */
- if (H5G__is_empty_test(group_id) != TRUE)
+ if (H5G__is_empty_test(group_id) != true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Query the group creation properties */
@@ -17274,20 +17282,20 @@ corder_create_compact(hid_t fapl)
/* Create several links, but keep group in compact form */
for (u = 0; u < max_compact; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, &nlinks) != TRUE)
+ if (H5G__has_links_test(group_id, &nlinks) != true)
TEST_ERROR;
if (nlinks != (u + 1))
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
} /* end for */
@@ -17312,13 +17320,13 @@ corder_create_compact(hid_t fapl)
FAIL_STACK_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, &nlinks) != TRUE)
+ if (H5G__has_links_test(group_id, &nlinks) != true)
TEST_ERROR;
if (nlinks != max_compact)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Loop through links, checking their creation order values */
@@ -17327,12 +17335,12 @@ corder_create_compact(hid_t fapl)
H5L_info2_t linfo; /* Link information */
/* Retrieve information for link */
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Lget_info2(group_id, objname, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
/* Verify creation order of link */
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != u)
TEST_ERROR;
@@ -17373,17 +17381,17 @@ error:
static int
corder_create_dense(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- unsigned nlinks; /* Number of link messages in group's header */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- unsigned u; /* Local index variable */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ unsigned nlinks; /* Number of link messages in group's header */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ unsigned u; /* Local index variable */
TESTING("creating dense group with creation order indexing");
@@ -17405,11 +17413,11 @@ corder_create_dense(hid_t fapl)
TEST_ERROR;
/* Check on group's initial status */
- if (H5G__is_empty_test(group_id) != TRUE)
+ if (H5G__is_empty_test(group_id) != true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Query the group creation properties */
@@ -17418,36 +17426,36 @@ corder_create_dense(hid_t fapl)
/* Create several links, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, &nlinks) != TRUE)
+ if (H5G__has_links_test(group_id, &nlinks) != true)
TEST_ERROR;
if (nlinks != (u + 1))
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
} /* end for */
/* Create another link, to push group into dense form */
- HDsnprintf(objname, sizeof(objname), "filler %u", max_compact);
+ snprintf(objname, sizeof(objname), "filler %u", max_compact);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Retrieve & verify # of records in the name & creation order indices */
@@ -17477,11 +17485,11 @@ corder_create_dense(hid_t fapl)
FAIL_STACK_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Loop through links, checking their creation order values */
@@ -17490,12 +17498,12 @@ corder_create_dense(hid_t fapl)
H5L_info2_t linfo; /* Link information */
/* Retrieve information for link */
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Lget_info2(group_id, objname, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
/* Verify creation order of link */
- if (linfo.corder_valid != TRUE)
+ if (linfo.corder_valid != true)
TEST_ERROR;
if (linfo.corder != u)
TEST_ERROR;
@@ -17536,19 +17544,19 @@ error:
static int
corder_transition(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- unsigned nlinks; /* Number of link messages in group's header */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- h5_stat_size_t empty_size; /* Size of empty file */
- h5_stat_size_t file_size; /* Size of file after operating on it */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- unsigned u; /* Local index variable */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ unsigned nlinks; /* Number of link messages in group's header */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ h5_stat_size_t empty_size; /* Size of empty file */
+ h5_stat_size_t file_size; /* Size of file after operating on it */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ unsigned u; /* Local index variable */
TESTING("transitioning group with creation order indexing between dense & compact forms");
@@ -17605,7 +17613,7 @@ corder_transition(hid_t fapl)
/* Create several links, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
@@ -17613,18 +17621,18 @@ corder_transition(hid_t fapl)
} /* end for */
/* Create another link, to push group into dense form */
- HDsnprintf(objname, sizeof(objname), "filler %u", max_compact);
+ snprintf(objname, sizeof(objname), "filler %u", max_compact);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Retrieve & verify # of records in the name & creation order indices */
@@ -17635,16 +17643,16 @@ corder_transition(hid_t fapl)
/* Delete several links from group, until it resumes compact form */
for (u = max_compact; u >= min_dense; u--) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Ldelete(group_id, objname, H5P_DEFAULT) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Retrieve & verify # of records in the name & creation order indices */
@@ -17655,23 +17663,23 @@ corder_transition(hid_t fapl)
} /* end for */
/* Delete another link, to push group into compact form */
- HDsnprintf(objname, sizeof(objname), "filler %u", (min_dense - 1));
+ snprintf(objname, sizeof(objname), "filler %u", (min_dense - 1));
if (H5Ldelete(group_id, objname, H5P_DEFAULT) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, &nlinks) != TRUE)
+ if (H5G__has_links_test(group_id, &nlinks) != true)
TEST_ERROR;
if (nlinks != (min_dense - 1))
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Re-add links to get back into dense form */
for (u = (min_dense - 1); u < (max_compact + 1); u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
@@ -17679,11 +17687,11 @@ corder_transition(hid_t fapl)
} /* end for */
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Retrieve & verify # of records in the name & creation order indices */
@@ -17709,11 +17717,11 @@ corder_transition(hid_t fapl)
FAIL_STACK_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Retrieve & verify # of records in the name & creation order indices */
@@ -17724,16 +17732,16 @@ corder_transition(hid_t fapl)
/* Delete several links from group, until it resumes compact form */
for (u = max_compact; u >= min_dense; u--) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Ldelete(group_id, objname, H5P_DEFAULT) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Retrieve & verify # of records in the name & creation order indices */
@@ -17744,23 +17752,23 @@ corder_transition(hid_t fapl)
} /* end for */
/* Delete another link, to push group into compact form */
- HDsnprintf(objname, sizeof(objname), "filler %u", (min_dense - 1));
+ snprintf(objname, sizeof(objname), "filler %u", (min_dense - 1));
if (H5Ldelete(group_id, objname, H5P_DEFAULT) < 0)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_links_test(group_id, &nlinks) != TRUE)
+ if (H5G__has_links_test(group_id, &nlinks) != true)
TEST_ERROR;
if (nlinks != (min_dense - 1))
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Re-add links to get back into dense form */
for (u = (min_dense - 1); u < (max_compact + 1); u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
@@ -17768,11 +17776,11 @@ corder_transition(hid_t fapl)
} /* end for */
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Retrieve & verify # of records in the name & creation order indices */
@@ -17783,11 +17791,11 @@ corder_transition(hid_t fapl)
/* Delete all the links */
for (u = max_compact; u > 0; u--) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Ldelete(group_id, objname, H5P_DEFAULT) < 0)
TEST_ERROR;
} /* end for */
- HDsnprintf(objname, sizeof(objname), "filler %u", (unsigned)0);
+ snprintf(objname, sizeof(objname), "filler %u", (unsigned)0);
if (H5Ldelete(group_id, objname, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -17833,25 +17841,25 @@ error:
static int
corder_delete(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- unsigned reopen_file; /* Whether to re-open the file before deleting group */
- h5_stat_size_t empty_size; /* Size of empty file */
- h5_stat_size_t file_size; /* Size of file after operating on it */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- unsigned u; /* Local index variable */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ unsigned reopen_file; /* Whether to re-open the file before deleting group */
+ h5_stat_size_t empty_size; /* Size of empty file */
+ h5_stat_size_t file_size; /* Size of file after operating on it */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ unsigned u; /* Local index variable */
TESTING("deleting group with creation order indexing in dense form");
/* Loop to leave file open when deleting group, or to close & re-open file
* before deleting group */
- for (reopen_file = FALSE; reopen_file <= TRUE; reopen_file++) {
+ for (reopen_file = false; reopen_file <= true; reopen_file++) {
/* Create file */
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
@@ -17899,7 +17907,7 @@ corder_delete(hid_t fapl)
/* Create links until the group is in dense form */
for (u = 0; u < max_compact * 2; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Gclose(group_id2) < 0)
@@ -17907,11 +17915,11 @@ corder_delete(hid_t fapl)
} /* end for */
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(group_id) == TRUE)
+ if (H5G__has_stab_test(group_id) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Retrieve & verify # of records in the name & creation order indices */
@@ -17984,7 +17992,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t hard_link, hbool_t use_index)
+link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, bool hard_link, bool use_index)
{
char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
char valname[NAME_BUF_SIZE]; /* Link value name */
@@ -17992,7 +18000,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
H5L_info2_t linfo; /* Link info struct */
/* Make link value for increasing/native order queries */
- HDsnprintf(valname, sizeof(valname), "value %02u", (unsigned)n);
+ snprintf(valname, sizeof(valname), "value %02u", (unsigned)n);
/* Verify the link information for first link, in increasing creation order */
memset(&linfo, 0, sizeof(linfo));
@@ -18015,7 +18023,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -18024,7 +18032,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Don't test "native" order if there is no creation order index, since
@@ -18054,7 +18062,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -18063,7 +18071,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
} /* end if */
@@ -18088,7 +18096,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -18097,7 +18105,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Verify the link information for first link, in increasing link name order */
@@ -18120,7 +18128,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpval, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -18129,7 +18137,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Don't test "native" order queries on link name order, since there's not
@@ -18156,7 +18164,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -18165,7 +18173,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Success */
@@ -18189,26 +18197,26 @@ error:
static int
link_info_by_idx(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- unsigned hard_link; /* Create hard or soft link? */
- unsigned use_index; /* Use index on creation order values */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- H5L_info2_t linfo; /* Link info struct */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char valname[NAME_BUF_SIZE]; /* Link value name */
- char filename[NAME_BUF_SIZE]; /* File name */
- char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
- unsigned u; /* Local index variable */
- ssize_t name_len; /* Length of name */
- herr_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ unsigned hard_link; /* Create hard or soft link? */
+ unsigned use_index; /* Use index on creation order values */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ H5L_info2_t linfo; /* Link info struct */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char valname[NAME_BUF_SIZE]; /* Link value name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
+ unsigned u; /* Local index variable */
+ ssize_t name_len; /* Length of name */
+ herr_t ret; /* Generic return value */
/* Loop over creating hard or soft links */
- for (hard_link = FALSE; hard_link <= TRUE; hard_link++) {
+ for (hard_link = false; hard_link <= true; hard_link++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
if (hard_link) {
if (use_index)
TESTING("querying info by index w/creation order index, using hard links");
@@ -18265,7 +18273,7 @@ link_info_by_idx(hid_t fapl)
/* Create several links, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Check for creating hard or soft link */
if (hard_link) {
@@ -18280,7 +18288,7 @@ link_info_by_idx(hid_t fapl)
} /* end if */
else {
/* Make value for link */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Create soft link */
if (H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -18293,7 +18301,7 @@ link_info_by_idx(hid_t fapl)
} /* end for */
/* Verify state of group */
- if (H5G__has_links_test(group_id, NULL) != TRUE)
+ if (H5G__has_links_test(group_id, NULL) != true)
TEST_ERROR;
/* Check for out of bound offset queries */
@@ -18325,7 +18333,7 @@ link_info_by_idx(hid_t fapl)
/* Create more links, to push group into dense form */
for (; u < (max_compact * 2); u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Check for creating hard or soft link */
if (hard_link) {
@@ -18340,7 +18348,7 @@ link_info_by_idx(hid_t fapl)
} /* end if */
else {
/* Make value for link */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Create soft link */
if (H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -18348,7 +18356,7 @@ link_info_by_idx(hid_t fapl)
} /* end else */
/* Verify state of group */
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Verify link information for new link */
@@ -18424,8 +18432,8 @@ error:
static int
link_info_by_idx_old(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
H5F_t *f = NULL;
unsigned hard_link; /* Create hard or soft link? */
H5L_info2_t linfo; /* Link info struct */
@@ -18442,7 +18450,7 @@ link_info_by_idx_old(hid_t fapl)
herr_t ret; /* Generic return value */
/* Loop over creating hard or soft links */
- for (hard_link = FALSE; hard_link <= TRUE; hard_link++) {
+ for (hard_link = false; hard_link <= true; hard_link++) {
if (hard_link)
TESTING("querying info by index in old-style group, using hard links");
else
@@ -18468,7 +18476,7 @@ link_info_by_idx_old(hid_t fapl)
/* Create several links */
for (u = 0; u < CORDER_NLINKS; u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Check for creating hard or soft link */
if (hard_link) {
@@ -18490,7 +18498,7 @@ link_info_by_idx_old(hid_t fapl)
} /* end if */
else {
/* Make value for link */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Create soft link */
if (H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -18503,10 +18511,10 @@ link_info_by_idx_old(hid_t fapl)
unsigned dec_u = CORDER_NLINKS - (u + 1); /* Decreasing mapped index */
/* Make link name for increasing/native order queries */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Make link value for increasing/native order queries */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Verify link information (in increasing order) */
if (hard_link) {
@@ -18522,7 +18530,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end else */
@@ -18530,7 +18538,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, tmpname) != 0)
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
/* Verify link information (in native order - native is increasing) */
@@ -18547,7 +18555,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end else */
@@ -18555,14 +18563,14 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, tmpname) != 0)
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
/* Make link name for decreasing order queries */
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
/* Make link value for decreasing order queries */
- HDsnprintf(valname, sizeof(valname), "value %02u", dec_u);
+ snprintf(valname, sizeof(valname), "value %02u", dec_u);
/* Verify link information (in decreasing order) */
if (hard_link) {
@@ -18578,7 +18586,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end else */
@@ -18586,7 +18594,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, tmpname) != 0)
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -18609,7 +18617,7 @@ link_info_by_idx_old(hid_t fapl)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Close the group */
@@ -18648,27 +18656,27 @@ error:
static int
delete_by_idx(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- unsigned use_index; /* Use index on creation order values */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- H5L_info2_t linfo; /* Link info struct */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ unsigned use_index; /* Use index on creation order values */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ H5L_info2_t linfo; /* Link info struct */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Loop over operating on different indices on link fields */
for (idx_type = H5_INDEX_NAME; idx_type <= H5_INDEX_CRT_ORDER; idx_type++) {
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_DEC; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -18756,7 +18764,7 @@ delete_by_idx(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -18766,12 +18774,12 @@ delete_by_idx(hid_t fapl)
TEST_ERROR;
/* Verify link information for new link */
- if (link_info_by_idx_check(group_id, objname, (hsize_t)u, TRUE, use_index) < 0)
+ if (link_info_by_idx_check(group_id, objname, (hsize_t)u, true, use_index) < 0)
TEST_ERROR;
} /* end for */
/* Verify state of group (compact) */
- if (H5G__has_links_test(group_id, NULL) != TRUE)
+ if (H5G__has_links_test(group_id, NULL) != true)
TEST_ERROR;
/* Check for out of bound deletion */
@@ -18809,10 +18817,10 @@ delete_by_idx(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", (max_compact - (u + 2)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", (max_compact - (u + 2)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -18821,7 +18829,7 @@ delete_by_idx(hid_t fapl)
TEST_ERROR;
/* Verify state of group (empty) */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
/* Create more links, to push group into dense form */
@@ -18829,7 +18837,7 @@ delete_by_idx(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -18840,11 +18848,11 @@ delete_by_idx(hid_t fapl)
/* Verify state of group (dense) */
if (u >= max_compact)
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Verify link information for new link */
- if (link_info_by_idx_check(group_id, objname, (hsize_t)u, TRUE, use_index) < 0)
+ if (link_info_by_idx_check(group_id, objname, (hsize_t)u, true, use_index) < 0)
TEST_ERROR;
} /* end for */
@@ -18883,10 +18891,10 @@ delete_by_idx(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - (u + 2)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - (u + 2)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -18895,9 +18903,9 @@ delete_by_idx(hid_t fapl)
TEST_ERROR;
/* Verify state of group (empty) */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Check for deletion on empty group again */
@@ -18916,7 +18924,7 @@ delete_by_idx(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -18927,11 +18935,11 @@ delete_by_idx(hid_t fapl)
/* Verify state of group (dense) */
if (u >= max_compact)
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Verify link information for new link */
- if (link_info_by_idx_check(group_id, objname, (hsize_t)u, TRUE, use_index) < 0)
+ if (link_info_by_idx_check(group_id, objname, (hsize_t)u, true, use_index) < 0)
TEST_ERROR;
} /* end for */
@@ -18961,11 +18969,11 @@ delete_by_idx(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u",
- ((max_compact * 2) - ((u * 2) + 2)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u",
+ ((max_compact * 2) - ((u * 2) + 2)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -18995,11 +19003,11 @@ delete_by_idx(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u",
- ((max_compact * 2) - ((u * 2) + 4)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u",
+ ((max_compact * 2) - ((u * 2) + 4)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -19008,9 +19016,9 @@ delete_by_idx(hid_t fapl)
TEST_ERROR;
/* Verify state of group (empty) */
- if (H5G__has_links_test(group_id, NULL) == TRUE)
+ if (H5G__has_links_test(group_id, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(group_id) == TRUE)
+ if (H5G__is_new_dense_test(group_id) == true)
TEST_ERROR;
/* Close the group */
@@ -19056,8 +19064,8 @@ error:
static int
delete_by_idx_old(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1, group_id2 = -1; /* Group IDs */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; /* Group IDs */
H5F_t *f = NULL;
H5L_info2_t linfo; /* Link info struct */
H5_iter_order_t order; /* Order within in the index */
@@ -19111,7 +19119,7 @@ delete_by_idx_old(hid_t fapl)
H5O_info2_t oi; /* Buffer for querying object's info */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create group */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -19177,10 +19185,10 @@ delete_by_idx_old(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -19198,7 +19206,7 @@ delete_by_idx_old(hid_t fapl)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Delete links in middle */
@@ -19208,7 +19216,7 @@ delete_by_idx_old(hid_t fapl)
H5O_info2_t oi; /* Buffer for querying object's info */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create group */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -19256,10 +19264,10 @@ delete_by_idx_old(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -19294,10 +19302,10 @@ delete_by_idx_old(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -19306,7 +19314,7 @@ delete_by_idx_old(hid_t fapl)
TEST_ERROR;
/* Verify state of group */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Close the group */
@@ -19382,8 +19390,8 @@ link_iterate_cb(hid_t group_id, const char *link_name, const H5L_info2_t *info,
} /* end if */
/* Verify name of link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", (unsigned)my_info.corder);
- if (HDstrcmp(link_name, objname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", (unsigned)my_info.corder);
+ if (strcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */
@@ -19391,7 +19399,7 @@ link_iterate_cb(hid_t group_id, const char *link_name, const H5L_info2_t *info,
return H5_ITER_ERROR;
if (op_data->visited[op_data->curr])
return H5_ITER_ERROR;
- op_data->visited[op_data->curr] = TRUE;
+ op_data->visited[op_data->curr] = true;
/* Advance to next value, in correct direction */
if (op_data->order != H5_ITER_DEC)
@@ -19469,7 +19477,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Literate2(group_id, idx_type, order, &skip, link_iterate_cb, iter_info) < 0)
TEST_ERROR;
@@ -19477,7 +19485,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
if (skip != max_links)
TEST_ERROR;
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -19487,7 +19495,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_cb, iter_info) < 0)
TEST_ERROR;
@@ -19495,7 +19503,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
if (gskip != (int)max_links)
TEST_ERROR;
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -19505,7 +19513,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = (int64_t)(order != H5_ITER_DEC ? skip : ((max_links - 1) - skip));
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Literate2(group_id, idx_type, order, &skip, link_iterate_cb, iter_info) < 0)
TEST_ERROR;
@@ -19514,12 +19522,12 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
TEST_ERROR;
if (order == H5_ITER_INC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v + (max_links / 2)] == FALSE)
+ if (iter_info->visited[v + (max_links / 2)] == false)
TEST_ERROR;
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
} /* end if */
else {
@@ -19527,7 +19535,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
if (nvisit != (max_links / 2))
@@ -19541,7 +19549,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - (unsigned)gskip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_cb, iter_info) < 0)
TEST_ERROR;
@@ -19550,12 +19558,12 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
TEST_ERROR;
if (order == H5_ITER_INC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v + (max_links / 2)] == FALSE)
+ if (iter_info->visited[v + (max_links / 2)] == false)
TEST_ERROR;
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
} /* end if */
else {
@@ -19563,7 +19571,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
if (nvisit != (max_links / 2))
@@ -19577,7 +19585,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if ((ret = H5Literate2(group_id, idx_type, order, &skip, link_iterate_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -19592,7 +19600,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if ((ret = H5Giterate(group_id, ".", &gskip, group_iterate_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -19632,21 +19640,21 @@ error:
static int
link_iterate(hid_t fapl)
{
- hid_t file_id = (-1); /* File ID */
- hid_t group_id = (-1); /* Group ID */
- hid_t gcpl_id = (-1); /* Group creation property list ID */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- unsigned use_index; /* Use index on creation order values */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- link_iter_info_t iter_info; /* Iterator info */
- hbool_t *visited = NULL; /* Array of flags for visiting links */
- hsize_t skip; /* # of links to skip in group */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t file_id = (H5I_INVALID_HID); /* File ID */
+ hid_t group_id = (H5I_INVALID_HID); /* Group ID */
+ hid_t gcpl_id = (H5I_INVALID_HID); /* Group creation property list ID */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ unsigned use_index; /* Use index on creation order values */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ link_iter_info_t iter_info; /* Iterator info */
+ bool *visited = NULL; /* Array of flags for visiting links */
+ hsize_t skip; /* # of links to skip in group */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Create group creation property list */
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
@@ -19658,7 +19666,7 @@ link_iterate(hid_t fapl)
/* Allocate the "visited link" array */
iter_info.max_visit = max_compact * 2;
- if (NULL == (visited = (hbool_t *)malloc(sizeof(hbool_t) * iter_info.max_visit)))
+ if (NULL == (visited = (bool *)malloc(sizeof(bool) * iter_info.max_visit)))
TEST_ERROR;
iter_info.visited = visited;
@@ -19667,7 +19675,7 @@ link_iterate(hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_NATIVE; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -19750,7 +19758,7 @@ link_iterate(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -19761,7 +19769,7 @@ link_iterate(hid_t fapl)
} /* end for */
/* Verify state of group (compact) */
- if (H5G__has_links_test(group_id, NULL) != TRUE)
+ if (H5G__has_links_test(group_id, NULL) != true)
TEST_ERROR;
/* Check for out of bound iteration on compact group */
@@ -19783,7 +19791,7 @@ link_iterate(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -19794,7 +19802,7 @@ link_iterate(hid_t fapl)
} /* end for */
/* Verify state of group (dense) */
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound iteration on dense group */
@@ -19893,9 +19901,9 @@ link_iterate_old_cb(hid_t group_id, const char *link_name, const H5L_info2_t *in
} /* end if */
/* Verify name of link */
- HDsnprintf(objname, sizeof(objname), "filler %02u",
- (info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped)));
- if (HDstrcmp(link_name, objname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u",
+ (info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped)));
+ if (strcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */
@@ -19903,7 +19911,7 @@ link_iterate_old_cb(hid_t group_id, const char *link_name, const H5L_info2_t *in
return H5_ITER_ERROR;
if (op_data->visited[op_data->curr])
return H5_ITER_ERROR;
- op_data->visited[op_data->curr] = TRUE;
+ op_data->visited[op_data->curr] = true;
/* Advance to next value, in correct direction */
if (op_data->order != H5_ITER_DEC)
@@ -19963,7 +19971,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Literate2(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_cb, iter_info) < 0)
TEST_ERROR;
@@ -19971,7 +19979,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
if (skip != max_links)
TEST_ERROR;
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -19981,7 +19989,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_old_cb, iter_info) < 0)
TEST_ERROR;
@@ -19989,7 +19997,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
if (gskip != (int)max_links)
TEST_ERROR;
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -19999,7 +20007,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = (int64_t)(order != H5_ITER_DEC ? skip : ((max_links - 1) - skip));
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Literate2(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_cb, iter_info) < 0)
TEST_ERROR;
@@ -20008,12 +20016,12 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
TEST_ERROR;
if (order == H5_ITER_INC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v + (max_links / 2)] == FALSE)
+ if (iter_info->visited[v + (max_links / 2)] == false)
TEST_ERROR;
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
} /* end if */
else {
@@ -20021,7 +20029,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
if (nvisit != (max_links / 2))
@@ -20035,7 +20043,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - (unsigned)gskip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if (H5Giterate(group_id, ".", &gskip, group_iterate_old_cb, iter_info) < 0)
TEST_ERROR;
@@ -20044,12 +20052,12 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
TEST_ERROR;
if (order == H5_ITER_INC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v + (max_links / 2)] == FALSE)
+ if (iter_info->visited[v + (max_links / 2)] == false)
TEST_ERROR;
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_links / 2); v++)
- if (iter_info->visited[v] == FALSE)
+ if (iter_info->visited[v] == false)
TEST_ERROR;
} /* end if */
else {
@@ -20057,7 +20065,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_links; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
if (nvisit != (max_links / 2))
@@ -20071,7 +20079,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if ((ret = H5Literate2(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -20086,7 +20094,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
if ((ret = H5Giterate(group_id, ".", &gskip, group_iterate_old_cb, iter_info)) < 0)
TEST_ERROR;
if (ret != CORDER_ITER_STOP)
@@ -20109,7 +20117,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
skip = 0;
H5E_BEGIN_TRY
{
- ret = H5Literate2((hid_t)(-1), H5_INDEX_NAME, order, &skip, link_iterate_fail_cb, NULL);
+ ret = H5Literate2((hid_t)(H5I_INVALID_HID), H5_INDEX_NAME, order, &skip, link_iterate_fail_cb, NULL);
}
H5E_END_TRY
if (ret >= 0)
@@ -20118,7 +20126,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links
#ifndef H5_NO_DEPRECATED_SYMBOLS
H5E_BEGIN_TRY
{
- ret = H5Giterate((hid_t)(-1), ".", &gskip, group_iterate_old_cb, iter_info);
+ ret = H5Giterate((hid_t)(H5I_INVALID_HID), ".", &gskip, group_iterate_old_cb, iter_info);
}
H5E_END_TRY
if (ret >= 0)
@@ -20144,20 +20152,20 @@ error:
static int
link_iterate_old(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- H5_iter_order_t order; /* Order within in the index */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char filename[NAME_BUF_SIZE]; /* File name */
- link_iter_info_t iter_info; /* Iterator info */
- hbool_t *visited = NULL; /* Array of flags for visiting links */
- hsize_t skip; /* # of links to skip in group */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ H5_iter_order_t order; /* Order within in the index */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ link_iter_info_t iter_info; /* Iterator info */
+ bool *visited = NULL; /* Array of flags for visiting links */
+ hsize_t skip; /* # of links to skip in group */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Allocate the "visited link" array */
iter_info.max_visit = CORDER_NLINKS;
- if (NULL == (visited = (hbool_t *)malloc(sizeof(hbool_t) * iter_info.max_visit)))
+ if (NULL == (visited = (bool *)malloc(sizeof(bool) * iter_info.max_visit)))
TEST_ERROR;
iter_info.visited = visited;
@@ -20194,7 +20202,7 @@ link_iterate_old(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -20204,7 +20212,7 @@ link_iterate_old(hid_t fapl)
} /* end for */
/* Verify state of group (symbol table) */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound iteration on old-style group */
@@ -20277,13 +20285,13 @@ static int
open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id, H5_index_t idx_type,
H5_iter_order_t order, unsigned max_links, H5O_token_t *objno)
{
- char mntname[NAME_BUF_SIZE]; /* Link value */
- hid_t group_id = -1; /* ID of group to test */
- H5O_info2_t oi; /* Buffer for querying object's info */
- H5O_token_t mnt_root_token; /* Token (address) of root group in file to mount */
- hid_t obj_id; /* ID of object opened */
- unsigned mnt_idx; /* Index to mount group on */
- unsigned u, v; /* Local index variables */
+ char mntname[NAME_BUF_SIZE]; /* Link value */
+ hid_t group_id = H5I_INVALID_HID; /* ID of group to test */
+ H5O_info2_t oi; /* Buffer for querying object's info */
+ H5O_token_t mnt_root_token; /* Token (address) of root group in file to mount */
+ hid_t obj_id; /* ID of object opened */
+ unsigned mnt_idx; /* Index to mount group on */
+ unsigned u, v; /* Local index variables */
int token_cmp;
/* Work through main & soft link groups */
@@ -20338,7 +20346,7 @@ open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id,
/* Mount a file over a group in main group */
mnt_idx = 2;
- HDsnprintf(mntname, sizeof(mntname), "/%s/filler %02u", CORDER_GROUP_NAME, mnt_idx);
+ snprintf(mntname, sizeof(mntname), "/%s/filler %02u", CORDER_GROUP_NAME, mnt_idx);
if (H5Fmount(main_group_id, mntname, mount_file_id, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -20389,23 +20397,23 @@ error:
static int
open_by_idx(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t mount_file_id = -1; /* File ID for file to mount */
- hid_t group_id = -1; /* Group ID */
- hid_t soft_group_id = -1; /* Group ID for soft links */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- unsigned use_index; /* Use index on creation order values */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- H5O_info2_t oi; /* Buffer for querying object's info */
- char filename[NAME_BUF_SIZE]; /* File name */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char valname[2 * NAME_BUF_SIZE]; /* Link value */
- H5O_token_t *objno = NULL; /* Tokens (addresses) of the objects created */
- unsigned u; /* Local index variable */
- hid_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t mount_file_id = H5I_INVALID_HID; /* File ID for file to mount */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t soft_group_id = H5I_INVALID_HID; /* Group ID for soft links */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ unsigned use_index; /* Use index on creation order values */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ H5O_info2_t oi; /* Buffer for querying object's info */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char valname[2 * NAME_BUF_SIZE]; /* Link value */
+ H5O_token_t *objno = NULL; /* Tokens (addresses) of the objects created */
+ unsigned u; /* Local index variable */
+ hid_t ret; /* Generic return value */
/* Create group creation property list */
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
@@ -20429,7 +20437,7 @@ open_by_idx(hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_NATIVE; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -20515,7 +20523,7 @@ open_by_idx(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -20532,13 +20540,13 @@ open_by_idx(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
}
/* Verify state of group (compact) */
- if (H5G__has_links_test(group_id, NULL) != TRUE)
+ if (H5G__has_links_test(group_id, NULL) != true)
TEST_ERROR;
/* Check for out of bound open by index on compact group */
@@ -20559,7 +20567,7 @@ open_by_idx(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -20576,13 +20584,13 @@ open_by_idx(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
} /* end for */
/* Verify state of group (dense) */
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound open by index on compact group */
@@ -20658,14 +20666,14 @@ static int
open_by_idx_check_old(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id, H5_index_t idx_type,
H5_iter_order_t order, unsigned max_links, H5O_token_t *objno)
{
- char mntname[NAME_BUF_SIZE]; /* Link value */
- hid_t group_id = -1; /* ID of group to test */
- H5O_info2_t oi; /* Buffer for querying object's info */
- H5O_token_t mnt_root_token; /* Token of root group in file to mount */
- hid_t obj_id; /* ID of object opened */
- unsigned mnt_idx; /* Index to mount group on */
- unsigned u, v; /* Local index variables */
- int cmp_value; /* Token comparison value */
+ char mntname[NAME_BUF_SIZE]; /* Link value */
+ hid_t group_id = H5I_INVALID_HID; /* ID of group to test */
+ H5O_info2_t oi; /* Buffer for querying object's info */
+ H5O_token_t mnt_root_token; /* Token of root group in file to mount */
+ hid_t obj_id; /* ID of object opened */
+ unsigned mnt_idx; /* Index to mount group on */
+ unsigned u, v; /* Local index variables */
+ int cmp_value; /* Token comparison value */
/* Work through main & soft link groups */
for (v = 0; v < 2; v++) {
@@ -20719,7 +20727,7 @@ open_by_idx_check_old(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file
/* Mount a file over a group in main group */
mnt_idx = 2;
- HDsnprintf(mntname, sizeof(mntname), "/%s/filler %02u", CORDER_GROUP_NAME, mnt_idx);
+ snprintf(mntname, sizeof(mntname), "/%s/filler %02u", CORDER_GROUP_NAME, mnt_idx);
if (H5Fmount(main_group_id, mntname, mount_file_id, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -20770,18 +20778,18 @@ error:
static int
open_by_idx_old(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t mount_file_id = -1; /* File ID for file to mount */
- hid_t group_id = -1; /* Group ID */
- hid_t soft_group_id = -1; /* Group ID for soft links */
- H5_iter_order_t order; /* Order within in the index */
- H5O_info2_t oi; /* Buffer for querying object's info */
- char filename[NAME_BUF_SIZE]; /* File name */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char valname[2 * NAME_BUF_SIZE]; /* Link value */
- H5O_token_t objno[CORDER_NLINKS]; /* Tokens for the objects created */
- unsigned u; /* Local index variable */
- hid_t ret; /* Generic return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t mount_file_id = H5I_INVALID_HID; /* File ID for file to mount */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t soft_group_id = H5I_INVALID_HID; /* Group ID for soft links */
+ H5_iter_order_t order; /* Order within in the index */
+ H5O_info2_t oi; /* Buffer for querying object's info */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char valname[2 * NAME_BUF_SIZE]; /* Link value */
+ H5O_token_t objno[CORDER_NLINKS]; /* Tokens for the objects created */
+ unsigned u; /* Local index variable */
+ hid_t ret; /* Generic return value */
/* Create file to mount */
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
@@ -20830,7 +20838,7 @@ open_by_idx_old(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -20846,13 +20854,13 @@ open_by_idx_old(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
} /* end for */
/* Verify state of group (symbol table) */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound open by index */
@@ -20923,10 +20931,10 @@ static int
object_info_check(hid_t main_group_id, hid_t soft_group_id, H5_index_t idx_type, H5_iter_order_t order,
unsigned max_links, H5O_token_t *objno)
{
- char objname[NAME_BUF_SIZE]; /* Object name */
- hid_t group_id = -1; /* ID of group to test */
- H5O_info2_t oinfo; /* Buffer for querying object's info */
- unsigned u, v; /* Local index variables */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t group_id = H5I_INVALID_HID; /* ID of group to test */
+ H5O_info2_t oinfo; /* Buffer for querying object's info */
+ unsigned u, v; /* Local index variables */
int token_cmp;
/* Work through main & soft link groups */
@@ -20940,7 +20948,7 @@ object_info_check(hid_t main_group_id, hid_t soft_group_id, H5_index_t idx_type,
/* Open each object in group by name and check that it's the correct one */
for (u = 0; u < max_links; u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Query the object's information, by name */
if (H5Oget_info_by_name3(group_id, objname, &oinfo, H5O_INFO_BASIC | H5O_INFO_NUM_ATTRS,
@@ -21006,24 +21014,24 @@ error:
static int
object_info(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t soft_group_id = -1; /* Group ID for soft links */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- hid_t space_id = -1; /* Dataspace ID (for attributes) */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- unsigned use_index; /* Use index on creation order values */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- H5O_info2_t oinfo; /* Buffer for querying object's info */
- char filename[NAME_BUF_SIZE]; /* File name */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char valname[2 * NAME_BUF_SIZE]; /* Link value */
- char attrname[NAME_BUF_SIZE]; /* Attribute name */
- H5O_token_t *objno = NULL; /* Tokens (addresses) of the objects created */
- herr_t ret; /* Generic return value */
- unsigned u, v; /* Local index variables */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t soft_group_id = H5I_INVALID_HID; /* Group ID for soft links */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ hid_t space_id = H5I_INVALID_HID; /* Dataspace ID (for attributes) */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ unsigned use_index; /* Use index on creation order values */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ H5O_info2_t oinfo; /* Buffer for querying object's info */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char valname[2 * NAME_BUF_SIZE]; /* Link value */
+ char attrname[NAME_BUF_SIZE]; /* Attribute name */
+ H5O_token_t *objno = NULL; /* Tokens (addresses) of the objects created */
+ herr_t ret; /* Generic return value */
+ unsigned u, v; /* Local index variables */
/* Create group creation property list */
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
@@ -21046,7 +21054,7 @@ object_info(hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_NATIVE; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -21139,7 +21147,7 @@ object_info(hid_t fapl)
hid_t attr_id; /* Attribute ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -21154,7 +21162,7 @@ object_info(hid_t fapl)
/* Create attributes on new object */
for (v = 0; v < u; v++) {
/* Make name for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", v);
+ snprintf(attrname, sizeof(attrname), "attr %02u", v);
/* Create attribute */
if ((attr_id = H5Acreate2(group_id2, attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT,
@@ -21171,13 +21179,13 @@ object_info(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
} /* end for */
/* Verify state of group (compact) */
- if (H5G__has_links_test(group_id, NULL) != TRUE)
+ if (H5G__has_links_test(group_id, NULL) != true)
TEST_ERROR;
/* Check for out of bound query by index */
@@ -21200,7 +21208,7 @@ object_info(hid_t fapl)
hid_t attr_id; /* Attribute ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -21215,7 +21223,7 @@ object_info(hid_t fapl)
/* Create attributes on new object */
for (v = 0; v < u; v++) {
/* Make name for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", v);
+ snprintf(attrname, sizeof(attrname), "attr %02u", v);
/* Create attribute */
if ((attr_id = H5Acreate2(group_id2, attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT,
@@ -21232,13 +21240,13 @@ object_info(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
} /* end for */
/* Verify state of group (dense) */
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound query by index */
@@ -21311,10 +21319,10 @@ static int
object_info_check_old(hid_t main_group_id, hid_t soft_group_id, H5_index_t idx_type, H5_iter_order_t order,
unsigned max_links, H5O_token_t *objno)
{
- char objname[NAME_BUF_SIZE]; /* Object name */
- hid_t group_id = -1; /* ID of group to test */
- H5O_info2_t oinfo; /* Buffer for querying object's info */
- unsigned u, v; /* Local index variables */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t group_id = H5I_INVALID_HID; /* ID of group to test */
+ H5O_info2_t oinfo; /* Buffer for querying object's info */
+ unsigned u, v; /* Local index variables */
/* Work through main & soft link groups */
for (v = 0; v < 2; v++) {
@@ -21329,7 +21337,7 @@ object_info_check_old(hid_t main_group_id, hid_t soft_group_id, H5_index_t idx_t
int cmp_value; /* Token comparison value */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Query the object's information, by name */
if (H5Oget_info_by_name3(group_id, objname, &oinfo, H5O_INFO_BASIC | H5O_INFO_NUM_ATTRS,
@@ -21394,19 +21402,19 @@ error:
static int
object_info_old(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t soft_group_id = -1; /* Group ID for soft links */
- hid_t space_id = -1; /* Dataspace ID (for attributes) */
- H5_iter_order_t order; /* Order within in the index */
- H5O_info2_t oinfo; /* Buffer for querying object's info */
- char filename[NAME_BUF_SIZE]; /* File name */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char valname[2 * NAME_BUF_SIZE]; /* Link value */
- char attrname[NAME_BUF_SIZE]; /* Attribute name */
- H5O_token_t objno[CORDER_NLINKS]; /* Tokens for the objects created */
- herr_t ret; /* Generic return value */
- unsigned u, v; /* Local index variables */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t soft_group_id = H5I_INVALID_HID; /* Group ID for soft links */
+ hid_t space_id = H5I_INVALID_HID; /* Dataspace ID (for attributes) */
+ H5_iter_order_t order; /* Order within in the index */
+ H5O_info2_t oinfo; /* Buffer for querying object's info */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char valname[2 * NAME_BUF_SIZE]; /* Link value */
+ char attrname[NAME_BUF_SIZE]; /* Attribute name */
+ H5O_token_t objno[CORDER_NLINKS]; /* Tokens for the objects created */
+ herr_t ret; /* Generic return value */
+ unsigned u, v; /* Local index variables */
/* Create dataspace for attributes */
if ((space_id = H5Screate(H5S_SCALAR)) < 0)
@@ -21457,7 +21465,7 @@ object_info_old(hid_t fapl)
hid_t attr_id; /* Attribute ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -21471,7 +21479,7 @@ object_info_old(hid_t fapl)
/* Create attributes on new object */
for (v = 0; v < u; v++) {
/* Make name for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", v);
+ snprintf(attrname, sizeof(attrname), "attr %02u", v);
/* Create attribute */
if ((attr_id = H5Acreate2(group_id2, attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT,
@@ -21488,13 +21496,13 @@ object_info_old(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
} /* end for */
/* Verify state of group (symbol table) */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound query by index */
@@ -21567,22 +21575,22 @@ error:
static int
group_info(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t soft_group_id = -1; /* Group ID for soft links */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- unsigned use_index; /* Use index on creation order values */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- H5G_info_t grp_info; /* Buffer for querying object's info */
- char filename[NAME_BUF_SIZE]; /* File name */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char objname2[NAME_BUF_SIZE]; /* Object name */
- char valname[2 * NAME_BUF_SIZE]; /* Link value */
- herr_t ret; /* Generic return value */
- unsigned u, v; /* Local index variables */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t soft_group_id = H5I_INVALID_HID; /* Group ID for soft links */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ unsigned use_index; /* Use index on creation order values */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ H5G_info_t grp_info; /* Buffer for querying object's info */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char objname2[NAME_BUF_SIZE]; /* Object name */
+ char valname[2 * NAME_BUF_SIZE]; /* Link value */
+ herr_t ret; /* Generic return value */
+ unsigned u, v; /* Local index variables */
/* Create group creation property list */
if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
@@ -21597,7 +21605,7 @@ group_info(hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_NATIVE; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -21689,7 +21697,7 @@ group_info(hid_t fapl)
hid_t group_id2, group_id3; /* Group IDs */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
@@ -21734,7 +21742,7 @@ group_info(hid_t fapl)
/* Create objects in new group created */
for (v = 0; v <= u; v++) {
/* Make name for link */
- HDsnprintf(objname2, sizeof(objname2), "filler %02u", v);
+ snprintf(objname2, sizeof(objname2), "filler %02u", v);
/* Create hard link, with group object */
if ((group_id3 =
@@ -21845,7 +21853,7 @@ group_info(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -21863,7 +21871,7 @@ group_info(hid_t fapl)
} /* end for */
/* Verify state of group (compact) */
- if (H5G__has_links_test(group_id, NULL) != TRUE)
+ if (H5G__has_links_test(group_id, NULL) != true)
TEST_ERROR;
/* Check for out of bound query by index */
@@ -21881,7 +21889,7 @@ group_info(hid_t fapl)
hid_t group_id2, group_id3; /* Group IDs */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
@@ -21926,7 +21934,7 @@ group_info(hid_t fapl)
/* Create objects in new group created */
for (v = 0; v <= u; v++) {
/* Make name for link */
- HDsnprintf(objname2, sizeof(objname2), "filler %02u", v);
+ snprintf(objname2, sizeof(objname2), "filler %02u", v);
/* Create hard link, with group object */
if ((group_id3 =
@@ -22037,7 +22045,7 @@ group_info(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -22055,7 +22063,7 @@ group_info(hid_t fapl)
} /* end for */
/* Verify state of group (dense) */
- if (H5G__is_new_dense_test(group_id) != TRUE)
+ if (H5G__is_new_dense_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound query by index */
@@ -22116,17 +22124,17 @@ error:
static int
group_info_old(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t soft_group_id = -1; /* Group ID for soft links */
- H5_iter_order_t order; /* Order within in the index */
- H5G_info_t grp_info; /* Buffer for querying object's info */
- char filename[NAME_BUF_SIZE]; /* File name */
- char objname[NAME_BUF_SIZE]; /* Object name */
- char objname2[NAME_BUF_SIZE]; /* Object name */
- char valname[2 * NAME_BUF_SIZE]; /* Link value */
- herr_t ret; /* Generic return value */
- unsigned u, v; /* Local index variables */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t soft_group_id = H5I_INVALID_HID; /* Group ID for soft links */
+ H5_iter_order_t order; /* Order within in the index */
+ H5G_info_t grp_info; /* Buffer for querying object's info */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ char objname2[NAME_BUF_SIZE]; /* Object name */
+ char valname[2 * NAME_BUF_SIZE]; /* Link value */
+ herr_t ret; /* Generic return value */
+ unsigned u, v; /* Local index variables */
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_NATIVE; order++) {
@@ -22169,7 +22177,7 @@ group_info_old(hid_t fapl)
hid_t group_id2, group_id3; /* Group IDs */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -22214,7 +22222,7 @@ group_info_old(hid_t fapl)
/* Create objects in new group created */
for (v = 0; v <= u; v++) {
/* Make name for link */
- HDsnprintf(objname2, sizeof(objname2), "filler %02u", v);
+ snprintf(objname2, sizeof(objname2), "filler %02u", v);
/* Create hard link, with group object */
if ((group_id3 = H5Gcreate2(group_id2, objname2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -22324,7 +22332,7 @@ group_info_old(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -22342,7 +22350,7 @@ group_info_old(hid_t fapl)
} /* end for */
/* Verify state of group (old-style) */
- if (H5G__has_stab_test(group_id) != TRUE)
+ if (H5G__has_stab_test(group_id) != true)
TEST_ERROR;
/* Check for out of bound query by index */
@@ -22405,15 +22413,15 @@ error:
static int
timestamps(hid_t fapl)
{
- hid_t file_id = -1; /* File ID */
- hid_t group_id = -1; /* Group ID */
- hid_t group_id2 = -1; /* Group ID */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- hid_t gcpl_id2 = -1; /* Group creation property list ID */
- H5O_info2_t oinfo, oinfo2; /* Object info for groups created */
- H5O_native_info_t ninfo, ninfo2; /* Native info for groups created */
- char filename[NAME_BUF_SIZE]; /* File name */
- hbool_t track_times; /* The object timestamp setting */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t group_id = H5I_INVALID_HID; /* Group ID */
+ hid_t group_id2 = H5I_INVALID_HID; /* Group ID */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ hid_t gcpl_id2 = H5I_INVALID_HID; /* Group creation property list ID */
+ H5O_info2_t oinfo, oinfo2; /* Object info for groups created */
+ H5O_native_info_t ninfo, ninfo2; /* Native info for groups created */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ bool track_times; /* The object timestamp setting */
/* Print test message */
TESTING("timestamps on objects");
@@ -22427,11 +22435,11 @@ timestamps(hid_t fapl)
TEST_ERROR;
/* Check default timestamp information */
- if (track_times != TRUE)
+ if (track_times != true)
TEST_ERROR;
/* Set a non-default object timestamp setting */
- if (H5Pset_obj_track_times(gcpl_id, FALSE) < 0)
+ if (H5Pset_obj_track_times(gcpl_id, false) < 0)
TEST_ERROR;
/* Query the object timestamp setting */
@@ -22439,7 +22447,7 @@ timestamps(hid_t fapl)
TEST_ERROR;
/* Check default timestamp information */
- if (track_times != FALSE)
+ if (track_times != false)
TEST_ERROR;
/* Create file */
@@ -22468,11 +22476,11 @@ timestamps(hid_t fapl)
/* Query & verify the object timestamp settings */
if (H5Pget_obj_track_times(gcpl_id, &track_times) < 0)
TEST_ERROR;
- if (track_times != FALSE)
+ if (track_times != false)
TEST_ERROR;
if (H5Pget_obj_track_times(gcpl_id2, &track_times) < 0)
TEST_ERROR;
- if (track_times != TRUE)
+ if (track_times != true)
TEST_ERROR;
/* Query the object information for each group */
@@ -22550,11 +22558,11 @@ timestamps(hid_t fapl)
/* Query & verify the object timestamp settings */
if (H5Pget_obj_track_times(gcpl_id, &track_times) < 0)
TEST_ERROR;
- if (track_times != FALSE)
+ if (track_times != false)
TEST_ERROR;
if (H5Pget_obj_track_times(gcpl_id2, &track_times) < 0)
TEST_ERROR;
- if (track_times != TRUE)
+ if (track_times != true)
TEST_ERROR;
/* Query the object information for each group */
@@ -22640,15 +22648,15 @@ error:
int
main(void)
{
- hid_t fapl = -1, fapl2 = -1; /* File access property lists */
+ hid_t fapl = H5I_INVALID_HID, fapl2 = H5I_INVALID_HID; /* File access property lists */
int nerrors = 0;
unsigned new_format; /* Whether to use the new format or not */
unsigned minimize_dset_oh;
unsigned efc; /* Whether to use the external file cache */
const char *env_h5_drvr; /* File Driver value from environment */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -22676,7 +22684,7 @@ main(void)
dcpl_g = H5P_DEFAULT;
}
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl;
/* Check for FAPL to use */
@@ -22718,7 +22726,7 @@ main(void)
#endif /* H5_NO_DEPRECATED_SYMBOLS */
/* Skip external link tests for splitter VFD, which has external link-related bugs */
- if (HDstrcmp(env_h5_drvr, "splitter")) {
+ if (strcmp(env_h5_drvr, "splitter")) {
/* tests for external link */
/* Test external file cache first, so it sees the default efc setting on the fapl
@@ -22736,7 +22744,7 @@ main(void)
nerrors += external_set_elink_acc_flags(env_h5_drvr, my_fapl, new_format) < 0 ? 1 : 0;
/* Try external link tests both with and without the external file cache */
- for (efc = FALSE; efc <= TRUE; efc++) {
+ for (efc = false; efc <= true; efc++) {
if (efc) {
if (H5Pset_elink_file_cache_size(my_fapl, 8) < 0)
TEST_ERROR;
@@ -22817,7 +22825,7 @@ main(void)
* so assume that everything that passed for external links
* above has already been tested for UD links.
*/
- if (new_format == TRUE) {
+ if (new_format == true) {
nerrors += ud_hard_links(fapl2) < 0 ? 1 : 0; /* requires new format groups */
#ifndef H5_NO_DEPRECATED_SYMBOLS
nerrors += ud_hard_links_deprec(fapl2) < 0 ? 1 : 0; /* requires new format groups */
@@ -22945,6 +22953,6 @@ main(void)
exit(EXIT_SUCCESS);
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/links_env.c b/test/links_env.c
index 620380b..1eae52a 100644
--- a/test/links_env.c
+++ b/test/links_env.c
@@ -30,7 +30,7 @@ static const char *FILENAME[] = {"extlinks_env0", /* 0: main file */
TMPDIR "extlinks_env1", /* 2 */
NULL};
-static int external_link_env(hid_t fapl, hbool_t new_format);
+static int external_link_env(hid_t fapl, bool new_format);
/*-------------------------------------------------------------------------
* Function: external_link_env (moved from links.c)
@@ -48,11 +48,11 @@ static int external_link_env(hid_t fapl, hbool_t new_format);
*-------------------------------------------------------------------------
*/
static int
-external_link_env(hid_t fapl, hbool_t new_format)
+external_link_env(hid_t fapl, bool new_format)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group IDs */
- const char *envval = NULL; /* Pointer to environment variable */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group IDs */
+ const char *envval = NULL; /* Pointer to environment variable */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE],
filename3[NAME_BUF_SIZE]; /* Holders for filename */
@@ -61,9 +61,9 @@ external_link_env(hid_t fapl, hbool_t new_format)
else
TESTING("external links via environment variable");
- if ((envval = HDgetenv("HDF5_EXT_PREFIX")) == NULL)
+ if ((envval = getenv("HDF5_EXT_PREFIX")) == NULL)
envval = "nomatch";
- if (HDstrcmp(envval, ".:tmp_links_env") != 0)
+ if (strcmp(envval, ".:tmp_links_env") != 0)
TEST_ERROR;
/* Set up name for main file:"extlinks_env0" */
@@ -109,7 +109,7 @@ external_link_env(hid_t fapl, hbool_t new_format)
/* Should be able to find the target file from pathnames set via HDF5_EXT_PREFIX */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links_env directory.");
+ puts(" Should have found the file in tmp_links_env directory.");
goto error;
}
@@ -149,26 +149,26 @@ main(void)
int nerrors = 0; /* Error from tests */
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
/* Splitter VFD has issues with external links */
- if (!HDstrcmp(env_h5_drvr, "splitter")) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ if (!strcmp(env_h5_drvr, "splitter")) {
+ puts(" -- SKIPPED for incompatible VFD --");
exit(EXIT_SUCCESS);
}
h5_reset();
fapl = h5_fileaccess();
- nerrors += external_link_env(fapl, FALSE) < 0 ? 1 : 0;
+ nerrors += external_link_env(fapl, false) < 0 ? 1 : 0;
/* Set the "use the latest version of the format" bounds for creating objects in the file */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
TEST_ERROR;
- nerrors += external_link_env(fapl, TRUE) < 0 ? 1 : 0;
+ nerrors += external_link_env(fapl, true) < 0 ? 1 : 0;
/* Verify symbol table messages are cached */
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
@@ -189,6 +189,6 @@ main(void)
exit(EXIT_SUCCESS);
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/mdset.c b/test/mdset.c
index 6e736df..013eb77 100644
--- a/test/mdset.c
+++ b/test/mdset.c
@@ -50,8 +50,8 @@ static const char *FILENAME[] = {"mdset", "mdset1", "mdset2", NULL};
char dset_name[MAX_DSETS][DSET_MAX_NAME_LEN];
/* Whether these filters are available */
-htri_t deflate_avail = FALSE;
-htri_t fletcher32_avail = FALSE;
+htri_t deflate_avail = false;
+htri_t fletcher32_avail = false;
static int
test_mdset_location(hid_t fapl_id)
@@ -183,7 +183,7 @@ test_mdset(size_t niter, unsigned flags, hid_t fapl_id)
size_t max_dsets;
size_t buf_size;
size_t ndsets;
- hid_t file_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
hid_t dcpl_id[MAX_DSETS];
hsize_t dset_dims[MAX_DSETS][3];
hsize_t chunk_dims[2];
@@ -196,7 +196,7 @@ test_mdset(size_t niter, unsigned flags, hid_t fapl_id)
unsigned *wbufi[MAX_DSETS][MAX_DSET_X];
unsigned *efbuf = NULL;
unsigned *efbufi[MAX_DSETS][MAX_DSET_X];
- hbool_t do_read;
+ bool do_read;
hsize_t start[3];
hsize_t count[3];
hsize_t points[3 * MAX_POINTS];
@@ -321,7 +321,7 @@ test_mdset(size_t niter, unsigned flags, hid_t fapl_id)
for (j = 0; j < ndsets; j++) {
hid_t source_dset;
- hbool_t use_chunk =
+ bool use_chunk =
(flags & MDSET_FLAG_CHUNK) || ((flags & MDSET_FLAG_MLAYOUT) && (j == 1 || j == 2));
/* Generate file dataspace */
@@ -388,7 +388,7 @@ test_mdset(size_t niter, unsigned flags, hid_t fapl_id)
for (j = 0; j < OPS_PER_FILE; j++) {
/* Decide whether to read or write. Can't read on the first iteration with external
* layout because the write is needed to create the external file. */
- do_read = (j == 0 && flags & MDSET_FLAG_MLAYOUT) ? FALSE : (hbool_t)(HDrandom() % 2);
+ do_read = (j == 0 && flags & MDSET_FLAG_MLAYOUT) ? false : (bool)(HDrandom() % 2);
/* Loop over datasets */
for (k = 0; k < ndsets; k++) {
diff --git a/test/mf.c b/test/mf.c
index bc01c38..269419f 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -133,11 +133,11 @@ static unsigned test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t
static unsigned test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl);
static unsigned test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl);
static unsigned test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl);
-static unsigned test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format);
-static unsigned test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format);
-static unsigned test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format);
-static unsigned test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format);
-static unsigned test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format);
+static unsigned test_mf_tmp(const char *env_h5_drvr, hid_t fapl, bool new_format);
+static unsigned test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, bool new_format);
+static unsigned test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, bool new_format);
+static unsigned test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, bool new_format);
+static unsigned test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, bool new_format);
#ifdef PB_OUT
static unsigned test_mf_fs_persist_split(void);
static unsigned test_mf_fs_persist_multi(void);
@@ -212,24 +212,24 @@ error:
static unsigned
test_mf_eoa(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
- hid_t fapl_new = -1; /* copy of fapl */
- char filename[FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
- h5_stat_size_t file_size, new_file_size; /* file size */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fapl_new = H5I_INVALID_HID; /* copy of fapl */
+ char filename[FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ h5_stat_size_t file_size, new_file_size; /* file size */
H5FD_mem_t type;
haddr_t addr1, addr2;
haddr_t ma_addr = HADDR_UNDEF, new_ma_addr = HADDR_UNDEF;
hsize_t ma_size = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MM_alloc() of file allocation");
/* Skip test when using VFDs that has different address spaces for each
* type of metadata allocation. Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -324,7 +324,7 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support continuous address space");
+ puts(" Current VFD doesn't support continuous address space");
} /* end else */
return (0);
@@ -361,8 +361,8 @@ error:
static unsigned
test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
- hid_t fapl_new = -1; /* copy of fapl */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fapl_new = H5I_INVALID_HID; /* copy of fapl */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size = 0, new_file_size; /* file size */
@@ -370,15 +370,15 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
haddr_t addr = 0;
haddr_t ma_addr = HADDR_UNDEF, new_ma_addr = HADDR_UNDEF;
hsize_t ma_size = 0, new_ma_size = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_try_shrink() of file allocation: test 1");
/* Skip test when using VFDs that has different address spaces for each
* type of metadata allocation. Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -472,7 +472,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_shrink() of file allocation: test 2");
@@ -522,7 +522,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_shrink() of file allocation: test 3");
@@ -567,7 +567,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_shrink() of file allocation: test 4");
@@ -615,7 +615,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -648,25 +648,25 @@ error:
static unsigned
test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
- hid_t fapl_new = -1; /* copy of fapl */
- char filename[FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
- h5_stat_size_t file_size, new_file_size; /* File size */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fapl_new = H5I_INVALID_HID; /* copy of fapl */
+ char filename[FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ h5_stat_size_t file_size, new_file_size; /* File size */
H5FD_mem_t type;
haddr_t addr;
htri_t was_extended;
haddr_t ma_addr = HADDR_UNDEF, new_ma_addr = HADDR_UNDEF;
hsize_t ma_size = 0, new_ma_size = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_try_extend() of file allocation: test 1");
/* Skip test when using VFDs that has different address spaces for each
* type of metadata allocation. Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -758,7 +758,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_extend() of file allocation: test 2");
@@ -822,7 +822,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -861,11 +861,11 @@ error:
*-------------------------------------------------------------------------
*/
static unsigned
-test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
+test_mf_tmp(const char *env_h5_drvr, hid_t fapl, bool new_format)
{
- hid_t file = -1; /* File ID */
- hid_t fapl2 = -1; /* File access property list */
- hid_t fcpl = -1; /* File creation property list */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fapl2 = H5I_INVALID_HID; /* File access property list */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
if (new_format)
TESTING("'temporary' file space allocation with new library format");
@@ -899,7 +899,7 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
if (H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
FAIL_STACK_ERROR;
- H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
} /* end if */
/* Create the file to work on */
@@ -1031,7 +1031,7 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support continuous address space");
+ puts(" Current VFD doesn't support continuous address space");
} /* end else */
return (0);
@@ -1056,11 +1056,11 @@ error:
static unsigned
test_mf_fs_start(hid_t fapl)
{
- hid_t file = -1; /* File ID */
- hid_t fapl_new = -1; /* copy of fapl */
- char filename[FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
- h5_stat_size_t file_size, new_file_size; /* file size */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fapl_new = H5I_INVALID_HID; /* copy of fapl */
+ char filename[FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ h5_stat_size_t file_size, new_file_size; /* file size */
H5FS_stat_t state;
TESTING("H5MF_create_fstype()/H5MF__open_fstype() of free-space manager");
@@ -1167,11 +1167,11 @@ error:
static unsigned
test_mf_fs_alloc_free(hid_t fapl)
{
- hid_t file = -1; /* File ID */
- hid_t fapl_new = -1; /* copy of fapl */
- char filename[FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
- h5_stat_size_t file_size, new_file_size; /* file size */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fapl_new = H5I_INVALID_HID; /* copy of fapl */
+ char filename[FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ h5_stat_size_t file_size, new_file_size; /* file size */
H5MF_free_section_t *sect_node = NULL;
haddr_t addr;
haddr_t tmp;
@@ -1258,7 +1258,7 @@ test_mf_fs_alloc_free(hid_t fapl)
/* Remove section A from free-space */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) !=
- TRUE)
+ true)
TEST_ERROR;
if (tmp != TBLOCK_ADDR70)
@@ -1334,7 +1334,7 @@ test_mf_fs_alloc_free(hid_t fapl)
/* Remove section A from free-space */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) !=
- TRUE)
+ true)
TEST_ERROR;
if (tmp != TBLOCK_ADDR70)
@@ -1404,7 +1404,7 @@ test_mf_fs_alloc_free(hid_t fapl)
/* Remove section A from free-space */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) !=
- TRUE)
+ true)
TEST_ERROR;
/* Verify that the block is section A in free-space */
@@ -1496,11 +1496,11 @@ error:
static unsigned
test_mf_fs_extend(hid_t fapl)
{
- hid_t file = -1; /* File ID */
- hid_t fapl_new = -1; /* copy of fapl */
- char filename[FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
- h5_stat_size_t file_size, new_file_size; /* file size */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fapl_new = H5I_INVALID_HID; /* copy of fapl */
+ char filename[FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ h5_stat_size_t file_size, new_file_size; /* file size */
H5MF_free_section_t *sect_node1 = NULL, *sect_node2 = NULL;
haddr_t addr;
haddr_t tmp;
@@ -1620,7 +1620,7 @@ test_mf_fs_extend(hid_t fapl)
/* Remove the extended block */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE30 + TBLOCK_SIZE50),
- f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != true)
TEST_ERROR;
if (tmp != TBLOCK_ADDR70)
@@ -1725,7 +1725,7 @@ test_mf_fs_extend(hid_t fapl)
/* Remove the merged sections A & B from free-space */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE30 + TBLOCK_SIZE50),
- f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != true)
TEST_ERROR;
if (tmp != addr)
@@ -1830,7 +1830,7 @@ test_mf_fs_extend(hid_t fapl)
/* Remove the merged sections A & B from free-space */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE30 + TBLOCK_SIZE50),
- f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != true)
TEST_ERROR;
if (tmp != addr)
@@ -1936,7 +1936,7 @@ test_mf_fs_extend(hid_t fapl)
/* Remove section A from free-space manager */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE30 - 10), f->shared->fs_man[H5FD_MEM_SUPER],
- &tmp) != TRUE)
+ &tmp) != true)
TEST_ERROR;
if (tmp != addr)
@@ -1944,7 +1944,7 @@ test_mf_fs_extend(hid_t fapl)
/* Remove section B from free-space manager */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE50, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) !=
- TRUE)
+ true)
TEST_ERROR;
if (H5Fclose(file) < 0)
@@ -2004,7 +2004,7 @@ error:
static unsigned
test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
haddr_t addr, saddr;
@@ -2012,12 +2012,12 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
haddr_t ma_addr = HADDR_UNDEF;
hsize_t ma_size = 0;
H5MF_free_section_t *sect_node = NULL;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
TESTING("A free-space section absorbs an aggregator: test 1");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2062,7 +2062,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
/* Verify that the section did absorb the aggregator */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(ma_addr + ma_size),
- f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != true)
TEST_ERROR;
if (tmp != ma_addr)
@@ -2082,7 +2082,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("A free-space section absorbs an aggregator: test 2");
@@ -2122,7 +2122,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
/* Verify that the section did absorb the aggregator */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(ma_size + TBLOCK_SIZE30),
- f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != true)
TEST_ERROR;
if ((tmp + TBLOCK_SIZE30) != ma_addr)
@@ -2144,7 +2144,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -2179,7 +2179,7 @@ error:
static unsigned
test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
hid_t fcpl; /* File creation property list */
@@ -2188,13 +2188,13 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
haddr_t addr1, addr2;
haddr_t ma_addr = HADDR_UNDEF;
hsize_t ma_size = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_alloc() of meta/sdata aggregator:test 1");
/* Skip test when using VFDs that don't use the metadata aggregator. Also skip test for Direct VFD. */
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2204,7 +2204,7 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR;
/* Set to H5F_FSPACE_STRATEGY_AGGR strategy */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_AGGR, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_AGGR, false, (hsize_t)1) < 0)
TEST_ERROR;
/* Create the file to work on */
@@ -2289,7 +2289,7 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -2332,7 +2332,7 @@ error:
static unsigned
test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size, new_file_size; /* file size */
@@ -2340,13 +2340,13 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl)
haddr_t addr1, addr2, addr3;
haddr_t ma_addr = HADDR_UNDEF;
hsize_t ma_size = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_alloc() of meta/sdata aggregator:test 2");
/* Skip test when using VFDs that don't use the metadata aggregator. Also skip test for Direct VFD. */
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2434,7 +2434,7 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -2489,7 +2489,7 @@ error:
static unsigned
test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size, new_file_size; /* file size */
@@ -2499,12 +2499,12 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
hsize_t ma_size = 0, new_ma_size = 0;
haddr_t sdata_addr = HADDR_UNDEF;
hsize_t sdata_size = 0;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
TESTING("H5MF_alloc() of meta/sdata aggregator: test 3");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2600,7 +2600,7 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -2659,7 +2659,7 @@ error:
static unsigned
test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size, new_file_size; /* File size */
@@ -2667,12 +2667,12 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
haddr_t addr1, addr2, saddr1, saddr2, saddr3;
haddr_t ma_addr = HADDR_UNDEF, new_ma_addr = HADDR_UNDEF, sdata_addr = HADDR_UNDEF;
hsize_t ma_size = 0, new_ma_size = 0, sdata_size = 0;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
TESTING("H5MF_alloc() of meta/sdata aggregator:test 4");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2768,7 +2768,7 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -2808,7 +2808,7 @@ error:
static unsigned
test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size, new_file_size; /* File size */
@@ -2816,12 +2816,12 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl)
haddr_t addr1, addr2, addr3;
haddr_t ma_addr = HADDR_UNDEF, new_ma_addr = HADDR_UNDEF;
hsize_t ma_size = 0, new_ma_size = 0;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
TESTING("H5MF_alloc() of meta/sdata aggregator:test 5");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2894,7 +2894,7 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -2945,7 +2945,7 @@ error:
static unsigned
test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size, new_file_size; /* file size */
@@ -2954,12 +2954,12 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
haddr_t ma_addr = HADDR_UNDEF, new_ma_addr = HADDR_UNDEF, sdata_addr = HADDR_UNDEF;
hsize_t ma_size = 0, new_ma_size = 0, sdata_size = 0;
H5FS_stat_t state;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
TESTING("H5MF_alloc() of meta/sdata aggregator:test 6");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3057,7 +3057,7 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -3119,7 +3119,7 @@ error:
static unsigned
test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t empty_size, file_size;
@@ -3128,12 +3128,12 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
haddr_t ma_addr = HADDR_UNDEF, sdata_addr = HADDR_UNDEF;
hsize_t ma_size = 0, sdata_size = 0;
H5FS_stat_t state;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
TESTING("H5MF_alloc() of meta/sdata aggregator:test 7");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3249,7 +3249,7 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -3290,7 +3290,7 @@ error:
static unsigned
test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t empty_size = 0, file_size;
@@ -3299,12 +3299,12 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
haddr_t ma_addr = HADDR_UNDEF, new_ma_addr = HADDR_UNDEF, sdata_addr = HADDR_UNDEF;
hsize_t ma_size = 0, new_ma_size = 0, sdata_size = 0;
htri_t was_extended;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
TESTING("H5MF_try_extend() of meta/sdata aggregator: test 1");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3408,7 +3408,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_extend() of meta/sdata aggregator: test 2");
@@ -3478,7 +3478,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_extend() of meta/sdata aggregator: test 3");
@@ -3548,7 +3548,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -3587,7 +3587,7 @@ error:
static unsigned
test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t empty_size = 0, file_size;
@@ -3597,12 +3597,12 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
haddr_t new_sdata_addr = HADDR_UNDEF;
hsize_t ma_size = 0, new_ma_size = 0;
hsize_t sdata_size = 0, new_sdata_size = 0;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
TESTING("H5MF_try_shrink() of meta/sdata aggregator: test 1");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3660,7 +3660,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_shrink() of meta/sdata aggregator: test 2");
@@ -3725,7 +3725,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_shrink() of meta/sdata aggregator: test 3");
@@ -3788,7 +3788,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -3837,8 +3837,8 @@ error:
static unsigned
test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
{
- hid_t file = -1; /* File ID */
- hid_t fapl1 = -1;
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fapl1 = H5I_INVALID_HID;
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size, new_file_size;
@@ -3849,7 +3849,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
htri_t was_extended;
H5FS_stat_t state;
hsize_t alignment = 0, mis_align = 0, tmp = 0, accum = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MM_alloc() of file allocation with alignment: test 1");
@@ -3857,8 +3857,8 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3963,7 +3963,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
TESTING("H5MF_try_shrink() of file allocation with alignment: test 2");
@@ -4021,7 +4021,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
TESTING("H5MF_try_extend() of file allocation with alignment: test 3");
@@ -4082,7 +4082,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
if (fapl1 >= 0 && H5Pclose(fapl1) < 0)
@@ -4134,7 +4134,7 @@ error:
static unsigned
test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
h5_stat_size_t file_size;
H5F_t *f = NULL; /* Internal file object pointer */
@@ -4143,7 +4143,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5FS_stat_t state;
htri_t was_extended;
hsize_t alignment = 0, tmp = 0, mis_align = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_alloc() of free-space manager with alignment: test 1");
@@ -4307,8 +4307,8 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list
* Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
if ((file_size = h5_get_file_size(filename, new_fapl)) < 0)
TEST_ERROR;
@@ -4380,7 +4380,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return (0);
@@ -4495,7 +4495,7 @@ error:
static unsigned
test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size; /* File size */
@@ -4506,7 +4506,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
haddr_t ma_addr = HADDR_UNDEF;
hsize_t ma_size = 0, mis_align = 0;
hsize_t alignment = 0, tmp = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_alloc() of meta/sdata aggregator with alignment: test 1");
@@ -4514,8 +4514,8 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -4656,7 +4656,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return (0);
@@ -4759,7 +4759,7 @@ error:
static unsigned
test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size; /* File size */
@@ -4769,7 +4769,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
haddr_t ma_addr = HADDR_UNDEF, sdata_addr = HADDR_UNDEF;
hsize_t ma_size = 0, sdata_size = 0, mis_align = 0;
hsize_t alignment = 0, tmp = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_alloc() of meta/sdata aggregator with alignment: test 2");
@@ -4777,8 +4777,8 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -4950,7 +4950,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return (0);
@@ -5104,7 +5104,7 @@ error:
static unsigned
test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size;
@@ -5115,7 +5115,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
haddr_t ma_addr = HADDR_UNDEF, sdata_addr = HADDR_UNDEF;
hsize_t ma_size = 0, sdata_size = 0, mis_align = 0;
hsize_t alignment = 0, tmp = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_alloc() of meta/sdata aggregator with alignment: test 3");
@@ -5123,8 +5123,8 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -5336,7 +5336,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return (0);
@@ -5419,7 +5419,7 @@ error:
static unsigned
test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size;
@@ -5429,7 +5429,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
haddr_t ma_addr = HADDR_UNDEF;
hsize_t ma_size = 0, saved_ma_size = 0;
hsize_t alignment = 0, mis_align = 0, tmp = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_alloc() of meta/sdata aggregator with alignment: test 4");
@@ -5437,8 +5437,8 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -5552,7 +5552,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return (0);
@@ -5637,7 +5637,7 @@ error:
static unsigned
test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size;
@@ -5648,7 +5648,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
haddr_t sdata_addr = HADDR_UNDEF, new_sdata_addr = HADDR_UNDEF;
hsize_t ma_size = 0, new_ma_size = 0, sdata_size = 0, new_sdata_size = 0;
hsize_t alignment = 0, mis_align = 0, tmp = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_alloc() of meta/sdata aggregator with alignment: test 5");
@@ -5656,8 +5656,8 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -5782,7 +5782,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return (0);
@@ -5908,7 +5908,7 @@ error:
static unsigned
test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size;
@@ -5919,7 +5919,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
haddr_t ma_addr = HADDR_UNDEF, new_ma_addr = HADDR_UNDEF, sdata_addr = HADDR_UNDEF;
hsize_t ma_size = 0, new_ma_size = 0, sdata_size = 0;
hsize_t alignment = 0, mis_align = 0, tmp = 0;
- hbool_t suitable_vfd;
+ bool suitable_vfd;
TESTING("H5MF_alloc() of meta/sdata aggregator with alignment: test 6");
@@ -5927,8 +5927,8 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -6097,7 +6097,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return 0;
@@ -6118,15 +6118,15 @@ error:
static unsigned
test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
{
- hid_t file = -1; /* File ID */
- hid_t copied_fapl = -1; /* FAPL to use for this test */
- char filename[FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t copied_fapl = H5I_INVALID_HID; /* FAPL to use for this test */
+ char filename[FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5FD_mem_t type;
haddr_t addr1, addr2;
hsize_t block_size;
hsize_t align;
- hbool_t split = FALSE, multi = FALSE;
+ bool split = false, multi = false;
TESTING("H5MF_alloc() bug 1");
@@ -6147,10 +6147,10 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR;
/* Check for split or multi driver */
- if (!HDstrcmp(env_h5_drvr, "split"))
- split = TRUE;
- else if (!HDstrcmp(env_h5_drvr, "multi"))
- multi = TRUE;
+ if (!strcmp(env_h5_drvr, "split"))
+ split = true;
+ else if (!strcmp(env_h5_drvr, "multi"))
+ multi = true;
/* Add alignment to member files for split/multi driver */
if (split || multi) {
@@ -6178,7 +6178,7 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
hid_t memb_fapl_arr[H5FD_MEM_NTYPES];
char *memb_name[H5FD_MEM_NTYPES];
haddr_t memb_addr[H5FD_MEM_NTYPES];
- hbool_t relax;
+ bool relax;
H5FD_mem_t mt;
/* Get current multi settings */
@@ -6296,9 +6296,9 @@ error:
static unsigned
test_mf_fs_persist_split(void)
{
- hid_t file = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t fapl = -1; /* File access property list ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FD_mem_t type, stype, btype; /* File allocation type */
@@ -6341,7 +6341,7 @@ test_mf_fs_persist_split(void)
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
FAIL_STACK_ERROR;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1) < 0)
FAIL_STACK_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
@@ -6583,22 +6583,22 @@ error:
memb_map[H5FD_MEM_DRAW] = H5FD_MEM_DRAW; \
memb_map[H5FD_MEM_GHEAP] = H5FD_MEM_GHEAP; \
memb_map[H5FD_MEM_LHEAP] = H5FD_MEM_LHEAP; \
- HDsnprintf(sv[H5FD_MEM_SUPER], 64, "%%s-%c.h5", 's'); \
+ snprintf(sv[H5FD_MEM_SUPER], 64, "%%s-%c.h5", 's'); \
memb_name[H5FD_MEM_SUPER] = sv[H5FD_MEM_SUPER]; \
memb_addr[H5FD_MEM_SUPER] = 0; \
- HDsnprintf(sv[H5FD_MEM_BTREE], 64, "%%s-%c.h5", 'b'); \
+ snprintf(sv[H5FD_MEM_BTREE], 64, "%%s-%c.h5", 'b'); \
memb_name[H5FD_MEM_BTREE] = sv[H5FD_MEM_BTREE]; \
memb_addr[H5FD_MEM_BTREE] = HADDR_MAX / 6; \
- HDsnprintf(sv[H5FD_MEM_DRAW], 64, "%%s-%c.h5", 'r'); \
+ snprintf(sv[H5FD_MEM_DRAW], 64, "%%s-%c.h5", 'r'); \
memb_name[H5FD_MEM_DRAW] = sv[H5FD_MEM_DRAW]; \
memb_addr[H5FD_MEM_DRAW] = HADDR_MAX / 3; \
- HDsnprintf(sv[H5FD_MEM_GHEAP], 64, "%%s-%c.h5", 'g'); \
+ snprintf(sv[H5FD_MEM_GHEAP], 64, "%%s-%c.h5", 'g'); \
memb_name[H5FD_MEM_GHEAP] = sv[H5FD_MEM_GHEAP]; \
memb_addr[H5FD_MEM_GHEAP] = HADDR_MAX / 2; \
- HDsnprintf(sv[H5FD_MEM_LHEAP], 64, "%%s-%c.h5", 'l'); \
+ snprintf(sv[H5FD_MEM_LHEAP], 64, "%%s-%c.h5", 'l'); \
memb_name[H5FD_MEM_LHEAP] = sv[H5FD_MEM_LHEAP]; \
memb_addr[H5FD_MEM_LHEAP] = HADDR_MAX * 2 / 3; \
- HDsnprintf(sv[H5FD_MEM_OHDR], 64, "%%s-%c.h5", 'o'); \
+ snprintf(sv[H5FD_MEM_OHDR], 64, "%%s-%c.h5", 'o'); \
memb_name[H5FD_MEM_OHDR] = sv[H5FD_MEM_OHDR]; \
memb_addr[H5FD_MEM_OHDR] = HADDR_MAX * 5 / 6; \
}
@@ -6611,9 +6611,9 @@ error:
static unsigned
test_mf_fs_persist_multi(void)
{
- hid_t file = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t fapl = -1; /* File access property list ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FD_mem_t type, stype, btype, gtype; /* File allocation type */
@@ -6624,7 +6624,7 @@ test_mf_fs_persist_multi(void)
haddr_t gaddr1, gaddr2; /* File address for H5FD_MEM_GHEAP */
haddr_t tmp_addr; /* Temporary variable for address */
H5FS_section_info_t *node; /* Free space section node */
- htri_t node_found = FALSE; /* Indicate section is in free-space */
+ htri_t node_found = false; /* Indicate section is in free-space */
H5FD_mem_t memb_map[H5FD_MEM_NTYPES]; /* Memory usage map */
hid_t memb_fapl[H5FD_MEM_NTYPES]; /* Member access properties */
char sv[H5FD_MEM_NTYPES][64]; /* Name generators */
@@ -6651,7 +6651,7 @@ test_mf_fs_persist_multi(void)
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
FAIL_STACK_ERROR;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1) < 0)
FAIL_STACK_ERROR;
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
@@ -6659,7 +6659,7 @@ test_mf_fs_persist_multi(void)
MULTI_SETUP(memb_map, memb_fapl, memb_name, memb_addr, sv)
- if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, TRUE) < 0)
+ if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, true) < 0)
TEST_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
@@ -6931,11 +6931,11 @@ error:
*-------------------------------------------------------------------------
*/
static unsigned
-test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
+test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, bool new_format)
{
- hid_t file = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t fapl2 = -1; /* File access property list ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t fapl2 = H5I_INVALID_HID; /* File access property list ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FD_mem_t type; /* File allocation type */
@@ -6949,7 +6949,7 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
else
TESTING("File's free-space is persistent with old library format");
- if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0) {
+ if (strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0) {
/* File creation property list template */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
@@ -6964,12 +6964,12 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
if (H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
FAIL_STACK_ERROR;
/* Set to paged aggregation and persisting free-space */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1) < 0)
TEST_ERROR;
}
else {
/* Setting: aggregation with persisting free-space */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1) < 0)
TEST_ERROR;
}
@@ -7084,7 +7084,7 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
+ puts(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
}
return (0);
@@ -7106,11 +7106,11 @@ error:
*-------------------------------------------------------------------------
*/
static unsigned
-test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
+test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, bool new_format)
{
- hid_t file = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
- hid_t fapl2 = -1; /* File access property list */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
+ hid_t fapl2 = H5I_INVALID_HID; /* File access property list */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FD_mem_t type; /* File allocation type */
@@ -7118,7 +7118,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
haddr_t addr1, addr2, addr3, addr4; /* File address for H5FD_MEM_SUPER */
haddr_t addrx;
H5FD_mem_t fs_type;
- hbool_t contig_addr_vfd;
+ bool contig_addr_vfd;
if (new_format)
TESTING("File's free-space is going away with new library format");
@@ -7126,7 +7126,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
TESTING("File's free-space is going away with old library format");
/* Current VFD that does not support contiguous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -7148,7 +7148,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
}
/* Set to aggregation and persisting free-space */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1) < 0)
FAIL_STACK_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
@@ -7273,7 +7273,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support persistent free-space manager");
+ puts(" Current VFD doesn't support persistent free-space manager");
}
return (0);
@@ -7296,11 +7296,11 @@ error:
*-------------------------------------------------------------------------
*/
static unsigned
-test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
+test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, bool new_format)
{
- hid_t file = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list template */
- hid_t fapl2 = -1; /* File access property list template */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list template */
+ hid_t fapl2 = H5I_INVALID_HID; /* File access property list template */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FD_mem_t type; /* File allocation type */
@@ -7309,7 +7309,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
H5F_fspace_strategy_t fs_type; /* File space handling strategy */
hsize_t fs_threshold; /* Free-space section threshold */
unsigned fs_persist; /* To persist free-space or not */
- hbool_t contig_addr_vfd;
+ bool contig_addr_vfd;
if (new_format)
TESTING("File space strategy/persisting/threshold with new library format");
@@ -7317,7 +7317,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
TESTING("File space strategy/persisting/threshold with old library format");
/* Current VFD that does not support contiguous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -7330,8 +7330,8 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
if (H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
FAIL_STACK_ERROR;
- /* Test with TRUE or FALSE for persisting free-space */
- for (fs_persist = FALSE; fs_persist <= TRUE; fs_persist++) {
+ /* Test with true or false for persisting free-space */
+ for (fs_persist = false; fs_persist <= true; fs_persist++) {
for (fs_threshold = 0; fs_threshold <= TEST_THRESHOLD10; fs_threshold++) {
@@ -7346,7 +7346,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
FAIL_STACK_ERROR;
/* Set default file space information */
- if (H5Pset_file_space_strategy(fcpl, fs_type, (hbool_t)fs_persist, fs_threshold) < 0)
+ if (H5Pset_file_space_strategy(fcpl, fs_type, (bool)fs_persist, fs_threshold) < 0)
FAIL_STACK_ERROR;
/* Create the file to work on */
@@ -7465,11 +7465,11 @@ error:
*-------------------------------------------------------------------------
*/
static unsigned
-test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
+test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, bool new_format)
{
- hid_t file = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list template */
- hid_t fapl2 = -1; /* File access property list template */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list template */
+ hid_t fapl2 = H5I_INVALID_HID; /* File access property list template */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FD_mem_t type; /* File allocation type */
@@ -7479,7 +7479,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
unsigned fs_persist; /* To persist free-space or not */
H5FS_stat_t fs_state; /* Information for free-space manager */
H5FS_stat_t fs_state_zero; /* Information for free-space manager */
- hbool_t contig_addr_vfd;
+ bool contig_addr_vfd;
if (new_format)
TESTING("File space merge/shrink for section size < threshold with new library format");
@@ -7487,7 +7487,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
TESTING("File space merge/shrink for section size < threshold with old library format");
/* Current VFD that does not support contiguous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -7502,8 +7502,8 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
if (H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
FAIL_STACK_ERROR;
- /* Test with TRUE or FALSE for persisting free-space */
- for (fs_persist = FALSE; fs_persist <= TRUE; fs_persist++) {
+ /* Test with true or false for persisting free-space */
+ for (fs_persist = false; fs_persist <= true; fs_persist++) {
/* Testing for H5F_FSPACE_STRATEGY_FSM_AGGR and H5F_FSPACE_STRATEGY_PAGE strategies only */
for (fs_type = H5F_FSPACE_STRATEGY_FSM_AGGR; fs_type < H5F_FSPACE_STRATEGY_AGGR; fs_type++) {
@@ -7672,7 +7672,7 @@ error:
static unsigned
test_dichotomy(hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FD_mem_t type, stype;
@@ -7746,13 +7746,13 @@ error:
*-------------------------------------------------------------------------
*/
static int
-set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t is_multi_or_split)
+set_multi_split(hid_t fapl, hsize_t pagesize, bool is_multi_or_split)
{
H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl_arr[H5FD_MEM_NTYPES];
char *memb_name[H5FD_MEM_NTYPES];
haddr_t memb_addr[H5FD_MEM_NTYPES];
- hbool_t relax;
+ bool relax;
H5FD_mem_t mt;
assert(is_multi_or_split);
@@ -7804,14 +7804,14 @@ static unsigned
test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
- hid_t fapl_new = -1; /* File access property list ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- haddr_t addr2, addr3; /* Addresses for small metadata blocks */
- haddr_t saddr1; /* Addresses for small raw data blocks */
- haddr_t gaddr1; /* Addresses for large data blocks */
- hbool_t split = FALSE, multi = FALSE;
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
+ hid_t fapl_new = H5I_INVALID_HID; /* File access property list ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ haddr_t addr2, addr3; /* Addresses for small metadata blocks */
+ haddr_t saddr1; /* Addresses for small raw data blocks */
+ haddr_t gaddr1; /* Addresses for large data blocks */
+ bool split = false, multi = false;
char filename[FILENAME_LEN]; /* Filename to use */
haddr_t found_addr; /* Address of the found section */
unsigned fs_persist; /* To persist free-space or not */
@@ -7819,10 +7819,10 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: H5MF_alloc/H5MF_xfree");
/* Check for split or multi driver */
- if (!HDstrcmp(env_h5_drvr, "split"))
- split = TRUE;
- else if (!HDstrcmp(env_h5_drvr, "multi"))
- multi = TRUE;
+ if (!strcmp(env_h5_drvr, "split"))
+ split = true;
+ else if (!strcmp(env_h5_drvr, "multi"))
+ multi = true;
if (!multi && !split) {
@@ -7836,8 +7836,8 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
if (set_multi_split(fapl_new, 4096, split) < 0)
TEST_ERROR;
- /* Test with TRUE or FALSE for persisting free-space */
- for (fs_persist = FALSE; fs_persist <= TRUE; fs_persist++) {
+ /* Test with true or false for persisting free-space */
+ for (fs_persist = false; fs_persist <= true; fs_persist++) {
H5F_mem_page_t fs_type;
/* File creation property list */
@@ -8002,7 +8002,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
+ puts(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
}
return (0);
@@ -8034,13 +8034,13 @@ static unsigned
test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
H5F_t *f = NULL; /* Internal file object pointer */
haddr_t addr1; /* Address for small metadata block */
haddr_t saddr1; /* Address for small raw data block */
haddr_t gaddr1; /* Address for large data block */
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
htri_t status; /* status from shrinking */
h5_stat_size_t file_size; /* File size */
char filename[FILENAME_LEN]; /* Filename to use */
@@ -8048,7 +8048,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: H5MF_try_shrink()");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -8060,7 +8060,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR;
/* Set the strategy to paged aggregation */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1) < 0)
FAIL_STACK_ERROR;
/* Create the file to work on */
@@ -8080,7 +8080,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
/* Couldn't shrink due to the section (remaining space in the page) is in the small metadata
* free-space manager */
- if (status == TRUE)
+ if (status == true)
TEST_ERROR;
/* Allocate a small raw data block with saddr1 */
@@ -8092,7 +8092,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
/* Couldn't shrink due to the section (remaining space in the page) is in the small raw data
* free-space manager */
- if (status == TRUE)
+ if (status == true)
TEST_ERROR;
/* Allocate a large data block with gaddr1 */
@@ -8104,7 +8104,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
/* Couldn't shrink due to the section (remaining space in the page) is in the large-sized free-space
* manager */
- if (status == TRUE)
+ if (status == true)
TEST_ERROR;
/* Free the block with saddr1--merge to become 1 page, then return to the large manager */
@@ -8132,7 +8132,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support paged aggregation");
+ puts(" Current VFD doesn't support paged aggregation");
}
return (0);
@@ -8163,20 +8163,20 @@ static unsigned
test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
H5F_t *f = NULL; /* Internal file object pointer */
haddr_t addr1, addr2, addr3; /* Addresses for small metadata blocks */
haddr_t saddr1; /* Address for small raw data block */
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
htri_t was_extended; /* Whether the block can be extended or not */
char filename[FILENAME_LEN]; /* Filename to use */
TESTING("Paged aggregation for file space: H5MF_try_extend() a small block");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0);
if (contig_addr_vfd) {
@@ -8188,7 +8188,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR;
/* Set the strategy to paged aggregation */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1) < 0)
FAIL_STACK_ERROR;
/* Create the file to work on */
@@ -8206,7 +8206,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended =
H5MF_try_extend(f, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE98, (hsize_t)3100);
/* Should succeed */
- if (was_extended != TRUE)
+ if (was_extended != true)
TEST_ERROR;
/* Allocate 2 small metadata blocks with addr2 and addr3--will be on another metadata page */
@@ -8228,7 +8228,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE3198,
(hsize_t)TBLOCK_SIZE100);
/* Shouldn't succeed--should not cross page boundary */
- if (was_extended == TRUE)
+ if (was_extended == true)
TEST_ERROR;
/* Try extending the block with addr1 into the free-space section that is big enough to fulfill the
@@ -8236,7 +8236,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE3198,
(hsize_t)TBLOCK_SIZE50);
/* Should succeed */
- if (was_extended != TRUE)
+ if (was_extended != true)
TEST_ERROR;
/* Free the block with addr1 */
@@ -8251,14 +8251,14 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE3286,
(hsize_t)TBLOCK_SIZE11);
/* Shouldn't succeed */
- if (was_extended == TRUE)
+ if (was_extended == true)
TEST_ERROR;
/* Try extending the block into the threshold with size < H5F_FILE_SPACE_PGEND_META_THRES */
was_extended = H5MF_try_extend(f, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE3286,
(hsize_t)TBLOCK_SIZE2);
/* Should succeed */
- if (was_extended != TRUE)
+ if (was_extended != true)
TEST_ERROR;
/* Free the block with addr3--will merge with the remaining sections to become a page and then free
@@ -8272,14 +8272,14 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)saddr1, (hsize_t)TBLOCK_SIZE4086,
(hsize_t)TBLOCK_SIZE11);
/* Shouldn't succeed */
- if (was_extended == TRUE)
+ if (was_extended == true)
TEST_ERROR;
/* Try extending the block not crossing page boundary */
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)saddr1, (hsize_t)TBLOCK_SIZE4086,
(hsize_t)TBLOCK_SIZE10);
/* Should succeed */
- if (was_extended != TRUE)
+ if (was_extended != true)
TEST_ERROR;
/* The extended block is now "large" in size */
@@ -8287,7 +8287,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)saddr1, (hsize_t)TBLOCK_SIZE4096,
(hsize_t)TBLOCK_SIZE10);
/* Should succeed */
- if (was_extended != TRUE)
+ if (was_extended != true)
TEST_ERROR;
/* Try extending the large-sized block */
@@ -8295,7 +8295,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
(hsize_t)TBLOCK_SIZE5000);
/* Should not succeed because the mis-aligned fragment in the page is in the large-sized free-space
* manager */
- if (was_extended == TRUE)
+ if (was_extended == true)
TEST_ERROR;
/* Close the file */
@@ -8310,7 +8310,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support paged aggregation");
+ puts(" Current VFD doesn't support paged aggregation");
}
return (0);
@@ -8341,18 +8341,18 @@ static unsigned
test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
H5F_t *f = NULL; /* Internal file object pointer */
haddr_t gaddr1, gaddr2, gaddr3, gaddr4; /* Addresses for large data blocks */
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
htri_t was_extended; /* Whether the block can be extended or not */
char filename[FILENAME_LEN]; /* Filename to use */
TESTING("Paged aggregation for file space: H5MF_try_extend() a large block");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -8364,7 +8364,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR;
/* Set the strategy to paged aggregation */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1) < 0)
FAIL_STACK_ERROR;
/* Create the file to work on */
@@ -8386,7 +8386,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr1, (hsize_t)TBLOCK_SIZE6000,
(hsize_t)TBLOCK_SIZE2192);
/* Should succeed */
- if (was_extended != TRUE)
+ if (was_extended != true)
TEST_ERROR;
/* Allocate a large data block with gaddr2 */
@@ -8399,7 +8399,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr1, (hsize_t)TBLOCK_SIZE8192,
(hsize_t)TBLOCK_SIZE50);
/* Should not succeed */
- if (was_extended == TRUE)
+ if (was_extended == true)
TEST_ERROR;
/* Allocate a large data block with gaddr3 */
@@ -8413,7 +8413,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8000,
(hsize_t)TBLOCK_SIZE100);
/* Should succeed */
- if (was_extended == FALSE)
+ if (was_extended == false)
TEST_ERROR;
/* Try extending the block with gaddr2--there is no free-space section big enough to fulfill the
@@ -8421,7 +8421,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8100,
(hsize_t)TBLOCK_SIZE100);
/* Should not succeed */
- if (was_extended == TRUE)
+ if (was_extended == true)
TEST_ERROR;
/* Try extending the block with gaddr2--there is a free-space section big enough to fulfill the
@@ -8429,7 +8429,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8100,
(hsize_t)TBLOCK_SIZE90);
/* Should succeed */
- if (was_extended == FALSE)
+ if (was_extended == false)
TEST_ERROR;
/* Try extending the block with gaddr2 */
@@ -8438,7 +8438,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8190,
(hsize_t)TBLOCK_SIZE5);
/* Should not succeed */
- if (was_extended == TRUE)
+ if (was_extended == true)
TEST_ERROR;
/* Allocate a large data block with gaddr4 */
@@ -8456,7 +8456,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8190,
(hsize_t)TBLOCK_SIZE5);
/* Should succeed */
- if (was_extended == FALSE)
+ if (was_extended == false)
TEST_ERROR;
/* Close file */
@@ -8471,7 +8471,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support paged aggregation strategy");
+ puts(" Current VFD doesn't support paged aggregation strategy");
}
return (0);
@@ -8502,11 +8502,11 @@ static unsigned
test_page_large(const char *env_h5_drvr, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
H5F_t *f = NULL; /* Internal file object pointer */
haddr_t gaddr1, gaddr2, gaddr3, gaddr4; /* Addresses for blocks */
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
H5FS_stat_t fs_stat; /* Information for free-space manager */
h5_stat_size_t file_size; /* File size */
char filename[FILENAME_LEN]; /* Filename to use */
@@ -8514,7 +8514,7 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: large allocations and de-allocations");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -8526,7 +8526,7 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR;
/* Set the strategy to paged aggregation */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1) < 0)
FAIL_STACK_ERROR;
/* Create the file to work on */
@@ -8625,7 +8625,7 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support paged aggregation strategy");
+ puts(" Current VFD doesn't support paged aggregation strategy");
}
return (0);
@@ -8654,24 +8654,24 @@ error:
static unsigned
test_page_small(const char *env_h5_drvr, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
H5F_t *f = NULL; /* Internal file object pointer */
haddr_t addr2, addr3, addr4, addr5; /* Addresses for blocks */
haddr_t addr9, addr10, addr11; /* Address for small metadata blocks */
haddr_t saddr1, saddr2; /* Addresses for small raw data blocks */
H5FS_stat_t fs_stat; /* Information for free-space manager */
char filename[FILENAME_LEN]; /* Filename to use */
- hbool_t multi = FALSE, split = FALSE, family = FALSE;
+ bool multi = false, split = false, family = false;
TESTING("Paged aggregation for file space: small allocations and de-allocations");
- if (!HDstrcmp(env_h5_drvr, "split"))
- split = TRUE;
- else if (!HDstrcmp(env_h5_drvr, "multi"))
- multi = TRUE;
- else if (!HDstrcmp(env_h5_drvr, "family"))
- family = TRUE;
+ if (!strcmp(env_h5_drvr, "split"))
+ split = true;
+ else if (!strcmp(env_h5_drvr, "multi"))
+ multi = true;
+ else if (!strcmp(env_h5_drvr, "family"))
+ family = true;
if (!multi && !split) {
@@ -8683,7 +8683,7 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR;
/* Set the strategy to paged aggregation */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1) < 0)
FAIL_STACK_ERROR;
/* Create the file to work on */
@@ -8794,7 +8794,7 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support paged aggregation strategy");
+ puts(" Current VFD doesn't support paged aggregation strategy");
}
return (0);
@@ -8825,24 +8825,24 @@ static unsigned
test_page_alignment(const char *env_h5_drvr, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list ID */
- hid_t fcpl2 = -1; /* File creation property list ID */
- hid_t fapl_new = -1; /* File access property list ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- haddr_t addr1, addr2; /* Addresses for small metadata blocks */
- haddr_t saddr1, saddr2; /* Addresses for small raw data blocks */
- haddr_t gaddr1, gaddr2; /* Addresses for blocks */
- char filename[FILENAME_LEN]; /* Filename to use */
- hbool_t split = FALSE, multi = FALSE;
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t fcpl2 = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t fapl_new = H5I_INVALID_HID; /* File access property list ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ haddr_t addr1, addr2; /* Addresses for small metadata blocks */
+ haddr_t saddr1, saddr2; /* Addresses for small raw data blocks */
+ haddr_t gaddr1, gaddr2; /* Addresses for blocks */
+ char filename[FILENAME_LEN]; /* Filename to use */
+ bool split = false, multi = false;
TESTING("Paged aggregation and H5Pset_alignment: verify proper alignment is used");
/* Check for split or multi driver */
- if (!HDstrcmp(env_h5_drvr, "split"))
- split = TRUE;
- else if (!HDstrcmp(env_h5_drvr, "multi"))
- multi = TRUE;
+ if (!strcmp(env_h5_drvr, "split"))
+ split = true;
+ else if (!strcmp(env_h5_drvr, "multi"))
+ multi = true;
if (!multi && !split) {
@@ -8871,7 +8871,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
hid_t memb_fapl_arr[H5FD_MEM_NTYPES];
char *memb_name[H5FD_MEM_NTYPES];
haddr_t memb_addr[H5FD_MEM_NTYPES];
- hbool_t relax;
+ bool relax;
H5FD_mem_t mt;
/* Create fapl */
@@ -8939,7 +8939,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
/* Set the strategy to paged aggregation and persisting free space */
/* The alignment to use will be the library's default file space page size */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1) < 0)
TEST_ERROR;
/* Create the file to work on */
@@ -9052,7 +9052,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR;
/* Set strategy to H5F_FSPACE_STRATEGY_AGGR but meta/raw data block is 0 as set in fapl_new */
- if (H5Pset_file_space_strategy(fcpl2, H5F_FSPACE_STRATEGY_AGGR, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl2, H5F_FSPACE_STRATEGY_AGGR, false, (hsize_t)1) < 0)
TEST_ERROR;
/* fapl_new has latest format, H5Pset_alignment set, and disable meta/raw block */
@@ -9106,7 +9106,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
+ puts(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
}
return (0);
@@ -9126,15 +9126,15 @@ error:
int
main(void)
{
- hid_t fapl = -1; /* File access property list for data files */
- hid_t new_fapl = -1; /* File access property list for alignment & aggr setting */
- unsigned nerrors = 0; /* Cumulative error count */
- test_type_t curr_test; /* Current test being worked on */
- const char *env_h5_drvr; /* File Driver value from environment */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list for data files */
+ hid_t new_fapl = H5I_INVALID_HID; /* File access property list for alignment & aggr setting */
+ unsigned nerrors = 0; /* Cumulative error count */
+ test_type_t curr_test; /* Current test being worked on */
+ const char *env_h5_drvr; /* File Driver value from environment */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -9145,7 +9145,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Make a copy of the FAPL before adjusting the alignment */
if ((new_fapl = H5Pcopy(fapl)) < 0)
@@ -9206,32 +9206,32 @@ main(void)
} /* end for */
/* For old and new format--interaction with temporary file space allocation */
- nerrors += test_mf_tmp(env_h5_drvr, fapl, FALSE);
- nerrors += test_mf_tmp(env_h5_drvr, fapl, TRUE);
+ nerrors += test_mf_tmp(env_h5_drvr, fapl, false);
+ nerrors += test_mf_tmp(env_h5_drvr, fapl, true);
/* For old and new format--free-space merge/shrunk away */
/* Temporary: modify to skip testing for multi/split driver:
fail file create when persisting free-space or using paged aggregation strategy */
- nerrors += test_mf_fs_gone(env_h5_drvr, fapl, FALSE);
- nerrors += test_mf_fs_gone(env_h5_drvr, fapl, TRUE);
+ nerrors += test_mf_fs_gone(env_h5_drvr, fapl, false);
+ nerrors += test_mf_fs_gone(env_h5_drvr, fapl, true);
/* Temporary: modify to skip testing multi/split driver:
fail file create when persisting free-space or using paged aggregation strategy */
- nerrors += test_mf_strat_thres_gone(env_h5_drvr, fapl, FALSE);
- nerrors += test_mf_strat_thres_gone(env_h5_drvr, fapl, TRUE);
+ nerrors += test_mf_strat_thres_gone(env_h5_drvr, fapl, false);
+ nerrors += test_mf_strat_thres_gone(env_h5_drvr, fapl, true);
/* For old and new format--persisting free-space */
/* Temporary: Modify to skip testing for multi/split driver:
fail file create when persisting free-space or using paged aggregation strategy */
- nerrors += test_mf_fs_persist(env_h5_drvr, fapl, FALSE);
- nerrors += test_mf_fs_persist(env_h5_drvr, fapl, TRUE);
+ nerrors += test_mf_fs_persist(env_h5_drvr, fapl, false);
+ nerrors += test_mf_fs_persist(env_h5_drvr, fapl, true);
/* Temporary: modify to skip testing for multi/split driver:
fail file create when persisting free-space or using paged aggregation strategy */
- nerrors += test_mf_strat_thres_persist(env_h5_drvr, fapl, FALSE);
- nerrors += test_mf_strat_thres_persist(env_h5_drvr, fapl, TRUE);
+ nerrors += test_mf_strat_thres_persist(env_h5_drvr, fapl, false);
+ nerrors += test_mf_strat_thres_persist(env_h5_drvr, fapl, true);
/* Temporary skipped for multi/split drivers:
fail file create when persisting free-space or using paged aggregation strategy */
@@ -9262,18 +9262,18 @@ main(void)
h5_cleanup(FILENAME, fapl);
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
if (nerrors)
goto error;
- HDputs("All free-space manager tests for file memory passed.");
+ puts("All free-space manager tests for file memory passed.");
return (0);
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
H5Pclose(fapl);
@@ -9282,7 +9282,7 @@ error:
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
return (1);
} /* main() */
diff --git a/test/mirror_vfd.c b/test/mirror_vfd.c
index e0068c0..f7f88de 100644
--- a/test/mirror_vfd.c
+++ b/test/mirror_vfd.c
@@ -115,7 +115,7 @@ static herr_t _close_chunking_ids(unsigned min_dset, unsigned max_dset, hid_t *d
hid_t *filespace_ids, hid_t *dataset_ids, hid_t *memspace_id);
static herr_t populate_filepath(const char *dirname, const char *_basename, hid_t fapl_id, char *path_out,
- hbool_t h5suffix);
+ bool h5suffix);
static hid_t create_mirroring_split_fapl(const char *_basename, struct mirrortest_filenames *names,
const struct mt_opts *opts);
@@ -125,15 +125,15 @@ static hid_t create_mirroring_split_fapl(const char *_basename, struct mirrortes
*
* Purpose: Given a directory name and a base name, concatenate the two and
* run h5fixname() to get the "actual" path to the intended target.
- * `h5suffix' should be FALSE to keep the base name unaltered;
- * TRUE will append the '.h5' h5suffix to the basename...
- * FALSE -> h5fixname_no_suffix(), TRUE -> h5fixname()
+ * `h5suffix' should be false to keep the base name unaltered;
+ * true will append the '.h5' h5suffix to the basename...
+ * false -> h5fixname_no_suffix(), true -> h5fixname()
* <h5fixname_prefix> / <dirname> / <basename> <h5prefix?>
*
* ----------------------------------------------------------------------------
*/
static herr_t
-populate_filepath(const char *dirname, const char *basename, hid_t fapl_id, char *path_out, hbool_t h5suffix)
+populate_filepath(const char *dirname, const char *basename, hid_t fapl_id, char *path_out, bool h5suffix)
{
char *path = NULL;
@@ -143,12 +143,12 @@ populate_filepath(const char *dirname, const char *basename, hid_t fapl_id, char
if (NULL == (path = calloc(H5FD_SPLITTER_PATH_MAX, sizeof(char))))
TEST_ERROR;
- if (HDsnprintf(path, H5FD_SPLITTER_PATH_MAX, "%s%s%s", dirname,
- (dirname[HDstrlen(dirname)] == '/') ? "" : "/", /* slash iff needed */
- basename) > H5FD_SPLITTER_PATH_MAX)
+ if (snprintf(path, H5FD_SPLITTER_PATH_MAX, "%s%s%s", dirname,
+ (dirname[strlen(dirname)] == '/') ? "" : "/", /* slash iff needed */
+ basename) > H5FD_SPLITTER_PATH_MAX)
TEST_ERROR;
- if (h5suffix == TRUE) {
+ if (h5suffix == true) {
if (h5_fixname(path, fapl_id, path_out, H5FD_SPLITTER_PATH_MAX) == NULL)
TEST_ERROR;
}
@@ -184,18 +184,18 @@ build_paths(const char *basename, H5FD_splitter_vfd_config_t *splitter_config,
if (NULL == (baselogname = calloc(H5FD_SPLITTER_PATH_MAX, sizeof(char))))
TEST_ERROR;
- if (populate_filepath(MIRROR_RW_DIR, basename, splitter_config->rw_fapl_id, names->rw, TRUE) < 0)
+ if (populate_filepath(MIRROR_RW_DIR, basename, splitter_config->rw_fapl_id, names->rw, true) < 0)
TEST_ERROR;
- if (populate_filepath(MIRROR_WO_DIR, basename, splitter_config->wo_fapl_id, names->wo, TRUE) < 0)
+ if (populate_filepath(MIRROR_WO_DIR, basename, splitter_config->wo_fapl_id, names->wo, true) < 0)
TEST_ERROR;
if (basename == NULL || *basename == 0)
TEST_ERROR;
- if (HDsnprintf(baselogname, H5FD_SPLITTER_PATH_MAX, "%s_err.log", basename) > H5FD_SPLITTER_PATH_MAX)
+ if (snprintf(baselogname, H5FD_SPLITTER_PATH_MAX, "%s_err.log", basename) > H5FD_SPLITTER_PATH_MAX)
TEST_ERROR;
- if (populate_filepath(MIRROR_WO_DIR, baselogname, splitter_config->wo_fapl_id, names->log, FALSE) < 0)
+ if (populate_filepath(MIRROR_WO_DIR, baselogname, splitter_config->wo_fapl_id, names->log, false) < 0)
TEST_ERROR;
free(baselogname);
@@ -248,7 +248,7 @@ test_fapl_configuration(void)
if (SERVER_HANDSHAKE_PORT != fa_out.handshake_port)
TEST_ERROR;
- if (HDstrncmp(SERVER_IP_ADDRESS, (const char *)fa_out.remote_ip, H5FD_MIRROR_MAX_IP_LEN))
+ if (strncmp(SERVER_IP_ADDRESS, (const char *)fa_out.remote_ip, H5FD_MIRROR_MAX_IP_LEN))
TEST_ERROR;
if (H5Pclose(fapl_id) < 0)
@@ -936,7 +936,7 @@ test_encdec_open(H5FD_mirror_xmit_t xmit_mock)
TEST_ERROR;
if (xmit_out->size_t_blob != xmit_in->size_t_blob)
TEST_ERROR;
- if (HDstrncmp(xmit_out->filename, xmit_in->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX) != 0) {
+ if (strncmp(xmit_out->filename, xmit_in->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX) != 0) {
PRINT_BUFFER_DIFF(xmit_out->filename, xmit_in->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX);
TEST_ERROR;
}
@@ -965,7 +965,7 @@ test_encdec_open(H5FD_mirror_xmit_t xmit_mock)
/* Update expected "filepath" in structure */
for (size_t i = 0x20; i < H5FD_MIRROR_XMIT_FILEPATH_MAX + 0x20; i++)
xmit_in->filename[i - 0x20] = (i > 0xFF) ? 0 : (char)i;
- if (HDstrncmp(xmit_out->filename, xmit_in->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX) != 0) {
+ if (strncmp(xmit_out->filename, xmit_in->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX) != 0) {
PRINT_BUFFER_DIFF(xmit_out->filename, xmit_in->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX);
TEST_ERROR;
}
@@ -1056,7 +1056,7 @@ test_encdec_reply(H5FD_mirror_xmit_t xmit_mock)
TEST_ERROR;
if (xmit_out.status != xmit_in.status)
TEST_ERROR;
- if (HDstrncmp(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX) != 0) {
+ if (strncmp(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX) != 0) {
PRINT_BUFFER_DIFF(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX);
TEST_ERROR;
}
@@ -1081,7 +1081,7 @@ test_encdec_reply(H5FD_mirror_xmit_t xmit_mock)
/* Update expected "message" in structure */
for (i = 0x10; i < H5FD_MIRROR_STATUS_MESSAGE_MAX + 0x10; i++)
xmit_in.message[i - 0x10] = (i > 0xFF) ? 0 : (char)i;
- if (HDstrncmp(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX) != 0) {
+ if (strncmp(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX) != 0) {
PRINT_BUFFER_DIFF(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX);
TEST_ERROR;
}
@@ -1217,7 +1217,7 @@ create_mirroring_split_fapl(const char *basename, struct mirrortest_filenames *n
*/
splitter_config->magic = H5FD_SPLITTER_MAGIC;
splitter_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- splitter_config->ignore_wo_errs = FALSE;
+ splitter_config->ignore_wo_errs = false;
splitter_config->rw_fapl_id = H5I_INVALID_HID;
splitter_config->wo_fapl_id = H5I_INVALID_HID;
@@ -1234,7 +1234,7 @@ create_mirroring_split_fapl(const char *basename, struct mirrortest_filenames *n
mirror_conf.magic = H5FD_MIRROR_FAPL_MAGIC;
mirror_conf.version = H5FD_MIRROR_CURR_FAPL_T_VERSION;
mirror_conf.handshake_port = opts->portno;
- if (HDstrncpy(mirror_conf.remote_ip, opts->ip, H5FD_MIRROR_MAX_IP_LEN) == NULL)
+ if (strncpy(mirror_conf.remote_ip, opts->ip, H5FD_MIRROR_MAX_IP_LEN) == NULL)
TEST_ERROR;
if ((splitter_config->wo_fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
@@ -1246,9 +1246,9 @@ create_mirroring_split_fapl(const char *basename, struct mirrortest_filenames *n
TEST_ERROR;
/* Set file paths for w/o and logfile */
- if (HDstrncpy(splitter_config->wo_path, (const char *)names->wo, H5FD_SPLITTER_PATH_MAX) == NULL)
+ if (strncpy(splitter_config->wo_path, (const char *)names->wo, H5FD_SPLITTER_PATH_MAX) == NULL)
TEST_ERROR;
- if (HDstrncpy(splitter_config->log_file_path, (const char *)names->log, H5FD_SPLITTER_PATH_MAX) == NULL)
+ if (strncpy(splitter_config->log_file_path, (const char *)names->log, H5FD_SPLITTER_PATH_MAX) == NULL)
TEST_ERROR;
/* Create Splitter FAPL */
@@ -1452,21 +1452,21 @@ _create_chunking_ids(hid_t file_id, unsigned min_dset, unsigned max_dset, hsize_
/* Create dataspace IDs */
for (unsigned m = min_dset; m <= max_dset; m++) {
if ((dataspace_ids[m] = H5Screate_simple(2, dset_dims, NULL)) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to create dataspace ID %d\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to create dataspace ID %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
/* Create dataset IDs */
for (unsigned m = min_dset; m <= max_dset; m++) {
- if (HDsnprintf(dset_name, DSET_NAME_LEN, "/dset%03d", m) > DSET_NAME_LEN) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to compose dset name %d\n", m);
+ if (snprintf(dset_name, DSET_NAME_LEN, "/dset%03d", m) > DSET_NAME_LEN) {
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to compose dset name %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
if ((dataset_ids[m] = H5Dcreate2(file_id, dset_name, H5T_STD_I32BE, dataspace_ids[m], H5P_DEFAULT,
dcpl_id, H5P_DEFAULT)) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to create dset ID %d\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to create dset ID %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
@@ -1474,7 +1474,7 @@ _create_chunking_ids(hid_t file_id, unsigned min_dset, unsigned max_dset, hsize_
/* Get file space IDs */
for (unsigned m = min_dset; m <= max_dset; m++) {
if ((filespace_ids[m] = H5Dget_space(dataset_ids[m])) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to create filespace ID %d\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to create filespace ID %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
@@ -1522,13 +1522,13 @@ _open_chunking_ids(hid_t file_id, unsigned min_dset, unsigned max_dset, hsize_t
/* Open dataset IDs */
for (unsigned m = min_dset; m <= max_dset; m++) {
- if (HDsnprintf(dset_name, DSET_NAME_LEN, "/dset%03d", m) > DSET_NAME_LEN) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to compose dset name %d\n", m);
+ if (snprintf(dset_name, DSET_NAME_LEN, "/dset%03d", m) > DSET_NAME_LEN) {
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to compose dset name %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
if ((dataset_ids[m] = H5Dopen2(file_id, dset_name, H5P_DEFAULT)) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to open dset ID %d\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to open dset ID %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
@@ -1536,7 +1536,7 @@ _open_chunking_ids(hid_t file_id, unsigned min_dset, unsigned max_dset, hsize_t
/* Open filespace IDs */
for (unsigned m = min_dset; m <= max_dset; m++) {
if ((filespace_ids[m] = H5Dget_space(dataset_ids[m])) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to get filespace ID %d\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to get filespace ID %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
@@ -1575,16 +1575,16 @@ _close_chunking_ids(unsigned min_dset, unsigned max_dset, hid_t *dataspace_ids,
LOGPRINT(3, "closing ids[%d]\n", m);
if (dataspace_ids) {
if (H5Sclose(dataspace_ids[m]) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to close dataspace_id[%d]\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to close dataspace_id[%d]\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
if (H5Dclose(dataset_ids[m]) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to close dataset_id[%d]\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to close dataset_id[%d]\n", m);
FAIL_PUTS_ERROR(mesg);
}
if (H5Sclose(filespace_ids[m]) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to close filespace_id[%d]\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to close filespace_id[%d]\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
@@ -1635,7 +1635,7 @@ _verify_datasets(unsigned min_dset, unsigned max_dset, hid_t *filespace_ids, hid
if (H5Dread(dataset_ids[m], H5T_NATIVE_INT, memspace_id, filespace_ids[m], H5P_DEFAULT,
data_chunk) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, " H5Dread() [%d][%d][%d]\n", i, j, m);
+ snprintf(mesg, MIRR_MESG_SIZE, " H5Dread() [%d][%d][%d]\n", i, j, m);
FAIL_PUTS_ERROR(mesg);
}
@@ -1643,8 +1643,8 @@ _verify_datasets(unsigned min_dset, unsigned max_dset, hid_t *filespace_ids, hid
for (l = 0; l < CHUNK_DIM; l++) {
if ((unsigned)data_chunk[k][l] !=
((DSET_DIM * DSET_DIM * m) + (DSET_DIM * (i + k)) + j + l)) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, " MISMATCH [%d][%d][%d][%d][%d]\n", i, j, m,
- k, l);
+ snprintf(mesg, MIRR_MESG_SIZE, " MISMATCH [%d][%d][%d][%d][%d]\n", i, j, m,
+ k, l);
FAIL_PUTS_ERROR(mesg);
}
}
@@ -2059,7 +2059,7 @@ test_vanishing_datasets(const struct mt_opts *opts)
/* Delete datasets */
if (i >= max_at_one_time) {
- if (HDsnprintf(namebuf, DSET_NAME_LEN, "/dset%02d", (i - max_at_one_time)) > DSET_NAME_LEN)
+ if (snprintf(namebuf, DSET_NAME_LEN, "/dset%02d", (i - max_at_one_time)) > DSET_NAME_LEN)
TEST_ERROR;
if (H5Ldelete(file_id, namebuf, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -2067,7 +2067,7 @@ test_vanishing_datasets(const struct mt_opts *opts)
/* Write to datasets */
if (i < (max_loops - max_at_one_time)) {
- if (HDsnprintf(namebuf, DSET_NAME_LEN, "/dset%02d", i) > DSET_NAME_LEN)
+ if (snprintf(namebuf, DSET_NAME_LEN, "/dset%02d", i) > DSET_NAME_LEN)
TEST_ERROR;
if ((dset_id = H5Dcreate2(file_id, namebuf, H5T_STD_U32LE, dspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
@@ -2191,7 +2191,7 @@ test_concurrent_access(const struct mt_opts *opts)
char name[16] = "";
hid_t fapl_id = H5I_INVALID_HID;
- HDsnprintf(name, 15, "concurrent%d", i);
+ snprintf(name, 15, "concurrent%d", i);
if ((fapl_id = create_mirroring_split_fapl(name, &bundle[i].names, opts)) < 0)
TEST_ERROR;
bundle[i].fapl_id = fapl_id;
@@ -2296,12 +2296,12 @@ parse_args(int argc, char **argv, struct mt_opts *opts)
int i = 0;
opts->portno = SERVER_HANDSHAKE_PORT;
- HDstrncpy(opts->ip, SERVER_IP_ADDRESS, H5FD_MIRROR_MAX_IP_LEN);
+ strncpy(opts->ip, SERVER_IP_ADDRESS, H5FD_MIRROR_MAX_IP_LEN);
for (i = 1; i < argc; i++) { /* start with first possible option argument */
- if (!HDstrncmp(argv[i], "--ip=", 5))
- HDstrncpy(opts->ip, argv[i] + 5, H5FD_MIRROR_MAX_IP_LEN);
- else if (!HDstrncmp(argv[i], "--port=", 7))
+ if (!strncmp(argv[i], "--ip=", 5))
+ strncpy(opts->ip, argv[i] + 5, H5FD_MIRROR_MAX_IP_LEN);
+ else if (!strncmp(argv[i], "--port=", 7))
opts->portno = atoi(argv[i] + 7);
else {
printf("Unrecognized option: '%s'\n", argv[i]);
@@ -2310,8 +2310,8 @@ parse_args(int argc, char **argv, struct mt_opts *opts)
} /* end for each argument from command line */
/* Auto-replace 'localhost' with numeric IP */
- if (!HDstrncmp(opts->ip, "localhost", 10)) /* include NUL terminator */
- HDstrncpy(opts->ip, "127.0.0.1", H5FD_MIRROR_MAX_IP_LEN);
+ if (!strncmp(opts->ip, "localhost", 10)) /* include NUL terminator */
+ strncpy(opts->ip, "127.0.0.1", H5FD_MIRROR_MAX_IP_LEN);
return 0;
} /* end parse_args() */
@@ -2346,7 +2346,7 @@ confirm_server(struct mt_opts *opts)
while (1) {
if (connect(live_socket, (struct sockaddr *)&target_addr, (socklen_t)sizeof(target_addr)) < 0) {
if (attempt > 10) {
- printf("ERROR connect() (%d)\n%s\n", errno, HDstrerror(errno));
+ printf("ERROR connect() (%d)\n%s\n", errno, strerror(errno));
return -1;
}
@@ -2359,7 +2359,7 @@ confirm_server(struct mt_opts *opts)
attempt++;
HDsleep(1);
- printf("attempt #%u: ERROR connect() (%d)\n%s\n", attempt, errno, HDstrerror(errno));
+ printf("attempt #%u: ERROR connect() (%d)\n%s\n", attempt, errno, strerror(errno));
/* Re-open socket for retry */
live_socket = socket(AF_INET, SOCK_STREAM, 0);
@@ -2374,7 +2374,7 @@ confirm_server(struct mt_opts *opts)
/* Request confirmation from the server */
if (HDwrite(live_socket, "CONFIRM", 8) == -1) {
- printf("ERROR write() (%d)\n%s\n", errno, HDstrerror(errno));
+ printf("ERROR write() (%d)\n%s\n", errno, strerror(errno));
return -1;
}
@@ -2383,7 +2383,7 @@ confirm_server(struct mt_opts *opts)
printf("ERROR read() can't receive data\n");
return -1;
}
- if (HDstrncmp("ALIVE", mybuf, 6)) {
+ if (strncmp("ALIVE", mybuf, 6)) {
printf("ERROR read() didn't receive data from server\n");
return -1;
}
diff --git a/test/mount.c b/test/mount.c
index e418b25..bc619b1 100644
--- a/test/mount.c
+++ b/test/mount.c
@@ -41,7 +41,7 @@ static int bm[NX][NY]; /* Data buffers */
static int
setup(hid_t fapl)
{
- hid_t file = -1;
+ hid_t file = H5I_INVALID_HID;
char filename[1024];
/* file 1 */
@@ -111,7 +111,7 @@ error:
static int
test_basic(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1, grp = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID, grp = H5I_INVALID_HID;
char filename1[1024], filename2[1024];
TESTING("basic functionality");
@@ -162,7 +162,8 @@ error:
static int
test_illegal(hid_t fapl)
{
- hid_t file1 = -1, file1b = -1, file2 = -1, file3 = -1, file3b = -1, mnt = -1;
+ hid_t file1 = H5I_INVALID_HID, file1b = H5I_INVALID_HID, file2 = H5I_INVALID_HID, file3 = H5I_INVALID_HID,
+ file3b = H5I_INVALID_HID, mnt = H5I_INVALID_HID;
char filename1[1024], filename2[1024], filename3[1024];
herr_t status;
@@ -189,7 +190,7 @@ test_illegal(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Mounting a file on itself should have failed.");
+ puts(" Mounting a file on itself should have failed.");
TEST_ERROR;
} /* end if */
@@ -209,7 +210,7 @@ test_illegal(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Mounting two files at one mount point should have failed.");
+ puts(" Mounting two files at one mount point should have failed.");
TEST_ERROR;
} /* end if */
if (H5Funmount(mnt, ".") < 0)
@@ -234,7 +235,7 @@ test_illegal(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Mounting same file opened twice at one mount point should have failed.");
+ puts(" Mounting same file opened twice at one mount point should have failed.");
TEST_ERROR;
} /* end if */
if (H5Funmount(mnt, ".") < 0)
@@ -252,7 +253,7 @@ test_illegal(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Creating a cycle with mount points should have failed.");
+ puts(" Creating a cycle with mount points should have failed.");
TEST_ERROR;
} /* end if */
if (H5Funmount(file1, "/mnt1") < 0)
@@ -301,8 +302,9 @@ error:
static int
test_samefile(hid_t fapl)
{
- hid_t file1a = -1, file1b = -1, file2 = -1, file3 = -1;
- hid_t mnt1a = -1, mnt1b = -1;
+ hid_t file1a = H5I_INVALID_HID, file1b = H5I_INVALID_HID, file2 = H5I_INVALID_HID,
+ file3 = H5I_INVALID_HID;
+ hid_t mnt1a = H5I_INVALID_HID, mnt1b = H5I_INVALID_HID;
char filename1[1024], filename2[1024], filename3[1024];
H5G_info_t grp_info;
herr_t status;
@@ -443,10 +445,10 @@ error:
static int
test_hide(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1, grp = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID, grp = H5I_INVALID_HID;
H5O_info2_t oi1, oi2;
char filename1[1024], filename2[1024];
- hbool_t same_obj;
+ bool same_obj;
TESTING("name hiding under mount point");
h5_fixname(FILENAME[0], fapl, filename1, sizeof(filename1));
@@ -472,7 +474,7 @@ test_hide(hid_t fapl)
H5E_END_TRY
if (grp >= 0) {
H5_FAILED();
- HDputs(" Name is still accessible under mount point.");
+ puts(" Name is still accessible under mount point.");
TEST_ERROR;
}
@@ -483,21 +485,21 @@ test_hide(hid_t fapl)
if (H5Oget_info_by_name3(file1, "/file1", &oi2, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- same_obj = TRUE;
+ same_obj = true;
if (oi1.fileno == oi2.fileno) {
int token_cmp;
if (H5Otoken_cmp(file1, &oi1.token, &oi2.token, &token_cmp) < 0)
FAIL_STACK_ERROR;
if (token_cmp)
- same_obj = FALSE;
+ same_obj = false;
}
else
- same_obj = FALSE;
+ same_obj = false;
if (!same_obj) {
H5_FAILED();
- HDputs(" Hard link failed for hidden object.");
+ puts(" Hard link failed for hidden object.");
TEST_ERROR;
}
@@ -538,10 +540,10 @@ error:
static int
test_assoc(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID;
H5O_info2_t oi1, oi2;
char filename1[1024], filename2[1024];
- hbool_t same_obj;
+ bool same_obj;
TESTING("mount point open");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
@@ -567,21 +569,21 @@ test_assoc(hid_t fapl)
if (H5Oget_info_by_name3(file1, "/mnt1", &oi2, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- same_obj = TRUE;
+ same_obj = true;
if (oi1.fileno == oi2.fileno) {
int token_cmp;
if (H5Otoken_cmp(file1, &oi1.token, &oi2.token, &token_cmp) < 0)
FAIL_STACK_ERROR;
if (token_cmp)
- same_obj = FALSE;
+ same_obj = false;
}
else
- same_obj = FALSE;
+ same_obj = false;
if (!same_obj) {
H5_FAILED();
- HDputs(" Association failed.");
+ puts(" Association failed.");
TEST_ERROR;
} /* end if */
@@ -622,7 +624,7 @@ error:
static int
test_mntlnk(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1, grp = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID, grp = H5I_INVALID_HID;
char filename1[1024], filename2[1024];
TESTING("multi-linked mount point");
@@ -687,7 +689,7 @@ error:
static int
test_move(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID;
herr_t status;
char filename1[1024], filename2[1024];
@@ -712,7 +714,7 @@ test_move(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Moving an object across files shouldn't have been possible");
+ puts(" Moving an object across files shouldn't have been possible");
TEST_ERROR;
} /* end if */
@@ -752,7 +754,7 @@ error:
static int
test_preopen(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1, grp = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID, grp = H5I_INVALID_HID;
H5O_info2_t oinfo;
char filename1[1024], filename2[1024];
@@ -817,7 +819,7 @@ static int
test_postopen(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1, grp = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID, grp = H5I_INVALID_HID;
H5O_info2_t oinfo;
char filename1[1024], filename2[1024];
@@ -886,7 +888,7 @@ error:
static int
test_unlink(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1, mnt = -1, root = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID, mnt = H5I_INVALID_HID, root = H5I_INVALID_HID;
H5O_info2_t oinfo;
char filename1[1024], filename2[1024];
herr_t status;
@@ -933,7 +935,7 @@ test_unlink(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Incorrect traversal from mount point!");
+ puts(" Incorrect traversal from mount point!");
TEST_ERROR;
} /* end if */
@@ -954,7 +956,7 @@ test_unlink(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Traversal through mount point should not have worked!");
+ puts(" Traversal through mount point should not have worked!");
TEST_ERROR;
} /* end if */
H5E_BEGIN_TRY
@@ -964,7 +966,7 @@ test_unlink(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Traversal through mount point should not have worked!");
+ puts(" Traversal through mount point should not have worked!");
TEST_ERROR;
} /* end if */
@@ -1035,7 +1037,7 @@ error:
static int
test_mvmpt(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID;
H5O_info2_t oinfo;
char filename1[1024], filename2[1024];
@@ -1093,9 +1095,9 @@ error:
static int
test_interlink(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID;
#ifdef NOT_NOW
- hid_t type = -1, space = -1, dset = -1;
+ hid_t type = H5I_INVALID_HID, space = H5I_INVALID_HID, dset = H5I_INVALID_HID;
hsize_t cur_dims[1] = {2};
#endif /* NOT_NOW */
char filename1[1024], filename2[1024];
@@ -1120,7 +1122,7 @@ test_interlink(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Interfile hard link should not have been allowed!");
+ puts(" Interfile hard link should not have been allowed!");
TEST_ERROR;
} /* end if */
@@ -1132,7 +1134,7 @@ test_interlink(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Interfile renaming should not have been allowed!");
+ puts(" Interfile renaming should not have been allowed!");
TEST_ERROR;
} /* end if */
@@ -1155,7 +1157,7 @@ test_interlink(hid_t fapl)
H5E_END_TRY
if (dset >= 0) {
H5_FAILED();
- HDputs(" Dataset and shared type must be in the same file!");
+ puts(" Dataset and shared type must be in the same file!");
TEST_ERROR;
} /* end if */
@@ -1166,7 +1168,7 @@ test_interlink(hid_t fapl)
FAIL_STACK_ERROR;
#else /* NOT_NOW */
SKIPPED();
- HDputs(" Test skipped due file pointer sharing issue (Jira 7638).");
+ puts(" Test skipped due file pointer sharing issue (Jira 7638).");
#endif /* NOT_NOW */
/* Shut down */
@@ -1210,7 +1212,7 @@ error:
static int
test_uniformity(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID;
H5O_info2_t oinfo;
char filename1[1024], filename2[1024];
@@ -1284,7 +1286,7 @@ error:
static int
test_close(hid_t fapl)
{
- hid_t file1 = -1, file2 = -1;
+ hid_t file1 = H5I_INVALID_HID, file2 = H5I_INVALID_HID;
H5O_info2_t oinfo;
char filename1[1024], filename2[1024];
@@ -1307,7 +1309,7 @@ test_close(hid_t fapl)
FAIL_STACK_ERROR;
if (H5Oget_info_by_name3(file2, "/mnt1", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDputs(" File1 contents are not accessible!");
+ puts(" File1 contents are not accessible!");
TEST_ERROR;
} /* end if */
if (H5Fclose(file2) < 0)
@@ -1369,15 +1371,17 @@ error:
static int
test_mount_after_close(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gidA = -1, gidAB = -1, gidABM = -1, gidX = -1, gidXY = -1; /* Group identifiers */
- hid_t gidABMX = -1, gidABC = -1, gidABT = -1; /* Group IDs for testing */
- hid_t didABMXYD = -1; /* Dataset ID for testing */
- hid_t did = -1, sid = -1; /* Dataset and dataspace identifiers */
- char filename1[1024], filename2[1024]; /* Name of files to mount */
- char objname[NAME_BUF_SIZE]; /* Name of object opened */
- hsize_t dims[] = {NX, NY}; /* Dataset dimensions */
- int i, j; /* Local index variable */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidAB = H5I_INVALID_HID, gidABM = H5I_INVALID_HID, gidX = H5I_INVALID_HID,
+ gidXY = H5I_INVALID_HID; /* Group identifiers */
+ hid_t gidABMX = H5I_INVALID_HID, gidABC = H5I_INVALID_HID,
+ gidABT = H5I_INVALID_HID; /* Group IDs for testing */
+ hid_t didABMXYD = H5I_INVALID_HID; /* Dataset ID for testing */
+ hid_t did = H5I_INVALID_HID, sid = H5I_INVALID_HID; /* Dataset and dataspace identifiers */
+ char filename1[1024], filename2[1024]; /* Name of files to mount */
+ char objname[NAME_BUF_SIZE]; /* Name of object opened */
+ hsize_t dims[] = {NX, NY}; /* Dataset dimensions */
+ int i, j; /* Local index variable */
TESTING("mounting on group after file is closed");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
@@ -1502,7 +1506,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidABMX, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/A/B/M/X") != 0)
+ if (strcmp(objname, "/A/B/M/X") != 0)
TEST_ERROR;
/* Close object in mounted file */
@@ -1517,7 +1521,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidABC, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/A/B/C") != 0)
+ if (strcmp(objname, "/A/B/C") != 0)
TEST_ERROR;
/* Close object in mounted file */
@@ -1532,7 +1536,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidABT, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/A/B/T") != 0)
+ if (strcmp(objname, "/A/B/T") != 0)
TEST_ERROR;
/* Close object in original file */
@@ -1547,7 +1551,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(didABMXYD, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/A/B/M/X/Y/D") != 0)
+ if (strcmp(objname, "/A/B/M/X/Y/D") != 0)
TEST_ERROR;
/* Close object in mounted file */
@@ -1599,16 +1603,18 @@ error:
static int
test_mount_after_unmount(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1, fid3 = -1, fid4 = -1; /* File IDs */
- hid_t gidA = -1, gidB = -1, gidX = -1, gidY = -1, gidZ = -1; /* Group identifiers */
- hid_t gidBM = -1; /* Group identifiers */
- hid_t gidBMZ = -1; /* Group identifiers */
- hid_t gidAM = -1; /* Group identifiers */
- hid_t gidAMX = -1; /* Group identifiers */
- hid_t gidAMXX = -1; /* Group identifiers */
- hid_t gidAMXMY = -1; /* Group identifiers */
- hid_t gidXM = -1; /* Group identifiers */
- hid_t gidXX = -1; /* Group identifiers */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID, fid3 = H5I_INVALID_HID,
+ fid4 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidB = H5I_INVALID_HID, gidX = H5I_INVALID_HID, gidY = H5I_INVALID_HID,
+ gidZ = H5I_INVALID_HID; /* Group identifiers */
+ hid_t gidBM = H5I_INVALID_HID; /* Group identifiers */
+ hid_t gidBMZ = H5I_INVALID_HID; /* Group identifiers */
+ hid_t gidAM = H5I_INVALID_HID; /* Group identifiers */
+ hid_t gidAMX = H5I_INVALID_HID; /* Group identifiers */
+ hid_t gidAMXX = H5I_INVALID_HID; /* Group identifiers */
+ hid_t gidAMXMY = H5I_INVALID_HID; /* Group identifiers */
+ hid_t gidXM = H5I_INVALID_HID; /* Group identifiers */
+ hid_t gidXX = H5I_INVALID_HID; /* Group identifiers */
char filename1[1024], filename2[1024], filename3[1024], filename4[1024]; /* Name of files to mount */
char objname[NAME_BUF_SIZE]; /* Name of object opened */
@@ -1715,7 +1721,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXX, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/M/X/X") != 0)
+ if (strcmp(objname, "/A/M/X/X") != 0)
TEST_ERROR;
/* Open group in mounted file #2 */
@@ -1735,7 +1741,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXMY, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/M/X/M/Y") != 0)
+ if (strcmp(objname, "/A/M/X/M/Y") != 0)
TEST_ERROR;
/* Unmount second file */
@@ -1746,7 +1752,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXMY, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/X/M/Y") != 0)
+ if (strcmp(objname, "/X/M/Y") != 0)
TEST_ERROR;
/* Rename object in file #3 that is "disconnected" from name hierarchy */
@@ -1766,7 +1772,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXMY, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/X/M/Z") != 0)
+ if (strcmp(objname, "/X/M/Z") != 0)
TEST_ERROR;
/* Mount fourth file */
@@ -1782,7 +1788,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidBMZ, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/B/M/Z") != 0)
+ if (strcmp(objname, "/B/M/Z") != 0)
TEST_ERROR;
/* Unmount third file */
@@ -1863,10 +1869,10 @@ error:
static int
test_missing_unmount(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1, fid3 = -1; /* File IDs */
- hid_t gidA = -1, gidE = -1, gidM = -1; /* Group IDs */
- hid_t gidAE = -1, gidAEM = -1; /* Group IDs */
- char filename1[1024], filename2[1024], filename3[1024]; /* Name of files to mount */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID, fid3 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidE = H5I_INVALID_HID, gidM = H5I_INVALID_HID; /* Group IDs */
+ hid_t gidAE = H5I_INVALID_HID, gidAEM = H5I_INVALID_HID; /* Group IDs */
+ char filename1[1024], filename2[1024], filename3[1024]; /* Name of files to mount */
TESTING("missing unmount");
@@ -2010,8 +2016,8 @@ error:
static int
test_hold_open_file(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gidA = -1, gidM = -1, gidAM = -1; /* Group IDs */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidM = H5I_INVALID_HID, gidAM = H5I_INVALID_HID; /* Group IDs */
char filename1[1024], filename2[1024]; /* Name of files to mount */
TESTING("hold open w/file");
@@ -2135,9 +2141,10 @@ error:
static int
test_hold_open_group(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gid = -1, gidA = -1, gidM = -1, gidAM = -1, gidAM2 = -1; /* Group IDs */
- char filename1[1024], filename2[1024]; /* Name of files to mount */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gid = H5I_INVALID_HID, gidA = H5I_INVALID_HID, gidM = H5I_INVALID_HID, gidAM = H5I_INVALID_HID,
+ gidAM2 = H5I_INVALID_HID; /* Group IDs */
+ char filename1[1024], filename2[1024]; /* Name of files to mount */
TESTING("hold open w/group");
@@ -2286,10 +2293,10 @@ error:
static int
test_fcdegree_same(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gidA = -1, gidM = -1, gidAM = -1; /* Group IDs */
- hid_t fapl_id = -1; /* FAPL IDs */
- herr_t ret; /* Generic return value */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidM = H5I_INVALID_HID, gidAM = H5I_INVALID_HID; /* Group IDs */
+ hid_t fapl_id = H5I_INVALID_HID; /* FAPL IDs */
+ herr_t ret; /* Generic return value */
char filename1[1024], filename2[1024]; /* Name of files to mount */
TESTING("file close degrees must be same");
@@ -2425,10 +2432,10 @@ error:
static int
test_fcdegree_semi(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gidA = -1, gidM = -1, gidAM = -1; /* Group IDs */
- hid_t fapl_id = -1; /* FAPL IDs */
- herr_t ret; /* Generic return value */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidM = H5I_INVALID_HID, gidAM = H5I_INVALID_HID; /* Group IDs */
+ hid_t fapl_id = H5I_INVALID_HID; /* FAPL IDs */
+ herr_t ret; /* Generic return value */
char filename1[1024], filename2[1024]; /* Name of files to mount */
TESTING("'semi' file close degree");
@@ -2563,9 +2570,9 @@ error:
static int
test_fcdegree_strong(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gidA = -1, gidM = -1, gidAM = -1; /* Group IDs */
- hid_t fapl_id = -1; /* FAPL IDs */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidM = H5I_INVALID_HID, gidAM = H5I_INVALID_HID; /* Group IDs */
+ hid_t fapl_id = H5I_INVALID_HID; /* FAPL IDs */
H5O_info2_t oinfo;
char filename1[1024], filename2[1024]; /* Name of files to mount */
herr_t ret; /* Generic return value */
@@ -2700,9 +2707,10 @@ error:
static int
test_acc_perm(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1, fid3 = -1; /* File IDs */
- hid_t gidA = -1, gidB = -1, gidC = -1, gidM = -1, gidAM = -1, gidAMZ = -1; /* Group IDs */
- hid_t bad_id = -1; /* Bad ID from object create */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID, fid3 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidB = H5I_INVALID_HID, gidC = H5I_INVALID_HID, gidM = H5I_INVALID_HID,
+ gidAM = H5I_INVALID_HID, gidAMZ = H5I_INVALID_HID; /* Group IDs */
+ hid_t bad_id = H5I_INVALID_HID; /* Bad ID from object create */
char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
char filename1[1024], filename2[1024], filename3[1024]; /* Name of files to mount */
@@ -2748,7 +2756,7 @@ test_acc_perm(hid_t fapl)
/* Get and verify file name */
if (H5Fget_name(gidA, name, NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, filename1) != 0)
+ if (strcmp(name, filename1) != 0)
TEST_ERROR;
if ((fid2 = H5Fopen(filename2, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
@@ -2757,7 +2765,7 @@ test_acc_perm(hid_t fapl)
/* Get and verify file name */
if (H5Fget_name(fid2, name, NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, filename2) != 0)
+ if (strcmp(name, filename2) != 0)
TEST_ERROR;
/* Mount files together */
@@ -2767,7 +2775,7 @@ test_acc_perm(hid_t fapl)
/* Get and verify file name */
if (H5Fget_name(fid2, name, NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, filename2) != 0)
+ if (strcmp(name, filename2) != 0)
TEST_ERROR;
/* Open group in mounted file */
@@ -2777,7 +2785,7 @@ test_acc_perm(hid_t fapl)
/* Get and verify file name */
if (H5Fget_name(gidAM, name, NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, filename2) != 0)
+ if (strcmp(name, filename2) != 0)
TEST_ERROR;
/* Attempt to create objects in read only file (should fail) */
@@ -2823,7 +2831,7 @@ test_acc_perm(hid_t fapl)
/* Get and verify file name */
if (H5Fget_name(gidAMZ, name, NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, filename3) != 0)
+ if (strcmp(name, filename3) != 0)
TEST_ERROR;
/* Close object in file #3 */
@@ -2899,12 +2907,14 @@ error:
static int
test_mult_mount(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1, fid3 = -1, fid3_2 = -1; /* File IDs */
- hid_t gidA = -1, gidB = -1; /* Group IDs in file #1 */
- hid_t gidM = -1, gidN = -1, gidAM = -1; /* Group IDs in file #2 */
- hid_t gidS = -1, gidT = -1, gidU = -1, gidBS = -1, gidAMT = -1; /* Group IDs in file #3 */
- char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
- char filename1[1024], filename2[1024], filename3[1024]; /* Name of files to mount */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID, fid3 = H5I_INVALID_HID,
+ fid3_2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidB = H5I_INVALID_HID; /* Group IDs in file #1 */
+ hid_t gidM = H5I_INVALID_HID, gidN = H5I_INVALID_HID, gidAM = H5I_INVALID_HID; /* Group IDs in file #2 */
+ hid_t gidS = H5I_INVALID_HID, gidT = H5I_INVALID_HID, gidU = H5I_INVALID_HID, gidBS = H5I_INVALID_HID,
+ gidAMT = H5I_INVALID_HID; /* Group IDs in file #3 */
+ char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
+ char filename1[1024], filename2[1024], filename3[1024]; /* Name of files to mount */
TESTING("multiple mounts");
@@ -3014,7 +3024,7 @@ test_mult_mount(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidAMT, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, "/A/M/T") != 0)
+ if (strcmp(name, "/A/M/T") != 0)
TEST_ERROR;
/* Create object in file #3 */
@@ -3032,7 +3042,7 @@ test_mult_mount(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidBS, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, "/B/S") != 0)
+ if (strcmp(name, "/B/S") != 0)
TEST_ERROR;
/* Re-open object created in file #3 through file #1 mount path */
@@ -3117,10 +3127,11 @@ error:
static int
test_nested_survive(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1, fid3 = -1; /* File IDs */
- hid_t gidA = -1; /* Group IDs in file #1 */
- hid_t gidM = -1, gidAM = -1; /* Group IDs in file #2 */
- hid_t gidS = -1, gidMS = -1, gidAMS = -1; /* Group IDs in file #3 */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID, fid3 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID; /* Group IDs in file #1 */
+ hid_t gidM = H5I_INVALID_HID, gidAM = H5I_INVALID_HID; /* Group IDs in file #2 */
+ hid_t gidS = H5I_INVALID_HID, gidMS = H5I_INVALID_HID,
+ gidAMS = H5I_INVALID_HID; /* Group IDs in file #3 */
char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
ssize_t name_len; /* Filename length */
char filename1[1024], filename2[1024], filename3[1024]; /* Name of files to mount */
@@ -3208,7 +3219,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidAM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/A/M") != 0)
+ if (name_len == 0 || strcmp(name, "/A/M") != 0)
TEST_ERROR;
/* Unmount file #2 from file #1 */
@@ -3219,7 +3230,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidAM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len != 0 || HDstrcmp(name, "") != 0)
+ if (name_len != 0 || strcmp(name, "") != 0)
TEST_ERROR;
/* Open object in file #3 through file #1 mount path (should fail) */
@@ -3239,7 +3250,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidMS, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, "/M/S") != 0)
+ if (strcmp(name, "/M/S") != 0)
TEST_ERROR;
/* Close group in file #3 */
@@ -3258,7 +3269,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidAMS, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, "/A/M/S") != 0)
+ if (strcmp(name, "/A/M/S") != 0)
TEST_ERROR;
/* Close group in file #3 */
@@ -3325,12 +3336,12 @@ error:
static int
test_close_parent(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gidA = -1; /* Group IDs in file #1 */
- hid_t gidM = -1; /* Group IDs in file #2 */
- char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
- ssize_t name_len; /* Filename length */
- char filename1[1024], filename2[1024]; /* Name of files to mount */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID; /* Group IDs in file #1 */
+ hid_t gidM = H5I_INVALID_HID; /* Group IDs in file #2 */
+ char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
+ ssize_t name_len; /* Filename length */
+ char filename1[1024], filename2[1024]; /* Name of files to mount */
TESTING("close parent");
@@ -3402,7 +3413,7 @@ test_close_parent(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/A/M") != 0)
+ if (name_len == 0 || strcmp(name, "/A/M") != 0)
TEST_ERROR;
/* Unmount file #2 from file #1, closing file #1 */
@@ -3413,7 +3424,7 @@ test_close_parent(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/M") != 0)
+ if (name_len == 0 || strcmp(name, "/M") != 0)
TEST_ERROR;
/* Just file #2's underlying shared file should be open still */
@@ -3491,17 +3502,18 @@ error:
static int
test_cut_graph(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1, fid3 = -1, fid4 = -1, fid5 = -1, fid6 = -1, fid7 = -1; /* File IDs */
- hid_t gidA = -1, gidB = -1; /* Group IDs in file #1 */
- hid_t gidD = -1, gidE = -1; /* Group IDs in file #2 */
- hid_t gidH = -1, gidI = -1; /* Group IDs in file #3 */
- hid_t gidK = -1; /* Group IDs in file #4 */
- hid_t gidM = -1; /* Group IDs in file #5 */
- hid_t gidO = -1; /* Group IDs in file #6 */
- hid_t gidQ = -1; /* Group IDs in file #7 */
- char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
- ssize_t name_len; /* Filename length */
- ssize_t obj_count; /* Number of objects open */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID, fid3 = H5I_INVALID_HID, fid4 = H5I_INVALID_HID,
+ fid5 = H5I_INVALID_HID, fid6 = H5I_INVALID_HID, fid7 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidB = H5I_INVALID_HID; /* Group IDs in file #1 */
+ hid_t gidD = H5I_INVALID_HID, gidE = H5I_INVALID_HID; /* Group IDs in file #2 */
+ hid_t gidH = H5I_INVALID_HID, gidI = H5I_INVALID_HID; /* Group IDs in file #3 */
+ hid_t gidK = H5I_INVALID_HID; /* Group IDs in file #4 */
+ hid_t gidM = H5I_INVALID_HID; /* Group IDs in file #5 */
+ hid_t gidO = H5I_INVALID_HID; /* Group IDs in file #6 */
+ hid_t gidQ = H5I_INVALID_HID; /* Group IDs in file #7 */
+ char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
+ ssize_t name_len; /* Filename length */
+ ssize_t obj_count; /* Number of objects open */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE],
filename4[NAME_BUF_SIZE], filename5[NAME_BUF_SIZE], filename6[NAME_BUF_SIZE],
filename7[NAME_BUF_SIZE]; /* Name of files to mount */
@@ -3675,7 +3687,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/A/E/M") != 0)
+ if (name_len == 0 || strcmp(name, "/A/E/M") != 0)
TEST_ERROR;
/* Open object in file #7 */
@@ -3686,7 +3698,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/B/I/Q") != 0)
+ if (name_len == 0 || strcmp(name, "/B/I/Q") != 0)
TEST_ERROR;
/* Close file #1 */
@@ -3746,7 +3758,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidK, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/D/K") != 0)
+ if (name_len == 0 || strcmp(name, "/D/K") != 0)
TEST_ERROR;
if (H5Gclose(gidK) < 0)
@@ -3769,7 +3781,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidO, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/B/H/O") != 0)
+ if (name_len == 0 || strcmp(name, "/B/H/O") != 0)
TEST_ERROR;
if (H5Gclose(gidO) < 0)
@@ -3779,14 +3791,14 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/E/M") != 0)
+ if (name_len == 0 || strcmp(name, "/E/M") != 0)
TEST_ERROR;
/* Check the name of "Q" is still defined */
*name = '\0';
if ((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/B/I/Q") != 0)
+ if (name_len == 0 || strcmp(name, "/B/I/Q") != 0)
TEST_ERROR;
/* Check that all seven underlying files are still opened */
@@ -3811,7 +3823,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/I/Q") != 0)
+ if (name_len == 0 || strcmp(name, "/I/Q") != 0)
TEST_ERROR;
/* Open object in file #6 from file #7 */
@@ -3822,7 +3834,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidO, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/H/O") != 0)
+ if (name_len == 0 || strcmp(name, "/H/O") != 0)
TEST_ERROR;
if (H5Gclose(gidO) < 0)
@@ -3878,13 +3890,13 @@ error:
static int
test_symlink(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1, fid3 = -1; /* File IDs */
- hid_t gidA = -1, gidB = -1; /* Group IDs in file #1 */
- hid_t gidD = -1, gidE = -1; /* Group IDs in file #2 */
- hid_t gidH = -1, gidI = -1; /* Group IDs in file #3 */
- hid_t gidL = -1; /* Group IDs through soft link to file #3 */
- char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
- ssize_t name_len; /* Filename length */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID, fid3 = H5I_INVALID_HID; /* File IDs */
+ hid_t gidA = H5I_INVALID_HID, gidB = H5I_INVALID_HID; /* Group IDs in file #1 */
+ hid_t gidD = H5I_INVALID_HID, gidE = H5I_INVALID_HID; /* Group IDs in file #2 */
+ hid_t gidH = H5I_INVALID_HID, gidI = H5I_INVALID_HID; /* Group IDs in file #3 */
+ hid_t gidL = H5I_INVALID_HID; /* Group IDs through soft link to file #3 */
+ char name[NAME_BUF_SIZE]; /* Buffer for filename retrieved */
+ ssize_t name_len; /* Filename length */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE],
filename3[NAME_BUF_SIZE]; /* Name of files to mount */
@@ -3986,7 +3998,7 @@ test_symlink(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidL, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/L") != 0)
+ if (name_len == 0 || strcmp(name, "/L") != 0)
TEST_ERROR;
/* Close file #1 */
@@ -4038,8 +4050,9 @@ error:
static int
test_sharedacc(hid_t fapl)
{
- hid_t fid1[2] = {-1, -1}, fid2[2] = {-1, -1}; /* File IDs */
- hid_t gid = -1;
+ hid_t fid1[2] = {H5I_INVALID_HID, H5I_INVALID_HID},
+ fid2[2] = {H5I_INVALID_HID, H5I_INVALID_HID}; /* File IDs */
+ hid_t gid = H5I_INVALID_HID;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE],
filename3[NAME_BUF_SIZE]; /* Name of files to mount */
int i, j, k; /* Counters */
@@ -4139,8 +4152,8 @@ error:
static int
test_sharedclose(hid_t fapl)
{
- hid_t fid1a = -1, fid1b = -1, fid2 = -1, fid3 = -2; /* File IDs */
- hid_t gid1 = -1, gid2 = -1, gid3 = -1;
+ hid_t fid1a = H5I_INVALID_HID, fid1b = H5I_INVALID_HID, fid2 = H5I_INVALID_HID, fid3 = -2; /* File IDs */
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID, gid3 = H5I_INVALID_HID;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE],
filename3[NAME_BUF_SIZE]; /* Name of files to mount */
@@ -4293,8 +4306,8 @@ error:
static int
test_multisharedclose(hid_t fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gid1 = -1, gid2 = -1, gid3 = -1;
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID, gid3 = H5I_INVALID_HID;
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], filename3[NAME_BUF_SIZE],
filename4[NAME_BUF_SIZE]; /* Name of files to mount */
@@ -4443,7 +4456,7 @@ int
main(void)
{
int nerrors = 0;
- hid_t fapl = -1;
+ hid_t fapl = H5I_INVALID_HID;
h5_reset();
fapl = h5_fileaccess();
@@ -4488,12 +4501,12 @@ main(void)
if (nerrors)
goto error;
- HDputs("All mount tests passed.");
+ puts("All mount tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
error:
- HDputs("***** MOUNT ERRORS *****");
+ puts("***** MOUNT ERRORS *****");
return 1;
}
diff --git a/test/mtime.c b/test/mtime.c
index 11668c8..60bfaaa 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -46,7 +46,7 @@ main(void)
signed char buf1[32], buf2[32];
char filename[1024];
int token_cmp;
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
h5_reset();
fapl = h5_fileaccess();
@@ -96,26 +96,26 @@ main(void)
/* Compare object tokens & times from the two ways of calling H5Oget_info() */
if (token_cmp || oi1.ctime != oi2.ctime) {
H5_FAILED();
- HDputs(" Calling H5Oget_info() with the dataset ID returned");
- HDputs(" different values than calling it with a file and dataset");
- HDputs(" name.");
+ puts(" Calling H5Oget_info() with the dataset ID returned");
+ puts(" different values than calling it with a file and dataset");
+ puts(" name.");
goto error;
}
/* Compare times -- they must be within 60 seconds of one another */
if (0 == oi1.ctime) {
SKIPPED();
- HDputs(" The modification time could not be decoded on this OS.");
- HDputs(" Modification times will be maintained in the file but");
- HDputs(" cannot be queried on this system. See H5O_mtime_decode().");
+ puts(" The modification time could not be decoded on this OS.");
+ puts(" Modification times will be maintained in the file but");
+ puts(" cannot be queried on this system. See H5O_mtime_decode().");
return 0;
}
- else if (HDfabs(HDdifftime(now, oi1.ctime)) > 60.0) {
+ else if (fabs(HDdifftime(now, oi1.ctime)) > 60.0) {
H5_FAILED();
tm = HDlocaltime(&(oi1.ctime));
- HDstrftime((char *)buf1, sizeof buf1, "%Y-%m-%d %H:%M:%S", tm);
+ strftime((char *)buf1, sizeof buf1, "%Y-%m-%d %H:%M:%S", tm);
tm = HDlocaltime(&now);
- HDstrftime((char *)buf2, sizeof buf2, "%Y-%m-%d %H:%M:%S", tm);
+ strftime((char *)buf2, sizeof buf2, "%Y-%m-%d %H:%M:%S", tm);
printf(" got: %s\n ans: %s\n", buf1, buf2);
goto error;
}
@@ -138,7 +138,7 @@ main(void)
H5_FAILED();
/* If this fails, examine H5Omtime.c. Modification time is very
* system dependent (e.g., on Windows DST must be hardcoded). */
- HDputs(" Old modification time incorrect");
+ puts(" Old modification time incorrect");
goto error;
}
if (H5Fclose(file) < 0)
@@ -168,7 +168,7 @@ main(void)
TEST_ERROR;
if (oi2.ctime != MTIME2) {
H5_FAILED();
- HDputs(" Modification time incorrect.");
+ puts(" Modification time incorrect.");
goto error;
}
if (H5Fclose(file) < 0)
@@ -188,7 +188,7 @@ main(void)
TEST_ERROR;
/* All looks good */
- HDputs("All modification time tests passed.");
+ puts("All modification time tests passed.");
h5_cleanup(FILENAME, fapl);
return EXIT_SUCCESS;
diff --git a/test/ntypes.c b/test/ntypes.c
index 99ac151..f36a600 100644
--- a/test/ntypes.c
+++ b/test/ntypes.c
@@ -62,8 +62,8 @@ static const char *FILENAME[] = {"ntypes", NULL};
static herr_t
test_atomic_dtype(hid_t file)
{
- hid_t dataset = -1, space = -1;
- hid_t dtype = -1, native_type = -1;
+ hid_t dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ hid_t dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID;
int i, j, n;
hsize_t dims[2];
void *tmp = NULL;
@@ -319,8 +319,9 @@ test_compound_dtype2(hid_t file)
s2 st;
unsigned long long l;
} s1;
- hid_t dataset = -1, space = -1;
- hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, tid_m = -1, tid_m2 = -1, mem_id = -1,
+ hid_t dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ hid_t dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID, tid = H5I_INVALID_HID,
+ tid2 = H5I_INVALID_HID, tid_m = H5I_INVALID_HID, tid_m2 = H5I_INVALID_HID, mem_id = H5I_INVALID_HID,
nest_mem_id = -1;
int i, j, n;
hsize_t dims[2];
@@ -445,7 +446,7 @@ test_compound_dtype2(hid_t file)
if ((native_type = H5Tget_native_type(dtype, H5T_DIR_DEFAULT)) < 0)
TEST_ERROR;
- if (H5Tequal(native_type, tid_m) != TRUE)
+ if (H5Tequal(native_type, tid_m) != true)
TEST_ERROR;
/* Verify the datatype of each field retrieved and converted */
@@ -629,8 +630,9 @@ test_compound_dtype(hid_t file)
unsigned int i;
long long l;
} s1;
- hid_t dataset = -1, space = -1;
- hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, mem_id = -1;
+ hid_t dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ hid_t dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID, tid = H5I_INVALID_HID,
+ tid2 = H5I_INVALID_HID, mem_id = H5I_INVALID_HID;
int i, j, n;
hsize_t dims[2];
s1 *temp_point = NULL;
@@ -711,7 +713,7 @@ test_compound_dtype(hid_t file)
if ((native_type = H5Tget_native_type(dtype, H5T_DIR_DEFAULT)) < 0)
TEST_ERROR;
- if (H5Tequal(native_type, tid2) != TRUE)
+ if (H5Tequal(native_type, tid2) != true)
TEST_ERROR;
/* Verify the datatype of each field retrieved and converted */
@@ -837,8 +839,9 @@ test_compound_dtype3(hid_t file)
int a[5];
long long l;
} s1;
- hid_t dataset = -1, space = -1;
- hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, tid_m = -1, tid_m2 = -1, mem_id = -1,
+ hid_t dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ hid_t dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID, tid = H5I_INVALID_HID,
+ tid2 = H5I_INVALID_HID, tid_m = H5I_INVALID_HID, tid_m2 = H5I_INVALID_HID, mem_id = H5I_INVALID_HID,
nest_mem_id = -1;
hsize_t array_dims[1] = {5};
int i, j, k, n;
@@ -1073,8 +1076,9 @@ test_compound_opaque(hid_t file)
unsigned char o[5];
long long l;
} s1;
- hid_t dataset = -1, space = -1;
- hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, tid_m = -1, mem_id = -1;
+ hid_t dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ hid_t dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID, tid = H5I_INVALID_HID,
+ tid2 = H5I_INVALID_HID, tid_m = H5I_INVALID_HID, mem_id = H5I_INVALID_HID;
int i, j, k, n;
hsize_t dims[2];
s1 *temp_point = NULL, *temp_check = NULL;
@@ -1290,8 +1294,9 @@ error:
static herr_t
test_enum_dtype(hid_t file)
{
- hid_t dataset = -1, space = -1;
- hid_t tid = -1, tid_m = -1, dtype = -1, native_type = -1;
+ hid_t dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID, tid_m = H5I_INVALID_HID, dtype = H5I_INVALID_HID,
+ native_type = H5I_INVALID_HID;
int i, j, n;
hsize_t dims[2];
void *tmp = NULL;
@@ -1449,8 +1454,9 @@ test_array_dtype(hid_t file)
int i;
long long l;
} s1;
- hid_t dataset = -1, space = -1;
- hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, tid3 = -1, tid_m = -1;
+ hid_t dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ hid_t dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID, tid = H5I_INVALID_HID,
+ tid2 = H5I_INVALID_HID, tid3 = H5I_INVALID_HID, tid_m = H5I_INVALID_HID;
int i, j, k, n;
hsize_t space_dims[2], array_dims[1] = {5};
s1 *temp_point = NULL, *temp_check = NULL;
@@ -1627,8 +1633,9 @@ error:
static herr_t
test_array_dtype2(hid_t file)
{
- hid_t dataset = -1, space = -1;
- hid_t dtype = -1, native_type = -1, tid = -1, tid_m = -1;
+ hid_t dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ hid_t dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID, tid = H5I_INVALID_HID,
+ tid_m = H5I_INVALID_HID;
int i, j, k, n;
hsize_t space_dims[2], array_dims[1] = {5};
void *tmp = NULL;
@@ -1778,10 +1785,11 @@ test_vl_dtype(hid_t file)
hvl_t rdata[SPACE1_DIM1]; /* Information read in */
hvl_t *t1, *t2; /* Temporary pointer to VL information */
hsize_t dims1[] = {SPACE1_DIM1};
- hid_t dataset = -1, space = -1;
- hid_t dtype = -1, native_type = -1, nat_super_type = -1, tid = -1, tid2 = -1, tid_m = -1, tid_m2 = -1;
- size_t i, j, k;
- void **tmp = NULL;
+ hid_t dataset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ hid_t dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID, nat_super_type = H5I_INVALID_HID,
+ tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID, tid_m = H5I_INVALID_HID, tid_m2 = H5I_INVALID_HID;
+ size_t i, j, k;
+ void **tmp = NULL;
TESTING("variable length datatype");
@@ -1981,11 +1989,11 @@ test_vlstr_dtype(hid_t file)
"conceived in liberty and dedicated to the proposition that all men are created equal.",
"Now we are engaged in a great civil war,",
"testing whether that nation or any nation so conceived and so dedicated can long endure."};
- char *rdata[SPACE1_DIM1]; /* Information read in */
- hbool_t rdata_alloc = FALSE; /* Whether the read data is allocated */
- hid_t dataset = -1; /* Dataset ID */
- hid_t sid1 = -1; /* Dataspace ID */
- hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
+ char *rdata[SPACE1_DIM1]; /* Information read in */
+ bool rdata_alloc = false; /* Whether the read data is allocated */
+ hid_t dataset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid1 = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid1 = H5I_INVALID_HID, dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID; /* Datatype ID */
hsize_t dims1[] = {SPACE1_DIM1};
unsigned i; /* counting variable */
@@ -2036,17 +2044,17 @@ test_vlstr_dtype(hid_t file)
/* Read dataset from disk */
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata) < 0)
TEST_ERROR;
- rdata_alloc = TRUE;
+ rdata_alloc = true;
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
H5_FAILED();
printf(" VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
goto error;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
H5_FAILED();
printf(" VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i], (int)i,
rdata[i]);
@@ -2071,7 +2079,7 @@ test_vlstr_dtype(hid_t file)
/* Free memory for rdata */
for (i = 0; i < SPACE1_DIM1; i++)
free(rdata[i]);
- rdata_alloc = FALSE;
+ rdata_alloc = false;
PASSED();
return 0;
@@ -2112,11 +2120,11 @@ test_str_dtype(hid_t file)
{
const char wdata[SPACE1_DIM1][4] = {"one", "two", "3rd", "4th"}; /* Information to write */
char rdata[SPACE1_DIM1][4]; /* Information read in */
- hid_t dataset = -1; /* Dataset ID */
- hid_t sid1 = -1; /* Dataspace ID */
- hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
- hsize_t dims1[] = {SPACE1_DIM1};
- unsigned i; /* counting variable */
+ hid_t dataset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid1 = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid1 = H5I_INVALID_HID, dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID; /* Datatype ID */
+ hsize_t dims1[] = {SPACE1_DIM1};
+ unsigned i; /* counting variable */
/* Output message about test being performed */
TESTING("fixed-length string datatype");
@@ -2168,13 +2176,13 @@ test_str_dtype(hid_t file)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
H5_FAILED();
printf(" data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
goto error;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
H5_FAILED();
printf(" data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i], (int)i,
rdata[i]);
@@ -2234,10 +2242,10 @@ test_refer_dtype(hid_t file)
float c;
} s1_t;
- hid_t dataset = -1; /* Dataset ID */
- hid_t group = -1; /* Group ID */
- hid_t sid1 = -1; /* Dataspace ID */
- hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
+ hid_t dataset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t group = H5I_INVALID_HID; /* Group ID */
+ hid_t sid1 = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid1 = H5I_INVALID_HID, dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID; /* Datatype ID */
hsize_t dims1[] = {1};
H5O_type_t obj_type; /* Object type */
hobj_ref_t *wbuf = NULL, /* buffer to write to disk */
@@ -2395,11 +2403,11 @@ error:
static herr_t
test_refer_dtype2(hid_t file)
{
- hid_t dset1 = -1, /* Dataset ID */
- dset2 = -1; /* Dereferenced dataset ID */
- hid_t sid1 = -1, /* Dataspace ID #1 */
- sid2 = -1; /* Dataspace ID #2 */
- hid_t dtype = -1, native_type = -1;
+ hid_t dset1 = H5I_INVALID_HID, /* Dataset ID */
+ dset2 = -1; /* Dereferenced dataset ID */
+ hid_t sid1 = H5I_INVALID_HID, /* Dataspace ID #1 */
+ sid2 = -1; /* Dataspace ID #2 */
+ hid_t dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID;
hsize_t dims1[] = {1}, dims2[] = {SPACE2_DIM1, SPACE2_DIM2};
hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
@@ -2604,8 +2612,8 @@ error:
static herr_t
test_opaque_dtype(hid_t file)
{
- hid_t type = -1, space = -1, dset = -1;
- hid_t dataset = -1, dtype = -1, native_type = -1;
+ hid_t type = H5I_INVALID_HID, space = H5I_INVALID_HID, dset = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID, dtype = H5I_INVALID_HID, native_type = H5I_INVALID_HID;
size_t i;
unsigned char wbuf[32], rbuf[32];
hsize_t nelmts;
@@ -2698,8 +2706,9 @@ error:
static herr_t
test_bitfield_dtype(hid_t file)
{
- hid_t type = -1, space = -1, dset1 = -1, dset2 = -1;
- hid_t dataset1 = -1, dataset2 = -1, dtype = -1, native_type = -1;
+ hid_t type = H5I_INVALID_HID, space = H5I_INVALID_HID, dset1 = H5I_INVALID_HID, dset2 = H5I_INVALID_HID;
+ hid_t dataset1 = H5I_INVALID_HID, dataset2 = H5I_INVALID_HID, dtype = H5I_INVALID_HID,
+ native_type = H5I_INVALID_HID;
size_t ntype_size, i;
unsigned char wbuf[BITFIELD_ENUMB * sizeof(int)];
unsigned char *p = NULL;
@@ -2849,19 +2858,19 @@ error:
static herr_t
test_ninteger(void)
{
- hid_t fid1 = -1; /* file ID */
- hid_t fid2 = -1; /* file ID */
- hid_t did1 = -1; /* dataset ID */
- hid_t did2 = -1; /* dataset ID */
- hid_t sid1 = -1; /* dataspace ID */
- hid_t dcpl1 = -1; /* dataset creation property list ID */
- hid_t dcpl2 = -1; /* dataset creation property list ID */
- hid_t tid1 = -1; /* file datatype */
- hid_t tid2 = -1; /* file datatype */
- hid_t nid1 = -1; /* native datatype */
- hid_t nid2 = -1; /* native datatype */
- hsize_t dims[1] = {DIM3}; /* dataspace dimensions */
- int rank = 1; /* rank of dataset */
+ hid_t fid1 = H5I_INVALID_HID; /* file ID */
+ hid_t fid2 = H5I_INVALID_HID; /* file ID */
+ hid_t did1 = H5I_INVALID_HID; /* dataset ID */
+ hid_t did2 = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid1 = H5I_INVALID_HID; /* dataspace ID */
+ hid_t dcpl1 = H5I_INVALID_HID; /* dataset creation property list ID */
+ hid_t dcpl2 = H5I_INVALID_HID; /* dataset creation property list ID */
+ hid_t tid1 = H5I_INVALID_HID; /* file datatype */
+ hid_t tid2 = H5I_INVALID_HID; /* file datatype */
+ hid_t nid1 = H5I_INVALID_HID; /* native datatype */
+ hid_t nid2 = H5I_INVALID_HID; /* native datatype */
+ hsize_t dims[1] = {DIM3}; /* dataspace dimensions */
+ int rank = 1; /* rank of dataset */
int buf[DIM3];
int chk[DIM3];
int i;
@@ -3052,10 +3061,10 @@ error:
int
main(void)
{
- hid_t file, fapl;
- int nerrors = 0;
- char filename[1024];
- hbool_t driver_is_parallel;
+ hid_t file, fapl;
+ int nerrors = 0;
+ char filename[1024];
+ bool driver_is_parallel;
h5_reset();
fapl = h5_fileaccess();
diff --git a/test/objcopy.c b/test/objcopy.c
index 8848ab1..d604c54 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -204,28 +204,28 @@ token_insert(H5O_info2_t *oi)
*
* Purpose: Check if a token has already been encountered
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: (can't fail)
*
*-------------------------------------------------------------------------
*/
-static H5_ATTR_PURE hbool_t
+static H5_ATTR_PURE bool
token_lookup(hid_t loc_id, H5O_info2_t *oi)
{
size_t n;
int token_cmp;
if (oi->rc < 2)
- return FALSE; /*only one link possible*/
+ return false; /*only one link possible*/
for (n = 0; n < idtab_g.nobjs; n++) {
if (H5Otoken_cmp(loc_id, &idtab_g.obj[n], &oi->token, &token_cmp) < 0)
- return FALSE;
+ return false;
if (!token_cmp)
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
} /* end token_lookup() */
/*-------------------------------------------------------------------------
@@ -258,9 +258,10 @@ token_reset(void)
static herr_t
attach_ref_attr(hid_t file_id, hid_t loc_id)
{
- char dsetname1[] = "dataset1_pointed_by_ref_attr";
- char dsetname2[] = "dataset2_pointed_by_ref_attr";
- hid_t did1 = (-1), did2 = (-1), aid = (-1), sid = (-1), sid_ref = (-1);
+ char dsetname1[] = "dataset1_pointed_by_ref_attr";
+ char dsetname2[] = "dataset2_pointed_by_ref_attr";
+ hid_t did1 = (H5I_INVALID_HID), did2 = (H5I_INVALID_HID), aid = (H5I_INVALID_HID),
+ sid = (H5I_INVALID_HID), sid_ref = (H5I_INVALID_HID);
hsize_t dims[2] = {2, 9};
hsize_t dims_ref[1] = {2};
hobj_ref_t ref[2];
@@ -333,10 +334,10 @@ static herr_t
attach_reg_ref_attr(hid_t file_id, hid_t loc_id)
{
const char dsetnamev[] = "dataset_pointed_by_reg_ref_attr";
- hid_t aid = (-1);
- hid_t space_id = (-1); /* dataspace identifiers */
- hid_t spacer_id = (-1); /* dataspace identifiers */
- hid_t dsetv_id = (-1); /*dataset identifiers*/
+ hid_t aid = (H5I_INVALID_HID);
+ hid_t space_id = (H5I_INVALID_HID); /* dataspace identifiers */
+ hid_t spacer_id = (H5I_INVALID_HID); /* dataspace identifiers */
+ hid_t dsetv_id = (H5I_INVALID_HID); /*dataset identifiers*/
hsize_t dims[2] = {2, 9};
hsize_t dimsr[1] = {2};
int rank = 2;
@@ -429,10 +430,10 @@ create_reg_ref_dataset(hid_t file_id, hid_t loc_id)
const char dsetnamer[] = "dataset_with_reg_ref";
const char dsetnamer1[] = "compact_dataset_with_reg_ref";
const char dsetnamer2[] = "compressed_dataset_with_reg_ref";
- hid_t space_id = (-1); /* dataspace identifiers */
- hid_t spacer_id = (-1);
- hid_t dsetv_id = (-1); /*dataset identifiers*/
- hid_t dsetr_id = (-1);
+ hid_t space_id = (H5I_INVALID_HID); /* dataspace identifiers */
+ hid_t spacer_id = (H5I_INVALID_HID);
+ hid_t dsetv_id = (H5I_INVALID_HID); /*dataset identifiers*/
+ hid_t dsetr_id = (H5I_INVALID_HID);
hsize_t dims[2] = {2, 9};
hsize_t dimsr[1] = {2};
int rank = 2;
@@ -444,7 +445,7 @@ create_reg_ref_dataset(hid_t file_id, hid_t loc_id)
hsize_t count[2];
hsize_t coord[3][2] = {{0, 0}, {1, 6}, {0, 8}};
size_t num_points = 3;
- hid_t pid = (-1);
+ hid_t pid = (H5I_INVALID_HID);
if ((space_id = H5Screate_simple(rank, dims, NULL)) < 0)
TEST_ERROR;
@@ -547,7 +548,7 @@ error:
static int
test_copy_attach_attribute_vl(hid_t loc_id)
{
- hid_t aid = -1, sid = -1, tid = -1;
+ hid_t aid = H5I_INVALID_HID, sid = H5I_INVALID_HID, tid = H5I_INVALID_HID;
hvl_t buf[4];
hsize_t dim1 = 4;
unsigned int i, j;
@@ -602,11 +603,11 @@ done:
static int
test_copy_attach_attributes(hid_t loc_id, hid_t type_id)
{
- hid_t aid = -1, sid = -1;
+ hid_t aid = H5I_INVALID_HID, sid = H5I_INVALID_HID;
char attr_name[ATTR_NAME_LEN];
int attr_data[2];
hsize_t dim1 = 2;
- hid_t acpl = -1;
+ hid_t acpl = H5I_INVALID_HID;
unsigned u;
int ret_value = -1;
@@ -618,7 +619,7 @@ test_copy_attach_attributes(hid_t loc_id, hid_t type_id)
goto done;
for (u = 0; u < num_attributes_g; u++) {
- HDsnprintf(attr_name, sizeof(attr_name), "%u attr", u);
+ snprintf(attr_name, sizeof(attr_name), "%u attr", u);
/* Set attribute data */
attr_data[0] = (int)(100 * u);
@@ -669,10 +670,10 @@ done:
static int
test_copy_attach_paired_attributes(hid_t loc_id, hid_t loc_id2, hid_t type_id)
{
- hid_t aid = -1, sid = -1;
+ hid_t aid = H5I_INVALID_HID, sid = H5I_INVALID_HID;
char attr_name[ATTR_NAME_LEN];
int attr_data[2];
- hid_t acpl = -1;
+ hid_t acpl = H5I_INVALID_HID;
unsigned u;
hsize_t dim1 = 2;
@@ -684,7 +685,7 @@ test_copy_attach_paired_attributes(hid_t loc_id, hid_t loc_id2, hid_t type_id)
goto done;
for (u = 0; u < num_attributes_g; u++) {
- HDsnprintf(attr_name, sizeof(attr_name), "%u attr", u);
+ snprintf(attr_name, sizeof(attr_name), "%u attr", u);
/* Set attribute data */
attr_data[0] = (int)(100 * u);
@@ -738,23 +739,23 @@ done:
*
* Purpose: Compare two attributes to check that they are equal
*
- * Return: TRUE if attributes are equal/FALSE if they are different
+ * Return: true if attributes are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
static int
compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_owner)
{
- hid_t sid = -1, sid2 = -1; /* Dataspace IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- size_t elmt_size; /* Size of datatype */
- htri_t is_committed; /* If the datatype is committed */
- htri_t is_committed2; /* If the datatype is committed */
- H5A_info_t ainfo; /* Attribute info */
- H5A_info_t ainfo2; /* Attribute info */
- hssize_t nelmts; /* # of elements in dataspace */
- void *rbuf = NULL; /* Buffer for reading raw data */
- void *rbuf2 = NULL; /* Buffer for reading raw data */
+ hid_t sid = H5I_INVALID_HID, sid2 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ size_t elmt_size; /* Size of datatype */
+ htri_t is_committed; /* If the datatype is committed */
+ htri_t is_committed2; /* If the datatype is committed */
+ H5A_info_t ainfo; /* Attribute info */
+ H5A_info_t ainfo2; /* Attribute info */
+ hssize_t nelmts; /* # of elements in dataspace */
+ void *rbuf = NULL; /* Buffer for reading raw data */
+ void *rbuf2 = NULL; /* Buffer for reading raw data */
/* Check the character sets are equal */
if (H5Aget_info(aid, &ainfo) < 0)
@@ -790,7 +791,7 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
TEST_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* Determine the size of datatype (for later) */
@@ -808,7 +809,7 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
TEST_ERROR;
/* Compare the dataspaces */
- if (H5Sextent_equal(sid, sid2) != TRUE)
+ if (H5Sextent_equal(sid, sid2) != true)
TEST_ERROR;
/* Determine the number of elements in dataspace (for later) */
@@ -843,10 +844,10 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
TEST_ERROR;
/* Reclaim vlen data, if necessary */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE)
+ if (H5Tdetect_class(tid, H5T_VLEN) == true)
if (H5Treclaim(tid, sid, H5P_DEFAULT, rbuf) < 0)
TEST_ERROR;
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE)
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true)
if (H5Treclaim(tid2, sid2, H5P_DEFAULT, rbuf2) < 0)
TEST_ERROR;
@@ -872,7 +873,7 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
if (H5Tclose(tid2) < 0)
TEST_ERROR;
- return TRUE;
+ return true;
error:
if (rbuf)
@@ -887,7 +888,7 @@ error:
H5Tclose(tid);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_attribute() */
/*-------------------------------------------------------------------------
@@ -895,7 +896,7 @@ error:
*
* Purpose: Compare "standard" attributes on two objects to check that they are equal
*
- * Return: TRUE if objects have same attributes/FALSE if they are different
+ * Return: true if objects have same attributes/false if they are different
*
* Note: This isn't very general, the attributes are assumed to be
* those written in test_copy_attach_attributes().
@@ -905,9 +906,9 @@ error:
static int
compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid)
{
- hid_t aid = -1, aid2 = -1; /* Attribute IDs */
- H5O_info2_t oinfo1, oinfo2; /* Object info */
- unsigned cpy_flags; /* Object copy flags */
+ hid_t aid = H5I_INVALID_HID, aid2 = H5I_INVALID_HID; /* Attribute IDs */
+ H5O_info2_t oinfo1, oinfo2; /* Object info */
+ unsigned cpy_flags; /* Object copy flags */
/* Retrieve the object copy flags from the property list, if it's non-DEFAULT */
if (pid != H5P_DEFAULT) {
@@ -962,7 +963,7 @@ compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid)
} /* end if */
/* Objects should be the same. :-) */
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
@@ -971,7 +972,7 @@ error:
H5Aclose(aid);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_std_attributes() */
/*-------------------------------------------------------------------------
@@ -979,7 +980,7 @@ error:
*
* Purpose: Compare two buffers of data to check that they are equal
*
- * Return: TRUE if buffer are equal/FALSE if they are different
+ * Return: true if buffer are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
@@ -996,7 +997,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
/* If the type is a compound containing a vlen, loop over all elements for
* each compound member. Compounds containing reference are not supported
* yet. */
- if ((H5Tget_class(tid) == H5T_COMPOUND) && (H5Tdetect_class(tid, H5T_VLEN) == TRUE)) {
+ if ((H5Tget_class(tid) == H5T_COMPOUND) && (H5Tdetect_class(tid, H5T_VLEN) == true)) {
hid_t memb_id; /* Member id */
const uint8_t *memb1; /* Pointer to current member */
const uint8_t *memb2; /* Pointer to current member */
@@ -1059,7 +1060,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
else {
/* vlens cannot currently be nested below the top layer of a
* compound */
- assert(H5Tdetect_class(memb_id, H5T_VLEN) == FALSE);
+ assert(H5Tdetect_class(memb_id, H5T_VLEN) == false);
/* Iterate over all elements, calling memcmp() for each */
for (elmt = 0; elmt < nelmts; elmt++) {
@@ -1073,7 +1074,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
} /* end else */
} /* end for */
}
- else if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ else if (H5Tdetect_class(tid, H5T_VLEN) == true) {
const hvl_t *vl_buf1, *vl_buf2; /* Aliases for buffers to compare */
hid_t base_tid; /* Base type of vlen datatype */
size_t u; /* Local index variable */
@@ -1103,7 +1104,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
if (H5Tclose(base_tid) < 0)
TEST_ERROR;
} /* end if */
- else if (H5Tdetect_class(tid, H5T_REFERENCE) == TRUE) {
+ else if (H5Tdetect_class(tid, H5T_REFERENCE) == true) {
size_t u; /* Local index variable */
/* Check for "simple" reference datatype */
@@ -1151,24 +1152,24 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
TEST_ERROR;
if (H5Oclose(obj2_id) < 0)
TEST_ERROR;
- return TRUE;
+ return true;
}
}
/* Check for types of objects handled */
switch (obj1_type) {
case H5O_TYPE_DATASET:
- if (compare_datasets(obj1_id, obj2_id, pid, NULL) != TRUE)
+ if (compare_datasets(obj1_id, obj2_id, pid, NULL) != true)
TEST_ERROR;
break;
case H5O_TYPE_GROUP:
- if (compare_groups(obj1_id, obj2_id, pid, -1, 0) != TRUE)
+ if (compare_groups(obj1_id, obj2_id, pid, -1, 0) != true)
TEST_ERROR;
break;
case H5O_TYPE_NAMED_DATATYPE:
- if (H5Tequal(obj1_id, obj2_id) != TRUE)
+ if (H5Tequal(obj1_id, obj2_id) != true)
TEST_ERROR;
break;
@@ -1229,24 +1230,24 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
TEST_ERROR;
if (H5Oclose(obj2_id) < 0)
TEST_ERROR;
- return TRUE;
+ return true;
}
}
/* Check for types of objects handled */
switch (obj1_type) {
case H5O_TYPE_DATASET:
- if (compare_datasets(obj1_id, obj2_id, pid, NULL) != TRUE)
+ if (compare_datasets(obj1_id, obj2_id, pid, NULL) != true)
TEST_ERROR;
break;
case H5O_TYPE_GROUP:
- if (compare_groups(obj1_id, obj2_id, pid, -1, 0) != TRUE)
+ if (compare_groups(obj1_id, obj2_id, pid, -1, 0) != true)
TEST_ERROR;
break;
case H5O_TYPE_NAMED_DATATYPE:
- if (H5Tequal(obj1_id, obj2_id) != TRUE)
+ if (H5Tequal(obj1_id, obj2_id) != true)
TEST_ERROR;
break;
@@ -1289,10 +1290,10 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
TEST_ERROR;
/* Data should be the same. :-) */
- return TRUE;
+ return true;
error:
- return FALSE;
+ return false;
} /* end compare_data() */
/*-------------------------------------------------------------------------
@@ -1300,25 +1301,25 @@ error:
*
* Purpose: Compare two datasets to check that they are equal
*
- * Return: TRUE if datasets are equal/FALSE if they are different
+ * Return: true if datasets are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
static int
compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
{
- hid_t sid = -1, sid2 = -1; /* Dataspace IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- hid_t dcpl = -1, dcpl2 = -1; /* Dataset creation property list IDs */
- size_t elmt_size; /* Size of datatype */
- htri_t is_committed; /* If the datatype is committed */
- htri_t is_committed2; /* If the datatype is committed */
- int nfilters; /* Number of filters applied to dataset */
- hssize_t nelmts; /* # of elements in dataspace */
- void *rbuf = NULL; /* Buffer for reading raw data */
- void *rbuf2 = NULL; /* Buffer for reading raw data */
- H5D_space_status_t space_status; /* Dataset's raw dataspace status */
- H5D_space_status_t space_status2; /* Dataset's raw dataspace status */
+ hid_t sid = H5I_INVALID_HID, sid2 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t dcpl = H5I_INVALID_HID, dcpl2 = H5I_INVALID_HID; /* Dataset creation property list IDs */
+ size_t elmt_size; /* Size of datatype */
+ htri_t is_committed; /* If the datatype is committed */
+ htri_t is_committed2; /* If the datatype is committed */
+ int nfilters; /* Number of filters applied to dataset */
+ hssize_t nelmts; /* # of elements in dataspace */
+ void *rbuf = NULL; /* Buffer for reading raw data */
+ void *rbuf2 = NULL; /* Buffer for reading raw data */
+ H5D_space_status_t space_status; /* Dataset's raw dataspace status */
+ H5D_space_status_t space_status2; /* Dataset's raw dataspace status */
/* Check the datatypes are equal */
@@ -1339,7 +1340,7 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* Determine the size of datatype (for later) */
@@ -1357,7 +1358,7 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Compare the dataspaces */
- if (H5Sextent_equal(sid, sid2) != TRUE)
+ if (H5Sextent_equal(sid, sid2) != true)
TEST_ERROR;
/* Determine the number of elements in dataspace (for later) */
@@ -1375,7 +1376,7 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Compare the rest of the dataset creation property lists */
- if (H5Pequal(dcpl, dcpl2) != TRUE)
+ if (H5Pequal(dcpl, dcpl2) != true)
TEST_ERROR;
/* Get the number of filters on dataset (for later) */
@@ -1441,10 +1442,10 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Reclaim vlen data, if necessary */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE)
+ if (H5Tdetect_class(tid, H5T_VLEN) == true)
if (H5Treclaim(tid, sid, H5P_DEFAULT, rbuf) < 0)
TEST_ERROR;
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE)
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true)
if (H5Treclaim(tid2, sid2, H5P_DEFAULT, rbuf2) < 0)
TEST_ERROR;
@@ -1471,11 +1472,11 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Check if the attributes are equal */
- if (compare_std_attributes(did, did2, pid) != TRUE)
+ if (compare_std_attributes(did, did2, pid) != true)
TEST_ERROR;
/* Datasets should be the same. :-) */
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
@@ -1492,7 +1493,7 @@ error:
H5Tclose(tid);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_datasets() */
/*-------------------------------------------------------------------------
@@ -1500,7 +1501,7 @@ error:
*
* Purpose: Compare two groups to check that they are "equal"
*
- * Return: TRUE if group are equal/FALSE if they are different
+ * Return: true if group are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
@@ -1550,7 +1551,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
if (H5Lget_name_by_idx(gid2, ".", H5_INDEX_NAME, H5_ITER_INC, idx, objname2,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, objname2) != 0)
+ if (strcmp(objname, objname2) != 0)
TEST_ERROR;
/* Get link info */
@@ -1613,19 +1614,19 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
switch (oinfo.type) {
case H5O_TYPE_GROUP:
/* Compare groups */
- if (compare_groups(oid, oid2, pid, depth - 1, copy_flags) != TRUE)
+ if (compare_groups(oid, oid2, pid, depth - 1, copy_flags) != true)
TEST_ERROR;
break;
case H5O_TYPE_DATASET:
/* Compare datasets */
- if (compare_datasets(oid, oid2, pid, NULL) != TRUE)
+ if (compare_datasets(oid, oid2, pid, NULL) != true)
TEST_ERROR;
break;
case H5O_TYPE_NAMED_DATATYPE:
/* Compare datatypes */
- if (H5Tequal(oid, oid2) != TRUE)
+ if (H5Tequal(oid, oid2) != true)
TEST_ERROR;
break;
@@ -1681,18 +1682,18 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
} /* end if */
/* Check if the attributes are equal */
- if (compare_std_attributes(gid, gid2, pid) != TRUE)
+ if (compare_std_attributes(gid, gid2, pid) != true)
TEST_ERROR;
/* Groups should be the same. :-) */
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
{
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_groups() */
/*-------------------------------------------------------------------------
@@ -1701,9 +1702,9 @@ error:
* Purpose: If using new format, the index array type should be NEW_TYPE
* If not, the index array type should be OLD_TYPE
*
- * Return: TRUE if the index type retrieved for the dataset DID is
+ * Return: true if the index type retrieved for the dataset DID is
* as expected
- * FALSE if not
+ * false if not
*
*-------------------------------------------------------------------------
*/
@@ -1729,9 +1730,9 @@ compare_idx_type(hid_t fapl, hid_t did, H5D_chunk_index_t new_type, H5D_chunk_in
else if (idx_type != old_type)
TEST_ERROR;
- return TRUE;
+ return true;
error:
- return FALSE;
+ return false;
} /* compare_idx_type() */
/*-------------------------------------------------------------------------
@@ -1747,8 +1748,8 @@ error:
static int
test_copy_named_datatype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -1807,7 +1808,7 @@ test_copy_named_datatype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
FAIL_STACK_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* close the destination datatype */
@@ -1854,8 +1855,8 @@ error:
static int
test_copy_named_datatype_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -1914,7 +1915,7 @@ test_copy_named_datatype_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
FAIL_STACK_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* close the destination datatype */
@@ -1961,8 +1962,8 @@ error:
static int
test_copy_named_datatype_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -2029,7 +2030,7 @@ test_copy_named_datatype_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
FAIL_STACK_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* close the destination datatype */
@@ -2078,14 +2079,14 @@ error:
static int
test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- hid_t aid = -1; /* Attribute ID */
- hid_t sid = -1; /* Dataspace ID */
- hsize_t dims[2] = {3, 4}; /* Dataspace dimensions */
- H5O_info2_t oinfo, oinfo2; /* Object info */
- H5G_info_t ginfo; /* Group info */
- hbool_t same_type;
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dims[2] = {3, 4}; /* Dataspace dimensions */
+ H5O_info2_t oinfo, oinfo2; /* Object info */
+ H5G_info_t ginfo; /* Group info */
+ bool same_type;
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -2164,7 +2165,7 @@ test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
FAIL_STACK_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* close the source datatype */
@@ -2180,7 +2181,7 @@ test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* verify that the attribute's datatype is committed */
- if (H5Tcommitted(tid) != TRUE)
+ if (H5Tcommitted(tid) != true)
TEST_ERROR;
/* verify that the tokens of the datatypes are the same */
@@ -2189,16 +2190,16 @@ test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
if (H5Oget_info3(tid2, &oinfo2, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- same_type = TRUE;
+ same_type = true;
if (oinfo.fileno == oinfo2.fileno) {
int token_cmp;
if (H5Otoken_cmp(tid2, &oinfo.token, &oinfo2.token, &token_cmp) < 0)
TEST_ERROR;
if (token_cmp)
- same_type = FALSE;
+ same_type = false;
}
else
- same_type = FALSE;
+ same_type = false;
if (!same_type)
FAIL_PUTS_ERROR("destination attribute does not use the same committed datatype");
@@ -2256,12 +2257,12 @@ error:
static int
test_copy_dataset_simple(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- hsize_t dim2d[2]; /* Dataset dimensions */
- int i, j; /* local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ int i, j; /* local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -2342,7 +2343,7 @@ test_copy_dataset_simple(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -2398,19 +2399,19 @@ error:
static int
test_copy_dataset_versionbounds(hid_t fcpl_src, hid_t fapl_src)
{
- hid_t fid_src = -1, fid_dst = -1; /* Source and destination file IDs */
- hid_t fapl_dst = -1; /* File access plist for dest file */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did_src = -1, did_dst = -1; /* Source and destination dataset IDs */
- int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- hsize_t dim2d[2]; /* Dataset dimensions */
- char src_fname[NAME_BUF_SIZE]; /* Name of source file */
- char dst_fname[NAME_BUF_SIZE]; /* Name of destination file */
- H5F_libver_t low, high; /* File format bounds */
- unsigned srcdset_layoutversion; /* Layout version of source dataset */
- int i, j; /* Local index variables */
- H5D_t *dsetp = NULL; /* Pointer to internal dset structure */
- herr_t ret; /* Generic return value */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* Source and destination file IDs */
+ hid_t fapl_dst = H5I_INVALID_HID; /* File access plist for dest file */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did_src = H5I_INVALID_HID, did_dst = H5I_INVALID_HID; /* Source and destination dataset IDs */
+ int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ char src_fname[NAME_BUF_SIZE]; /* Name of source file */
+ char dst_fname[NAME_BUF_SIZE]; /* Name of destination file */
+ H5F_libver_t low, high; /* File format bounds */
+ unsigned srcdset_layoutversion; /* Layout version of source dataset */
+ int i, j; /* Local index variables */
+ H5D_t *dsetp = NULL; /* Pointer to internal dset structure */
+ herr_t ret; /* Generic return value */
TESTING("H5Ocopy(): simple dataset with version bounds");
@@ -2542,7 +2543,7 @@ test_copy_dataset_versionbounds(hid_t fcpl_src, hid_t fapl_src)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did_src, did_dst, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did_src, did_dst, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* Close the datasets */
@@ -2595,12 +2596,12 @@ error:
static int
test_copy_dataset_simple_samefile(hid_t fcpl, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- hsize_t dim2d[2]; /* Dataset dimensions */
- int i, j; /* local index variables */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ int i, j; /* local index variables */
char filename[NAME_BUF_SIZE];
TESTING("H5Ocopy(): simple dataset within the same file");
@@ -2670,7 +2671,7 @@ test_copy_dataset_simple_samefile(hid_t fcpl, hid_t fapl)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -2715,13 +2716,12 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t test_open)
+test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim2d[2]; /* Dataset dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim2d[2]; /* Dataset dimensions */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -2803,7 +2803,7 @@ test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -2851,11 +2851,11 @@ error:
static int
test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim1d[1]; /* Dataset dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim1d[1]; /* Dataset dimensions */
typedef struct comp_t {
int a;
double d;
@@ -2954,7 +2954,7 @@ test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3003,18 +3003,18 @@ error:
static int
test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hsize_t max_dim1d[1]; /* Dataset max. dimensions */
- hsize_t dim2d[2]; /* Dataset dimensions */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
- float buf1d[DIM_SIZE_1]; /* Buffer for writing data */
- float buf2d[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int i, j; /* Local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hsize_t max_dim1d[1]; /* Dataset max. dimensions */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
+ float buf1d[DIM_SIZE_1]; /* Buffer for writing data */
+ float buf2d[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int i, j; /* Local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -3329,11 +3329,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf1d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf1d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3353,11 +3353,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf1d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf1d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3377,11 +3377,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3401,11 +3401,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3425,11 +3425,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3449,11 +3449,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3473,11 +3473,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3527,15 +3527,15 @@ error:
static int
test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hsize_t max_dim1d[1]; /* Dataset max. dimensions */
- hsize_t dim2d[2]; /* Dataset dimensions */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hsize_t max_dim1d[1]; /* Dataset max. dimensions */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -3829,11 +3829,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3853,11 +3853,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3877,11 +3877,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3901,11 +3901,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3925,11 +3925,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3949,11 +3949,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3973,11 +3973,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4027,21 +4027,21 @@ error:
static int
test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hsize_t new_dim1d[1]; /* Dataset dimensions */
- hsize_t max_dim1d[1]; /* Dataset max. dimensions */
- hsize_t dim2d[2]; /* Dataset dimensions */
- hsize_t new_dim2d[2]; /* Dataset dimensions */
- hsize_t max_dim2d[2]; /* Dataset max. dimensions */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
- float buf1d[DIM_SIZE_1]; /* Buffer for writing data */
- float buf2d[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int i, j; /* Local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hsize_t new_dim1d[1]; /* Dataset dimensions */
+ hsize_t max_dim1d[1]; /* Dataset max. dimensions */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ hsize_t new_dim2d[2]; /* Dataset dimensions */
+ hsize_t max_dim2d[2]; /* Dataset max. dimensions */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
+ float buf1d[DIM_SIZE_1]; /* Buffer for writing data */
+ float buf2d[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int i, j; /* Local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -4279,11 +4279,11 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4303,11 +4303,11 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_BT2, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_BT2, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4327,11 +4327,11 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4351,11 +4351,11 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4405,14 +4405,14 @@ static int
test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
#ifdef H5_HAVE_FILTER_DEFLATE
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim2d[2]; /* Dataset dimensions */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
- float buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int i, j; /* Local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
+ float buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int i, j; /* Local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -4425,7 +4425,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
(void)src_fapl;
(void)dst_fapl; /* Silence compiler */
SKIPPED();
- HDputs(" Deflation filter not available");
+ puts(" Deflation filter not available");
#else /* H5_HAVE_FILTER_DEFLATE */
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++)
@@ -4671,11 +4671,11 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4694,11 +4694,11 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED2, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4717,11 +4717,11 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED2_SINGLE, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4740,11 +4740,11 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED3_SINGLE, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4763,11 +4763,11 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED4_SINGLE, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4820,18 +4820,17 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t test_open)
+test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool test_open)
{
#ifdef H5_HAVE_FILTER_DEFLATE
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim2d[2]; /* Dataset dimensions */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
- float buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int i, j; /* Local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
+ float buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int i, j; /* Local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -4849,7 +4848,7 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
(void)src_fapl;
(void)dst_fapl; /* Silence compiler */
SKIPPED();
- HDputs(" Deflation filter not available");
+ puts(" Deflation filter not available");
#else /* H5_HAVE_FILTER_DEFLATE */
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++)
@@ -4945,11 +4944,11 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
TEST_ERROR;
/* H5Pset_chunk_opts() will set layout version to 4 which will use latest indexing available */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_FARRAY) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_FARRAY) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -5002,15 +5001,15 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t test_open)
+test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim2d[2]; /* Dataset dimensions */
- float buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int i, j; /* Local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ float buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int i, j; /* Local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -5110,7 +5109,7 @@ test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -5159,10 +5158,10 @@ error:
static int
test_copy_dataset_external(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
int i;
hsize_t size;
hsize_t dim1d[1];
@@ -5255,7 +5254,7 @@ test_copy_dataset_external(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -5305,10 +5304,10 @@ error:
static int
test_copy_dataset_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
int i;
hsize_t dim1d[1];
int buf[DIM_SIZE_1];
@@ -5397,7 +5396,7 @@ test_copy_dataset_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hi
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -5447,11 +5446,11 @@ error:
static int
test_copy_dataset_named_dtype_hier(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
int i;
hsize_t dim1d[1];
int buf[DIM_SIZE_1];
@@ -5560,7 +5559,7 @@ test_copy_dataset_named_dtype_hier(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -5612,11 +5611,11 @@ error:
static int
test_copy_dataset_named_dtype_hier_outside(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
int i;
hsize_t dim1d[1];
int buf[DIM_SIZE_1];
@@ -5725,7 +5724,7 @@ test_copy_dataset_named_dtype_hier_outside(hid_t fcpl_src, hid_t fcpl_dst, hid_t
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -5779,12 +5778,12 @@ error:
*/
static int
test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t test_open)
+ bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
int i;
hsize_t dim1d[1];
int buf[DIM_SIZE_1];
@@ -5901,7 +5900,7 @@ test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fa
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -5952,11 +5951,11 @@ error:
static int
test_copy_dataset_attr_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
int i;
hsize_t dim1d[1];
int buf[DIM_SIZE_1];
@@ -6068,7 +6067,7 @@ test_copy_dataset_attr_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -6120,14 +6119,14 @@ error:
static int
test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -6205,7 +6204,7 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -6225,7 +6224,7 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -6277,16 +6276,16 @@ error:
static int
test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -6391,11 +6390,11 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -6414,11 +6413,11 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL2, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -6438,7 +6437,7 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -6491,15 +6490,15 @@ error:
static int
test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -6587,7 +6586,7 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -6607,7 +6606,7 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -6659,11 +6658,11 @@ error:
static int
test_copy_attribute_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t aid = -1, aid2 = -1; /* Attribute IDs */
- hsize_t dim2d[2]; /* Dataset dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t aid = H5I_INVALID_HID, aid2 = H5I_INVALID_HID; /* Attribute IDs */
+ hsize_t dim2d[2]; /* Dataset dimensions */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -6742,7 +6741,7 @@ test_copy_attribute_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
if ((aid2 = H5Aopen_by_idx(did2, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_attribute(aid, aid2, H5P_DEFAULT, NULL, did) != TRUE)
+ if (compare_attribute(aid, aid2, H5P_DEFAULT, NULL, did) != true)
TEST_ERROR;
if (H5Aclose(aid) < 0)
TEST_ERROR;
@@ -6795,13 +6794,13 @@ error:
static int
attach_attribute_compound_vlstr(hid_t loc_id)
{
- hid_t aid = -1; /* Attribute ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t vl_str_tid = -1; /* Variable length string datatype ID */
- hid_t cmpd_tid = -1; /* Compound datatype ID */
- hsize_t dim1 = 1; /* Dimension size */
- typedef struct { /* Compound structure for the attribute */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t vl_str_tid = H5I_INVALID_HID; /* Variable length string datatype ID */
+ hid_t cmpd_tid = H5I_INVALID_HID; /* Compound datatype ID */
+ hsize_t dim1 = 1; /* Dimension size */
+ typedef struct { /* Compound structure for the attribute */
int i;
char *v;
} s1;
@@ -6836,11 +6835,11 @@ attach_attribute_compound_vlstr(hid_t loc_id)
goto done;
/* Write to the attribute */
- len = HDstrlen(ATTR_CMPD_STRING) + 1;
+ len = strlen(ATTR_CMPD_STRING) + 1;
buf.i = 9;
if (NULL == (buf.v = (char *)calloc(len, sizeof(char))))
goto done;
- HDstrncpy(buf.v, ATTR_CMPD_STRING, len);
+ strncpy(buf.v, ATTR_CMPD_STRING, len);
if (H5Awrite(aid, cmpd_tid, &buf) < 0)
goto done;
@@ -6876,10 +6875,10 @@ done:
static int
compare_attribute_compound_vlstr(hid_t loc, hid_t loc2)
{
- hid_t aid = -1, aid2 = -1; /* Attribute IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- hid_t sid = -1, sid2 = -1; /* Dataspace IDs */
- hid_t dxpl_id = -1;
+ hid_t aid = H5I_INVALID_HID, aid2 = H5I_INVALID_HID; /* Attribute IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t sid = H5I_INVALID_HID, sid2 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t dxpl_id = H5I_INVALID_HID;
typedef struct { /* Compound structure for the attribute */
int i;
char *v;
@@ -6916,9 +6915,9 @@ compare_attribute_compound_vlstr(hid_t loc, hid_t loc2)
/* Compare the attributes' data */
if (rbuf.i != rbuf2.i)
FAIL_STACK_ERROR;
- if (HDstrlen(rbuf.v) != HDstrlen(rbuf2.v))
+ if (strlen(rbuf.v) != strlen(rbuf2.v))
FAIL_STACK_ERROR;
- if (memcmp(rbuf.v, rbuf2.v, HDstrlen(rbuf.v)) != 0)
+ if (memcmp(rbuf.v, rbuf2.v, strlen(rbuf.v)) != 0)
FAIL_STACK_ERROR;
/* Reclaim vlen buffer */
@@ -6944,7 +6943,7 @@ compare_attribute_compound_vlstr(hid_t loc, hid_t loc2)
FAIL_STACK_ERROR;
if (H5Aclose(aid2) < 0)
FAIL_STACK_ERROR;
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
@@ -6960,7 +6959,7 @@ error:
H5Pclose(dxpl_id);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* compare_attribute_compound_vlstr() */
@@ -6981,14 +6980,14 @@ error:
static int
test_copy_attribute_compound_vlstr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t aid = -1, aid2 = -1; /* Attribute IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hsize_t dim2d[2]; /* Dataset dimensions */
- char src_filename[NAME_BUF_SIZE]; /* Source file name */
- char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t aid = H5I_INVALID_HID, aid2 = H5I_INVALID_HID; /* Attribute IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ char src_filename[NAME_BUF_SIZE]; /* Source file name */
+ char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
TESTING("H5Ocopy(): attribute with compound datatype consisting of variable length string");
@@ -7143,16 +7142,16 @@ static int
test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
#ifdef H5_HAVE_FILTER_DEFLATE
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- hsize_t dim2d[2]; /* Dataset dimensions */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
- hvl_t buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int i, j, k; /* Local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
+ hvl_t buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int i, j, k; /* Local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -7165,7 +7164,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
(void)src_fapl;
(void)dst_fapl; /* Silence compiler */
SKIPPED();
- HDputs(" Deflation filter not available");
+ puts(" Deflation filter not available");
#else /* H5_HAVE_FILTER_DEFLATE */
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++) {
@@ -7254,7 +7253,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -7274,7 +7273,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -7329,8 +7328,8 @@ error:
static int
test_copy_group_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -7389,7 +7388,7 @@ test_copy_group_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -7436,11 +7435,11 @@ error:
static int
test_copy_root_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t gid_sub = -1; /* Sub-group ID */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID; /* Sub-group ID */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -7542,7 +7541,7 @@ test_copy_root_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -7592,11 +7591,11 @@ error:
static int
test_copy_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t gid_sub = -1; /* Sub-group ID */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID; /* Sub-group ID */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -7698,7 +7697,7 @@ test_copy_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -7748,11 +7747,11 @@ error:
static int
test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t gid_sub = -1, gid_sub2; /* Sub-group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID, gid_sub2; /* Sub-group IDs */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j, k; /* Local index variables */
@@ -7796,17 +7795,17 @@ test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f
/* create nested sub-groups & datasets */
for (i = 0; i < NUM_SUB_GROUPS; i++) {
- HDsnprintf(objname, sizeof(objname), "Group #%d", i);
+ snprintf(objname, sizeof(objname), "Group #%d", i);
if ((gid_sub = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
for (j = 0; j < NUM_SUB_GROUPS; j++) {
- HDsnprintf(objname, sizeof(objname), "Group #%d", j);
+ snprintf(objname, sizeof(objname), "Group #%d", j);
if ((gid_sub2 = H5Gcreate2(gid_sub, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
for (k = 0; k < NUM_DATASETS; k++) {
- HDsnprintf(objname, sizeof(objname), "Dataset #%d", k);
+ snprintf(objname, sizeof(objname), "Dataset #%d", k);
/* add a dataset to the group */
if ((did = H5Dcreate2(gid_sub2, objname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT,
@@ -7864,7 +7863,7 @@ test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -7914,9 +7913,9 @@ error:
static int
test_copy_group_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t gid_sub = -1, gid_sub2 = -1; /* Sub-group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID, gid_sub2 = H5I_INVALID_HID; /* Sub-group IDs */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -7994,7 +7993,7 @@ test_copy_group_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -8048,11 +8047,11 @@ error:
static int
test_copy_group_wide_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t gid_sub = -1, gid_sub2 = -1; /* Sub-group IDs */
- unsigned u, v; /* Local index variables */
- char objname[NAME_BUF_SIZE]; /* Object name buffer */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID, gid_sub2 = H5I_INVALID_HID; /* Sub-group IDs */
+ unsigned u, v; /* Local index variables */
+ char objname[NAME_BUF_SIZE]; /* Object name buffer */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -8079,12 +8078,12 @@ test_copy_group_wide_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
/* create wide sub-group hierarchy, with multiple links to higher groups */
for (u = 0; u < NUM_WIDE_LOOP_GROUPS; u++) {
- HDsnprintf(objname, sizeof(objname), "%s-%u", NAME_GROUP_SUB, u);
+ snprintf(objname, sizeof(objname), "%s-%u", NAME_GROUP_SUB, u);
if ((gid_sub = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
for (v = 0; v < NUM_WIDE_LOOP_GROUPS; v++) {
- HDsnprintf(objname, sizeof(objname), "%s-%u", NAME_GROUP_SUB_SUB2, v);
+ snprintf(objname, sizeof(objname), "%s-%u", NAME_GROUP_SUB_SUB2, v);
if ((gid_sub2 = H5Gcreate2(gid_sub, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
@@ -8144,7 +8143,7 @@ test_copy_group_wide_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -8193,13 +8192,13 @@ error:
static int
test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1, fid_ext = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t plid = -1; /* Object copy plist ID */
- hsize_t dim2d[2];
- hsize_t dim1d[1];
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID, fid_ext = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t plid = H5I_INVALID_HID; /* Object copy plist ID */
+ hsize_t dim2d[2];
+ hsize_t dim1d[1];
H5L_info2_t linfo;
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -8382,7 +8381,7 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
TEST_ERROR;
if ((did2 = H5Dopen2(fid_dst, NAME_LINK_SOFT, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* Delete expanded dataset, add soft link */
@@ -8415,7 +8414,7 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
TEST_ERROR;
if ((did2 = H5Dopen2(fid_dst, NAME_LINK_EXTERN, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* Delete expanded dataset, add external link */
@@ -8435,7 +8434,7 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
} /* end if */
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -8459,7 +8458,7 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
TEST_ERROR;
/* Compare the groups */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* Close groups */
@@ -8517,12 +8516,12 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t test_open)
+test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t gid = -1; /* Group ID */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -8625,7 +8624,7 @@ test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fa
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -8674,10 +8673,10 @@ error:
static int
test_copy_ext_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1, fid_ext = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t gid = -1; /* Group ID */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID, fid_ext = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -8782,7 +8781,7 @@ test_copy_ext_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -8836,13 +8835,13 @@ error:
static int
test_copy_exist(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset IDs */
- int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- hsize_t dim2d[2]; /* Dataset dimensions */
- int i, j; /* local index variables */
- herr_t ret; /* Generic return value */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset IDs */
+ int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ int i, j; /* local index variables */
+ herr_t ret; /* Generic return value */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -8960,14 +8959,14 @@ error:
static int
test_copy_path(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t gid = -1; /* Group ID */
- int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- hsize_t dim2d[2]; /* Dataset dimensions */
- int i, j; /* local index variables */
- herr_t ret; /* Generic return value */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ int i, j; /* local index variables */
+ herr_t ret; /* Generic return value */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -9073,7 +9072,7 @@ test_copy_path(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -9122,8 +9121,8 @@ error:
static int
test_copy_same_file_named_datatype(hid_t fcpl_src, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
char filename[NAME_BUF_SIZE];
TESTING("H5Ocopy(): named datatype in same file");
@@ -9155,7 +9154,7 @@ test_copy_same_file_named_datatype(hid_t fcpl_src, hid_t fapl)
FAIL_STACK_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* close the destination datatype */
@@ -9199,11 +9198,11 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_old_layout(hid_t fcpl_dst, hid_t fapl, hbool_t test_open)
+test_copy_old_layout(hid_t fcpl_dst, hid_t fapl, bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t src_fapl = -1; /* Source file FAPL ID */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t src_fapl = H5I_INVALID_HID; /* Source file FAPL ID */
const char *src_filename = H5_get_srcdir_filename(FILE_OLD_LAYOUT); /* Corrected test file name */
char dst_filename[NAME_BUF_SIZE];
@@ -9262,7 +9261,7 @@ test_copy_old_layout(hid_t fcpl_dst, hid_t fapl, hbool_t test_open)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -9311,15 +9310,15 @@ error:
static int
test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid_copy = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid_copy = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -9419,7 +9418,7 @@ test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -9439,7 +9438,7 @@ test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid_copy, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -9493,14 +9492,14 @@ error:
static int
test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid_copy = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid_copy = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -9590,7 +9589,7 @@ test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -9610,7 +9609,7 @@ test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid_copy, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -9665,18 +9664,18 @@ error:
*/
static int
test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t test_open)
+ bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid_copy = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid_copy = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -9786,7 +9785,7 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -9806,7 +9805,7 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid_copy, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -9860,16 +9859,16 @@ error:
static int
test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid_copy = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid_copy = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -9971,7 +9970,7 @@ test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -9991,7 +9990,7 @@ test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid_copy, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -10045,16 +10044,16 @@ error:
static int
test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j, k; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
- hvl_t *tvl; /* Temporary pointer to VL information */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j, k; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hvl_t *tvl; /* Temporary pointer to VL information */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -10158,7 +10157,7 @@ test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -10178,7 +10177,7 @@ test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -10235,19 +10234,18 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t test_open)
+test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j, k; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
- hvl_t *tvl; /* Temporary pointer to VL information */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j, k; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hvl_t *tvl; /* Temporary pointer to VL information */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -10358,7 +10356,7 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -10378,7 +10376,7 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -10434,15 +10432,15 @@ error:
static int
test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j, k; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j, k; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
hvl_t *tvl; /* Temporary pointer to VL information */
hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
char src_filename[NAME_BUF_SIZE];
@@ -10563,11 +10561,11 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL_VL, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -10586,11 +10584,11 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL_VL2, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -10610,7 +10608,7 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -10668,17 +10666,17 @@ error:
*/
static int
test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t test_open)
+ bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j, k; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j, k; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
hvl_t *tvl; /* Temporary pointer to VL information */
hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
char src_filename[NAME_BUF_SIZE];
@@ -10794,7 +10792,7 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -10814,7 +10812,7 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -10879,16 +10877,16 @@ typedef struct cmpd_vl_t {
static int
test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t tid2 = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t did2 = -1; /* Dataset ID */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t tid2 = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t did2 = H5I_INVALID_HID; /* Dataset ID */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -10977,7 +10975,7 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -10997,7 +10995,7 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -11052,16 +11050,16 @@ error:
static int
test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
- cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -11159,7 +11157,7 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -11179,7 +11177,7 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -11235,15 +11233,15 @@ error:
static int
test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -11341,7 +11339,7 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -11361,7 +11359,7 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -11421,14 +11419,14 @@ error:
static int
test_copy_null_ref(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Object copy property list ID */
- hid_t did1 = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim1d[1] = {2}; /* Dataset dimensions */
- hobj_ref_t obj_buf[2]; /* Buffer for object refs */
- hdset_reg_ref_t reg_buf[2]; /* Buffer for region refs */
- char zeros[MAX(sizeof(obj_buf), sizeof(reg_buf))]; /* Array of zeros, for memcmp */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Object copy property list ID */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim1d[1] = {2}; /* Dataset dimensions */
+ hobj_ref_t obj_buf[2]; /* Buffer for object refs */
+ hdset_reg_ref_t reg_buf[2]; /* Buffer for region refs */
+ char zeros[MAX(sizeof(obj_buf), sizeof(reg_buf))]; /* Array of zeros, for memcmp */
char src_filename[NAME_BUF_SIZE];
char mid_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -11612,18 +11610,18 @@ error:
static int
test_copy_null_ref_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid1 = -1, fid2 = -1, fid3 = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Object copy property list ID */
- hid_t did1 = -1, did2 = -1; /* Dataset IDs */
- hid_t did3 = -1, did4 = -1; /* Dataset IDs */
- hid_t did5 = -1, did6 = -1; /* Dataset IDs */
- hid_t dcpl = -1; /* Dataset creation property list */
- hsize_t chunk_dim1d[1] = {2}; /* Chunk dimensions */
- hsize_t dim1d[1] = {3}; /* Dataset dimensions */
- hobj_ref_t obj_buf[3]; /* Buffer for object refs */
- hdset_reg_ref_t reg_buf[3]; /* Buffer for region refs */
- char zeros[MAX(sizeof(obj_buf), sizeof(reg_buf))]; /* Array of zeros, for memcmp */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID, fid3 = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Object copy property list ID */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t did3 = H5I_INVALID_HID, did4 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t did5 = H5I_INVALID_HID, did6 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hsize_t chunk_dim1d[1] = {2}; /* Chunk dimensions */
+ hsize_t dim1d[1] = {3}; /* Dataset dimensions */
+ hobj_ref_t obj_buf[3]; /* Buffer for object refs */
+ hdset_reg_ref_t reg_buf[3]; /* Buffer for region refs */
+ char zeros[MAX(sizeof(obj_buf), sizeof(reg_buf))]; /* Array of zeros, for memcmp */
char src_filename[NAME_BUF_SIZE];
char mid_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -11817,9 +11815,9 @@ error:
static int
test_copy_attr_crt_order(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gcplid = -1; /* Group creation property list ID */
- hid_t gid1 = -1, gid2 = -1; /* Group IDs */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gcplid = H5I_INVALID_HID; /* Group creation property list ID */
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -11889,7 +11887,7 @@ test_copy_attr_crt_order(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
TEST_ERROR;
/* Compare the attributes */
- if (compare_std_attributes(gid1, gid2, H5P_DEFAULT) != TRUE)
+ if (compare_std_attributes(gid1, gid2, H5P_DEFAULT) != true)
TEST_ERROR;
/* Close groups */
@@ -11905,7 +11903,7 @@ test_copy_attr_crt_order(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
TEST_ERROR;
/* Compare the attributes */
- if (compare_std_attributes(gid1, gid2, H5P_DEFAULT) != TRUE)
+ if (compare_std_attributes(gid1, gid2, H5P_DEFAULT) != true)
TEST_ERROR;
/* Close groups */
@@ -11948,18 +11946,18 @@ error:
*/
static int
test_copy_committed_datatype_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t reopen)
+ bool reopen)
{
- hid_t fid_src1 = -1, fid_src2 = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid_src1 = H5I_INVALID_HID, fid_src2 = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char src1_filename[NAME_BUF_SIZE];
char src2_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -12264,19 +12262,19 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reopen)
+test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, bool reopen)
{
- hid_t fid = -1; /* File ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1; /* Group ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char filename[NAME_BUF_SIZE];
int token_cmp;
@@ -12657,19 +12655,18 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t reopen)
+test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
int token_cmp;
@@ -12952,21 +12949,20 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_committed_dt_merge_attr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t reopen)
+test_copy_committed_dt_merge_attr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t gid = -1; /* Group ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
int token_cmp;
@@ -13224,25 +13220,25 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t reopen)
+test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1; /* Group IDs */
- hid_t f_tid = -1; /* Datatype ID for root group */
- hid_t g_tid = -1; /* Datatype ID for group */
- hid_t anon_tid = -1; /* Anonymous datatype */
- hid_t aid = -1; /* Attribute ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- int i; /* Local index variable */
- hsize_t dim1d[1]; /* dimension sizes */
- int buf[DIM_SIZE_1]; /* Buffer for data */
- H5O_token_t exp_token_int, exp_token_short; /* Expected object tokenes */
- H5O_info2_t oinfo; /* Object info */
- char src_filename[NAME_BUF_SIZE]; /* Source file name */
- char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
+ hid_t f_tid = H5I_INVALID_HID; /* Datatype ID for root group */
+ hid_t g_tid = H5I_INVALID_HID; /* Datatype ID for group */
+ hid_t anon_tid = H5I_INVALID_HID; /* Anonymous datatype */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ int i; /* Local index variable */
+ hsize_t dim1d[1]; /* dimension sizes */
+ int buf[DIM_SIZE_1]; /* Buffer for data */
+ H5O_token_t exp_token_int, exp_token_short; /* Expected object tokenes */
+ H5O_info2_t oinfo; /* Object info */
+ char src_filename[NAME_BUF_SIZE]; /* Source file name */
+ char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
int token_cmp;
if (reopen)
@@ -13694,20 +13690,20 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t reopen)
+test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid1 = -1, tid2 = -1; /* Datatype IDs */
- hid_t tid3 = -1, tid4 = -1; /* Datatype IDs */
- hid_t tid5 = -1, tid = -1; /* Datatype IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- hsize_t dim1d[1]; /* dimension sizes */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
- char src_filename[NAME_BUF_SIZE]; /* Source file name */
- char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid1 = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t tid3 = H5I_INVALID_HID, tid4 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t tid5 = H5I_INVALID_HID, tid = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ hsize_t dim1d[1]; /* dimension sizes */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
+ char src_filename[NAME_BUF_SIZE]; /* Source file name */
+ char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
int token_cmp;
if (reopen)
@@ -14007,13 +14003,13 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t reopen)
+test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
int token_cmp;
@@ -14320,18 +14316,18 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t reopen)
+test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
int token_cmp;
@@ -14693,19 +14689,19 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t reopen)
+test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t gid = -1; /* Group ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t did = -1; /* Dataset ID */
- hid_t exp_did = -1; /* Dataset ID */
- hid_t tid_short = -1; /* Datatype ID */
- hid_t exp_tid = -1; /* Expected datatype ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- hsize_t dim1d[1]; /* Dataset dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t exp_did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t tid_short = H5I_INVALID_HID; /* Datatype ID */
+ hid_t exp_tid = H5I_INVALID_HID; /* Expected datatype ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ hsize_t dim1d[1]; /* Dataset dimensions */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -15336,18 +15332,18 @@ mcdt_search_cb(void *_udata)
} /* mcdt_search_cb() */
static int
-test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t reopen)
+test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
mcdt_search_cb_ud cb_udata; /* User data for callback */
@@ -15808,17 +15804,16 @@ mcdt_search_cbB(void *_udata)
/* The main test function */
static int
-test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t reopen)
+test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
H5O_mcdt_search_cb_t mcdt_cb = NULL; /* The callback function */
@@ -16222,8 +16217,8 @@ error:
static int
test_copy_iterate(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gid = -1; /* Group ID */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
int i;
char grp_name[16];
char src_filename[NAME_BUF_SIZE];
@@ -16244,7 +16239,7 @@ test_copy_iterate(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl
/* Create groups */
for (i = 0; i < 9; i++) {
- HDsnprintf(grp_name, sizeof(grp_name), "grp%d", i);
+ snprintf(grp_name, sizeof(grp_name), "grp%d", i);
if ((gid = H5Gcreate2(fid1, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(gid) < 0)
@@ -16307,16 +16302,16 @@ error:
*/
static int
test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, unsigned flag,
- hbool_t crt_intermediate_grp, const char *test_desciption)
+ bool crt_intermediate_grp, const char *test_desciption)
{
- hid_t fid_src = -1, fid_dst = -1, fid_ext = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1, gid_ref = -1; /* Group IDs */
- hid_t gid_sub = -1, gid_sub_sub = -1; /* Sub-group ID */
- hid_t pid = -1, lcpl_id = -1; /* Property IDs */
- unsigned cpy_flags; /* Object copy flags */
- int depth = -1; /* Copy depth */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID, fid_ext = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID, gid_ref = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID, gid_sub_sub = H5I_INVALID_HID; /* Sub-group ID */
+ hid_t pid = H5I_INVALID_HID, lcpl_id = H5I_INVALID_HID; /* Property IDs */
+ unsigned cpy_flags; /* Object copy flags */
+ int depth = -1; /* Copy depth */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -16554,7 +16549,7 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
/* Create link creation plist to pass in intermediate group creation */
if ((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0)
TEST_ERROR;
- if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0)
+ if (H5Pset_create_intermediate_group(lcpl_id, true) < 0)
TEST_ERROR;
if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, "/new_g0/new_g00", pid, lcpl_id) < 0)
@@ -16634,7 +16629,7 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
} /* end else */
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, pid, depth, flag) != TRUE)
+ if (compare_groups(gid, gid2, pid, depth, flag) != true)
TEST_ERROR;
if (H5Gclose(gid2) < 0)
TEST_ERROR;
@@ -16715,18 +16710,18 @@ error:
static int
test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t did3 = -1, did4 = -1; /* Dataset IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t pid = -1; /* Dataset creation property list */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimension sizes */
- int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int newbuf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- hsize_t dim2d[2]; /* Dataset dimensions */
- int i, j; /* local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t did3 = H5I_INVALID_HID, did4 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimension sizes */
+ int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int newbuf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ int i, j; /* local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -16818,9 +16813,9 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did3, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did3, H5P_DEFAULT, buf) != true)
TEST_ERROR;
- if (compare_datasets(did2, did4, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did2, did4, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the copied dataset */
@@ -16845,9 +16840,9 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did3, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did3, H5P_DEFAULT, buf) != true)
TEST_ERROR;
- if (compare_datasets(did2, did4, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did2, did4, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the copied dataset in DST file */
@@ -16893,9 +16888,9 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did3, H5P_DEFAULT, newbuf) != TRUE)
+ if (compare_datasets(did, did3, H5P_DEFAULT, newbuf) != true)
TEST_ERROR;
- if (compare_datasets(did2, did4, H5P_DEFAULT, newbuf) != TRUE)
+ if (compare_datasets(did2, did4, H5P_DEFAULT, newbuf) != true)
TEST_ERROR;
/* close the copied dataset in SRC file */
@@ -16919,9 +16914,9 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did3, H5P_DEFAULT, newbuf) != TRUE)
+ if (compare_datasets(did, did3, H5P_DEFAULT, newbuf) != true)
TEST_ERROR;
- if (compare_datasets(did2, did4, H5P_DEFAULT, newbuf) != TRUE)
+ if (compare_datasets(did2, did4, H5P_DEFAULT, newbuf) != true)
TEST_ERROR;
/* close the copied dataset in DST file */
@@ -16977,7 +16972,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the copied dataset in SRC file */
@@ -16997,7 +16992,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the copied dataset in DST file */
@@ -17043,7 +17038,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the DST dataset */
@@ -17062,7 +17057,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the group in DST file */
@@ -17130,10 +17125,10 @@ main(void)
int configuration; /* Configuration of tests. */
int ExpressMode;
const char *env_h5_drvr; /* File Driver value from environment */
- hbool_t same_file; /* Whether to run tests that only use one file */
- hbool_t driver_is_default_compatible;
+ bool same_file; /* Whether to run tests that only use one file */
+ bool driver_is_default_compatible;
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -17179,10 +17174,10 @@ main(void)
hid_t fcpl_src;
hid_t fcpl_dst;
- /* Start with same_file == TRUE. Use source file settings for these
+ /* Start with same_file == true. Use source file settings for these
* tests. Don't run with a non-default destination file setting, as
* destination settings have no effect. */
- same_file = TRUE;
+ same_file = true;
/* No need to test dense attributes with old format */
if (!(configuration & CONFIG_SRC_NEW_FORMAT) && (configuration & CONFIG_DENSE))
@@ -17190,52 +17185,52 @@ main(void)
/* Test with and without shared messages */
if (configuration & CONFIG_SHARE_SRC) {
- HDputs("\nTesting with shared src messages:");
+ puts("\nTesting with shared src messages:");
fcpl_src = fcpl_shared;
}
else {
- HDputs("\nTesting without shared src messages:");
+ puts("\nTesting without shared src messages:");
fcpl_src = H5P_DEFAULT;
}
if (configuration & CONFIG_SHARE_DST) {
- HDputs("Testing with shared dst messages:");
+ puts("Testing with shared dst messages:");
fcpl_dst = fcpl_shared;
- same_file = FALSE;
+ same_file = false;
}
else {
- HDputs("Testing without shared dst messages:");
+ puts("Testing without shared dst messages:");
fcpl_dst = H5P_DEFAULT;
}
/* Set the FAPL for the source file's type of format */
if (configuration & CONFIG_SRC_NEW_FORMAT) {
- HDputs("Testing with latest format for source file:");
+ puts("Testing with latest format for source file:");
src_fapl = fapl2;
/* Test with and without dense attributes */
if (configuration & CONFIG_DENSE) {
- HDputs("Testing with dense attributes:");
+ puts("Testing with dense attributes:");
num_attributes_g = max_compact + 1;
}
else {
- HDputs("Testing without dense attributes:");
+ puts("Testing without dense attributes:");
num_attributes_g = MAX(min_dense, 2) - 2;
}
} /* end if */
else {
- HDputs("Testing with oldest file format for source file:");
+ puts("Testing with oldest file format for source file:");
src_fapl = fapl;
num_attributes_g = 4;
} /* end else */
/* Set the FAPL for the destination file's type of format */
if (configuration & CONFIG_DST_NEW_FORMAT) {
- HDputs("Testing with latest format for destination file:");
+ puts("Testing with latest format for destination file:");
dst_fapl = fapl2;
- same_file = FALSE;
+ same_file = false;
} /* end if */
else {
- HDputs("Testing with oldest file format for destination file:");
+ puts("Testing with oldest file format for destination file:");
dst_fapl = fapl;
} /* end else */
@@ -17245,8 +17240,8 @@ main(void)
nerrors += test_copy_dataset_simple_samefile(fcpl_src, src_fapl);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_dataset_simple_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_simple_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_simple_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_simple_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
nerrors += test_copy_dataset_compound(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_chunked(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
@@ -17255,15 +17250,15 @@ main(void)
nerrors += test_copy_dataset_compressed(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_dataset_no_edge_filt(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_no_edge_filt(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_no_edge_filt(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_no_edge_filt(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_dataset_compact(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_compact(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_compact(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_compact(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
- nerrors += test_copy_dataset_multi_ohdr_chunks(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_multi_ohdr_chunks(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_multi_ohdr_chunks(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_multi_ohdr_chunks(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
nerrors += test_copy_dataset_attr_named_dtype(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
@@ -17276,8 +17271,8 @@ main(void)
nerrors += test_copy_group_links(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_soft_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_soft_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_soft_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_soft_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
nerrors += test_copy_ext_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_exist(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
@@ -17287,30 +17282,30 @@ main(void)
nerrors += test_copy_attr_crt_order(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
- nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_WITHOUT_ATTR_FLAG, FALSE,
+ nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_WITHOUT_ATTR_FLAG, false,
"H5Ocopy(): without attributes");
- nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, 0, TRUE,
+ nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, 0, true,
"H5Ocopy(): with missing groups");
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_EXPAND_SOFT_LINK_FLAG,
- FALSE, "H5Ocopy(): expand soft link");
+ false, "H5Ocopy(): expand soft link");
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_EXPAND_EXT_LINK_FLAG,
- FALSE, "H5Ocopy(): expand external link");
+ false, "H5Ocopy(): expand external link");
/* Splitter VFD currently has external link-related bugs */
- if (HDstrcmp(env_h5_drvr, "splitter")) {
+ if (strcmp(env_h5_drvr, "splitter")) {
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl,
- H5O_COPY_EXPAND_SOFT_LINK_FLAG | H5O_COPY_EXPAND_EXT_LINK_FLAG, FALSE,
+ H5O_COPY_EXPAND_SOFT_LINK_FLAG | H5O_COPY_EXPAND_EXT_LINK_FLAG, false,
"H5Ocopy(): expand soft and external links");
}
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_SHALLOW_HIERARCHY_FLAG,
- FALSE, "H5Ocopy(): shallow group copy");
+ false, "H5Ocopy(): shallow group copy");
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_EXPAND_REFERENCE_FLAG,
- FALSE, "H5Ocopy(): expand object reference");
+ false, "H5Ocopy(): expand object reference");
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_PRESERVE_NULL_FLAG,
- FALSE, "H5Ocopy(): preserve NULL messages");
+ false, "H5Ocopy(): preserve NULL messages");
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl,
- H5O_COPY_WITHOUT_ATTR_FLAG | H5O_COPY_PRESERVE_NULL_FLAG, TRUE,
+ H5O_COPY_WITHOUT_ATTR_FLAG | H5O_COPY_PRESERVE_NULL_FLAG, true,
"H5Ocopy(): preserve NULL messages");
nerrors += test_copy_dataset_open(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
@@ -17324,7 +17319,7 @@ main(void)
nerrors += test_copy_named_datatype_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
/* Loop over reopening the file */
- for (reopen = FALSE; reopen <= TRUE; reopen++) {
+ for (reopen = false; reopen <= true; reopen++) {
nerrors += test_copy_committed_datatype_merge(fcpl_src, fcpl_dst, src_fapl, dst_fapl, reopen);
if (same_file)
@@ -17358,21 +17353,21 @@ main(void)
nerrors += test_copy_dataset_contig_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_dataset_chunked_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_chunked_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_chunked_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_chunked_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
nerrors += test_copy_dataset_compressed_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_compact_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_dataset_contig_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_contig_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_contig_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_contig_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
nerrors += test_copy_dataset_chunked_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_dataset_compressed_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_compressed_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_compressed_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_compressed_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
nerrors += test_copy_dataset_contig_cmpd_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_chunked_cmpd_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
@@ -17382,8 +17377,8 @@ main(void)
if (driver_is_default_compatible) {
/* Test with dataset opened in the file or not */
- nerrors += test_copy_old_layout(fcpl_dst, dst_fapl, FALSE);
- nerrors += test_copy_old_layout(fcpl_dst, dst_fapl, TRUE);
+ nerrors += test_copy_old_layout(fcpl_dst, dst_fapl, false);
+ nerrors += test_copy_old_layout(fcpl_dst, dst_fapl, true);
}
/* Test with dataset opened in the file or not */
@@ -17412,7 +17407,7 @@ main(void)
exit(EXIT_FAILURE);
} /* end if */
- HDputs("All object copying tests passed.");
+ puts("All object copying tests passed.");
/* close property list.
* NOTE: if this property list is not closed and the test is
diff --git a/test/objcopy_ref.c b/test/objcopy_ref.c
index 7a81aea..58326d5 100644
--- a/test/objcopy_ref.c
+++ b/test/objcopy_ref.c
@@ -112,28 +112,28 @@ token_insert(H5O_info2_t *oinfo)
*
* Purpose: Check if a token has already been encountered
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: (can't fail)
*
*-------------------------------------------------------------------------
*/
-static H5_ATTR_PURE hbool_t
+static H5_ATTR_PURE bool
token_lookup(hid_t loc_id, H5O_info2_t *oinfo)
{
size_t n;
int token_cmp;
if (oinfo->rc < 2)
- return FALSE; /*only one link possible*/
+ return false; /*only one link possible*/
for (n = 0; n < idtab_g.nobjs; n++) {
if (H5Otoken_cmp(loc_id, &(idtab_g.obj[n]), &oinfo->token, &token_cmp) < 0)
- return FALSE;
+ return false;
if (0 == token_cmp)
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
} /* end token_lookup() */
/*-------------------------------------------------------------------------
@@ -166,9 +166,10 @@ token_reset(void)
static herr_t
attach_ref_attr(hid_t file_id, hid_t loc_id)
{
- char dsetname1[] = "dataset1_pointed_by_ref_attr";
- char dsetname2[] = "dataset2_pointed_by_ref_attr";
- hid_t did1 = (-1), did2 = (-1), aid = (-1), sid = (-1), sid_ref = (-1);
+ char dsetname1[] = "dataset1_pointed_by_ref_attr";
+ char dsetname2[] = "dataset2_pointed_by_ref_attr";
+ hid_t did1 = (H5I_INVALID_HID), did2 = (H5I_INVALID_HID), aid = (H5I_INVALID_HID),
+ sid = (H5I_INVALID_HID), sid_ref = (H5I_INVALID_HID);
hsize_t dims[2] = {2, 9};
hsize_t dims_ref[1] = {2};
H5R_ref_t ref[2];
@@ -247,10 +248,10 @@ static herr_t
attach_reg_ref_attr(hid_t file_id, hid_t loc_id)
{
const char dsetnamev[] = "dataset_pointed_by_reg_ref_attr";
- hid_t aid = (-1);
- hid_t space_id = (-1); /* dataspace identifiers */
- hid_t spacer_id = (-1); /* dataspace identifiers */
- hid_t dsetv_id = (-1); /*dataset identifiers*/
+ hid_t aid = (H5I_INVALID_HID);
+ hid_t space_id = (H5I_INVALID_HID); /* dataspace identifiers */
+ hid_t spacer_id = (H5I_INVALID_HID); /* dataspace identifiers */
+ hid_t dsetv_id = (H5I_INVALID_HID); /*dataset identifiers*/
hsize_t dims[2] = {2, 9};
hsize_t dimsr[1] = {2};
int rank = 2;
@@ -347,10 +348,10 @@ create_reg_ref_dataset(hid_t file_id, hid_t loc_id)
const char dsetnamer[] = "dataset_with_reg_ref";
const char dsetnamer1[] = "compact_dataset_with_reg_ref";
const char dsetnamer2[] = "compressed_dataset_with_reg_ref";
- hid_t space_id = (-1); /* dataspace identifiers */
- hid_t spacer_id = (-1);
- hid_t dsetv_id = (-1); /*dataset identifiers*/
- hid_t dsetr_id = (-1);
+ hid_t space_id = (H5I_INVALID_HID); /* dataspace identifiers */
+ hid_t spacer_id = (H5I_INVALID_HID);
+ hid_t dsetv_id = (H5I_INVALID_HID); /*dataset identifiers*/
+ hid_t dsetr_id = (H5I_INVALID_HID);
hsize_t dims[2] = {2, 9};
hsize_t dimsr[1] = {2};
int rank = 2;
@@ -362,7 +363,7 @@ create_reg_ref_dataset(hid_t file_id, hid_t loc_id)
hsize_t count[2];
hsize_t coord[3][2] = {{0, 0}, {1, 6}, {0, 8}};
size_t num_points = 3;
- hid_t pid = (-1);
+ hid_t pid = (H5I_INVALID_HID);
if ((space_id = H5Screate_simple(rank, dims, NULL)) < 0)
TEST_ERROR;
@@ -471,11 +472,11 @@ error:
static int
test_copy_attach_attributes(hid_t loc_id, hid_t type_id)
{
- hid_t aid = -1, sid = -1;
+ hid_t aid = H5I_INVALID_HID, sid = H5I_INVALID_HID;
char attr_name[ATTR_NAME_LEN];
int attr_data[2];
hsize_t dim1 = 2;
- hid_t acpl = -1;
+ hid_t acpl = H5I_INVALID_HID;
unsigned u;
int ret_value = -1;
@@ -487,7 +488,7 @@ test_copy_attach_attributes(hid_t loc_id, hid_t type_id)
goto done;
for (u = 0; u < num_attributes_g; u++) {
- HDsnprintf(attr_name, sizeof(attr_name), "%u attr", u);
+ snprintf(attr_name, sizeof(attr_name), "%u attr", u);
/* Set attribute data */
attr_data[0] = (int)(100 * u);
@@ -531,23 +532,23 @@ done:
*
* Purpose: Compare two attributes to check that they are equal
*
- * Return: TRUE if attributes are equal/FALSE if they are different
+ * Return: true if attributes are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
static int
compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_owner)
{
- hid_t sid = -1, sid2 = -1; /* Dataspace IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- size_t elmt_size; /* Size of datatype */
- htri_t is_committed; /* If the datatype is committed */
- htri_t is_committed2; /* If the datatype is committed */
- H5A_info_t ainfo; /* Attribute info */
- H5A_info_t ainfo2; /* Attribute info */
- hssize_t nelmts; /* # of elements in dataspace */
- void *rbuf = NULL; /* Buffer for reading raw data */
- void *rbuf2 = NULL; /* Buffer for reading raw data */
+ hid_t sid = H5I_INVALID_HID, sid2 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ size_t elmt_size; /* Size of datatype */
+ htri_t is_committed; /* If the datatype is committed */
+ htri_t is_committed2; /* If the datatype is committed */
+ H5A_info_t ainfo; /* Attribute info */
+ H5A_info_t ainfo2; /* Attribute info */
+ hssize_t nelmts; /* # of elements in dataspace */
+ void *rbuf = NULL; /* Buffer for reading raw data */
+ void *rbuf2 = NULL; /* Buffer for reading raw data */
/* Check the character sets are equal */
if (H5Aget_info(aid, &ainfo) < 0)
@@ -583,7 +584,7 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
TEST_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* Determine the size of datatype (for later) */
@@ -601,7 +602,7 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
TEST_ERROR;
/* Compare the dataspaces */
- if (H5Sextent_equal(sid, sid2) != TRUE)
+ if (H5Sextent_equal(sid, sid2) != true)
TEST_ERROR;
/* Determine the number of elements in dataspace (for later) */
@@ -636,10 +637,10 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
TEST_ERROR;
/* Reclaim vlen data, if necessary */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE || H5Tdetect_class(tid, H5T_REFERENCE) == TRUE)
+ if (H5Tdetect_class(tid, H5T_VLEN) == true || H5Tdetect_class(tid, H5T_REFERENCE) == true)
if (H5Treclaim(tid, sid, H5P_DEFAULT, rbuf) < 0)
TEST_ERROR;
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE || H5Tdetect_class(tid2, H5T_REFERENCE) == TRUE)
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true || H5Tdetect_class(tid2, H5T_REFERENCE) == true)
if (H5Treclaim(tid2, sid2, H5P_DEFAULT, rbuf2) < 0)
TEST_ERROR;
@@ -665,7 +666,7 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
if (H5Tclose(tid2) < 0)
TEST_ERROR;
- return TRUE;
+ return true;
error:
if (rbuf)
@@ -680,7 +681,7 @@ error:
H5Tclose(tid);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_attribute() */
/*-------------------------------------------------------------------------
@@ -688,7 +689,7 @@ error:
*
* Purpose: Compare "standard" attributes on two objects to check that they are equal
*
- * Return: TRUE if objects have same attributes/FALSE if they are different
+ * Return: true if objects have same attributes/false if they are different
*
* Note: This isn't very general, the attributes are assumed to be
* those written in test_copy_attach_attributes().
@@ -698,9 +699,9 @@ error:
static int
compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid)
{
- hid_t aid = -1, aid2 = -1; /* Attribute IDs */
- H5O_info2_t oinfo1, oinfo2; /* Object info */
- unsigned cpy_flags; /* Object copy flags */
+ hid_t aid = H5I_INVALID_HID, aid2 = H5I_INVALID_HID; /* Attribute IDs */
+ H5O_info2_t oinfo1, oinfo2; /* Object info */
+ unsigned cpy_flags; /* Object copy flags */
/* Retrieve the object copy flags from the property list, if it's non-DEFAULT */
if (pid != H5P_DEFAULT) {
@@ -755,7 +756,7 @@ compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid)
} /* end if */
/* Objects should be the same. :-) */
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
@@ -764,7 +765,7 @@ error:
H5Aclose(aid);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_std_attributes() */
/*-------------------------------------------------------------------------
@@ -772,7 +773,7 @@ error:
*
* Purpose: Compare two buffers of data to check that they are equal
*
- * Return: TRUE if buffer are equal/FALSE if they are different
+ * Return: true if buffer are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
@@ -789,7 +790,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
/* If the type is a compound containing a vlen, loop over all elements for
* each compound member. Compounds containing reference are not supported
* yet. */
- if ((H5Tget_class(tid) == H5T_COMPOUND) && (H5Tdetect_class(tid, H5T_VLEN) == TRUE)) {
+ if ((H5Tget_class(tid) == H5T_COMPOUND) && (H5Tdetect_class(tid, H5T_VLEN) == true)) {
hid_t memb_id; /* Member id */
const uint8_t *memb1; /* Pointer to current member */
const uint8_t *memb2; /* Pointer to current member */
@@ -852,7 +853,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
else {
/* vlens cannot currently be nested below the top layer of a
* compound */
- assert(H5Tdetect_class(memb_id, H5T_VLEN) == FALSE);
+ assert(H5Tdetect_class(memb_id, H5T_VLEN) == false);
/* Iterate over all elements, calling memcmp() for each */
for (elmt = 0; elmt < nelmts; elmt++) {
@@ -866,7 +867,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
} /* end else */
} /* end for */
}
- else if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ else if (H5Tdetect_class(tid, H5T_VLEN) == true) {
const hvl_t *vl_buf1, *vl_buf2; /* Aliases for buffers to compare */
hid_t base_tid; /* Base type of vlen datatype */
size_t u; /* Local index variable */
@@ -896,7 +897,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
if (H5Tclose(base_tid) < 0)
TEST_ERROR;
} /* end if */
- else if (H5Tdetect_class(tid, H5T_REFERENCE) == TRUE) {
+ else if (H5Tdetect_class(tid, H5T_REFERENCE) == true) {
size_t u; /* Local index variable */
/* Check for "simple" reference datatype */
@@ -946,24 +947,24 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
TEST_ERROR;
if (H5Oclose(obj2_id) < 0)
TEST_ERROR;
- return TRUE;
+ return true;
}
}
/* Check for types of objects handled */
switch (obj1_type) {
case H5O_TYPE_DATASET:
- if (compare_datasets(obj1_id, obj2_id, pid, NULL) != TRUE)
+ if (compare_datasets(obj1_id, obj2_id, pid, NULL) != true)
TEST_ERROR;
break;
case H5O_TYPE_GROUP:
- if (compare_groups(obj1_id, obj2_id, pid, -1, 0) != TRUE)
+ if (compare_groups(obj1_id, obj2_id, pid, -1, 0) != true)
TEST_ERROR;
break;
case H5O_TYPE_NAMED_DATATYPE:
- if (H5Tequal(obj1_id, obj2_id) != TRUE)
+ if (H5Tequal(obj1_id, obj2_id) != true)
TEST_ERROR;
break;
@@ -1010,10 +1011,10 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
TEST_ERROR;
/* Data should be the same. :-) */
- return TRUE;
+ return true;
error:
- return FALSE;
+ return false;
} /* end compare_data() */
/*-------------------------------------------------------------------------
@@ -1021,25 +1022,25 @@ error:
*
* Purpose: Compare two datasets to check that they are equal
*
- * Return: TRUE if datasets are equal/FALSE if they are different
+ * Return: true if datasets are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
static int
compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
{
- hid_t sid = -1, sid2 = -1; /* Dataspace IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- hid_t dcpl = -1, dcpl2 = -1; /* Dataset creation property list IDs */
- size_t elmt_size; /* Size of datatype */
- htri_t is_committed; /* If the datatype is committed */
- htri_t is_committed2; /* If the datatype is committed */
- int nfilters; /* Number of filters applied to dataset */
- hssize_t nelmts; /* # of elements in dataspace */
- void *rbuf = NULL; /* Buffer for reading raw data */
- void *rbuf2 = NULL; /* Buffer for reading raw data */
- H5D_space_status_t space_status; /* Dataset's raw dataspace status */
- H5D_space_status_t space_status2; /* Dataset's raw dataspace status */
+ hid_t sid = H5I_INVALID_HID, sid2 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t dcpl = H5I_INVALID_HID, dcpl2 = H5I_INVALID_HID; /* Dataset creation property list IDs */
+ size_t elmt_size; /* Size of datatype */
+ htri_t is_committed; /* If the datatype is committed */
+ htri_t is_committed2; /* If the datatype is committed */
+ int nfilters; /* Number of filters applied to dataset */
+ hssize_t nelmts; /* # of elements in dataspace */
+ void *rbuf = NULL; /* Buffer for reading raw data */
+ void *rbuf2 = NULL; /* Buffer for reading raw data */
+ H5D_space_status_t space_status; /* Dataset's raw dataspace status */
+ H5D_space_status_t space_status2; /* Dataset's raw dataspace status */
/* Check the datatypes are equal */
@@ -1060,7 +1061,7 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* Determine the size of datatype (for later) */
@@ -1078,7 +1079,7 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Compare the dataspaces */
- if (H5Sextent_equal(sid, sid2) != TRUE)
+ if (H5Sextent_equal(sid, sid2) != true)
TEST_ERROR;
/* Determine the number of elements in dataspace (for later) */
@@ -1096,7 +1097,7 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Compare the rest of the dataset creation property lists */
- if (H5Pequal(dcpl, dcpl2) != TRUE)
+ if (H5Pequal(dcpl, dcpl2) != true)
TEST_ERROR;
/* Get the number of filters on dataset (for later) */
@@ -1162,10 +1163,10 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Reclaim vlen data, if necessary */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE || H5Tdetect_class(tid, H5T_REFERENCE) == TRUE)
+ if (H5Tdetect_class(tid, H5T_VLEN) == true || H5Tdetect_class(tid, H5T_REFERENCE) == true)
if (H5Treclaim(tid, sid, H5P_DEFAULT, rbuf) < 0)
TEST_ERROR;
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE || H5Tdetect_class(tid2, H5T_REFERENCE) == TRUE)
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true || H5Tdetect_class(tid2, H5T_REFERENCE) == true)
if (H5Treclaim(tid2, sid2, H5P_DEFAULT, rbuf2) < 0)
TEST_ERROR;
@@ -1192,11 +1193,11 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Check if the attributes are equal */
- if (compare_std_attributes(did, did2, pid) != TRUE)
+ if (compare_std_attributes(did, did2, pid) != true)
TEST_ERROR;
/* Datasets should be the same. :-) */
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
@@ -1213,7 +1214,7 @@ error:
H5Tclose(tid);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_datasets() */
/*-------------------------------------------------------------------------
@@ -1221,7 +1222,7 @@ error:
*
* Purpose: Compare two groups to check that they are "equal"
*
- * Return: TRUE if group are equal/FALSE if they are different
+ * Return: true if group are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
@@ -1271,7 +1272,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
if (H5Lget_name_by_idx(gid2, ".", H5_INDEX_NAME, H5_ITER_INC, idx, objname2,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, objname2) != 0)
+ if (strcmp(objname, objname2) != 0)
TEST_ERROR;
/* Get link info */
@@ -1334,19 +1335,19 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
switch (oinfo.type) {
case H5O_TYPE_GROUP:
/* Compare groups */
- if (compare_groups(oid, oid2, pid, depth - 1, copy_flags) != TRUE)
+ if (compare_groups(oid, oid2, pid, depth - 1, copy_flags) != true)
TEST_ERROR;
break;
case H5O_TYPE_DATASET:
/* Compare datasets */
- if (compare_datasets(oid, oid2, pid, NULL) != TRUE)
+ if (compare_datasets(oid, oid2, pid, NULL) != true)
TEST_ERROR;
break;
case H5O_TYPE_NAMED_DATATYPE:
/* Compare datatypes */
- if (H5Tequal(oid, oid2) != TRUE)
+ if (H5Tequal(oid, oid2) != true)
TEST_ERROR;
break;
@@ -1402,18 +1403,18 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
} /* end if */
/* Check if the attributes are equal */
- if (compare_std_attributes(gid, gid2, pid) != TRUE)
+ if (compare_std_attributes(gid, gid2, pid) != true)
TEST_ERROR;
/* Groups should be the same. :-) */
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
{
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_groups() */
/*-------------------------------------------------------------------------
@@ -1428,16 +1429,16 @@ error:
*/
static int
test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, unsigned flag,
- hbool_t crt_intermediate_grp, const char *test_desciption)
+ bool crt_intermediate_grp, const char *test_desciption)
{
- hid_t fid_src = -1, fid_dst = -1, fid_ext = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1, gid_ref = -1; /* Group IDs */
- hid_t gid_sub = -1, gid_sub_sub = -1; /* Sub-group ID */
- hid_t pid = -1, lcpl_id = -1; /* Property IDs */
- unsigned cpy_flags; /* Object copy flags */
- int depth = -1; /* Copy depth */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID, fid_ext = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID, gid_ref = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID, gid_sub_sub = H5I_INVALID_HID; /* Sub-group ID */
+ hid_t pid = H5I_INVALID_HID, lcpl_id = H5I_INVALID_HID; /* Property IDs */
+ unsigned cpy_flags; /* Object copy flags */
+ int depth = -1; /* Copy depth */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -1675,7 +1676,7 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
/* Create link creation plist to pass in intermediate group creation */
if ((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0)
TEST_ERROR;
- if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0)
+ if (H5Pset_create_intermediate_group(lcpl_id, true) < 0)
TEST_ERROR;
if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, "/new_g0/new_g00", pid, lcpl_id) < 0)
@@ -1755,7 +1756,7 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
} /* end else */
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, pid, depth, flag) != TRUE)
+ if (compare_groups(gid, gid2, pid, depth, flag) != true)
TEST_ERROR;
if (H5Gclose(gid2) < 0)
TEST_ERROR;
@@ -1869,56 +1870,56 @@ main(void)
/* Test with and without shared messages */
if (configuration & CONFIG_SHARE_SRC) {
- HDputs("\nTesting with shared src messages:");
+ puts("\nTesting with shared src messages:");
fcpl_src = fcpl_shared;
}
else {
- HDputs("\nTesting without shared src messages:");
+ puts("\nTesting without shared src messages:");
fcpl_src = H5P_DEFAULT;
}
if (configuration & CONFIG_SHARE_DST) {
- HDputs("Testing with shared dst messages:");
+ puts("Testing with shared dst messages:");
fcpl_dst = fcpl_shared;
}
else {
- HDputs("Testing without shared dst messages:");
+ puts("Testing without shared dst messages:");
fcpl_dst = H5P_DEFAULT;
}
/* Set the FAPL for the source file's type of format */
if (configuration & CONFIG_SRC_NEW_FORMAT) {
- HDputs("Testing with latest format for source file:");
+ puts("Testing with latest format for source file:");
src_fapl = fapl2;
/* Test with and without dense attributes */
if (configuration & CONFIG_DENSE) {
- HDputs("Testing with dense attributes:");
+ puts("Testing with dense attributes:");
num_attributes_g = max_compact + 1;
}
else {
- HDputs("Testing without dense attributes:");
+ puts("Testing without dense attributes:");
num_attributes_g = MAX(min_dense, 2) - 2;
}
} /* end if */
else {
- HDputs("Testing with oldest file format for source file:");
+ puts("Testing with oldest file format for source file:");
src_fapl = fapl;
num_attributes_g = 4;
} /* end else */
/* Set the FAPL for the destination file's type of format */
if (configuration & CONFIG_DST_NEW_FORMAT) {
- HDputs("Testing with latest format for destination file:");
+ puts("Testing with latest format for destination file:");
dst_fapl = fapl2;
} /* end if */
else {
- HDputs("Testing with oldest file format for destination file:");
+ puts("Testing with oldest file format for destination file:");
dst_fapl = fapl;
} /* end else */
/* The tests... */
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_EXPAND_REFERENCE_FLAG,
- FALSE, "H5Ocopy(): expand object reference");
+ false, "H5Ocopy(): expand object reference");
} /* end for */
/* Reset file token checking info */
@@ -1933,7 +1934,7 @@ main(void)
exit(EXIT_FAILURE);
} /* end if */
- HDputs("All object copying tests passed.");
+ puts("All object copying tests passed.");
/* close property list.
* NOTE: if this property list is not closed and the test is
diff --git a/test/ohdr.c b/test/ohdr.c
index 95a4dc3..99b979b 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -68,7 +68,7 @@ static const char *FILENAME[] = {"ohdr", "ohdr_min_a", "ohdr_min_b", NULL};
static herr_t
test_cont(char *filename, hid_t fapl)
{
- hid_t file = -1;
+ hid_t file = H5I_INVALID_HID;
H5F_t *f = NULL;
H5O_hdr_info_t hdr_info;
H5O_loc_t oh_locA, oh_locB;
@@ -138,7 +138,7 @@ test_cont(char *filename, hid_t fapl)
nchunks = hdr_info.nchunks;
/* remove the 1st H5O_NAME_ID message */
- if (H5O_msg_remove(&oh_locA, H5O_NAME_ID, 0, FALSE) < 0)
+ if (H5O_msg_remove(&oh_locA, H5O_NAME_ID, 0, false) < 0)
FAIL_STACK_ERROR;
if (H5O_get_hdr_info(&oh_locA, &hdr_info) < 0)
@@ -181,7 +181,7 @@ error:
static herr_t
test_ohdr_cache(char *filename, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
hid_t my_fapl; /* FAPL ID */
H5AC_cache_config_t mdc_config; /* Metadata cache configuration info */
H5F_t *f = NULL; /* File handle */
@@ -201,7 +201,7 @@ test_ohdr_cache(char *filename, hid_t fapl)
mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
if (H5Pget_mdc_config(my_fapl, &mdc_config) < 0)
FAIL_STACK_ERROR;
- mdc_config.set_initial_size = TRUE;
+ mdc_config.set_initial_size = true;
mdc_config.initial_size = 32 * 1024;
mdc_config.max_size = 64 * 1024;
mdc_config.min_size = 8 * 1024;
@@ -316,19 +316,19 @@ error:
* bytes. For SWMR access, the read should be done all at one time.
*/
static herr_t
-test_ohdr_swmr(hbool_t new_format)
+test_ohdr_swmr(bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list */
- hid_t did = -1; /* Dataset ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t plist = -1; /* Dataset creation property list */
- size_t compact_size = 1024; /* The size of compact dataset */
- int *wbuf = NULL; /* Buffer for writing */
- hsize_t dims[1]; /* Dimension sizes */
- size_t u; /* Iterator */
- int n; /* Data variable */
- H5O_native_info_t ninfo; /* Information for the object */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t plist = H5I_INVALID_HID; /* Dataset creation property list */
+ size_t compact_size = 1024; /* The size of compact dataset */
+ int *wbuf = NULL; /* Buffer for writing */
+ hsize_t dims[1]; /* Dimension sizes */
+ size_t u; /* Iterator */
+ int n; /* Data variable */
+ H5O_native_info_t ninfo; /* Information for the object */
if (new_format) {
TESTING("exercise the coding for the re-read of the object header for SWMR access: latest-format");
@@ -528,23 +528,23 @@ error:
static herr_t
test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
{
- hid_t fid = -1; /* file ID */
- hid_t gid = -1; /* group ID */
- hid_t did = -1; /* Dataset ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t loc = -1; /* location: file or group ID */
- hid_t fid_bogus = -1; /* bogus file ID */
- hid_t gid_bogus = -1; /* bogus group ID */
- hid_t loc_bogus = -1; /* location: bogus file or group ID */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t gid = H5I_INVALID_HID; /* group ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t loc = H5I_INVALID_HID; /* location: file or group ID */
+ hid_t fid_bogus = H5I_INVALID_HID; /* bogus file ID */
+ hid_t gid_bogus = H5I_INVALID_HID; /* bogus group ID */
+ hid_t loc_bogus = H5I_INVALID_HID; /* location: bogus file or group ID */
char testfile[TESTFILE_LEN];
/* create a different name for a local copy of the data file to be
opened with rd/wr file permissions in case build and test are
done in the source directory. */
- HDstrncpy(testfile, FILE_BOGUS, TESTFILE_LEN);
+ strncpy(testfile, FILE_BOGUS, TESTFILE_LEN);
testfile[TESTFILE_LEN - 1] = '\0';
- HDstrncat(testfile, ".copy", sizeof(testfile) - HDstrlen(testfile) - 1);
+ strncat(testfile, ".copy", sizeof(testfile) - strlen(testfile) - 1);
/* Make a copy of the data file from svn. */
if (h5_make_local_copy(FILE_BOGUS, testfile) < 0)
@@ -652,7 +652,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
FAIL_STACK_ERROR;
/* Check that the "unknown" message was _NOT_ marked */
- if (H5O__check_msg_marked_test(did, FALSE) < 0)
+ if (H5O__check_msg_marked_test(did, false) < 0)
FAIL_STACK_ERROR;
/* Close the dataset */
@@ -734,7 +734,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
FAIL_STACK_ERROR;
/* Check that the "unknown" message was marked */
- if (H5O__check_msg_marked_test(did, TRUE) < 0)
+ if (H5O__check_msg_marked_test(did, true) < 0)
FAIL_STACK_ERROR;
/* Close the dataset */
@@ -922,7 +922,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
/* Set the 'no attrs' hint on the dcpl */
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) == H5I_INVALID_HID)
TEST_ERROR;
- if (H5Pset_dset_no_attrs_hint(dcpl_id, TRUE) < 0)
+ if (H5Pset_dset_no_attrs_hint(dcpl_id, true) < 0)
TEST_ERROR;
/* The dataset doesn't need to contain data */
@@ -945,7 +945,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
* ADD A (STRING) ATTRIBUTE AND MANIPULATE IT *
**********************************************/
- buf_size = HDstrlen(ATTR_LONG) + 1;
+ buf_size = strlen(ATTR_LONG) + 1;
if (NULL == (in_buf = (char *)calloc(buf_size, sizeof(char))))
TEST_ERROR;
if (NULL == (out_buf = (char *)calloc(buf_size, sizeof(char))))
@@ -964,7 +964,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
TEST_ERROR;
/* Write attribute data */
- HDstrcpy(in_buf, ATTR_SHORT);
+ strcpy(in_buf, ATTR_SHORT);
if (H5Awrite(aid, H5T_NATIVE_CHAR, in_buf) < 0)
TEST_ERROR;
@@ -975,12 +975,12 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
/* Read the data back and verify */
if (H5Aread(aid, H5T_NATIVE_CHAR, out_buf) < 0)
TEST_ERROR;
- if (HDstrcmp(in_buf, out_buf) != 0)
+ if (strcmp(in_buf, out_buf) != 0)
TEST_ERROR;
/* modify the string attribute */
memset(in_buf, 0, buf_size);
- HDstrcpy(in_buf, ATTR_LONG);
+ strcpy(in_buf, ATTR_LONG);
if (H5Awrite(aid, H5T_NATIVE_CHAR, in_buf) < 0)
TEST_ERROR;
@@ -990,7 +990,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
/* Read the data back and verify */
if (H5Aread(aid, H5T_NATIVE_CHAR, out_buf) < 0)
TEST_ERROR;
- if (HDstrcmp(in_buf, out_buf) != 0)
+ if (strcmp(in_buf, out_buf) != 0)
TEST_ERROR;
/* Close */
@@ -1010,7 +1010,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
for (i = 0; i < N_ATTRS; i++) {
/* Set the attribute's name */
- if (HDsnprintf(attr_name, ATTR_NAME_MAX, "int_attr_%d", i) < 0)
+ if (snprintf(attr_name, ATTR_NAME_MAX, "int_attr_%d", i) < 0)
TEST_ERROR;
/* Create an integer attribute on the dataset */
@@ -1083,23 +1083,23 @@ test_minimized_dset_ohdr_size_comparisons(hid_t fapl_id)
unsigned compact = 0;
/* IDs that are file-agnostic */
- hid_t dspace_id = -1;
- hid_t int_type_id = -1;
- hid_t dcpl_minimize = -1;
- hid_t dcpl_dontmin = -1;
- hid_t dcpl_default = -1;
+ hid_t dspace_id = H5I_INVALID_HID;
+ hid_t int_type_id = H5I_INVALID_HID;
+ hid_t dcpl_minimize = H5I_INVALID_HID;
+ hid_t dcpl_dontmin = H5I_INVALID_HID;
+ hid_t dcpl_default = H5I_INVALID_HID;
/* IDs for non-minimized file open */
- hid_t file_f_id = -1; /* lower 'f' for standard file setting */
- hid_t dset_f_x_id = -1; /* 'x' for default */
- hid_t dset_f_N_id = -1; /* 'N' for explicit non-minimized dset */
- hid_t dset_f_Y_id = -1; /* 'Y' for minimized dset */
+ hid_t file_f_id = H5I_INVALID_HID; /* lower 'f' for standard file setting */
+ hid_t dset_f_x_id = H5I_INVALID_HID; /* 'x' for default */
+ hid_t dset_f_N_id = H5I_INVALID_HID; /* 'N' for explicit non-minimized dset */
+ hid_t dset_f_Y_id = H5I_INVALID_HID; /* 'Y' for minimized dset */
/* IDs for minimized file open */
- hid_t file_F_id = -1; /* upper 'F' for minimized file setting */
- hid_t dset_F_x_id = -1; /* 'x' for default */
- hid_t dset_F_N_id = -1; /* 'N' for explicit non-minimized dset */
- hid_t dset_F_Y_id = -1; /* 'Y' for minimized dset */
+ hid_t file_F_id = H5I_INVALID_HID; /* upper 'F' for minimized file setting */
+ hid_t dset_F_x_id = H5I_INVALID_HID; /* 'x' for default */
+ hid_t dset_F_N_id = H5I_INVALID_HID; /* 'N' for explicit non-minimized dset */
+ hid_t dset_F_Y_id = H5I_INVALID_HID; /* 'Y' for minimized dset */
char filename_a[512] = "";
char filename_b[512] = "";
@@ -1138,14 +1138,14 @@ test_minimized_dset_ohdr_size_comparisons(hid_t fapl_id)
dcpl_minimize = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl_minimize < 0)
TEST_ERROR;
- ret = H5Pset_dset_no_attrs_hint(dcpl_minimize, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl_minimize, true);
if (ret < 0)
TEST_ERROR;
dcpl_dontmin = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl_dontmin < 0)
TEST_ERROR;
- ret = H5Pset_dset_no_attrs_hint(dcpl_dontmin, FALSE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl_dontmin, false);
if (ret < 0)
TEST_ERROR;
@@ -1191,7 +1191,7 @@ test_minimized_dset_ohdr_size_comparisons(hid_t fapl_id)
file_F_id = H5Fcreate(filename_b, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
if (file_F_id < 0)
TEST_ERROR;
- ret = H5Fset_dset_no_attrs_hint(file_F_id, TRUE);
+ ret = H5Fset_dset_no_attrs_hint(file_F_id, true);
if (ret < 0)
TEST_ERROR;
@@ -1310,16 +1310,16 @@ test_minimized_dset_ohdr_with_filter(hid_t fapl_id)
const unsigned filter_values[] = {0}; /* TBD */
const hsize_t chunk_dim[] = {32}; /* needed for filter */
const int ndims = 1;
- hid_t dspace_id = -1;
- hid_t dtype_id = -1;
- hid_t dcpl_xZ_id = -1;
- hid_t dcpl_mx_id = -1;
- hid_t dcpl_mZ_id = -1;
- hid_t dset_xx_id = -1;
- hid_t dset_xZ_id = -1;
- hid_t dset_mx_id = -1;
- hid_t dset_mZ_id = -1;
- hid_t file_id = -1;
+ hid_t dspace_id = H5I_INVALID_HID;
+ hid_t dtype_id = H5I_INVALID_HID;
+ hid_t dcpl_xZ_id = H5I_INVALID_HID;
+ hid_t dcpl_mx_id = H5I_INVALID_HID;
+ hid_t dcpl_mZ_id = H5I_INVALID_HID;
+ hid_t dset_xx_id = H5I_INVALID_HID;
+ hid_t dset_xZ_id = H5I_INVALID_HID;
+ hid_t dset_mx_id = H5I_INVALID_HID;
+ hid_t dset_mZ_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
herr_t ret;
/* dcpl suffixes:
@@ -1342,7 +1342,7 @@ test_minimized_dset_ohdr_with_filter(hid_t fapl_id)
dcpl_mx_id = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl_mx_id < 0)
TEST_ERROR;
- ret = H5Pset_dset_no_attrs_hint(dcpl_mx_id, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl_mx_id, true);
if (ret < 0)
TEST_ERROR;
@@ -1358,7 +1358,7 @@ test_minimized_dset_ohdr_with_filter(hid_t fapl_id)
dcpl_mZ_id = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl_mZ_id < 0)
TEST_ERROR;
- ret = H5Pset_dset_no_attrs_hint(dcpl_mZ_id, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl_mZ_id, true);
if (ret < 0)
TEST_ERROR;
ret = H5Pset_chunk(dcpl_mZ_id, ndims, chunk_dim);
@@ -1469,19 +1469,19 @@ test_minimized_dset_ohdr_modification_times(hid_t _fapl_id)
char filename[512] = "";
const hsize_t extents[1] = {128}; /* extents of dataspace */
- hid_t dspace_id = -1;
- hid_t dtype_id = -1;
- hid_t dcpl_xT_id = -1; /* Track modtime */
- hid_t dcpl_mx_id = -1; /* minimized */
- hid_t dcpl_mT_id = -1; /* minimized, Track */
- hid_t dcpl_mN_id = -1; /* minimized, do Not track */
- hid_t dset_xx_id = -1;
- hid_t dset_xT_id = -1;
- hid_t dset_mx_id = -1;
- hid_t dset_mT_id = -1;
- hid_t dset_mN_id = -1;
- hid_t file_id = -1;
- hid_t fapl_id = -1;
+ hid_t dspace_id = H5I_INVALID_HID;
+ hid_t dtype_id = H5I_INVALID_HID;
+ hid_t dcpl_xT_id = H5I_INVALID_HID; /* Track modtime */
+ hid_t dcpl_mx_id = H5I_INVALID_HID; /* minimized */
+ hid_t dcpl_mT_id = H5I_INVALID_HID; /* minimized, Track */
+ hid_t dcpl_mN_id = H5I_INVALID_HID; /* minimized, do Not track */
+ hid_t dset_xx_id = H5I_INVALID_HID;
+ hid_t dset_xT_id = H5I_INVALID_HID;
+ hid_t dset_mx_id = H5I_INVALID_HID;
+ hid_t dset_mT_id = H5I_INVALID_HID;
+ hid_t dset_mN_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
herr_t ret;
unsigned i = 0; /* for testcase loop */
@@ -1517,34 +1517,34 @@ test_minimized_dset_ohdr_modification_times(hid_t _fapl_id)
dcpl_mx_id = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl_mx_id < 0)
TEST_ERROR;
- ret = H5Pset_dset_no_attrs_hint(dcpl_mx_id, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl_mx_id, true);
if (ret < 0)
TEST_ERROR;
dcpl_xT_id = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl_xT_id < 0)
TEST_ERROR;
- ret = H5Pset_obj_track_times(dcpl_xT_id, TRUE);
+ ret = H5Pset_obj_track_times(dcpl_xT_id, true);
if (ret < 0)
TEST_ERROR;
dcpl_mT_id = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl_mT_id < 0)
TEST_ERROR;
- ret = H5Pset_dset_no_attrs_hint(dcpl_mT_id, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl_mT_id, true);
if (ret < 0)
TEST_ERROR;
- ret = H5Pset_obj_track_times(dcpl_mT_id, TRUE);
+ ret = H5Pset_obj_track_times(dcpl_mT_id, true);
if (ret < 0)
TEST_ERROR;
dcpl_mN_id = H5Pcreate(H5P_DATASET_CREATE);
if (dcpl_mN_id < 0)
TEST_ERROR;
- ret = H5Pset_dset_no_attrs_hint(dcpl_mN_id, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl_mN_id, true);
if (ret < 0)
TEST_ERROR;
- ret = H5Pset_obj_track_times(dcpl_mN_id, FALSE);
+ ret = H5Pset_obj_track_times(dcpl_mN_id, false);
if (ret < 0)
TEST_ERROR;
@@ -1686,13 +1686,13 @@ test_minimized_dset_ohdr_fillvalue_backwards_compatability(hid_t _fapl_id)
char filename[512] = "";
const hsize_t extents[1] = {64}; /* extents of dataspace */
const int fill[1] = {343}; /* fill value of dataset */
- hid_t file_id = -1;
- hid_t dtype_id = -1;
- hid_t dspace_id = -1;
- hid_t dcpl_id = -1;
- hid_t fapl_id = -1;
- hid_t dset_0_id = -1;
- hid_t dset_1_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dtype_id = H5I_INVALID_HID;
+ hid_t dspace_id = H5I_INVALID_HID;
+ hid_t dcpl_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t dset_0_id = H5I_INVALID_HID;
+ hid_t dset_1_id = H5I_INVALID_HID;
herr_t ret;
/*********
@@ -1720,7 +1720,7 @@ test_minimized_dset_ohdr_fillvalue_backwards_compatability(hid_t _fapl_id)
if (dcpl_id < 0)
TEST_ERROR;
- ret = H5Pset_dset_no_attrs_hint(dcpl_id, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl_id, true);
if (ret == FAIL)
TEST_ERROR;
@@ -1824,22 +1824,22 @@ error:
int
main(void)
{
- hid_t fapl = -1;
- hid_t file = -1;
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t file = H5I_INVALID_HID;
H5F_t *f = NULL;
const char *env_h5_drvr; /* File driver value from environment */
- hbool_t single_file_vfd; /* Whether VFD used stores data in a single file */
+ bool single_file_vfd; /* Whether VFD used stores data in a single file */
char filename[1024];
H5O_hdr_info_t hdr_info; /* Object info */
H5O_loc_t oh_loc; /* Object header locations */
H5F_libver_t low, high; /* File format bounds */
time_t time_new, ro;
int i; /* Local index variable */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
herr_t ret; /* Generic return value */
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -1854,7 +1854,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Loop through all the combinations of low/high library format bounds */
for (low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
@@ -1876,8 +1876,8 @@ main(void)
/* Display info about testing */
low_string = h5_get_version_string(low);
high_string = h5_get_version_string(high);
- HDsnprintf(msg, sizeof(msg), "Using file format version: (%s, %s)", low_string, high_string);
- HDputs(msg);
+ snprintf(msg, sizeof(msg), "Using file format version: (%s, %s)", low_string, high_string);
+ puts(msg);
/* test on object continuation block */
if (test_cont(filename, fapl) < 0)
@@ -2029,9 +2029,9 @@ main(void)
* Delete all time messages.
*/
TESTING("message deletion");
- if (H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE) < 0)
+ if (H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, true) < 0)
FAIL_STACK_ERROR;
- if (H5O_msg_remove(&oh_loc, H5O_MTIME_ID, H5O_ALL, TRUE) < 0)
+ if (H5O_msg_remove(&oh_loc, H5O_MTIME_ID, H5O_ALL, true) < 0)
FAIL_STACK_ERROR;
if (H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro))
FAIL_STACK_ERROR;
@@ -2067,7 +2067,7 @@ main(void)
H5E_END_TRY
if (ret >= 0)
TEST_ERROR;
- if (H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE) < 0)
+ if (H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, true) < 0)
FAIL_STACK_ERROR;
PASSED();
@@ -2084,23 +2084,23 @@ main(void)
/* Test reading datasets with undefined object header messages
* and the various "fail/mark if unknown" object header message flags
*/
- HDputs("Accessing objects with unknown header messages: H5O_BOGUS_VALID_ID");
+ puts("Accessing objects with unknown header messages: H5O_BOGUS_VALID_ID");
if (single_file_vfd) {
if (test_unknown(H5O_BOGUS_VALID_ID, filename, fapl) < 0)
TEST_ERROR;
} /* end if */
else {
SKIPPED();
- HDputs(" Unknown header message test not supported with the current VFD.");
+ puts(" Unknown header message test not supported with the current VFD.");
} /* end else */
- HDputs("Accessing objects with unknown header messages: H5O_BOGUS_INVALID_ID");
+ puts("Accessing objects with unknown header messages: H5O_BOGUS_INVALID_ID");
if (single_file_vfd) {
if (test_unknown(H5O_BOGUS_INVALID_ID, filename, fapl) < 0)
TEST_ERROR;
} /* end if */
else {
SKIPPED();
- HDputs(" Unknown header message test not supported with the current VFD.");
+ puts(" Unknown header message test not supported with the current VFD.");
} /* end else */
/* Test object header creation metadata cache issues */
@@ -2134,25 +2134,25 @@ main(void)
if (H5FD__supports_swmr_test(env_h5_drvr)) {
/* A test to exercise the re-read of the object header for SWMR access */
- if (test_ohdr_swmr(TRUE) < 0)
+ if (test_ohdr_swmr(true) < 0)
TEST_ERROR;
- if (test_ohdr_swmr(FALSE) < 0)
+ if (test_ohdr_swmr(false) < 0)
TEST_ERROR;
}
else
- HDputs("Skipped SWMR tests for SWMR-incompatible VFD");
+ puts("Skipped SWMR tests for SWMR-incompatible VFD");
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
- HDputs("All object header tests passed.");
+ puts("All object header tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
H5Fclose(file);
@@ -2160,7 +2160,7 @@ error:
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
return 1;
} /* end main() */
diff --git a/test/onion.c b/test/onion.c
index 51e5d24..5b9bb92 100644
--- a/test/onion.c
+++ b/test/onion.c
@@ -68,7 +68,7 @@ struct write_info {
const unsigned char *buf;
};
struct revise_revision {
- hbool_t truncate; /* onion-create, truncating any existing data */
+ bool truncate; /* onion-create, truncating any existing data */
uint64_t revision_num;
size_t n_writes;
struct write_info writes[ONION_TEST_REV_REV_WRITES_MAX];
@@ -119,15 +119,15 @@ onion_filepaths_init(const char *basename)
if (NULL == (paths->canon = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
TEST_ERROR;
- HDsnprintf(paths->canon, ONION_TEST_FIXNAME_SIZE, "%s", basename);
+ snprintf(paths->canon, ONION_TEST_FIXNAME_SIZE, "%s", basename);
if (NULL == (paths->onion = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
TEST_ERROR;
- HDsnprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon);
+ snprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon);
if (NULL == (paths->recovery = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
TEST_ERROR;
- HDsnprintf(paths->recovery, ONION_TEST_FIXNAME_SIZE, "%s.onion.recovery", paths->canon);
+ snprintf(paths->recovery, ONION_TEST_FIXNAME_SIZE, "%s.onion.recovery", paths->canon);
return paths;
@@ -848,7 +848,7 @@ test_fapl(void)
TEST_ERROR;
if (0 != info_out.force_write_open)
TEST_ERROR;
- if (HDstrcmp(info_in.comment, info_out.comment))
+ if (strcmp(info_in.comment, info_out.comment))
TEST_ERROR;
/* Cleanup */
@@ -1285,7 +1285,7 @@ test_revision_record_encode_decode(void)
0, 0, 0, 0, /* Bytes 080-083: checksum (populated below) */
/* ENTRY 1 */
0, 0xF0, 0x2E, 0, 0, 0, 0, 0, /* Bytes 084-091: entry 1: logical offset */
- 0xA7, 0, 0, 0, 0, 0, 0, 0, /* Bytes 092-099: entry 1: physical address */
+ 0xA7, 0, 0, 0, 0, 0, 0, 0, /* Bytes 092-099: entry 1: physical address */
0, 0, 0, 0, /* Bytes 100-103: checksum (populated below) */
/* ENTRY 2 */
0, 0x50, 0x15, 0, 0, 0x20, 0, 0, /* Bytes 104-111: entry 2: logical offset */
@@ -1308,7 +1308,7 @@ test_revision_record_encode_decode(void)
uint64_t size_ret;
H5FD_onion_revision_record_t r_out;
uint32_t checksum = 0;
- hbool_t badness = FALSE;
+ bool badness = false;
char comment[25] = "Example comment message.";
H5FD_onion_revision_record_t record = {
H5FD_ONION_REVISION_RECORD_VERSION_CURR,
@@ -1328,7 +1328,7 @@ test_revision_record_encode_decode(void)
};
size_t exp_size = H5FD_ONION_ENCODED_SIZE_REVISION_RECORD +
(H5FD_ONION_ENCODED_SIZE_INDEX_ENTRY * record.archival_index.n_entries) +
- HDstrlen("Example comment message.") + 1;
+ strlen("Example comment message.") + 1;
r_out.archival_index.list = NULL;
r_out.comment = NULL;
@@ -1386,7 +1386,7 @@ test_revision_record_encode_decode(void)
for (i = 0; i < exp_size; i++) {
if (exp[i] != buf[i]) {
- badness = TRUE;
+ badness = true;
printf("Bad encoded record - Index %zu: expected 0x%02X but got 0x%02X\n", i,
(unsigned int)exp[i], (unsigned int)buf[i]);
}
@@ -1478,15 +1478,15 @@ test_revision_record_encode_decode(void)
TEST_ERROR;
if (record.checksum != r_out.checksum)
TEST_ERROR;
- if (HDstrncmp(record.time_of_creation, r_out.time_of_creation, 16) != 0)
+ if (strncmp(record.time_of_creation, r_out.time_of_creation, 16) != 0)
TEST_ERROR;
if (record.comment_size != r_out.comment_size)
TEST_ERROR;
- if (record.comment_size != HDstrlen(r_out.comment) + 1)
+ if (record.comment_size != strlen(r_out.comment) + 1)
TEST_ERROR;
- if (HDstrlen(record.comment) != HDstrlen(r_out.comment))
+ if (strlen(record.comment) != strlen(r_out.comment))
TEST_ERROR;
- if (HDstrcmp(record.comment, r_out.comment) != 0)
+ if (strcmp(record.comment, r_out.comment) != 0)
TEST_ERROR;
if (H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR != r_out.archival_index.version)
@@ -1766,9 +1766,9 @@ verify_history_as_expected_onion(H5FD_t *raw_file, struct expected_history *filt
TEST_ERROR;
}
else {
- if (HDstrlen(rev_out.comment) != HDstrlen(erp->comment))
+ if (strlen(rev_out.comment) != strlen(erp->comment))
TEST_ERROR;
- if (HDstrcmp(rev_out.comment, erp->comment) != 0)
+ if (strcmp(rev_out.comment, erp->comment) != 0)
TEST_ERROR;
}
if (erp->n_index_entries != (uint64_t)(-1) &&
@@ -1897,9 +1897,9 @@ error:
* Purpose: Test the ability of the Onion VFD to create a valid
* 'onionized' file.
*
- * When `truncate_canonical` is FALSE, the canonical file is
+ * When `truncate_canonical` is false, the canonical file is
* nonexistent on the backing store on onion-creation.
- * When `truncate_canonical` is TRUE, a canonical file is created
+ * When `truncate_canonical` is true, a canonical file is created
* on the backing store with known contents, which are to be
* truncated on onion-creation.
*
@@ -1908,7 +1908,7 @@ error:
*-----------------------------------------------------------------------------
*/
static int
-test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data)
+test_create_oniontarget(bool truncate_canonical, bool with_initial_data)
{
const char *basename = "somesuch";
hid_t fapl_id = H5I_INVALID_HID;
@@ -1929,11 +1929,11 @@ test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data)
struct expected_history filter;
char *buf = NULL;
- if (TRUE == truncate_canonical && TRUE == with_initial_data)
+ if (true == truncate_canonical && true == with_initial_data)
TESTING("onion creation; truncate extant canonical; w/ initial data");
- else if (TRUE == truncate_canonical)
+ else if (true == truncate_canonical)
TESTING("onion creation; truncate extant canonical; no initial data");
- else if (TRUE == with_initial_data)
+ else if (true == with_initial_data)
TESTING("onion creation; no extant canonical; w/ initial data");
else
TESTING("onion creation; no extant canonical; no initial data");
@@ -1955,7 +1955,7 @@ test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data)
HDremove(paths->recovery);
/* Create canonical file to be truncated */
- if (TRUE == truncate_canonical) {
+ if (true == truncate_canonical) {
/* Create canonical file. */
vfile_raw = H5FDopen(paths->canon, flags_create_s, onion_info.backing_fapl_id, HADDR_UNDEF);
if (NULL == vfile_raw)
@@ -2017,7 +2017,7 @@ test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data)
* WRITING
*/
- if (TRUE == with_initial_data) {
+ if (true == with_initial_data) {
haddr_t half_size = 0;
haddr_t buf_size = 0;
@@ -2111,7 +2111,7 @@ test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data)
filter.revisions[0].n_index_entries = (uint64_t)(-1); /* don't care */
filter.revisions[0].revision_num = 0;
filter.revisions[0].parent_revision_num = 0;
- filter.revisions[0].logical_eof = (TRUE == with_initial_data) ? a_list_size_s : 0;
+ filter.revisions[0].logical_eof = (true == with_initial_data) ? a_list_size_s : 0;
if (verify_history_as_expected_onion(vfile_raw, &filter) < 0)
TEST_ERROR;
@@ -2126,7 +2126,7 @@ test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data)
if (NULL == vfile_ro)
TEST_ERROR;
- if (TRUE == with_initial_data) {
+ if (true == with_initial_data) {
/* Initial revision contains data */
if (H5FDget_eof(vfile_ro, H5FD_MEM_DRAW) != a_list_size_s)
TEST_ERROR;
@@ -2204,9 +2204,9 @@ error:
* Purpose: Test the ability of the Onion VFD to create a valid
* 'onionized' file.
*
- * When `truncate_canonical` is FALSE, the canonical file is
+ * When `truncate_canonical` is false, the canonical file is
* nonexistent on the backing store on onion-creation.
- * When `truncate_canonical` is TRUE, a canonical file is created
+ * When `truncate_canonical` is true, a canonical file is created
* on the backing store with known contents, which are to be
* truncated on onion-creation.
*
@@ -2263,12 +2263,12 @@ test_several_revisions_with_logical_gaps(void)
HDremove(paths->recovery);
/* Empty first revision */
- about[0].truncate = TRUE;
+ about[0].truncate = true;
about[0].revision_num = H5FD_ONION_FAPL_INFO_REVISION_ID_LATEST;
about[0].comment = "first";
about[0].n_writes = 0;
- about[1].truncate = FALSE;
+ about[1].truncate = false;
about[1].revision_num = H5FD_ONION_FAPL_INFO_REVISION_ID_LATEST;
about[1].comment = "second";
about[1].n_writes = 1;
@@ -2276,7 +2276,7 @@ test_several_revisions_with_logical_gaps(void)
about[1].writes[0].size = a_list_size_s;
about[1].writes[0].buf = a_list_s;
- about[2].truncate = FALSE;
+ about[2].truncate = false;
about[2].revision_num = H5FD_ONION_FAPL_INFO_REVISION_ID_LATEST;
about[2].comment = "third";
about[2].n_writes = 1; /* TODO: several writes */
@@ -2284,7 +2284,7 @@ test_several_revisions_with_logical_gaps(void)
about[2].writes[0].size = b_list_size_s;
about[2].writes[0].buf = b_list_s;
- about[3].truncate = FALSE;
+ about[3].truncate = false;
about[3].revision_num = H5FD_ONION_FAPL_INFO_REVISION_ID_LATEST;
about[3].comment = "fourth";
about[3].n_writes = 1;
@@ -2577,15 +2577,15 @@ do_onion_open_and_writes(const char *filename, H5FD_onion_fapl_info_t *onion_inf
size_t j = 0;
unsigned int flags = H5F_ACC_RDWR;
- if (i != 0 && about[i].truncate == TRUE)
+ if (i != 0 && about[i].truncate == true)
goto error;
- if (TRUE == about[i].truncate)
+ if (true == about[i].truncate)
flags |= H5F_ACC_CREAT | H5F_ACC_TRUNC;
onion_info_p->revision_num = about[i].revision_num;
if (about[i].comment != NULL) {
- j = MIN(HDstrlen(about[i].comment), H5FD_ONION_FAPL_INFO_COMMENT_MAX_LEN);
+ j = MIN(strlen(about[i].comment), H5FD_ONION_FAPL_INFO_COMMENT_MAX_LEN);
memcpy(onion_info_p->comment, about[i].comment, j);
}
onion_info_p->comment[j] = '\0';
@@ -2615,7 +2615,7 @@ do_onion_open_and_writes(const char *filename, H5FD_onion_fapl_info_t *onion_inf
if (memcmp(buf_vfy, wi->buf, wi->size) != 0) {
const unsigned char *_buf = wi->buf;
size_t z = 0;
- HDputs("i exp act");
+ puts("i exp act");
for (z = 0; z < wi->size; z++)
printf("%02zx %c %c\n", z, _buf[z], buf_vfy[z]);
fflush(stdout);
@@ -2712,7 +2712,7 @@ test_page_aligned_history_create(void)
HDremove(paths->onion);
HDremove(paths->recovery);
- about[0].truncate = TRUE;
+ about[0].truncate = true;
about[0].revision_num = H5FD_ONION_FAPL_INFO_REVISION_ID_LATEST;
about[0].comment = "initial_commit";
about[0].n_writes = 1;
@@ -2720,7 +2720,7 @@ test_page_aligned_history_create(void)
about[0].writes[0].size = b_list_size_s;
about[0].writes[0].buf = b_list_s;
- about[1].truncate = FALSE;
+ about[1].truncate = false;
about[1].revision_num = H5FD_ONION_FAPL_INFO_REVISION_ID_LATEST;
about[1].comment = "second";
about[1].n_writes = 1;
@@ -2746,7 +2746,7 @@ test_page_aligned_history_create(void)
if (memcmp(a_list_s, buf + a_off, a_list_size_s) != 0) {
size_t k;
printf("aoff: %" PRIu64 "\n", a_off);
- HDputs("i exp act");
+ puts("i exp act");
for (k = 0; k < b_list_size_s; k++) {
printf("%3zu:: %c : %c\n", k, (k < a_off) ? ' ' : a_list_s[k - a_off], buf[k]);
}
@@ -2756,7 +2756,7 @@ test_page_aligned_history_create(void)
if (memcmp(b_list_s, buf, a_off) != 0) {
size_t k;
printf("aoff: %" PRIu64 "\n", a_off);
- HDputs("i exp act");
+ puts("i exp act");
for (k = 0; k < b_list_size_s; k++) {
printf("%3zu:: %c : %c\n", k, (k < a_off) ? b_list_s[k] : ' ', buf[k]);
}
@@ -4918,12 +4918,12 @@ main(void)
/* The onion VFD only supports the sec2 VFD under the hood, so skip this
* test when the environment variable has been set to something else
*/
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
- if ((0 != HDstrcmp(env_h5_drvr, "nomatch")) && (0 != HDstrcmp(env_h5_drvr, "sec2"))) {
+ if ((0 != strcmp(env_h5_drvr, "nomatch")) && (0 != strcmp(env_h5_drvr, "sec2"))) {
SKIPPED();
- HDputs("Onion VFD test skipped due to non-sec2 default VFD");
+ puts("Onion VFD test skipped due to non-sec2 default VFD");
exit(EXIT_SUCCESS);
}
@@ -4941,10 +4941,10 @@ main(void)
nerrors -= test_history_encode_decode_empty();
nerrors -= test_history_encode_decode();
nerrors -= test_revision_record_encode_decode();
- nerrors -= test_create_oniontarget(FALSE, FALSE);
- nerrors -= test_create_oniontarget(TRUE, FALSE);
- nerrors -= test_create_oniontarget(FALSE, TRUE);
- nerrors -= test_create_oniontarget(TRUE, TRUE);
+ nerrors -= test_create_oniontarget(false, false);
+ nerrors -= test_create_oniontarget(true, false);
+ nerrors -= test_create_oniontarget(false, true);
+ nerrors -= test_create_oniontarget(true, true);
nerrors -= test_several_revisions_with_logical_gaps();
nerrors -= test_page_aligned_history_create();
nerrors -= test_integration_create();
diff --git a/test/page_buffer.c b/test/page_buffer.c
index 6eed35f..651e84a 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -82,13 +82,13 @@ static const char *FILENAME[] = {"filepaged", NULL};
static unsigned
create_file(char *filename, hid_t fcpl, hid_t fapl)
{
- hid_t file_id = -1;
- hid_t dset_id = -1;
- hid_t grp_id = -1;
- hid_t filespace = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t grp_id = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
hsize_t dimsf[2] = {NX, NY}; /* dataset dimensions */
int *data = NULL; /* pointer to data buffer to write */
- hid_t dcpl = -1;
+ hid_t dcpl = H5I_INVALID_HID;
int i;
int num_elements;
int j;
@@ -116,28 +116,28 @@ create_file(char *filename, hid_t fcpl, hid_t fapl)
for (i = 0; i < NUM_DSETS; i++) {
- HDsnprintf(dset_name, sizeof(dset_name), "D1dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "D1dset%d", i);
if ((dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Dclose(dset_id) < 0)
FAIL_STACK_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "D2dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "D2dset%d", i);
if ((dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Dclose(dset_id) < 0)
FAIL_STACK_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "D3dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "D3dset%d", i);
if ((dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Dclose(dset_id) < 0)
FAIL_STACK_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "dset%d", i);
if ((dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
@@ -162,13 +162,13 @@ create_file(char *filename, hid_t fcpl, hid_t fapl)
}
}
- HDsnprintf(dset_name, sizeof(dset_name), "D1dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "D1dset%d", i);
if (H5Ldelete(grp_id, dset_name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "D2dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "D2dset%d", i);
if (H5Ldelete(grp_id, dset_name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "D3dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "D3dset%d", i);
if (H5Ldelete(grp_id, dset_name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
}
@@ -219,9 +219,9 @@ error:
static unsigned
open_file(char *filename, hid_t fapl, hsize_t page_size, size_t page_buffer_size)
{
- hid_t file_id = -1;
- hid_t dset_id = -1;
- hid_t grp_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t grp_id = H5I_INVALID_HID;
int *data = NULL; /* pointer to data buffer to write */
int i;
int j;
@@ -252,7 +252,7 @@ open_file(char *filename, hid_t fapl, hsize_t page_size, size_t page_buffer_size
for (i = 0; i < NUM_DSETS; i++) {
- HDsnprintf(dset_name, sizeof(dset_name), "dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "dset%d", i);
if ((dset_id = H5Dopen2(grp_id, dset_name, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
@@ -301,20 +301,20 @@ error:
static unsigned
set_multi_split(const char *env_h5_drvr, hid_t fapl, hsize_t pagesize)
{
- hbool_t split = FALSE;
- hbool_t multi = FALSE;
+ bool split = false;
+ bool multi = false;
H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl_arr[H5FD_MEM_NTYPES];
char *memb_name[H5FD_MEM_NTYPES];
haddr_t memb_addr[H5FD_MEM_NTYPES];
- hbool_t relax;
+ bool relax;
H5FD_mem_t mt;
/* Check for split or multi driver */
- if (!HDstrcmp(env_h5_drvr, "split"))
- split = TRUE;
- else if (!HDstrcmp(env_h5_drvr, "multi"))
- multi = TRUE;
+ if (!strcmp(env_h5_drvr, "split"))
+ split = true;
+ else if (!strcmp(env_h5_drvr, "multi"))
+ multi = true;
if (split || multi) {
@@ -376,10 +376,10 @@ error:
static unsigned
test_args(hid_t orig_fapl, const char *env_h5_drvr)
{
- char filename[FILENAME_LEN]; /* Filename to use */
- hid_t file_id = -1; /* File ID */
- hid_t fcpl = -1;
- hid_t fapl = -1;
+ char filename[FILENAME_LEN]; /* Filename to use */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
herr_t ret;
TESTING("Settings for Page Buffering");
@@ -547,10 +547,10 @@ error:
static unsigned
test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
{
- char filename[FILENAME_LEN]; /* Filename to use */
- hid_t file_id = -1; /* File ID */
- hid_t fcpl = -1;
- hid_t fapl = -1;
+ char filename[FILENAME_LEN]; /* Filename to use */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
size_t base_page_cnt;
size_t page_count = 0;
int i, num_elements = 2000;
@@ -810,10 +810,10 @@ error:
static unsigned
test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
{
- char filename[FILENAME_LEN]; /* Filename to use */
- hid_t file_id = -1; /* File ID */
- hid_t fcpl = -1;
- hid_t fapl = -1;
+ char filename[FILENAME_LEN]; /* Filename to use */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
size_t base_page_cnt;
size_t page_count = 0;
int i;
@@ -1049,10 +1049,10 @@ error:
static unsigned
test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
{
- char filename[FILENAME_LEN]; /* Filename to use */
- hid_t file_id = -1; /* File ID */
- hid_t fcpl = -1;
- hid_t fapl = -1;
+ char filename[FILENAME_LEN]; /* Filename to use */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
size_t base_raw_cnt = 0;
size_t base_meta_cnt = 0;
size_t page_count = 0;
@@ -1667,10 +1667,10 @@ error:
static unsigned
test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr)
{
- char filename[FILENAME_LEN]; /* Filename to use */
- hid_t file_id = -1; /* File ID */
- hid_t fcpl = -1;
- hid_t fapl = -1;
+ char filename[FILENAME_LEN]; /* Filename to use */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
int i;
int num_elements = 1000;
size_t base_raw_cnt = 0;
@@ -1956,10 +1956,10 @@ error:
static unsigned
verify_page_buffering_disabled(hid_t orig_fapl, const char *env_h5_drvr)
{
- char filename[FILENAME_LEN]; /* Filename to use */
- hid_t file_id = -1; /* File ID */
- hid_t fcpl = -1;
- hid_t fapl = -1;
+ char filename[FILENAME_LEN]; /* Filename to use */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
TESTING("Page Buffering Disabled");
h5_fixname(FILENAME[0], orig_fapl, filename, sizeof(filename));
@@ -2064,15 +2064,15 @@ error:
int
main(void)
{
- hid_t fapl = -1; /* File access property list for data files */
- unsigned nerrors = 0; /* Cumulative error count */
- const char *env_h5_drvr = NULL; /* File Driver value from environment */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list for data files */
+ unsigned nerrors = 0; /* Cumulative error count */
+ const char *env_h5_drvr = NULL; /* File Driver value from environment */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
h5_reset();
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -2080,10 +2080,10 @@ main(void)
* Page buffering depends on paged aggregation which is
* currently disabled for multi/split drivers.
*/
- if ((0 == HDstrcmp(env_h5_drvr, "multi")) || (0 == HDstrcmp(env_h5_drvr, "split"))) {
+ if ((0 == strcmp(env_h5_drvr, "multi")) || (0 == strcmp(env_h5_drvr, "split"))) {
SKIPPED();
- HDputs("Skip page buffering test because paged aggregation is disabled for multi/split drivers");
+ puts("Skip page buffering test because paged aggregation is disabled for multi/split drivers");
exit(EXIT_SUCCESS);
} /* end if */
@@ -2095,11 +2095,11 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
#ifdef H5_HAVE_PARALLEL
- HDputs("Page Buffering is disabled for parallel.");
+ puts("Page Buffering is disabled for parallel.");
nerrors += verify_page_buffering_disabled(fapl, env_h5_drvr);
#else /* H5_HAVE_PARALLEL */
@@ -2118,11 +2118,11 @@ main(void)
goto error;
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
- HDputs("All Page Buffering tests passed.");
+ puts("All Page Buffering tests passed.");
exit(EXIT_SUCCESS);
@@ -2136,7 +2136,7 @@ error:
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
exit(EXIT_FAILURE);
} /* main() */
diff --git a/test/reserved.c b/test/reserved.c
index 1b29f8b..5540d04 100644
--- a/test/reserved.c
+++ b/test/reserved.c
@@ -31,8 +31,8 @@ static const char *FILENAME[] = {"rsrv_heap", "rsrv_ohdr", "rsrv_vlen", NULL};
static herr_t
rsrv_heap(void)
{
- hid_t file_id = (-1), dataset_id = (-1), dataspace_id = (-1);
- hid_t fapl = (-1), fcpl = (-1);
+ hid_t file_id = (H5I_INVALID_HID), dataset_id = (H5I_INVALID_HID), dataspace_id = (H5I_INVALID_HID);
+ hid_t fapl = (H5I_INVALID_HID), fcpl = (H5I_INVALID_HID);
hsize_t dims[1] = {1};
char filename[1024], dset_name[10];
int i;
@@ -64,7 +64,7 @@ rsrv_heap(void)
}
H5E_END_TRY
- HDsnprintf(dset_name, sizeof(dset_name), "Dset %d", i);
+ snprintf(dset_name, sizeof(dset_name), "Dset %d", i);
H5E_BEGIN_TRY
{
@@ -108,7 +108,7 @@ rsrv_heap(void)
if (H5open() < 0)
TEST_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "Dset %d", i - 2);
+ snprintf(dset_name, sizeof(dset_name), "Dset %d", i - 2);
file_id = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT);
if (file_id < 0)
@@ -160,8 +160,8 @@ error:
static herr_t
rsrv_ohdr(void)
{
- hid_t file_id = (-1), dataset_id = (-1), dataspace_id = (-1);
- hid_t fapl = (-1), fcpl = (-1), aid, attr_id;
+ hid_t file_id = (H5I_INVALID_HID), dataset_id = (H5I_INVALID_HID), dataspace_id = (H5I_INVALID_HID);
+ hid_t fapl = (H5I_INVALID_HID), fcpl = (H5I_INVALID_HID), aid, attr_id;
hsize_t dims[2];
herr_t status;
int attrval[4][6];
@@ -205,7 +205,7 @@ rsrv_ohdr(void)
} /* end for */
for (i = 0; i < 2000; i++) {
- HDsnprintf(attrname, sizeof(attrname), "attr %d", i);
+ snprintf(attrname, sizeof(attrname), "attr %d", i);
H5E_BEGIN_TRY
{
aid = H5Screate_simple(2, dims, NULL);
@@ -298,8 +298,9 @@ error:
static herr_t
rsrv_vlen(void)
{
- hid_t file_id = (-1), dataset_id = (-1), dataspace_id = (-1), type_id = (-1);
- hid_t fapl = (-1), fcpl = (-1), mem_space_id = (-1);
+ hid_t file_id = (H5I_INVALID_HID), dataset_id = (H5I_INVALID_HID), dataspace_id = (H5I_INVALID_HID),
+ type_id = (H5I_INVALID_HID);
+ hid_t fapl = (H5I_INVALID_HID), fcpl = (H5I_INVALID_HID), mem_space_id = (H5I_INVALID_HID);
hssize_t offset[1];
hsize_t start[1];
hsize_t dims[1], count[1];
@@ -465,12 +466,12 @@ main(void)
hid_t fapl;
const char *envval = NULL;
- envval = HDgetenv(HDF5_DRIVER);
+ envval = getenv(HDF5_DRIVER);
if (envval == NULL)
envval = "nomatch";
/* QAK: should be able to use the core driver? */
- if (HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") &&
- HDstrcmp(envval, "family")) {
+ if (strcmp(envval, "core") && strcmp(envval, "split") && strcmp(envval, "multi") &&
+ strcmp(envval, "family")) {
num_errs += rsrv_ohdr();
num_errs += rsrv_heap();
num_errs += rsrv_vlen();
@@ -478,14 +479,14 @@ main(void)
if (num_errs > 0)
printf("**** %d FAILURE%s! ****\n", num_errs, num_errs == 1 ? "" : "S");
else
- HDputs("All address space reservation tests passed.");
+ puts("All address space reservation tests passed.");
fapl = h5_fileaccess();
h5_cleanup(FILENAME, fapl);
return num_errs;
}
else {
- HDputs("All address space reservation tests skipped - Incompatible with current Virtual File Driver");
+ puts("All address space reservation tests skipped - Incompatible with current Virtual File Driver");
}
#endif /* BROKEN */
diff --git a/test/ros3.c b/test/ros3.c
index 267aa0a..cc058fb 100644
--- a/test/ros3.c
+++ b/test/ros3.c
@@ -288,7 +288,7 @@ jserr_str(const char *expected, const char *actual, const char *reason)
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(expected, actual, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -327,7 +327,7 @@ jserr_str(const char *expected, const char *actual, const char *reason)
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(actual, expected, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -349,12 +349,12 @@ jserr_str(const char *expected, const char *actual, const char *reason)
#define S3_TEST_RESOURCE_H5_PUBLIC "GMODO-SVM01.h5"
#define S3_TEST_RESOURCE_MISSING "missing.csv"
-static char url_text_restricted[S3_TEST_MAX_URL_SIZE] = "";
-static char url_text_public[S3_TEST_MAX_URL_SIZE] = "";
-static char url_h5_public[S3_TEST_MAX_URL_SIZE] = "";
-static char url_missing[S3_TEST_MAX_URL_SIZE] = "";
-static char s3_test_bucket_url[S3_TEST_MAX_URL_SIZE] = "";
-static hbool_t s3_test_bucket_defined = FALSE;
+static char url_text_restricted[S3_TEST_MAX_URL_SIZE] = "";
+static char url_text_public[S3_TEST_MAX_URL_SIZE] = "";
+static char url_h5_public[S3_TEST_MAX_URL_SIZE] = "";
+static char url_missing[S3_TEST_MAX_URL_SIZE] = "";
+static char s3_test_bucket_url[S3_TEST_MAX_URL_SIZE] = "";
+static bool s3_test_bucket_defined = false;
/* Global variables for aws test profile.
* An attempt is made to read ~/.aws/credentials and ~/.aws/config upon test
@@ -367,12 +367,12 @@ static char s3_test_aws_access_key_id[64];
static char s3_test_aws_secret_access_key[128];
H5FD_ros3_fapl_t restricted_access_fa = {H5FD_CURR_ROS3_FAPL_T_VERSION, /* fapl version */
- TRUE, /* authenticate */
+ true, /* authenticate */
"", /* aws region */
"", /* access key id */
""}; /* secret access key */
-H5FD_ros3_fapl_t anonymous_fa = {H5FD_CURR_ROS3_FAPL_T_VERSION, FALSE, "", "", ""};
+H5FD_ros3_fapl_t anonymous_fa = {H5FD_CURR_ROS3_FAPL_T_VERSION, false, "", "", ""};
/*---------------------------------------------------------------------------
*
@@ -412,7 +412,7 @@ test_fapl_config_validation(void)
* test-local variables *
************************/
- hid_t fapl_id = -1; /* file access property list ID */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
H5FD_ros3_fapl_t config;
H5FD_ros3_fapl_t fa_fetch;
herr_t success = SUCCEED;
@@ -427,7 +427,7 @@ test_fapl_config_validation(void)
SUCCEED,
{
H5FD_CURR_ROS3_FAPL_T_VERSION, /* version */
- FALSE, /* authenticate */
+ false, /* authenticate */
"", /* aws_region */
"", /* secret_id */
"", /* secret_key */
@@ -438,7 +438,7 @@ test_fapl_config_validation(void)
FAIL,
{
H5FD_CURR_ROS3_FAPL_T_VERSION,
- TRUE,
+ true,
"",
"",
"",
@@ -449,7 +449,7 @@ test_fapl_config_validation(void)
SUCCEED,
{
H5FD_CURR_ROS3_FAPL_T_VERSION,
- TRUE,
+ true,
"region",
"me",
"",
@@ -460,7 +460,7 @@ test_fapl_config_validation(void)
FAIL,
{
H5FD_CURR_ROS3_FAPL_T_VERSION,
- TRUE,
+ true,
"",
"me",
"",
@@ -471,7 +471,7 @@ test_fapl_config_validation(void)
FAIL,
{
H5FD_CURR_ROS3_FAPL_T_VERSION,
- TRUE,
+ true,
"where",
"",
"",
@@ -482,7 +482,7 @@ test_fapl_config_validation(void)
SUCCEED,
{
H5FD_CURR_ROS3_FAPL_T_VERSION,
- TRUE,
+ true,
"where",
"who",
"thisIsA GREAT seeeecrit",
@@ -493,7 +493,7 @@ test_fapl_config_validation(void)
FAIL,
{
12345,
- FALSE,
+ false,
"",
"",
"",
@@ -505,7 +505,7 @@ test_fapl_config_validation(void)
SUCCEED,
{
H5FD_CURR_ROS3_FAPL_T_VERSION,
- FALSE,
+ false,
"someregion",
"someid",
"somekey",
@@ -519,9 +519,9 @@ test_fapl_config_validation(void)
* TESTS *
*********/
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -620,12 +620,12 @@ test_ros3_fapl(void)
* test-local variables *
************************/
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
H5FD_ros3_fapl_t ros3_fa_0 = {
H5FD_CURR_ROS3_FAPL_T_VERSION, /* version */
- FALSE, /* authenticate */
+ false, /* authenticate */
"", /* aws_region */
"", /* secret_id */
"plugh", /* secret_key */
@@ -786,23 +786,23 @@ test_vfd_open(void)
},
};
H5FD_t *fd = NULL;
- hbool_t curl_ready = FALSE;
- hid_t fapl_id = -1;
- hid_t fapl_file_access = -1;
+ bool curl_ready = false;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t fapl_file_access = H5I_INVALID_HID;
unsigned i = 0;
unsigned tests_count = 10;
TESTING("ROS3 VFD-level open");
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
FAIL_IF(CURLE_OK != curl_global_init(CURL_GLOBAL_DEFAULT))
- curl_ready = TRUE;
+ curl_ready = true;
fapl_file_access = H5Pcreate(H5P_FILE_ACCESS);
FAIL_IF(fapl_file_access < 0)
@@ -858,7 +858,7 @@ test_vfd_open(void)
fapl_file_access = -1;
curl_global_cleanup();
- curl_ready = FALSE;
+ curl_ready = false;
PASSED();
return 0;
@@ -885,7 +885,7 @@ error:
}
H5E_END_TRY
}
- if (curl_ready == TRUE) {
+ if (curl_ready == true) {
curl_global_cleanup();
}
@@ -929,21 +929,21 @@ test_eof_eoa(void)
************************/
H5FD_t *fd_shakespeare = NULL;
- hbool_t curl_ready = FALSE;
- hid_t fapl_id = -1;
+ bool curl_ready = false;
+ hid_t fapl_id = H5I_INVALID_HID;
TESTING("ROS3 eof/eoa gets and sets");
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- HDputs(" s3 credentials are not loaded");
+ puts(" s3 credentials are not loaded");
fflush(stdout);
return 0;
}
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -953,7 +953,7 @@ test_eof_eoa(void)
*********/
FAIL_IF(CURLE_OK != curl_global_init(CURL_GLOBAL_DEFAULT))
- curl_ready = TRUE;
+ curl_ready = true;
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
FAIL_IF(0 > fapl_id)
@@ -995,7 +995,7 @@ test_eof_eoa(void)
fapl_id = -1;
curl_global_cleanup();
- curl_ready = FALSE;
+ curl_ready = false;
PASSED();
return 0;
@@ -1007,7 +1007,7 @@ error:
if (fd_shakespeare)
(void)H5FDclose(fd_shakespeare);
- if (TRUE == curl_ready)
+ if (true == curl_ready)
curl_global_cleanup();
if (fapl_id >= 0) {
H5E_BEGIN_TRY
@@ -1038,20 +1038,20 @@ test_H5FDread_without_eoa_set_fails(void)
char buffer[256];
unsigned int i = 0;
H5FD_t *file_shakespeare = NULL;
- hid_t fapl_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
TESTING("ROS3 VFD read-eoa temporal coupling library limitation ");
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- HDputs(" s3 credentials are not loaded");
+ puts(" s3 credentials are not loaded");
fflush(stdout);
return 0;
}
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -1209,20 +1209,20 @@ test_read(void)
char buffer[S3_TEST_MAX_URL_SIZE];
unsigned int i = 0;
H5FD_t *file_raven = NULL;
- hid_t fapl_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
TESTING("ROS3 VFD read/range-gets");
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- HDputs(" s3 credentials are not loaded");
+ puts(" s3 credentials are not loaded");
fflush(stdout);
return 0;
}
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -1347,16 +1347,16 @@ test_noops_and_autofails(void)
* test-local variables *
************************/
- hbool_t curl_ready = FALSE;
- hid_t fapl_id = -1;
+ bool curl_ready = false;
+ hid_t fapl_id = H5I_INVALID_HID;
H5FD_t *file = NULL;
const char data[36] = "The Force shall be with you, always";
TESTING("ROS3 VFD always-fail and no-op routines");
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -1366,7 +1366,7 @@ test_noops_and_autofails(void)
*********/
FAIL_IF(CURLE_OK != curl_global_init(CURL_GLOBAL_DEFAULT))
- curl_ready = TRUE;
+ curl_ready = true;
/* create ROS3 fapl
*/
@@ -1388,10 +1388,10 @@ test_noops_and_autofails(void)
H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDwrite(file, H5FD_MEM_DRAW, H5P_DEFAULT, 1000, 35, data),
"write must fail")} H5E_END_TRY
- H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, FALSE), "truncate must fail")} H5E_END_TRY
+ H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, false), "truncate must fail")} H5E_END_TRY
H5E_BEGIN_TRY{
- JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, TRUE), "truncate must fail (closing)")} H5E_END_TRY
+ JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, true), "truncate must fail (closing)")} H5E_END_TRY
/************
* TEARDOWN *
@@ -1404,7 +1404,7 @@ test_noops_and_autofails(void)
fapl_id = -1;
curl_global_cleanup();
- curl_ready = FALSE;
+ curl_ready = false;
PASSED();
return 0;
@@ -1424,7 +1424,7 @@ error:
if (file) {
(void)H5FDclose(file);
}
- if (curl_ready == TRUE) {
+ if (curl_ready == true) {
curl_global_cleanup();
}
@@ -1466,21 +1466,21 @@ test_cmp(void)
H5FD_t *fd_raven = NULL;
H5FD_t *fd_shakes = NULL;
H5FD_t *fd_raven_2 = NULL;
- hbool_t curl_ready = FALSE;
- hid_t fapl_id = -1;
+ bool curl_ready = false;
+ hid_t fapl_id = H5I_INVALID_HID;
TESTING("ROS3 cmp (comparison)");
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- HDputs(" s3 credentials are not loaded");
+ puts(" s3 credentials are not loaded");
fflush(stdout);
return 0;
}
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -1490,7 +1490,7 @@ test_cmp(void)
*********/
FAIL_IF(CURLE_OK != curl_global_init(CURL_GLOBAL_DEFAULT))
- curl_ready = TRUE;
+ curl_ready = true;
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
FAIL_IF(0 > fapl_id)
@@ -1527,7 +1527,7 @@ test_cmp(void)
fapl_id = -1;
curl_global_cleanup();
- curl_ready = FALSE;
+ curl_ready = false;
PASSED();
return 0;
@@ -1543,7 +1543,7 @@ error:
(void)H5FDclose(fd_raven_2);
if (fd_shakes != NULL)
(void)H5FDclose(fd_shakes);
- if (TRUE == curl_ready)
+ if (true == curl_ready)
curl_global_cleanup();
if (fapl_id >= 0) {
H5E_BEGIN_TRY
@@ -1587,21 +1587,21 @@ test_H5F_integration(void)
* test-local variables *
************************/
- hid_t file = -1;
- hid_t fapl_id = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
TESTING("S3 file access through HD5F library (H5F API)");
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- HDputs(" s3 credentials are not loaded");
+ puts(" s3 credentials are not loaded");
fflush(stdout);
return 0;
}
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -1695,37 +1695,37 @@ main(void)
* initialize test urls *
************************/
- bucket_url_env = HDgetenv("HDF5_ROS3_TEST_BUCKET_URL");
+ bucket_url_env = getenv("HDF5_ROS3_TEST_BUCKET_URL");
if (bucket_url_env == NULL || bucket_url_env[0] == '\0') {
printf("WARNING: S3 bucket url is not defined in environment "
"variable 'HDF5_ROS3_TEST_BUCKET_URL'!\n");
}
else {
- HDstrncpy(s3_test_bucket_url, bucket_url_env, S3_TEST_MAX_URL_SIZE);
- s3_test_bucket_defined = TRUE;
+ strncpy(s3_test_bucket_url, bucket_url_env, S3_TEST_MAX_URL_SIZE);
+ s3_test_bucket_defined = true;
}
- if (S3_TEST_MAX_URL_SIZE < HDsnprintf(url_text_restricted, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
- (const char *)s3_test_bucket_url,
- (const char *)S3_TEST_RESOURCE_TEXT_RESTRICTED)) {
+ if (S3_TEST_MAX_URL_SIZE < snprintf(url_text_restricted, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
+ (const char *)s3_test_bucket_url,
+ (const char *)S3_TEST_RESOURCE_TEXT_RESTRICTED)) {
printf("* ros3 setup failed (text_restricted) ! *\n");
return 1;
}
- if (S3_TEST_MAX_URL_SIZE < HDsnprintf(url_text_public, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
- (const char *)s3_test_bucket_url,
- (const char *)S3_TEST_RESOURCE_TEXT_PUBLIC)) {
+ if (S3_TEST_MAX_URL_SIZE < snprintf(url_text_public, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
+ (const char *)s3_test_bucket_url,
+ (const char *)S3_TEST_RESOURCE_TEXT_PUBLIC)) {
printf("* ros3 setup failed (text_public) ! *\n");
return 1;
}
- if (S3_TEST_MAX_URL_SIZE < HDsnprintf(url_h5_public, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
- (const char *)s3_test_bucket_url,
- (const char *)S3_TEST_RESOURCE_H5_PUBLIC)) {
+ if (S3_TEST_MAX_URL_SIZE < snprintf(url_h5_public, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
+ (const char *)s3_test_bucket_url,
+ (const char *)S3_TEST_RESOURCE_H5_PUBLIC)) {
printf("* ros3 setup failed (h5_public) ! *\n");
return 1;
}
- if (S3_TEST_MAX_URL_SIZE < HDsnprintf(url_missing, S3_TEST_MAX_URL_SIZE, "%s/%s",
- (const char *)s3_test_bucket_url,
- (const char *)S3_TEST_RESOURCE_MISSING)) {
+ if (S3_TEST_MAX_URL_SIZE < snprintf(url_missing, S3_TEST_MAX_URL_SIZE, "%s/%s",
+ (const char *)s3_test_bucket_url,
+ (const char *)S3_TEST_RESOURCE_MISSING)) {
printf("* ros3 setup failed (missing) ! *\n");
return 1;
}
@@ -1745,12 +1745,11 @@ main(void)
if (SUCCEED == H5FD_s3comms_load_aws_profile(S3_TEST_PROFILE_NAME, s3_test_aws_access_key_id,
s3_test_aws_secret_access_key, s3_test_aws_region)) {
s3_test_credentials_loaded = 1;
- HDstrncpy(restricted_access_fa.aws_region, (const char *)s3_test_aws_region,
- H5FD_ROS3_MAX_REGION_LEN);
- HDstrncpy(restricted_access_fa.secret_id, (const char *)s3_test_aws_access_key_id,
- H5FD_ROS3_MAX_SECRET_ID_LEN);
- HDstrncpy(restricted_access_fa.secret_key, (const char *)s3_test_aws_secret_access_key,
- H5FD_ROS3_MAX_SECRET_KEY_LEN);
+ strncpy(restricted_access_fa.aws_region, (const char *)s3_test_aws_region, H5FD_ROS3_MAX_REGION_LEN);
+ strncpy(restricted_access_fa.secret_id, (const char *)s3_test_aws_access_key_id,
+ H5FD_ROS3_MAX_SECRET_ID_LEN);
+ strncpy(restricted_access_fa.secret_key, (const char *)s3_test_aws_secret_access_key,
+ H5FD_ROS3_MAX_SECRET_KEY_LEN);
}
/******************
diff --git a/test/s3comms.c b/test/s3comms.c
index ea32769..40f163e 100644
--- a/test/s3comms.c
+++ b/test/s3comms.c
@@ -281,7 +281,7 @@ jserr_str(const char *expected, const char *actual, const char *reason)
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(expected, actual, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -323,7 +323,7 @@ jserr_str(const char *expected, const char *actual, const char *reason)
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(actual, expected, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -344,13 +344,13 @@ jserr_str(const char *expected, const char *actual, const char *reason)
* startup -- if unable to open either file or cannot load region, id, and key,
* tests connecting with S3 will not be run
*/
-static int s3_test_credentials_loaded = 0;
-static char s3_test_aws_region[16] = "";
-static char s3_test_aws_access_key_id[64] = "";
-static char s3_test_aws_secret_access_key[128] = "";
-static char s3_test_aws_security_token[1024] = "";
-static char s3_test_bucket_url[S3_TEST_MAX_URL_SIZE] = "";
-static hbool_t s3_test_bucket_defined = FALSE;
+static int s3_test_credentials_loaded = 0;
+static char s3_test_aws_region[16] = "";
+static char s3_test_aws_access_key_id[64] = "";
+static char s3_test_aws_secret_access_key[128] = "";
+static char s3_test_aws_security_token[1024] = "";
+static char s3_test_bucket_url[S3_TEST_MAX_URL_SIZE] = "";
+static bool s3_test_bucket_defined = false;
/*---------------------------------------------------------------------------
*
@@ -585,7 +585,7 @@ test_bytes_to_hex(void)
const char exp[17]; /* in size * 2 + 1 for null terminator */
const unsigned char in[8];
size_t size;
- hbool_t lower;
+ bool lower;
};
/************************
@@ -597,16 +597,16 @@ test_bytes_to_hex(void)
"52F3000C9A",
{82, 243, 0, 12, 154},
5,
- FALSE,
+ false,
},
{
"009a0cf3005200", /* lowercase alphas */
{0, 154, 12, 243, 0, 82, 0},
7,
- TRUE,
+ true,
},
{
- "", {17, 63, 26, 56}, 0, FALSE, /* irrelevant */
+ "", {17, 63, 26, 56}, 0, false, /* irrelevant */
},
};
int i = 0;
@@ -628,7 +628,7 @@ test_bytes_to_hex(void)
/* dest cannot be null
*/
- JSVERIFY(FAIL, H5FD_s3comms_bytes_to_hex(NULL, (const unsigned char *)"nada", 5, FALSE),
+ JSVERIFY(FAIL, H5FD_s3comms_bytes_to_hex(NULL, (const unsigned char *)"nada", 5, false),
"destination cannot be null")
PASSED();
@@ -666,7 +666,7 @@ test_hrb_init_request(void)
const char *resource;
const char *exp_res;
const char *version;
- hbool_t ret_null;
+ bool ret_null;
};
/************************
@@ -680,7 +680,7 @@ test_hrb_init_request(void)
"/path/to/some/file",
"/path/to/some/file",
"HTTP/1.1",
- FALSE,
+ false,
},
{
"null verb substitutes to GET",
@@ -688,7 +688,7 @@ test_hrb_init_request(void)
"/MYPATH/MYFILE.tiff",
"/MYPATH/MYFILE.tiff",
"HTTP/1.1",
- FALSE,
+ false,
},
{
"demonstrate non-GET verb",
@@ -696,7 +696,7 @@ test_hrb_init_request(void)
"/MYPATH/MYFILE.tiff",
"/MYPATH/MYFILE.tiff",
"HTTP/1.1",
- FALSE,
+ false,
},
{
"slash prepended to resource path, if necessary",
@@ -704,7 +704,7 @@ test_hrb_init_request(void)
"MYPATH/MYFILE.tiff",
"/MYPATH/MYFILE.tiff",
NULL,
- FALSE,
+ false,
},
{
"null resource path causes problem",
@@ -712,7 +712,7 @@ test_hrb_init_request(void)
NULL,
NULL,
NULL,
- TRUE,
+ true,
},
};
struct testcase *C = NULL;
@@ -725,7 +725,7 @@ test_hrb_init_request(void)
for (i = 0; i < ncases; i++) {
C = &cases[i];
req = H5FD_s3comms_hrb_init_request(C->verb, C->resource, C->version);
- if (cases[i].ret_null == TRUE) {
+ if (cases[i].ret_null == true) {
FAIL_IF(req != NULL);
}
else {
@@ -1188,8 +1188,8 @@ test_HMAC_SHA256(void)
SHA256_DIGEST_LENGTH,
"AWS4-HMAC-SHA256\n20130524T000000Z\n20130524/us-east-1/s3/"
"aws4_request\n7344ae5b7ee6c3e7e6b0fe0640412a37625d1fbfff95c48bbb2dc43964946972",
- HDstrlen("AWS4-HMAC-SHA256\n20130524T000000Z\n20130524/us-east-1/s3/"
- "aws4_request\n7344ae5b7ee6c3e7e6b0fe0640412a37625d1fbfff95c48bbb2dc43964946972"),
+ strlen("AWS4-HMAC-SHA256\n20130524T000000Z\n20130524/us-east-1/s3/"
+ "aws4_request\n7344ae5b7ee6c3e7e6b0fe0640412a37625d1fbfff95c48bbb2dc43964946972"),
"f0e8bdb87c964420e857bd35b5d6ed310bd44f0170aba48dd91039c6036bdb41",
SHA256_DIGEST_LENGTH * 2 + 1, /* +1 for null terminator */
},
@@ -1228,7 +1228,7 @@ test_HMAC_SHA256(void)
cases[i].msg);
if (cases[i].ret == SUCCEED) {
#ifdef VERBOSE
- if (0 != HDstrncmp(cases[i].exp, dest, HDstrlen(cases[i].exp))) {
+ if (0 != strncmp(cases[i].exp, dest, strlen(cases[i].exp))) {
/* print out how wrong things are, and then fail
*/
dest = (char *)realloc(dest, cases[i].dest_size + 1);
@@ -1240,7 +1240,7 @@ test_HMAC_SHA256(void)
#else /* VERBOSE not defined */
/* simple pass/fail test
*/
- JSVERIFY(0, HDstrncmp(cases[i].exp, dest, HDstrlen(cases[i].exp)), NULL);
+ JSVERIFY(0, strncmp(cases[i].exp, dest, strlen(cases[i].exp)), NULL);
#endif /* VERBOSE */
}
free(dest);
@@ -1313,7 +1313,7 @@ test_nlowercase(void)
JSVERIFY(SUCCEED, H5FD_s3comms_nlowercase(dest, cases[i].in, cases[i].len), cases[i].in)
if (cases[i].len > 0) {
- JSVERIFY(0, HDstrncmp(dest, cases[i].exp, cases[i].len), NULL)
+ JSVERIFY(0, strncmp(dest, cases[i].exp, cases[i].len), NULL)
}
free(dest);
} /* end for each testcase */
@@ -1679,7 +1679,7 @@ test_percent_encode_char(void)
JSVERIFY(SUCCEED, H5FD_s3comms_percent_encode_char(dest, (const unsigned char)cases[i].c, &dest_len),
NULL)
JSVERIFY(cases[i].exp_len, dest_len, NULL)
- JSVERIFY(0, HDstrncmp(dest, cases[i].exp, dest_len), NULL)
+ JSVERIFY(0, strncmp(dest, cases[i].exp, dest_len), NULL)
JSVERIFY_STR(cases[i].exp, dest, NULL)
}
@@ -1711,15 +1711,15 @@ test_s3r_get_filesize(void)
/* setup -- compose url to target resource
*/
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
- FAIL_IF(S3_TEST_MAX_URL_SIZE < HDsnprintf(url_raven, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
- S3_TEST_RESOURCE_TEXT_PUBLIC));
+ FAIL_IF(S3_TEST_MAX_URL_SIZE < snprintf(url_raven, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
+ S3_TEST_RESOURCE_TEXT_PUBLIC));
JSVERIFY(0, H5FD_s3comms_s3r_get_filesize(NULL), "filesize of the null handle should be 0")
@@ -1762,20 +1762,20 @@ test_s3r_open(void)
struct tm *now = NULL;
char iso8601now[ISO8601_SIZE];
s3r_t *handle = NULL;
- hbool_t curl_ready = FALSE;
+ bool curl_ready = false;
parsed_url_t *purl = NULL;
TESTING("s3r_open");
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- HDputs(" s3 credentials are not loaded");
+ puts(" s3 credentials are not loaded");
fflush(stdout);
return 0;
}
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -1784,14 +1784,14 @@ test_s3r_open(void)
* PRE-TEST SETUP *
******************/
- FAIL_IF(S3_TEST_MAX_URL_SIZE < HDsnprintf(url_shakespeare, S3_TEST_MAX_URL_SIZE, "%s/%s",
- s3_test_bucket_url, S3_TEST_RESOURCE_TEXT_RESTRICTED));
+ FAIL_IF(S3_TEST_MAX_URL_SIZE < snprintf(url_shakespeare, S3_TEST_MAX_URL_SIZE, "%s/%s",
+ s3_test_bucket_url, S3_TEST_RESOURCE_TEXT_RESTRICTED));
- FAIL_IF(S3_TEST_MAX_URL_SIZE < HDsnprintf(url_missing, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
- S3_TEST_RESOURCE_MISSING));
+ FAIL_IF(S3_TEST_MAX_URL_SIZE < snprintf(url_missing, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
+ S3_TEST_RESOURCE_MISSING));
- FAIL_IF(S3_TEST_MAX_URL_SIZE < HDsnprintf(url_raven, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
- S3_TEST_RESOURCE_TEXT_PUBLIC));
+ FAIL_IF(S3_TEST_MAX_URL_SIZE < snprintf(url_raven, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
+ S3_TEST_RESOURCE_TEXT_PUBLIC));
/* Set given bucket url with invalid/inactive port number for badport.
* Note, this sort of micro-management of parsed_url_t is not advised
@@ -1800,20 +1800,20 @@ test_s3r_open(void)
if (purl->port == NULL) {
purl->port = (char *)H5MM_malloc(sizeof(char) * 5);
FAIL_IF(purl->port == NULL);
- FAIL_IF(5 < HDsnprintf(purl->port, 5, "9000"))
+ FAIL_IF(5 < snprintf(purl->port, 5, "9000"))
}
- else if (HDstrcmp(purl->port, "9000") != 0) {
- FAIL_IF(5 < HDsnprintf(purl->port, 5, "9000"))
+ else if (strcmp(purl->port, "9000") != 0) {
+ FAIL_IF(5 < snprintf(purl->port, 5, "9000"))
}
else {
- FAIL_IF(5 < HDsnprintf(purl->port, 5, "1234"))
+ FAIL_IF(5 < snprintf(purl->port, 5, "1234"))
}
- FAIL_IF(S3_TEST_MAX_URL_SIZE < HDsnprintf(url_raven_badport, S3_TEST_MAX_URL_SIZE, "%s://%s:%s/%s",
- purl->scheme, purl->host, purl->port,
- S3_TEST_RESOURCE_TEXT_PUBLIC));
+ FAIL_IF(S3_TEST_MAX_URL_SIZE < snprintf(url_raven_badport, S3_TEST_MAX_URL_SIZE, "%s://%s:%s/%s",
+ purl->scheme, purl->host, purl->port,
+ S3_TEST_RESOURCE_TEXT_PUBLIC));
curl_global_init(CURL_GLOBAL_DEFAULT);
- curl_ready = TRUE;
+ curl_ready = true;
now = gmnow();
FAIL_IF(now == NULL)
@@ -1907,7 +1907,7 @@ test_s3r_open(void)
handle = NULL;
curl_global_cleanup();
- curl_ready = FALSE;
+ curl_ready = false;
FAIL_IF(FAIL == H5FD_s3comms_free_purl(purl))
purl = NULL;
@@ -1923,7 +1923,7 @@ error:
H5FD_s3comms_s3r_close(handle);
if (purl != NULL)
H5FD_s3comms_free_purl(purl);
- if (curl_ready == TRUE)
+ if (curl_ready == true)
curl_global_cleanup();
return -1;
@@ -1961,7 +1961,7 @@ test_s3r_read(void)
char url_raven[S3_TEST_MAX_URL_SIZE];
char buffer[S3COMMS_TEST_BUFFER_SIZE];
s3r_t *handle = NULL;
- hbool_t curl_ready = FALSE;
+ bool curl_ready = false;
unsigned int i = 0;
TESTING("test_s3r_read");
@@ -1969,17 +1969,17 @@ test_s3r_read(void)
/*
* initial setup
*/
- if (FALSE == s3_test_bucket_defined) {
+ if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
curl_global_init(CURL_GLOBAL_DEFAULT);
- curl_ready = TRUE;
- FAIL_IF(S3_TEST_MAX_URL_SIZE < HDsnprintf(url_raven, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
- S3_TEST_RESOURCE_TEXT_PUBLIC));
+ curl_ready = true;
+ FAIL_IF(S3_TEST_MAX_URL_SIZE < snprintf(url_raven, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
+ S3_TEST_RESOURCE_TEXT_PUBLIC));
for (i = 0; i < S3COMMS_TEST_BUFFER_SIZE; i++)
buffer[i] = '\0';
@@ -2032,7 +2032,7 @@ test_s3r_read(void)
JSVERIFY(SUCCEED, H5FD_s3comms_s3r_read(handle, (haddr_t)6370, (size_t)0, buffer), NULL)
JSVERIFY(
0,
- HDstrncmp(
+ strncmp(
buffer,
"And my soul from out that shadow that lies floating on the floor\nShall be lifted—nevermore!\n",
94),
@@ -2049,7 +2049,7 @@ test_s3r_read(void)
H5FD_s3comms_s3r_read(handle, (haddr_t)6400, (size_t)100, /* 6400+100 > 6464 */
buffer),
NULL)
- JSVERIFY(0, HDstrcmp("", buffer), NULL)
+ JSVERIFY(0, strcmp("", buffer), NULL)
/************************
* read starts past eof *
@@ -2059,14 +2059,14 @@ test_s3r_read(void)
H5FD_s3comms_s3r_read(handle, (haddr_t)1200699, /* 1200699 > 6464 */
(size_t)100, buffer),
NULL)
- JSVERIFY(0, HDstrcmp("", buffer), NULL)
+ JSVERIFY(0, strcmp("", buffer), NULL)
/**********************
* read starts on eof *
**********************/
JSVERIFY(FAIL, H5FD_s3comms_s3r_read(handle, (haddr_t)6464, (size_t)0, buffer), NULL)
- JSVERIFY(0, HDstrcmp("", buffer), NULL)
+ JSVERIFY(0, strcmp("", buffer), NULL)
/*************
* TEAR DOWN *
@@ -2076,7 +2076,7 @@ test_s3r_read(void)
handle = NULL;
curl_global_cleanup();
- curl_ready = FALSE;
+ curl_ready = false;
PASSED();
return 0;
@@ -2089,7 +2089,7 @@ error:
if (handle != NULL)
H5FD_s3comms_s3r_close(handle);
- if (curl_ready == TRUE)
+ if (curl_ready == true)
curl_global_cleanup();
return -1;
@@ -2153,7 +2153,7 @@ test_signing_key(void)
JSVERIFY(SUCCEED, H5FD_s3comms_signing_key(key, cases[i].secret_key, cases[i].region, cases[i].when),
NULL)
- JSVERIFY(0, HDstrncmp((const char *)cases[i].exp, (const char *)key, SHA256_DIGEST_LENGTH),
+ JSVERIFY(0, strncmp((const char *)cases[i].exp, (const char *)key, SHA256_DIGEST_LENGTH),
(const char *)cases[i].exp)
free(key);
@@ -2324,12 +2324,12 @@ test_trim(void)
assert(str == NULL);
str = (char *)malloc(sizeof(char) * cases[i].in_len);
assert(str != NULL);
- HDstrncpy(str, cases[i].in, cases[i].in_len);
+ strncpy(str, cases[i].in, cases[i].in_len);
JSVERIFY(SUCCEED, H5FD_s3comms_trim(dest, str, cases[i].in_len, &dest_len), NULL)
JSVERIFY(cases[i].exp_len, dest_len, cases[i].in)
if (dest_len > 0) {
- JSVERIFY(0, HDstrncmp(cases[i].exp, dest, dest_len), cases[i].exp)
+ JSVERIFY(0, strncmp(cases[i].exp, dest, dest_len), cases[i].exp)
}
free(str);
str = NULL;
@@ -2378,7 +2378,7 @@ test_uriencode(void)
struct testcase {
const char *str;
size_t s_len;
- hbool_t encode_slash;
+ bool encode_slash;
const char *expected;
};
@@ -2389,37 +2389,37 @@ test_uriencode(void)
struct testcase cases[] = {{
"/path/to/resource.jpg",
21,
- FALSE,
+ false,
"/path/to/resource.jpg",
},
{
"/path/to/resource.jpg",
21,
- TRUE,
+ true,
"%2Fpath%2Fto%2Fresource.jpg",
},
{
"string got_spaa ces",
20,
- TRUE,
+ true,
"string%20got_spaa%20%20ces",
},
{
"sp ac~es/and-sl ash.encoded",
27,
- TRUE,
+ true,
"sp%20ac~es%2Fand-sl%20ash.encoded",
},
{
"sp ac~es/and-sl ash.unencoded",
29,
- FALSE,
+ false,
"sp%20ac~es/and-sl%20ash.unencoded",
},
{
"/path/to/resource.txt",
0,
- FALSE,
+ false,
"",
}};
@@ -2439,8 +2439,8 @@ test_uriencode(void)
JSVERIFY(SUCCEED,
H5FD_s3comms_uriencode(dest, cases[i].str, str_len, cases[i].encode_slash, &dest_written),
NULL);
- JSVERIFY(HDstrlen(cases[i].expected), dest_written, NULL)
- JSVERIFY(0, HDstrncmp(dest, cases[i].expected, dest_written), cases[i].expected);
+ JSVERIFY(strlen(cases[i].expected), dest_written, NULL)
+ JSVERIFY(0, strncmp(dest, cases[i].expected, dest_written), cases[i].expected);
free(dest);
dest = NULL;
@@ -2453,9 +2453,9 @@ test_uriencode(void)
dest = (char *)malloc(sizeof(char) * 15);
assert(dest != NULL);
- JSVERIFY(FAIL, H5FD_s3comms_uriencode(NULL, "word$", 5, FALSE, &dest_written),
+ JSVERIFY(FAIL, H5FD_s3comms_uriencode(NULL, "word$", 5, false, &dest_written),
"destination cannot be NULL");
- JSVERIFY(FAIL, H5FD_s3comms_uriencode(dest, NULL, 5, FALSE, &dest_written),
+ JSVERIFY(FAIL, H5FD_s3comms_uriencode(dest, NULL, 5, false, &dest_written),
"source string cannot be NULL");
free(dest);
@@ -2520,14 +2520,14 @@ main(void)
s3_test_credentials_loaded = 1;
}
- bucket_url_env = HDgetenv("HDF5_ROS3_TEST_BUCKET_URL");
+ bucket_url_env = getenv("HDF5_ROS3_TEST_BUCKET_URL");
if (bucket_url_env == NULL || bucket_url_env[0] == '\0') {
printf("WARNING: S3 bucket url is not defined in environment "
"variable 'HDF5_ROS3_TEST_BUCKET_URL'!\n");
}
else {
- HDstrncpy(s3_test_bucket_url, bucket_url_env, S3_TEST_MAX_URL_SIZE);
- s3_test_bucket_defined = TRUE;
+ strncpy(s3_test_bucket_url, bucket_url_env, S3_TEST_MAX_URL_SIZE);
+ s3_test_bucket_defined = true;
}
/* tests ordered roughly by dependence */
diff --git a/test/select_io_dset.c b/test/select_io_dset.c
index 0f38aba..79449aa 100644
--- a/test/select_io_dset.c
+++ b/test/select_io_dset.c
@@ -141,8 +141,8 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf)
}
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "no_tconv_%s_%s_%s", chunked ? "chunked" : "contig",
- dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "no_tconv_%s_%s_%s", chunked ? "chunked" : "contig",
+ dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
/* Create dataset */
if ((did = H5Dcreate2(fid, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -163,7 +163,7 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf)
/* Set modify write buffer if requested */
if (mwbuf)
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
if ((ntrans_dxpl = H5Pcopy(dxpl)) < 0)
@@ -265,6 +265,7 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
char *wbuf_bak = NULL;
char *rbuf = NULL;
char dset_name[DSET_NAME_LEN];
+ int fillvalue = (-1);
if ((wbuf = (char *)malloc((size_t)(4 * DSET_SELECT_DIM))) == NULL)
FAIL_STACK_ERROR;
@@ -282,16 +283,20 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Set modify write buffer if requested */
if (mwbuf)
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
/* Create 1d data space */
dims[0] = DSET_SELECT_DIM;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
FAIL_STACK_ERROR;
+
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR;
+ if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillvalue) < 0)
+ FAIL_STACK_ERROR;
+
if (chunked) {
cdims[0] = DSET_SELECT_CHUNK_DIM;
if (H5Pset_chunk(dcpl, 1, cdims) < 0)
@@ -299,8 +304,8 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
}
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "no_size_change_%s_%s", chunked ? "chunked" : "contig",
- mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "no_size_change_%s_%s", chunked ? "chunked" : "contig",
+ mwbuf ? "mwbuf" : "nomwbuf");
/* Create 1d dataset */
if ((did = H5Dcreate2(fid, dset_name, H5T_STD_I32BE, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -431,8 +436,8 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign
}
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "larger_no_bkg_%s_%s_%s", chunked ? "chunked" : "contig",
- dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "larger_no_bkg_%s_%s_%s", chunked ? "chunked" : "contig",
+ dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
/* Create dataset */
if ((did = H5Dcreate2(fid, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -453,7 +458,7 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign
/* Set modify write buffer if requested */
if (mwbuf)
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
if ((ntrans_dxpl = H5Pcopy(dxpl)) < 0)
@@ -573,8 +578,8 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig
}
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "smaller_no_bkg_%s_%s_%s", chunked ? "chunked" : "contig",
- dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "smaller_no_bkg_%s_%s_%s", chunked ? "chunked" : "contig",
+ dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
/* Create 1d chunked dataset with/without data transform */
if ((did = H5Dcreate2(fid, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -595,7 +600,7 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig
/* Set modify write buffer if requested */
if (mwbuf)
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
if ((ntrans_dxpl = H5Pcopy(dxpl)) < 0)
@@ -721,6 +726,7 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
s2_t *s2_wbuf_bak = NULL;
s2_t *s2_rbuf = NULL;
char dset_name[DSET_NAME_LEN];
+ int fillvalue = -1;
/* Create dataset transfer property list */
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
@@ -731,7 +737,7 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Set modify write buffer if requested */
if (mwbuf)
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
/* Allocate buffers for datasets */
@@ -762,9 +768,13 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
dims[0] = DSET_SELECT_DIM;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
FAIL_STACK_ERROR;
+
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR;
+ if (H5Pset_fill_value(dcpl, s1_tid, &fillvalue) < 0)
+ FAIL_STACK_ERROR;
+
if (chunked) {
cdims[0] = DSET_SELECT_CHUNK_DIM;
if (H5Pset_chunk(dcpl, 1, cdims) < 0)
@@ -774,8 +784,8 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Case 5(a) */
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "cmpd_with_bkg_%s_%s", chunked ? "chunked" : "contig",
- mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "cmpd_with_bkg_%s_%s", chunked ? "chunked" : "contig",
+ mwbuf ? "mwbuf" : "nomwbuf");
/* Create 1d dataset */
if ((did = H5Dcreate2(fid, dset_name, s1_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -1081,7 +1091,7 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
/* Set modify write buffer if requested */
if (mwbuf)
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
if ((ntrans_dxpl = H5Pcopy(dxpl)) < 0)
@@ -1101,8 +1111,8 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
FAIL_STACK_ERROR;
/* Generate dataset name */
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_dset%d_%s_%s_%s", i,
- chunked ? "chunked" : "contig", dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_dset%d_%s_%s_%s", i,
+ chunked ? "chunked" : "contig", dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
/* Create ith dataset */
if ((dset_dids[i] =
@@ -1401,7 +1411,7 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Set modify write buffer if requested */
if (mwbuf)
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
dims[0] = DSET_SELECT_DIM;
@@ -1431,8 +1441,8 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
FAIL_STACK_ERROR;
/* Generate dataset name */
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_cmpd_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_cmpd_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
/* Create ith dataset */
if ((dset_dids[i] =
@@ -1842,7 +1852,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Set modify write buffer if requested */
if (mwbuf)
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
dims[0] = DSET_SELECT_DIM;
@@ -1865,8 +1875,8 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
FAIL_STACK_ERROR;
/* Generate dataset name */
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_size_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_size_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
/* Create ith dataset */
if ((dset_dids[i] = H5Dcreate2(fid, dset_names[i], H5T_STD_I32BE, file_sids[i], H5P_DEFAULT, dcpl,
@@ -2276,7 +2286,7 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
/* Set modify write buffer if requested */
if (mwbuf)
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
/* Set dataset layout: contiguous or chunked */
@@ -2332,24 +2342,24 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
mm = HDrandom() % (int)ndsets;
if (mm == 0) {
dset_types[i] = DSET_WITH_NO_CONV;
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_nconv_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_nconv_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
if ((dset_dids[i] = H5Dcreate2(fid, dset_names[i], H5T_NATIVE_INT, file_sids[i], H5P_DEFAULT,
dcpl, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
}
else if (mm == 1) {
dset_types[i] = DSET_WITH_CONV_AND_NO_BKG;
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_conv_nbkg_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_conv_nbkg_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
if ((dset_dids[i] = H5Dcreate2(fid, dset_names[i], H5T_NATIVE_LONG, file_sids[i], H5P_DEFAULT,
dcpl, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
}
else {
dset_types[i] = DSET_WITH_CONV_AND_BKG;
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_conv_bkg_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_conv_bkg_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
if ((dset_dids[i] = H5Dcreate2(fid, dset_names[i], s1_tid, file_sids[i], H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
@@ -2729,8 +2739,9 @@ error:
* Verify H5Pset/get_selection_io API works as expected
*/
static herr_t
-test_set_get_select_io_mode(hid_t fid)
+test_set_get_select_io_mode(const char *filename, hid_t fapl)
{
+ hid_t fid = H5I_INVALID_HID;
hid_t did = H5I_INVALID_HID;
hid_t sid = H5I_INVALID_HID;
hid_t dcpl = H5I_INVALID_HID;
@@ -2744,6 +2755,9 @@ test_set_get_select_io_mode(hid_t fid)
printf("\n");
TESTING("H5Pget/set_selection_io_mode()");
+ if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ FAIL_STACK_ERROR;
+
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
@@ -2808,6 +2822,8 @@ test_set_get_select_io_mode(hid_t fid)
FAIL_STACK_ERROR;
if (H5Sclose(sid) < 0)
FAIL_STACK_ERROR;
+ if (H5Fclose(fid) < 0)
+ FAIL_STACK_ERROR;
PASSED();
@@ -2820,6 +2836,7 @@ error:
H5Dclose(did);
H5Pclose(dcpl);
H5Pclose(dxpl);
+ H5Fclose(fid);
}
H5E_END_TRY
@@ -2843,7 +2860,7 @@ test_no_selection_io_cause_mode(const char *filename, hid_t fapl, uint32_t test_
hid_t sid = H5I_INVALID_HID;
hsize_t dims[1];
hsize_t cdims[1];
- hbool_t is_chunked = FALSE;
+ bool is_chunked = false;
hid_t tid = H5T_NATIVE_INT;
uint32_t no_selection_io_cause_write = 0;
uint32_t no_selection_io_cause_read = 0;
@@ -2859,8 +2876,8 @@ test_no_selection_io_cause_mode(const char *filename, hid_t fapl, uint32_t test_
/* The split and multi driver are not compatible with page buffering. No message since the other
* cases aren't skipped. */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
- if (env_h5_drvr && (!HDstrcmp(env_h5_drvr, "split") || !HDstrcmp(env_h5_drvr, "multi")))
+ env_h5_drvr = getenv(HDF5_DRIVER);
+ if (env_h5_drvr && (!strcmp(env_h5_drvr, "split") || !strcmp(env_h5_drvr, "multi")))
return 0;
}
@@ -2908,13 +2925,13 @@ test_no_selection_io_cause_mode(const char *filename, hid_t fapl, uint32_t test_
if (test_mode == TEST_DATASET_FILTER) {
if (H5Pset_deflate(dcpl, 9) < 0)
FAIL_STACK_ERROR;
- is_chunked = TRUE;
+ is_chunked = true;
no_selection_io_cause_write_expected |= H5D_SEL_IO_DATASET_FILTER;
no_selection_io_cause_read_expected |= H5D_SEL_IO_DATASET_FILTER;
}
if (test_mode == TEST_CHUNK_CACHE) {
- is_chunked = TRUE;
+ is_chunked = true;
no_selection_io_cause_write_expected |= H5D_SEL_IO_CHUNK_CACHE;
no_selection_io_cause_read_expected |= H5D_SEL_IO_CHUNK_CACHE;
}
@@ -2945,7 +2962,7 @@ test_no_selection_io_cause_mode(const char *filename, hid_t fapl, uint32_t test_
/* If we're using in-place type conversion sel io will succeed and only switch to scalar at the
* VFL */
if (test_mode & TEST_IN_PLACE_TCONV) {
- if (H5Pset_modify_write_buf(dxpl, TRUE) < 0)
+ if (H5Pset_modify_write_buf(dxpl, true) < 0)
FAIL_STACK_ERROR;
no_selection_io_cause_write_expected |= H5D_SEL_IO_NO_VECTOR_OR_SELECTION_IO_CB;
}
@@ -3123,150 +3140,176 @@ main(void)
{
int nerrors = 0;
char filename[FILENAME_BUF_SIZE];
- hid_t fapl = H5I_INVALID_HID;
- hid_t fid = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t fapl2 = H5I_INVALID_HID;
+ hid_t fid = H5I_INVALID_HID;
int test_select_config;
- unsigned chunked;
- unsigned dtrans;
- unsigned mwbuf;
+ unsigned set_cache; /* Set chunk cache to 0 or not */
+ unsigned chunked; /* Set to chunked dataset or not */
+ unsigned dtrans; /* Set to using data transform or not */
+ unsigned mwbuf; /* With/without modifying write buffer */
/* Testing setup */
h5_reset();
fapl = h5_fileaccess();
-
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ if ((fapl2 = H5Pcopy(fapl)) < 0)
TEST_ERROR;
- /* Test with contiguous or chunked dataset */
- for (chunked = FALSE; chunked <= TRUE; chunked++) {
+ for (set_cache = FALSE; set_cache <= TRUE; set_cache++) {
- /* Data transforms only apply to integer or floating-point datasets */
- /* therefore, not all tests are run with data transform */
- for (dtrans = FALSE; dtrans <= TRUE; dtrans++) {
+ /* Disable chunk caching on fapl2 */
+ if (set_cache) {
+ if (H5Pset_cache(fapl2, 0, (size_t)0, (size_t)0, 0.0) < 0)
+ TEST_ERROR;
+ }
- /* Test with and without modify_write_buf turned on */
- for (mwbuf = FALSE; mwbuf <= TRUE; mwbuf++) {
- /* Print configuration message */
- printf("Testing for selection I/O ");
- if (chunked)
- printf("with chunked dataset, ");
- else
- printf("with contiguous dataset, ");
- if (dtrans)
- printf("data transform, ");
- else
- printf("without data transform, ");
- if (mwbuf)
- printf("and with modifying write buffers\n");
- else
- printf("and without modifying write buffers\n");
+ if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl2)) < 0)
+ TEST_ERROR;
- for (test_select_config = (int)TEST_NO_TYPE_CONV;
- test_select_config < (int)TEST_SELECT_NTESTS; test_select_config++) {
+ /* Test with contiguous or chunked dataset */
+ for (chunked = false; chunked <= true; chunked++) {
- switch (test_select_config) {
- case TEST_NO_TYPE_CONV: /* case 1 */
- TESTING_2("No type conversion (null case)");
+ /* Data transforms only apply to integer or floating-point datasets */
+ /* therefore, not all tests are run with data transform */
+ for (dtrans = false; dtrans <= true; dtrans++) {
- nerrors += (test_no_type_conv(fid, chunked, dtrans, mwbuf) < 0 ? 1 : 0);
+ /* Test with and without modify_write_buf turned on */
+ for (mwbuf = false; mwbuf <= true; mwbuf++) {
- break;
+ /* Print configuration message */
+ printf("Testing for selection I/O ");
- case TEST_NO_SIZE_CHANGE_NO_BKG: /* case 2 */
- TESTING_2("No size change, no background buffer");
+ if (set_cache)
+ printf("with 0 chunk cache, ");
+ else
+ printf("with default chunk cache, ");
- /* Data transforms does not apply to the dataset datatype for this test */
- if (dtrans)
- SKIPPED();
- else
- nerrors += (test_no_size_change_no_bkg(fid, chunked, mwbuf) < 0 ? 1 : 0);
+ if (chunked)
+ printf("with chunked dataset, ");
+ else
+ printf("with contiguous dataset, ");
- break;
+ if (dtrans)
+ printf("data transform, ");
+ else
+ printf("without data transform, ");
- case TEST_LARGER_MEM_NO_BKG: /* case 3 */
- TESTING_2("Larger memory type, no background buffer");
+ if (mwbuf)
+ printf("and with modifying write buffers\n");
+ else
+ printf("and without modifying write buffers\n");
- nerrors += (test_larger_mem_type_no_bkg(fid, chunked, dtrans, mwbuf) < 0 ? 1 : 0);
+ for (test_select_config = (int)TEST_NO_TYPE_CONV;
+ test_select_config < (int)TEST_SELECT_NTESTS; test_select_config++) {
- break;
+ switch (test_select_config) {
+ case TEST_NO_TYPE_CONV: /* case 1 */
+ TESTING_2("No type conversion (null case)");
- case TEST_SMALLER_MEM_NO_BKG: /* case 4 */
- TESTING_2("Smaller memory type, no background buffer");
+ nerrors += (test_no_type_conv(fid, chunked, dtrans, mwbuf) < 0 ? 1 : 0);
- nerrors +=
- (test_smaller_mem_type_no_bkg(fid, chunked, dtrans, mwbuf) < 0 ? 1 : 0);
+ break;
- break;
+ case TEST_NO_SIZE_CHANGE_NO_BKG: /* case 2 */
+ TESTING_2("No size change, no background buffer");
- case TEST_CMPD_WITH_BKG: /* case 5 */
- TESTING_2("Compound types with background buffer");
+ /* Data transforms does not apply to the dataset datatype for this test */
+ if (dtrans)
+ SKIPPED();
+ else
+ nerrors += (test_no_size_change_no_bkg(fid, chunked, mwbuf) < 0 ? 1 : 0);
- /* Data transforms does not apply to the dataset datatype for this test */
- if (dtrans)
- SKIPPED();
- else
- nerrors += (test_cmpd_with_bkg(fid, chunked, mwbuf) < 0 ? 1 : 0);
+ break;
- break;
+ case TEST_LARGER_MEM_NO_BKG: /* case 3 */
+ TESTING_2("Larger memory type, no background buffer");
- case TEST_MULTI_CONV_NO_BKG: /* case 6 */
- TESTING_2("multi-datasets: type conv + no bkg buffer");
+ nerrors +=
+ (test_larger_mem_type_no_bkg(fid, chunked, dtrans, mwbuf) < 0 ? 1 : 0);
- nerrors += test_multi_dsets_no_bkg(fid, chunked, dtrans, mwbuf);
- break;
+ break;
- case TEST_MULTI_CONV_BKG: /* case 7 */
- TESTING_2("multi-datasets: type conv + bkg buffer");
+ case TEST_SMALLER_MEM_NO_BKG: /* case 4 */
+ TESTING_2("Smaller memory type, no background buffer");
- /* Data transforms does not apply to the dataset datatype for this test */
- if (dtrans)
- SKIPPED();
- else
- nerrors += test_multi_dsets_cmpd_with_bkg(fid, chunked, mwbuf);
+ nerrors +=
+ (test_smaller_mem_type_no_bkg(fid, chunked, dtrans, mwbuf) < 0 ? 1 : 0);
- break;
+ break;
- case TEST_MULTI_CONV_SIZE_CHANGE: /* case 8 */
- TESTING_2("multi-datasets: type conv + size change + no bkg buffer");
+ case TEST_CMPD_WITH_BKG: /* case 5 */
+ TESTING_2("Compound types with background buffer");
- /* Data transforms does not apply to the dataset datatype for this test */
- if (dtrans)
- SKIPPED();
- else
- nerrors += test_multi_dsets_size_change_no_bkg(fid, chunked, mwbuf);
+ /* Data transforms does not apply to the dataset datatype for this test */
+ if (dtrans)
+ SKIPPED();
+ else
+ nerrors += (test_cmpd_with_bkg(fid, chunked, mwbuf) < 0 ? 1 : 0);
- break;
+ break;
- case TEST_MULTI_ALL: /* case 9 */
- TESTING_2("multi-datasets: no conv + conv without bkg + conv with bkg");
+ case TEST_MULTI_CONV_NO_BKG: /* case 6 */
+ TESTING_2("multi-datasets: type conv + no bkg buffer");
- /* Data transforms does not apply to the dataset datatype for this test */
- if (dtrans)
- SKIPPED();
- else
- nerrors += test_multi_dsets_all(10, fid, chunked, mwbuf);
+ nerrors += test_multi_dsets_no_bkg(fid, chunked, dtrans, mwbuf);
- break;
+ break;
- case TEST_SELECT_NTESTS:
- default:
- TEST_ERROR;
+ case TEST_MULTI_CONV_BKG: /* case 7 */
+ TESTING_2("multi-datasets: type conv + bkg buffer");
- } /* end switch */
- } /* end for test_select_config */
+ /* Data transforms does not apply to the dataset datatype for this test */
+ if (dtrans)
+ SKIPPED();
+ else
+ nerrors += test_multi_dsets_cmpd_with_bkg(fid, chunked, mwbuf);
- } /* end mwbuf */
+ break;
- } /* end dtrans */
+ case TEST_MULTI_CONV_SIZE_CHANGE: /* case 8 */
+ TESTING_2("multi-datasets: type conv + size change + no bkg buffer");
- } /* end chunked */
+ /* Data transforms does not apply to the dataset datatype for this test */
+ if (dtrans)
+ SKIPPED();
+ else
+ nerrors += test_multi_dsets_size_change_no_bkg(fid, chunked, mwbuf);
- nerrors += test_set_get_select_io_mode(fid);
+ break;
- if (H5Fclose(fid) < 0)
- TEST_ERROR;
+ case TEST_MULTI_ALL: /* case 9 */
+ TESTING_2("multi-datasets: no conv + conv without bkg + conv with bkg");
+
+ /* Data transforms does not apply to the dataset datatype for this test */
+ if (dtrans)
+ SKIPPED();
+ else
+ nerrors += test_multi_dsets_all(10, fid, chunked, mwbuf);
+
+ break;
+
+ case TEST_SELECT_NTESTS:
+ default:
+ TEST_ERROR;
+
+ } /* end switch */
+ } /* end for test_select_config */
+
+ } /* end mwbuf */
+
+ } /* end dtrans */
+
+ } /* end chunked */
+
+ if (H5Fclose(fid) < 0)
+ TEST_ERROR;
+
+ } /* end set_cache */
+
+ /* Use own file */
+ nerrors += test_set_get_select_io_mode(filename, fapl);
/* Use own file */
nerrors += test_get_no_selection_io_cause(filename, fapl);
diff --git a/test/set_extent.c b/test/set_extent.c
index 661ef4e..d418f2e 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -78,21 +78,21 @@ typedef enum rank4_index_t {
RANK4_NINDICES, /* Must be last */
} rank4_index_t;
-static int do_ranks(hid_t fapl, hbool_t new_format, hbool_t use_select_io);
-static int do_layouts(hid_t fapl, hbool_t use_select_io);
-
-static int test_rank1(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fill_value, hbool_t disable_edge_filters,
- hbool_t set_istore_k);
-static int test_rank2(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fill_value, hbool_t disable_edge_filters,
- hbool_t set_istore_k);
-static int test_rank3(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fill_value, hbool_t disable_edge_filters,
- hbool_t set_istore_k);
-static int test_random_rank4(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fillvalue,
- hbool_t disable_edge_filters, hbool_t do_sparse, rank4_index_t index_type);
-static int test_random_rank4_vl(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fillvalue,
- hbool_t disable_edge_filters, hbool_t do_sparse, rank4_index_t index_type);
-
-static int test_external(hid_t fapl, hbool_t use_select_io);
+static int do_ranks(hid_t fapl, bool new_format, bool use_select_io);
+static int do_layouts(hid_t fapl, bool use_select_io);
+
+static int test_rank1(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fill_value, bool disable_edge_filters,
+ bool set_istore_k);
+static int test_rank2(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fill_value, bool disable_edge_filters,
+ bool set_istore_k);
+static int test_rank3(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fill_value, bool disable_edge_filters,
+ bool set_istore_k);
+static int test_random_rank4(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fillvalue, bool disable_edge_filters,
+ bool do_sparse, rank4_index_t index_type);
+static int test_random_rank4_vl(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fillvalue,
+ bool disable_edge_filters, bool do_sparse, rank4_index_t index_type);
+
+static int test_external(hid_t fapl, bool use_select_io);
static int test_layouts(H5D_layout_t layout, hid_t fapl, hid_t dxpl);
static void test_random_rank4_dump(unsigned ndim_sets, hsize_t dim_log[][4], hsize_t cdims[4], int j, int k,
int l, int m);
@@ -111,13 +111,13 @@ main(void)
unsigned chunk_cache; /* Whether to enable chunk caching */
int nerrors = 0;
const char *env_h5_drvr; /* File Driver value from environment */
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
/* Current VFD that does not support contiguous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
/* Initialize random number seed */
HDsrandom((unsigned)HDtime(NULL));
@@ -142,11 +142,11 @@ main(void)
TEST_ERROR;
/* Test with old & new format groups */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl;
/* Test chunked datasets with and without chunk cache */
- for (chunk_cache = FALSE; chunk_cache <= TRUE; chunk_cache++) {
+ for (chunk_cache = false; chunk_cache <= true; chunk_cache++) {
/* Output message about the type of format */
if (new_format)
printf("Testing with new file format");
@@ -155,11 +155,11 @@ main(void)
/* Set the FAPL for the chunk cache settings */
if (chunk_cache) {
- HDputs(" and chunk cache enabled:");
+ puts(" and chunk cache enabled:");
my_fapl = fapl;
} /* end if */
else {
- HDputs(" and chunk cache disabled:");
+ puts(" and chunk cache disabled:");
my_fapl = fapl2;
} /* end else */
@@ -179,19 +179,19 @@ main(void)
/* Tests which use chunked datasets */
if (!new_format || (new_format && contig_addr_vfd)) {
/* Run do_ranks() with H5D_SELECTION_IO_MODE_DEFAULT/H5D_SELECTION_IO_MODE_ON */
- nerrors += do_ranks(my_fapl, new_format, FALSE) < 0 ? 1 : 0;
- nerrors += do_ranks(my_fapl, new_format, TRUE) < 0 ? 1 : 0;
+ nerrors += do_ranks(my_fapl, new_format, false) < 0 ? 1 : 0;
+ nerrors += do_ranks(my_fapl, new_format, true) < 0 ? 1 : 0;
}
} /* end for */
/* Tests which do not use chunked datasets */
if (!new_format || (new_format && contig_addr_vfd)) {
/* Run test_external() with H5D_SELECTION_IO_MODE_DEFAULT/H5D_SELECTION_IO_MODE_ON */
- nerrors += test_external(fapl, FALSE) < 0 ? 1 : 0;
- nerrors += test_external(fapl, TRUE) < 0 ? 1 : 0;
+ nerrors += test_external(fapl, false) < 0 ? 1 : 0;
+ nerrors += test_external(fapl, true) < 0 ? 1 : 0;
/* Run do_layouts() with H5D_SELECTION_IO_MODE_DEFAULT/H5D_SELECTION_IO_MODE_ON */
- nerrors += do_layouts(fapl, FALSE) < 0 ? 1 : 0;
- nerrors += do_layouts(fapl, TRUE) < 0 ? 1 : 0;
+ nerrors += do_layouts(fapl, false) < 0 ? 1 : 0;
+ nerrors += do_layouts(fapl, true) < 0 ? 1 : 0;
}
} /* end for */
@@ -209,7 +209,7 @@ main(void)
if (nerrors)
goto error;
- HDputs("All H5Dset_extent tests passed.");
+ puts("All H5Dset_extent tests passed.");
return 0;
@@ -224,17 +224,17 @@ error:
*-------------------------------------------------------------------------
*/
static int
-do_ranks(hid_t fapl, hbool_t new_format, hbool_t use_select_io)
+do_ranks(hid_t fapl, bool new_format, bool use_select_io)
{
- hbool_t do_fillvalue = FALSE;
- hbool_t disable_edge_filters = FALSE;
+ bool do_fillvalue = false;
+ bool disable_edge_filters = false;
rank4_index_t index_type;
- hid_t dcpl = -1;
- hid_t dxpl = -1;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t dxpl = H5I_INVALID_HID;
int fillvalue = FILL_VALUE;
unsigned config;
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
@@ -272,21 +272,21 @@ do_ranks(hid_t fapl, hbool_t new_format, hbool_t use_select_io)
} /* end if */
if (config & CONFIG_FILL) {
- do_fillvalue = TRUE;
+ do_fillvalue = true;
if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillvalue) < 0)
TEST_ERROR;
} /* end if */
else
- do_fillvalue = FALSE;
+ do_fillvalue = false;
if (config & CONFIG_EARLY_ALLOC)
if (H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0)
TEST_ERROR;
if (config & CONFIG_UNFILT_EDGE)
- disable_edge_filters = TRUE;
+ disable_edge_filters = true;
else
- disable_edge_filters = FALSE;
+ disable_edge_filters = false;
/* Run tests */
if (do_fillvalue) {
@@ -301,22 +301,22 @@ do_ranks(hid_t fapl, hbool_t new_format, hbool_t use_select_io)
else if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
TEST_ERROR;
- if (test_rank1(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
+ if (test_rank1(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, false) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 1")
printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" : "H5D_FILL_TIME_ALLOC"));
goto error;
} /* end if */
- if (test_rank2(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
+ if (test_rank2(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, false) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 2")
printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" : "H5D_FILL_TIME_ALLOC"));
goto error;
} /* end if */
- if (test_rank3(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
+ if (test_rank3(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, false) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 3")
printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" : "H5D_FILL_TIME_ALLOC"));
goto error;
} /* end if */
- if (test_rank2(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, TRUE) < 0) {
+ if (test_rank2(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, true) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 2 with non-default indexed storage B-tree")
printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET" : "H5D_FILL_TIME_ALLOC"));
goto error;
@@ -329,19 +329,19 @@ do_ranks(hid_t fapl, hbool_t new_format, hbool_t use_select_io)
if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
TEST_ERROR;
- if (test_rank1(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
+ if (test_rank1(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, false) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 1")
goto error;
} /* end if */
- if (test_rank2(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
+ if (test_rank2(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, false) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 2")
goto error;
} /* end if */
- if (test_rank3(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
+ if (test_rank3(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, false) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 3")
goto error;
} /* end if */
- if (test_rank2(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, TRUE) < 0) {
+ if (test_rank2(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, true) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 2 with non-default indexed storage B-tree")
goto error;
} /* end if */
@@ -356,7 +356,7 @@ do_ranks(hid_t fapl, hbool_t new_format, hbool_t use_select_io)
*/
for (index_type = RANK4_INDEX_BTREE; index_type < RANK4_NINDICES; index_type++) {
/* Standard test */
- if (test_random_rank4(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, FALSE, index_type) <
+ if (test_random_rank4(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, false, index_type) <
0) {
DO_RANKS_PRINT_CONFIG("Randomized rank 4")
printf(" Index: %s\n", index_type == RANK4_INDEX_BTREE
@@ -367,7 +367,7 @@ do_ranks(hid_t fapl, hbool_t new_format, hbool_t use_select_io)
if (!driver_is_parallel) {
/* VL test */
- if (test_random_rank4_vl(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, FALSE,
+ if (test_random_rank4_vl(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, false,
index_type) < 0) {
DO_RANKS_PRINT_CONFIG("Randomized rank 4 variable length")
printf(" Index: %s\n", index_type == RANK4_INDEX_BTREE
@@ -379,7 +379,7 @@ do_ranks(hid_t fapl, hbool_t new_format, hbool_t use_select_io)
/* Sparse allocation test (regular and VL) */
if (!(config & CONFIG_EARLY_ALLOC)) {
- if (test_random_rank4(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, TRUE,
+ if (test_random_rank4(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, true,
index_type) < 0) {
DO_RANKS_PRINT_CONFIG("Randomized rank 4 with sparse allocation")
printf(" Index: %s\n", index_type == RANK4_INDEX_BTREE
@@ -389,7 +389,7 @@ do_ranks(hid_t fapl, hbool_t new_format, hbool_t use_select_io)
} /* end if */
if (!driver_is_parallel) {
- if (test_random_rank4_vl(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, TRUE,
+ if (test_random_rank4_vl(fapl, dcpl, dxpl, do_fillvalue, disable_edge_filters, true,
index_type) < 0) {
DO_RANKS_PRINT_CONFIG("Randomized rank 4 variable length with sparse allocation")
printf(" Index: %s\n",
@@ -435,10 +435,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-do_layouts(hid_t fapl, hbool_t use_select_io)
+do_layouts(hid_t fapl, bool use_select_io)
{
- hid_t new_fapl = -1;
- hid_t dxpl = -1;
+ hid_t new_fapl = H5I_INVALID_HID;
+ hid_t dxpl = H5I_INVALID_HID;
H5F_libver_t low, high; /* Low and high bounds */
herr_t ret; /* Generic return value */
@@ -510,14 +510,14 @@ error:
*/
static int
-test_rank1(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fill_value, hbool_t disable_edge_filters,
- hbool_t set_istore_k)
+test_rank1(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fill_value, bool disable_edge_filters,
+ bool set_istore_k)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t sid = -1;
- hid_t my_dcpl = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t my_dcpl = H5I_INVALID_HID;
hid_t fcpl;
hsize_t dims_o[RANK1] = {DIM0}; /* original dimensions */
hsize_t dims_s[RANK1] = {DIMS0}; /* shrinking dimensions */
@@ -844,14 +844,14 @@ error:
*/
static int
-test_rank2(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fill_value, hbool_t disable_edge_filters,
- hbool_t set_istore_k)
+test_rank2(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fill_value, bool disable_edge_filters,
+ bool set_istore_k)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t sid = -1;
- hid_t my_dcpl = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t my_dcpl = H5I_INVALID_HID;
hid_t fcpl;
hsize_t dims_o[RANK2] = {DIM0, DIM1}; /* original dimensions */
hsize_t dims_s[RANK2] = {DIMS0, DIMS1}; /* shrinking dimensions */
@@ -1339,14 +1339,14 @@ error:
*/
static int
-test_rank3(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fill_value, hbool_t disable_edge_filters,
- hbool_t set_istore_k)
+test_rank3(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fill_value, bool disable_edge_filters,
+ bool set_istore_k)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t sid = -1;
- hid_t my_dcpl = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t my_dcpl = H5I_INVALID_HID;
hid_t fcpl;
hsize_t dims_o[RANK3] = {DIM0, DIM1, DIM2}; /* original dimensions */
hsize_t dims_s[RANK3] = {DIMS0, DIMS1, DIMS2}; /* shrinking dimensions */
@@ -1774,14 +1774,14 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_external(hid_t fapl, hbool_t use_select_io)
+test_external(hid_t fapl, bool use_select_io)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t sid = -1;
- hid_t dcpl = -1;
- hid_t dxpl = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t dxpl = H5I_INVALID_HID;
hsize_t dims_o[RANK2] = {DIM0, DIM1}; /* original dimensions */
hsize_t dims_s[RANK2] = {DIMS0, DIMS1}; /* shrinking dimensions */
hsize_t dims_e[RANK2] = {DIME0, DIM1}; /* extended dimensions, dimension 1 is the original */
@@ -2080,10 +2080,10 @@ static int
test_layouts(H5D_layout_t layout, hid_t fapl, hid_t dxpl)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t sid = -1;
- hid_t dcpl = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
herr_t ret;
hsize_t dims_o[RANK2] = {DIM0, DIM1}; /* original dimensions */
hsize_t dims_s[RANK2] = {DIMS0, DIMS1}; /* shrinking dimensions */
@@ -2293,14 +2293,14 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_random_rank4(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fillvalue, hbool_t disable_edge_filters,
- hbool_t do_sparse, rank4_index_t index_type)
+test_random_rank4(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fillvalue, bool disable_edge_filters,
+ bool do_sparse, rank4_index_t index_type)
{
- hid_t file = -1;
- hid_t dset = -1;
- hid_t fspace = -1;
- hid_t mspace = -1;
- hid_t my_dcpl = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
+ hid_t fspace = H5I_INVALID_HID;
+ hid_t mspace = H5I_INVALID_HID;
+ hid_t my_dcpl = H5I_INVALID_HID;
hsize_t dims[4] = {10, 10, 10, 10}; /* Dataset's dimensions */
hsize_t max_dims[4] = {10, 10, 10, 10}; /* Maximum dimensions */
hsize_t old_dims[4]; /* Old dataset dimensions */
@@ -2318,8 +2318,8 @@ test_random_rank4(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fillvalue, hboo
struct {
hsize_t arr[RAND4_NITER + 1][4];
} *dim_log = NULL; /* Log of dataset dimensions */
- hbool_t zero_dim = FALSE; /* Whether a dimension is 0 */
- hbool_t writing = TRUE; /* Whether we're writing to the dset */
+ bool zero_dim = false; /* Whether a dimension is 0 */
+ bool writing = true; /* Whether we're writing to the dset */
unsigned scalar_iter; /* Iteration to shrink dset to 1x1x1x1 */
unsigned i, j, k, l, m; /* Local indices */
char filename[NAME_BUF_SIZE];
@@ -2399,12 +2399,12 @@ test_random_rank4(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fillvalue, hboo
/* Generate new dataset size, 0-10 (0 much less likely). If i is
* scalar_iter, set all dims to 1. */
- zero_dim = FALSE;
+ zero_dim = false;
for (j = 0; j < 4; j++) {
old_dims[j] = dims[j];
if ((dims[j] = (hsize_t)(i == scalar_iter ? 1 : (HDrandom() % 11))) == 0)
if ((dims[j] = (hsize_t)(HDrandom() % 11)) == 0)
- zero_dim = TRUE;
+ zero_dim = true;
dim_log->arr[i + 1][j] = dims[j];
} /* end for */
@@ -2510,15 +2510,15 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_random_rank4_vl(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fillvalue, hbool_t disable_edge_filters,
- hbool_t do_sparse, rank4_index_t index_type)
+test_random_rank4_vl(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fillvalue, bool disable_edge_filters,
+ bool do_sparse, rank4_index_t index_type)
{
- hid_t file = -1;
- hid_t dset = -1;
- hid_t type = -1;
- hid_t fspace = -1;
- hid_t mspace = -1;
- hid_t my_dcpl = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
+ hid_t type = H5I_INVALID_HID;
+ hid_t fspace = H5I_INVALID_HID;
+ hid_t mspace = H5I_INVALID_HID;
+ hid_t my_dcpl = H5I_INVALID_HID;
hsize_t dims[4] = {10, 10, 10, 10}; /* Dataset's dimensions */
hsize_t max_dims[4] = {10, 10, 10, 10}; /* Maximum dimensions */
hsize_t old_dims[4]; /* Old dataset dimensions */
@@ -2536,8 +2536,8 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fillvalue, h
struct {
hsize_t arr[RAND4_NITER + 1][4];
} *dim_log = NULL; /* Log of dataset dimensions */
- hbool_t zero_dim = FALSE; /* Whether a dimension is 0 */
- hbool_t writing = TRUE; /* Whether we're writing to the dset */
+ bool zero_dim = false; /* Whether a dimension is 0 */
+ bool writing = true; /* Whether we're writing to the dset */
hvl_t fill_value; /* Fill value */
unsigned scalar_iter; /* Iteration to shrink dset to 1x1x1x1 */
unsigned i, j, k, l, m; /* Local indices */
@@ -2661,12 +2661,12 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hid_t dxpl, hbool_t do_fillvalue, h
/* Generate new dataset size, 0-10 (0 much less likely). If i is
* scalar_iter, set all dims to 1. */
- zero_dim = FALSE;
+ zero_dim = false;
for (j = 0; j < 4; j++) {
old_dims[j] = dims[j];
if ((dims[j] = (hsize_t)(i == scalar_iter ? 1 : (HDrandom() % 11))) == 0)
if ((dims[j] = (hsize_t)(HDrandom() % 11)) == 0)
- zero_dim = TRUE;
+ zero_dim = true;
dim_log->arr[i + 1][j] = dims[j];
}
diff --git a/test/stab.c b/test/stab.c
index 6bdba65..1b7da01 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -83,10 +83,10 @@ static const char *FILENAME[] = {"stab", NULL};
*-------------------------------------------------------------------------
*/
static int
-test_misc(hid_t fcpl, hid_t fapl, hbool_t new_format)
+test_misc(hid_t fcpl, hid_t fapl, bool new_format)
{
- hid_t fid = (-1); /* File ID */
- hid_t g1 = (-1), g2 = (-1), g3 = (-1);
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t g1 = (H5I_INVALID_HID), g2 = (H5I_INVALID_HID), g3 = (H5I_INVALID_HID);
char filename[NAME_BUF_SIZE];
char comment[64];
@@ -125,9 +125,9 @@ test_misc(hid_t fcpl, hid_t fapl, hbool_t new_format)
TEST_ERROR;
if (H5Oget_comment_by_name(g3, "././.", comment, sizeof comment, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(comment, "hello world") != 0) {
+ if (strcmp(comment, "hello world") != 0) {
H5_FAILED();
- HDputs(" Read the wrong comment string from the group.");
+ puts(" Read the wrong comment string from the group.");
printf(" got: \"%s\"\n ans: \"hello world\"\n", comment);
TEST_ERROR;
}
@@ -184,10 +184,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_long(hid_t fcpl, hid_t fapl, hbool_t new_format)
+test_long(hid_t fcpl, hid_t fapl, bool new_format)
{
- hid_t fid = (-1); /* File ID */
- hid_t g1 = (-1), g2 = (-1);
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t g1 = (H5I_INVALID_HID), g2 = (H5I_INVALID_HID);
size_t name2Len;
char *name1 = NULL, *name2 = NULL;
char filename[NAME_BUF_SIZE];
@@ -210,7 +210,7 @@ test_long(hid_t fcpl, hid_t fapl, hbool_t new_format)
name1[LONG_NAME_LEN - 1] = '\0';
name2Len = (2 * LONG_NAME_LEN) + 2;
name2 = (char *)malloc(name2Len);
- HDsnprintf(name2, name2Len, "%s/%s", name1, name1);
+ snprintf(name2, name2Len, "%s/%s", name1, name1);
/* Create groups */
if ((g1 = H5Gcreate2(fid, name1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -268,10 +268,10 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_large(hid_t fcpl, hid_t fapl, hbool_t new_format)
+test_large(hid_t fcpl, hid_t fapl, bool new_format)
{
- hid_t fid = (-1); /* File ID */
- hid_t cwg = (-1), dir = (-1); /* Group IDs */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t cwg = (H5I_INVALID_HID), dir = (H5I_INVALID_HID); /* Group IDs */
char filename[NAME_BUF_SIZE];
char name[NAME_BUF_SIZE];
int i;
@@ -293,17 +293,17 @@ test_large(hid_t fcpl, hid_t fapl, hbool_t new_format)
if ((cwg = H5Gcreate2(fid, "/big", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (new_format)
- if (H5G__has_stab_test(cwg) != FALSE)
+ if (H5G__has_stab_test(cwg) != false)
TEST_ERROR;
for (i = 0; i < LARGE_NOBJS; i++) {
- HDsnprintf(name, sizeof(name), "%05d%05d", (HDrandom() % 100000), i);
+ snprintf(name, sizeof(name), "%05d%05d", (HDrandom() % 100000), i);
if ((dir = H5Gcreate2(cwg, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(dir) < 0)
TEST_ERROR;
}
if (new_format)
- if (H5G__is_new_dense_test(cwg) != TRUE)
+ if (H5G__is_new_dense_test(cwg) != true)
TEST_ERROR;
if (H5Gclose(cwg) < 0)
TEST_ERROR;
@@ -342,18 +342,18 @@ error:
static int
lifecycle(hid_t fcpl, hid_t fapl2)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group ID */
- hid_t gid2 = (-1); /* Datatype ID */
- hid_t gcpl = (-1); /* Group creation property list ID */
- size_t lheap_size_hint; /* Local heap size hint */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- unsigned est_num_entries; /* Estimated # of entries in group */
- unsigned est_name_len; /* Estimated length of entry name */
- unsigned nmsgs; /* Number of messages in group's header */
- H5O_native_info_t ninfo; /* Object info */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group ID */
+ hid_t gid2 = (H5I_INVALID_HID); /* Datatype ID */
+ hid_t gcpl = (H5I_INVALID_HID); /* Group creation property list ID */
+ size_t lheap_size_hint; /* Local heap size hint */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ unsigned est_num_entries; /* Estimated # of entries in group */
+ unsigned est_name_len; /* Estimated length of entry name */
+ unsigned nmsgs; /* Number of messages in group's header */
+ H5O_native_info_t ninfo; /* Object info */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename[NAME_BUF_SIZE];
h5_stat_size_t empty_size; /* Size of an empty file */
unsigned u; /* Local index variable */
@@ -431,16 +431,16 @@ lifecycle(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Use internal testing routine to check that the group has no links or symbol table */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Create first "bottom" group */
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, (unsigned)0);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, (unsigned)0);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -448,9 +448,9 @@ lifecycle(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Check on top group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, &nmsgs) != TRUE)
+ if (H5G__has_links_test(gid, &nmsgs) != true)
TEST_ERROR;
if (nmsgs != 1)
TEST_ERROR;
@@ -458,12 +458,12 @@ lifecycle(hid_t fcpl, hid_t fapl2)
/* Create several more bottom groups, to push the top group almost to a symbol table */
/* (Start counting at '1', since we've already created one bottom group */
for (u = 1; u < LIFECYCLE_MAX_COMPACT; u++) {
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -472,13 +472,13 @@ lifecycle(hid_t fcpl, hid_t fapl2)
} /* end for */
/* Check on top group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, &nmsgs) != TRUE)
+ if (H5G__has_links_test(gid, &nmsgs) != true)
TEST_ERROR;
if (nmsgs != LIFECYCLE_MAX_COMPACT)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != FALSE)
+ if (H5G__is_new_dense_test(gid) != false)
TEST_ERROR;
/* Check that the object header is only one chunk and the space has been allocated correctly */
@@ -494,12 +494,12 @@ lifecycle(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Create one more "bottom" group, which should push top group into using a symbol table */
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -507,11 +507,11 @@ lifecycle(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Check on top group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Check that the object header is still one chunk and the space has been allocated correctly */
@@ -528,7 +528,7 @@ lifecycle(hid_t fcpl, hid_t fapl2)
/* Unlink objects from top group */
while (u >= LIFECYCLE_MIN_DENSE) {
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
@@ -537,38 +537,38 @@ lifecycle(hid_t fcpl, hid_t fapl2)
} /* end while */
/* Check on top group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Unlink one more object from the group, which should transform back to using links */
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
u--;
/* Check on top group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, &nmsgs) != TRUE)
+ if (H5G__has_links_test(gid, &nmsgs) != true)
TEST_ERROR;
if (nmsgs != (LIFECYCLE_MIN_DENSE - 1))
TEST_ERROR;
/* Unlink last two objects from top group */
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
u--;
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
/* Check on top group's status */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Close top group */
@@ -625,10 +625,10 @@ error:
static int
long_compact(hid_t fcpl, hid_t fapl2)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group ID */
- hid_t gid2 = (-1); /* Group ID */
- char *objname = NULL; /* Object name */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group ID */
+ hid_t gid2 = (H5I_INVALID_HID); /* Group ID */
+ char *objname = NULL; /* Object name */
char filename[NAME_BUF_SIZE];
h5_stat_size_t empty_size; /* Size of an empty file */
h5_stat_size_t file_size; /* Size of each file created */
@@ -663,7 +663,7 @@ long_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Use internal testing routine to check that the group has no links or dense storage */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Create first group with "long" name */
@@ -671,7 +671,7 @@ long_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -680,11 +680,11 @@ long_compact(hid_t fcpl, hid_t fapl2)
/* Check on top group's status */
/* (Should have dense storage to hold links, since name is too long for object header message) */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Create second group with "long" name */
@@ -693,7 +693,7 @@ long_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -702,11 +702,11 @@ long_compact(hid_t fcpl, hid_t fapl2)
/* Check on top group's status */
/* (Should have dense storage to hold links, since name is too long for object header message) */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Unlink second object from top group */
@@ -715,11 +715,11 @@ long_compact(hid_t fcpl, hid_t fapl2)
/* Check on top group's status */
/* (Should still be dense storage to hold links, since name is too long for object header message) */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Unlink first object from top group */
@@ -729,7 +729,7 @@ long_compact(hid_t fcpl, hid_t fapl2)
/* Check on top group's status */
/* (Should have deleted the dense storage now) */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Free object name */
@@ -788,11 +788,11 @@ error:
static int
read_old(void)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group ID */
- hid_t gid2 = (-1); /* Group ID */
- char objname[NAME_BUF_SIZE]; /* Object name */
- unsigned u; /* Local index variable */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group ID */
+ hid_t gid2 = (H5I_INVALID_HID); /* Group ID */
+ char objname[NAME_BUF_SIZE]; /* Object name */
+ unsigned u; /* Local index variable */
TESTING("reading old groups");
@@ -809,21 +809,21 @@ read_old(void)
TEST_ERROR;
/* Check on old group's status */
- if (H5G__is_empty_test(gid) == FALSE)
+ if (H5G__is_empty_test(gid) == false)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(gid) != TRUE)
+ if (H5G__has_stab_test(gid) != true)
TEST_ERROR;
/* Create a bunch of objects in the group */
for (u = 0; u < READ_OLD_NGROUPS; u++) {
- HDsnprintf(objname, sizeof(objname), "Group %u", u);
+ snprintf(objname, sizeof(objname), "Group %u", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -833,27 +833,27 @@ read_old(void)
/* Check on old group's status */
/* (Should stay in old "symbol table" form) */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(gid) != TRUE)
+ if (H5G__has_stab_test(gid) != true)
TEST_ERROR;
/* Delete new objects from old group */
for (u = 0; u < READ_OLD_NGROUPS; u++) {
- HDsnprintf(objname, sizeof(objname), "Group %u", u);
+ snprintf(objname, sizeof(objname), "Group %u", u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
/* Check on old group's status */
/* (Should stay in old "symbol table" form, but have no links) */
- if (H5G__is_empty_test(gid) == FALSE)
+ if (H5G__is_empty_test(gid) == false)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(gid) != TRUE)
+ if (H5G__has_stab_test(gid) != true)
TEST_ERROR;
/* Close old group */
@@ -892,11 +892,11 @@ error:
static int
no_compact(hid_t fcpl, hid_t fapl2)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group ID */
- hid_t gid2 = (-1); /* Datatype ID */
- hid_t gcpl = (-1); /* Group creation property list ID */
- char objname[NAME_BUF_SIZE]; /* Object name */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group ID */
+ hid_t gid2 = (H5I_INVALID_HID); /* Datatype ID */
+ hid_t gcpl = (H5I_INVALID_HID); /* Group creation property list ID */
+ char objname[NAME_BUF_SIZE]; /* Object name */
char filename[NAME_BUF_SIZE];
h5_stat_size_t empty_size; /* Size of an empty file */
h5_stat_size_t file_size; /* Size of each file created */
@@ -947,16 +947,16 @@ no_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Use internal testing routine to check that the group has no links or dense storage */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Create first "bottom" group */
- HDsnprintf(objname, sizeof(objname), NO_COMPACT_BOTTOM_GROUP, (unsigned)0);
+ snprintf(objname, sizeof(objname), NO_COMPACT_BOTTOM_GROUP, (unsigned)0);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -964,20 +964,20 @@ no_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Check on top group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Unlink object from top group */
- HDsnprintf(objname, sizeof(objname), NO_COMPACT_BOTTOM_GROUP, (unsigned)0);
+ snprintf(objname, sizeof(objname), NO_COMPACT_BOTTOM_GROUP, (unsigned)0);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
/* Check on top group's status */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Close top group */
@@ -1029,14 +1029,14 @@ error:
static int
gcpl_on_root(hid_t fapl2)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group ID */
- hid_t gid2 = (-1); /* Datatype ID */
- hid_t fcpl = (-1); /* File creation property list ID */
- hid_t gcpl = (-1); /* Group creation property list ID */
- hid_t lcpl = (-1); /* Link creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group ID */
+ hid_t gid2 = (H5I_INVALID_HID); /* Datatype ID */
+ hid_t fcpl = (H5I_INVALID_HID); /* File creation property list ID */
+ hid_t gcpl = (H5I_INVALID_HID); /* Group creation property list ID */
+ hid_t lcpl = (H5I_INVALID_HID); /* Link creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
char filename[NAME_BUF_SIZE];
TESTING("setting root group creation properties");
@@ -1089,7 +1089,7 @@ gcpl_on_root(hid_t fapl2)
/* Create a link creation property list, with intermediate group creation set */
if ((lcpl = H5Pcreate(H5P_LINK_CREATE)) < 0)
TEST_ERROR;
- if (H5Pset_create_intermediate_group(lcpl, TRUE) < 0)
+ if (H5Pset_create_intermediate_group(lcpl, true) < 0)
TEST_ERROR;
/* Create a group and intermediate groups, to check if root group settings are inherited */
@@ -1179,10 +1179,10 @@ static int
old_api(hid_t fapl)
{
#ifndef H5_NO_DEPRECATED_SYMBOLS
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group ID */
- h5_stat_size_t small_file_size; /* Size of small group file */
- h5_stat_size_t large_file_size; /* Size of large group file */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t gid = (H5I_INVALID_HID); /* Group ID */
+ h5_stat_size_t small_file_size; /* Size of small group file */
+ h5_stat_size_t large_file_size; /* Size of large group file */
char filename[NAME_BUF_SIZE];
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -1250,7 +1250,7 @@ old_api(hid_t fapl)
(void)fapl;
SKIPPED();
- HDputs(" Deprecated API symbols not enabled");
+ puts(" Deprecated API symbols not enabled");
#endif /* H5_NO_DEPRECATED_SYMBOLS */
return 0;
@@ -1281,8 +1281,8 @@ error:
static int
corrupt_stab_msg(void)
{
- hid_t fid = (-1); /* File ID */
- hid_t did = (-1); /* Dataset ID */
+ hid_t fid = (H5I_INVALID_HID); /* File ID */
+ hid_t did = (H5I_INVALID_HID); /* Dataset ID */
TESTING("corrupt symbol table message");
@@ -1376,17 +1376,17 @@ main(void)
hid_t fcpl, fcpl2; /* File creation property list ID */
unsigned new_format; /* Whether to use the new format or not */
const char *env_h5_drvr; /* File Driver value from environment */
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
- hbool_t driver_is_default_compatible;
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool driver_is_default_compatible;
int nerrors = 0;
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
/* VFD that does not support contiguous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
/* Reset library */
h5_reset();
@@ -1415,7 +1415,7 @@ main(void)
TEST_ERROR;
/* Loop over using new group format */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl = fapl;
hid_t my_fcpl = fcpl;
@@ -1465,7 +1465,7 @@ main(void)
if (nerrors)
goto error;
- HDputs("All symbol table tests passed.");
+ puts("All symbol table tests passed.");
/* Cleanup */
if (GetTestCleanup()) {
@@ -1477,6 +1477,6 @@ main(void)
return 0;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
return 1;
}
diff --git a/test/swmr.c b/test/swmr.c
index d91d273..aacf498 100644
--- a/test/swmr.c
+++ b/test/swmr.c
@@ -63,9 +63,9 @@ static int test_metadata_read_attempts(hid_t in_fapl);
static int test_metadata_read_retry_info(hid_t in_fapl);
/* Tests for H5Fstart_swmr_write() */
-static int test_start_swmr_write(hid_t in_fapl, hbool_t new_format);
-static int test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format);
-static int test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format);
+static int test_start_swmr_write(hid_t in_fapl, bool new_format);
+static int test_err_start_swmr_write(hid_t in_fapl, bool new_format);
+static int test_start_swmr_write_concur(hid_t in_fapl, bool new_format);
static int test_start_swmr_write_stress_ohdr(hid_t in_fapl);
static int test_start_swmr_write_persist_dapl(hid_t in_fapl);
@@ -90,16 +90,16 @@ static int test_file_lock_concur(hid_t fapl);
static int test_file_lock_swmr_concur(hid_t fapl);
/* Test file lock environment variable */
-static int test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_override);
+static int test_file_locking(hid_t in_fapl, bool turn_locking_on, bool env_var_override);
/* Tests for SWMR VFD flag */
static int test_swmr_vfd_flag(void);
/* Tests for H5Drefresh: concurrent access */
-static int test_refresh_concur(hid_t in_fapl, hbool_t new_format);
+static int test_refresh_concur(hid_t in_fapl, bool new_format);
/* Tests for multiple opens of files and datasets with H5Drefresh() & H5Fstart_swmr_write(): same process */
-static int test_multiple_same(hid_t in_fapl, hbool_t new_format);
+static int test_multiple_same(hid_t in_fapl, bool new_format);
/*
* Tests for H5Pget/set_metadata_read_attemps(), H5Fget_metadata_read_retry_info()
@@ -115,12 +115,12 @@ static int test_multiple_same(hid_t in_fapl, hbool_t new_format);
static int
test_metadata_read_attempts(hid_t in_fapl)
{
- hid_t fapl = -1; /* File access property list */
- hid_t file_fapl = -1; /* The file's access property list */
- hid_t fid = -1, fid1 = -1, fid2 = -1; /* File IDs */
- hid_t driver_id = -1; /* ID for this VFD */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t file_fapl = H5I_INVALID_HID; /* The file's access property list */
+ hid_t fid = H5I_INVALID_HID, fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
unsigned long driver_flags = 0; /* VFD feature flags */
- hbool_t compat_w_default_vfd; /* current VFD compat w/ H5P_DEFAULT? */
+ bool compat_w_default_vfd; /* current VFD compat w/ H5P_DEFAULT? */
unsigned attempts; /* The # of read attempts */
char filename[NAME_BUF_SIZE]; /* File name */
herr_t ret; /* Generic return value */
@@ -138,11 +138,11 @@ test_metadata_read_attempts(hid_t in_fapl)
FAIL_STACK_ERROR;
if (H5FDdriver_query(driver_id, &driver_flags) < 0)
FAIL_STACK_ERROR;
- compat_w_default_vfd = (driver_flags & H5FD_FEAT_DEFAULT_VFD_COMPATIBLE) ? TRUE : FALSE;
+ compat_w_default_vfd = (driver_flags & H5FD_FEAT_DEFAULT_VFD_COMPATIBLE) ? true : false;
if (!compat_w_default_vfd) {
SKIPPED();
- HDputs(" The current VFD is not compatible with the default VFD.");
+ puts(" The current VFD is not compatible with the default VFD.");
return 0;
}
@@ -1570,28 +1570,28 @@ error:
* Close the group and file
*/
static int
-test_start_swmr_write(hid_t in_fapl, hbool_t new_format)
+test_start_swmr_write(hid_t in_fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property */
- hid_t gid = -1; /* Group ID */
- hid_t dcpl = -1; /* Dataset creation property */
- hid_t file_fapl = -1; /* File access property for the file */
- hid_t did1 = -1, did2 = -1, did3 = -1; /* Dataset IDs */
- hid_t did1_a = -1, did1_b = -1;
- hid_t sid1 = -1, sid2 = -1, sid3 = -1; /* Dataspace IDs */
- hsize_t dim[1] = {1}; /* Dimension sizes */
- hsize_t max_dim[1] = {H5S_UNLIMITED}; /* Maximum dimension sizes */
- hsize_t chunk_dim[1] = {2}; /* Chunk dimension sizes */
- hsize_t dim2[2] = {5, 10}; /* Dimension sizes */
- hsize_t max_dim2[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* Maximum dimension sizes */
- hsize_t chunk_dim2[2] = {2, 7}; /* Chunk dimension sizes */
- H5D_chunk_index_t idx_type; /* Dataset chunk index type */
- int wdata = 99; /* Data to write */
- int rdata; /* Data read */
- unsigned attempts; /* The retrieved # of read attempts */
- char filename[NAME_BUF_SIZE]; /* File name */
- herr_t ret; /* Return value */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property */
+ hid_t file_fapl = H5I_INVALID_HID; /* File access property for the file */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID, did3 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t did1_a = H5I_INVALID_HID, did1_b = H5I_INVALID_HID;
+ hid_t sid1 = H5I_INVALID_HID, sid2 = H5I_INVALID_HID, sid3 = H5I_INVALID_HID; /* Dataspace IDs */
+ hsize_t dim[1] = {1}; /* Dimension sizes */
+ hsize_t max_dim[1] = {H5S_UNLIMITED}; /* Maximum dimension sizes */
+ hsize_t chunk_dim[1] = {2}; /* Chunk dimension sizes */
+ hsize_t dim2[2] = {5, 10}; /* Dimension sizes */
+ hsize_t max_dim2[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* Maximum dimension sizes */
+ hsize_t chunk_dim2[2] = {2, 7}; /* Chunk dimension sizes */
+ H5D_chunk_index_t idx_type; /* Dataset chunk index type */
+ int wdata = 99; /* Data to write */
+ int rdata; /* Data read */
+ unsigned attempts; /* The retrieved # of read attempts */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ herr_t ret; /* Return value */
/* Get a copy of the parameter fapl (non-latest-format) */
if ((fapl = H5Pcopy(in_fapl)) < 0)
@@ -1938,20 +1938,20 @@ error:
* --fail to enable SWMR due to superblock version not 3
*/
static int
-test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
+test_err_start_swmr_write(hid_t in_fapl, bool new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t fid2 = -1; /* File ID */
- hid_t fapl = -1; /* A copy of file access property */
- hid_t new_fapl = -1; /* A copy of file access property */
- hid_t gid = -1; /* Group ID */
- hid_t did = -1; /* Dataset ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t bad_fid = -1; /* Test fid (should never represent a real ID) */
- herr_t ret; /* Return value */
- char filename[NAME_BUF_SIZE]; /* File name */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fid2 = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* A copy of file access property */
+ hid_t new_fapl = H5I_INVALID_HID; /* A copy of file access property */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t bad_fid = H5I_INVALID_HID; /* Test fid (should never represent a real ID) */
+ herr_t ret; /* Return value */
+ char filename[NAME_BUF_SIZE]; /* File name */
/* Create a copy of the input parameter in_fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
@@ -2401,7 +2401,7 @@ error:
#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID))
static int
-test_start_swmr_write_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t new_format)
+test_start_swmr_write_concur(hid_t H5_ATTR_UNUSED in_fapl, bool new_format)
{
if (new_format) {
TESTING("H5Fstart_swmr_write()--concurrent access for latest format");
@@ -2411,27 +2411,27 @@ test_start_swmr_write_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t new_format)
}
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ puts(" Test skipped due to fork or waitpid not defined.");
return 0;
} /* test_start_swmr_write_concur() */
#else /* !defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */
static int
-test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
+test_start_swmr_write_concur(hid_t in_fapl, bool new_format)
{
- hid_t fid = -1, fid1 = -1, fid2 = -1; /* File IDs */
- hid_t fapl; /* File access property list */
- pid_t childpid = 0; /* Child process ID */
- pid_t tmppid; /* Child process ID returned by waitpid */
- int child_status; /* Status passed to waitpid */
- int child_wait_option = 0; /* Options passed to waitpid */
- int child_exit_val; /* Exit status of the child */
- char filename[NAME_BUF_SIZE]; /* File name */
-
- hid_t did = -1, did1 = -1, did2 = -1, did3 = -1;
- hid_t sid = -1;
- hid_t dcpl = -1;
+ hid_t fid = H5I_INVALID_HID, fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t fapl; /* File access property list */
+ pid_t childpid = 0; /* Child process ID */
+ pid_t tmppid; /* Child process ID returned by waitpid */
+ int child_status; /* Status passed to waitpid */
+ int child_wait_option = 0; /* Options passed to waitpid */
+ int child_exit_val; /* Exit status of the child */
+ char filename[NAME_BUF_SIZE]; /* File name */
+
+ hid_t did = H5I_INVALID_HID, did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID, did3 = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
hsize_t chunk_dims[1] = {1};
hsize_t maxdims[1] = {H5S_UNLIMITED};
hsize_t dims[1] = {1};
@@ -2583,9 +2583,9 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
if ((childpid = fork()) < 0)
FAIL_STACK_ERROR;
- if (childpid == 0) { /* Child process */
- hid_t child_fid1 = -1, child_fid2; /* File IDs */
- hid_t child_did1 = -1, child_did2 = -1; /* Dataset IDs */
+ if (childpid == 0) { /* Child process */
+ hid_t child_fid1 = H5I_INVALID_HID, child_fid2; /* File IDs */
+ hid_t child_did1 = H5I_INVALID_HID, child_did2 = H5I_INVALID_HID; /* Dataset IDs */
int child_notify = 0;
int rdata = 0;
@@ -3029,14 +3029,14 @@ error:
static int
test_start_swmr_write_stress_ohdr(hid_t in_fapl)
{
- hid_t fid = -1; /* File IDs */
- hid_t fapl; /* File access property list */
- char filename[NAME_BUF_SIZE]; /* File name */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t aid = -1; /* Attribute ID */
+ hid_t fid = H5I_INVALID_HID; /* File IDs */
+ hid_t fapl; /* File access property list */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
hsize_t chunk_dims[2] = {10, 10};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
char fill[256]; /* Fill value for dataset */
@@ -3241,19 +3241,19 @@ tssw_persist_dapl_verify(hid_t did, hid_t vdsid1, hid_t vdsid2, hsize_t boundary
TEST_ERROR;
if (rdcc_nbytes != rdcc_nbytes_out)
TEST_ERROR;
- if (HDfabs(rdcc_w0 - rdcc_w0_out) > (double)FP_EPSILON)
+ if (fabs(rdcc_w0 - rdcc_w0_out) > (double)FP_EPSILON)
TEST_ERROR;
/* Get efile prefix property and verify */
if (H5Pget_efile_prefix(dapl, efile_prefix_out, sizeof(efile_prefix_out)) < 0)
TEST_ERROR;
- if (HDstrncmp(efile_prefix, efile_prefix_out, sizeof(efile_prefix_out)))
+ if (strncmp(efile_prefix, efile_prefix_out, sizeof(efile_prefix_out)))
TEST_ERROR;
/* Get virtual prefix property and verify */
if (H5Pget_virtual_prefix(vds_dapl1, virtual_prefix_out, sizeof(virtual_prefix_out)) < 0)
TEST_ERROR;
- if (HDstrncmp(virtual_prefix, virtual_prefix_out, sizeof(virtual_prefix_out)))
+ if (strncmp(virtual_prefix, virtual_prefix_out, sizeof(virtual_prefix_out)))
TEST_ERROR;
/* Get virtual printf gap property and verify */
@@ -3582,14 +3582,14 @@ flush_cb(hid_t H5_ATTR_UNUSED obj_id, void *_udata)
static int
test_object_flush_cb(hid_t in_fapl)
{
- hid_t fapl = -1; /* A copy of file access property list */
- hid_t ffapl = -1; /* A file's file access property list */
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t did1 = -1, did2 = -1; /* Dataset IDs */
- hid_t sid = -1; /* Dataspace ID */
- hsize_t dims[2] = {5, 10}; /* Dataset dimension sizes */
- int buf[50]; /* Data buffer */
+ hid_t fapl = H5I_INVALID_HID; /* A copy of file access property list */
+ hid_t ffapl = H5I_INVALID_HID; /* A file's file access property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dims[2] = {5, 10}; /* Dataset dimension sizes */
+ int buf[50]; /* Data buffer */
H5F_flush_cb_t ret_cb; /* The callback function set in object flush property */
void *ret_ct; /* The user data set in object flush property */
unsigned flush_ct = 0; /* The user data for object flush property */
@@ -3860,13 +3860,13 @@ append_cb2(hid_t H5_ATTR_UNUSED dset_id, hsize_t H5_ATTR_UNUSED *cur_dims, void
static int
test_append_flush_generic(void)
{
- hid_t dapl = -1; /* A copy of dataset access property */
- hsize_t boundary[3]; /* The boundary for append flush property */
- unsigned count = 0; /* The user data for append flush property */
- hsize_t ret_boundary[3]; /* The boundary set in append flush property */
- H5D_append_cb_t ret_cb; /* The callback function set in append flush property */
- unsigned *ret_count; /* The user data set in append flush property */
- herr_t ret; /* The return value */
+ hid_t dapl = H5I_INVALID_HID; /* A copy of dataset access property */
+ hsize_t boundary[3]; /* The boundary for append flush property */
+ unsigned count = 0; /* The user data for append flush property */
+ hsize_t ret_boundary[3]; /* The boundary set in append flush property */
+ H5D_append_cb_t ret_cb; /* The callback function set in append flush property */
+ unsigned *ret_count; /* The user data set in append flush property */
+ herr_t ret; /* The return value */
TESTING("H5Fget/set_append_flush() for a generic dataset access property list");
@@ -4035,13 +4035,13 @@ error:
static int
test_append_flush_dataset_chunked(hid_t in_fapl)
{
- hid_t fid = -1; /* file ID */
- hid_t fapl = -1; /* A copy of file access property */
- hid_t did1 = -1, did2 = -1; /* The dataset ID */
- hid_t sid = -1; /* The dataspace ID */
- hid_t dcpl = -1; /* A copy of dataset creation property */
- hid_t dapl = -1; /* A copy of dataset access property */
- hid_t ddapl = -1; /* The dataset access property of the opened dataset */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t fapl = H5I_INVALID_HID; /* A copy of file access property */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* The dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* The dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* A copy of dataset creation property */
+ hid_t dapl = H5I_INVALID_HID; /* A copy of dataset access property */
+ hid_t ddapl = H5I_INVALID_HID; /* The dataset access property of the opened dataset */
hsize_t boundary[3]; /* Boundary size */
unsigned count = 0; /* User data */
@@ -4258,12 +4258,12 @@ error:
static int
test_append_flush_dataset_fixed(hid_t in_fapl)
{
- hid_t fid = -1; /* file ID */
- hid_t fapl = -1; /* A copy of file access property */
- hid_t did1 = -1, did2 = -1; /* The dataset ID */
- hid_t sid = -1; /* The dataspace ID */
- hid_t dapl = -1; /* A copy of dataset access property */
- hid_t ddapl = -1; /* The dataset access property of the opened dataset */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t fapl = H5I_INVALID_HID; /* A copy of file access property */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* The dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* The dataspace ID */
+ hid_t dapl = H5I_INVALID_HID; /* A copy of dataset access property */
+ hid_t ddapl = H5I_INVALID_HID; /* The dataset access property of the opened dataset */
hsize_t boundary[3]; /* Boundary size */
unsigned count = 0; /* User data */
@@ -4476,14 +4476,14 @@ error:
static int
test_append_flush_dataset_multiple(hid_t in_fapl)
{
- hid_t fid = -1; /* file ID */
- hid_t fapl = -1; /* A copy of file access property */
- hid_t did1 = -1, did2 = -1; /* The dataset ID */
- hid_t sid = -1; /* The dataspace ID */
- hid_t dcpl = -1; /* A copy of dataset creation property */
- hid_t dapl1 = -1; /* A copy of dataset access property */
- hid_t dapl2 = -1; /* A copy of dataset access property */
- hid_t ddapl = -1; /* The dataset access property of the opened dataset */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t fapl = H5I_INVALID_HID; /* A copy of file access property */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* The dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* The dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* A copy of dataset creation property */
+ hid_t dapl1 = H5I_INVALID_HID; /* A copy of dataset access property */
+ hid_t dapl2 = H5I_INVALID_HID; /* A copy of dataset access property */
+ hid_t ddapl = H5I_INVALID_HID; /* The dataset access property of the opened dataset */
hsize_t boundary1[3]; /* Boundary size */
hsize_t boundary2[3]; /* Boundary size */
@@ -4705,10 +4705,10 @@ error:
static int
test_file_lock_same(hid_t in_fapl)
{
- hid_t fid = -1, fid2 = -1; /* File IDs */
- hid_t fapl = -1; /* File access property list */
- unsigned intent; /* File access flags */
- char filename[NAME_BUF_SIZE]; /* file name */
+ hid_t fid = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ unsigned intent; /* File access flags */
+ char filename[NAME_BUF_SIZE]; /* file name */
/* Output message about test being performed */
TESTING("File open with different combinations of flags--single process access");
@@ -4716,7 +4716,7 @@ test_file_lock_same(hid_t in_fapl)
/* Set locking in the fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
FAIL_STACK_ERROR;
- if (H5Pset_file_locking(fapl, TRUE, TRUE) < 0)
+ if (H5Pset_file_locking(fapl, true, true) < 0)
FAIL_STACK_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
@@ -5188,7 +5188,7 @@ test_file_lock_concur(hid_t H5_ATTR_UNUSED in_fapl)
/* Output message about test being performed */
TESTING("File open with different combinations of flags--concurrent access");
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ puts(" Test skipped due to fork or waitpid not defined.");
return 0;
} /* end test_file_lock_concur() */
@@ -5198,8 +5198,8 @@ test_file_lock_concur(hid_t H5_ATTR_UNUSED in_fapl)
static int
test_file_lock_concur(hid_t in_fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
char filename[NAME_BUF_SIZE]; /* file name */
pid_t childpid = 0; /* Child process ID */
int child_status; /* Status passed to waitpid */
@@ -5213,7 +5213,7 @@ test_file_lock_concur(hid_t in_fapl)
/* Set locking in the fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
FAIL_STACK_ERROR;
- if (H5Pset_file_locking(fapl, TRUE, TRUE) < 0)
+ if (H5Pset_file_locking(fapl, true, true) < 0)
FAIL_STACK_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
@@ -5581,7 +5581,7 @@ test_file_lock_swmr_concur(hid_t H5_ATTR_UNUSED in_fapl)
/* Output message about test being performed */
TESTING("File open with different combintations of flags + SWMR flags--concurrent access");
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ puts(" Test skipped due to fork or waitpid not defined.");
return 0;
} /* end test_file_lock_swmr_concur() */
@@ -5606,7 +5606,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Set locking in the fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
FAIL_STACK_ERROR;
- if (H5Pset_file_locking(fapl, TRUE, TRUE) < 0)
+ if (H5Pset_file_locking(fapl, true, true) < 0)
FAIL_STACK_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
@@ -6596,7 +6596,7 @@ error:
**
*****************************************************************/
static int
-test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_override)
+test_file_locking(hid_t in_fapl, bool turn_locking_on, bool env_var_override)
{
#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID))
if (turn_locking_on && env_var_override)
@@ -6608,11 +6608,11 @@ test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_overri
else
TESTING("File locking: OFF");
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ puts(" Test skipped due to fork or waitpid not defined.");
return 0;
#else /* !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)) */
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
char filename[NAME_BUF_SIZE]; /* file name */
pid_t childpid = 0; /* Child process ID */
int child_status; /* Status passed to waitpid */
@@ -6636,18 +6636,18 @@ test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_overri
TEST_ERROR;
/* Set locking in the fapl */
- if (H5Pset_file_locking(fapl, turn_locking_on ? TRUE : FALSE, TRUE) < 0)
+ if (H5Pset_file_locking(fapl, turn_locking_on ? true : false, true) < 0)
TEST_ERROR;
/* If requested, set the environment variable */
if (env_var_override) {
- if (HDsetenv(HDF5_USE_FILE_LOCKING, turn_locking_on ? "FALSE" : "TRUE", TRUE) < 0)
+ if (HDsetenv(HDF5_USE_FILE_LOCKING, turn_locking_on ? "FALSE" : "TRUE", true) < 0)
TEST_ERROR;
if (H5F__reparse_file_lock_variable_test() < 0)
TEST_ERROR;
}
else {
- if (HDsetenv(HDF5_USE_FILE_LOCKING, "", TRUE) < 0)
+ if (HDsetenv(HDF5_USE_FILE_LOCKING, "", true) < 0)
TEST_ERROR;
if (H5F__reparse_file_lock_variable_test() < 0)
TEST_ERROR;
@@ -6803,7 +6803,7 @@ test_different_lock_flags(hid_t in_fapl)
TEST_ERROR;
/* Set locking in the fapl */
- if (H5Pset_file_locking(fapl_id, TRUE, TRUE) < 0)
+ if (H5Pset_file_locking(fapl_id, true, true) < 0)
TEST_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
@@ -6818,7 +6818,7 @@ test_different_lock_flags(hid_t in_fapl)
TEST_ERROR;
/* Unset locking in the fapl */
- if (H5Pset_file_locking(fapl_id, FALSE, FALSE) < 0)
+ if (H5Pset_file_locking(fapl_id, false, false) < 0)
TEST_ERROR;
/* Open the test file with different flags (should FAIL) */
@@ -6860,10 +6860,10 @@ error:
static int
test_swmr_vfd_flag(void)
{
- hid_t fid = -1; /* file ID */
- hid_t sec2_fapl = -1; /* fapl ID of a VFD that supports SWMR writes (sec2) */
- hid_t bad_fapl = -1; /* fapl ID of a VFD that does not support SWMR writes (stdio) */
- char filename[NAME_BUF_SIZE]; /* file name */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t sec2_fapl = H5I_INVALID_HID; /* fapl ID of a VFD that supports SWMR writes (sec2) */
+ hid_t bad_fapl = H5I_INVALID_HID; /* fapl ID of a VFD that does not support SWMR writes (stdio) */
+ char filename[NAME_BUF_SIZE]; /* file name */
TESTING("SWMR-enabled VFD flag functionality");
@@ -7073,7 +7073,7 @@ error:
#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID))
static int
-test_refresh_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t new_format)
+test_refresh_concur(hid_t H5_ATTR_UNUSED in_fapl, bool new_format)
{
if (new_format) {
TESTING("H5Drefresh()--concurrent access for latest format");
@@ -7083,14 +7083,14 @@ test_refresh_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t new_format)
}
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ puts(" Test skipped due to fork or waitpid not defined.");
return 0;
} /* test_refresh_concur() */
#else /* !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)) */
static int
-test_refresh_concur(hid_t in_fapl, hbool_t new_format)
+test_refresh_concur(hid_t in_fapl, bool new_format)
{
hid_t fid = H5I_INVALID_HID; /* File ID */
hid_t fapl; /* File access property list */
@@ -7101,9 +7101,9 @@ test_refresh_concur(hid_t in_fapl, hbool_t new_format)
int child_exit_val; /* Exit status of the child */
char filename[NAME_BUF_SIZE]; /* File name */
- hid_t did = -1;
- hid_t sid = -1;
- hid_t dcpl = -1;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
hsize_t chunk_dims[1] = {1};
hsize_t maxdims[1] = {H5S_UNLIMITED};
hsize_t dims[1] = {1};
@@ -7175,11 +7175,11 @@ test_refresh_concur(hid_t in_fapl, hbool_t new_format)
if ((childpid = fork()) < 0)
FAIL_STACK_ERROR;
- if (childpid == 0) { /* Child process */
- hid_t child_fid1 = -1; /* File ID */
- hid_t child_fid2 = -1; /* File ID */
- hid_t child_did1 = -1, child_did2 = -1;
- hid_t child_sid = -1;
+ if (childpid == 0) { /* Child process */
+ hid_t child_fid1 = H5I_INVALID_HID; /* File ID */
+ hid_t child_fid2 = H5I_INVALID_HID; /* File ID */
+ hid_t child_did1 = H5I_INVALID_HID, child_did2 = H5I_INVALID_HID;
+ hid_t child_sid = H5I_INVALID_HID;
hsize_t tdims[1];
int rbuf[2] = {0, 0};
int child_notify = 0;
@@ -7403,14 +7403,15 @@ error:
* opens of files and datasets.
*/
static int
-test_multiple_same(hid_t in_fapl, hbool_t new_format)
+test_multiple_same(hid_t in_fapl, bool new_format)
{
- hid_t fid = -1, fid1 = -1, fid2 = -1, fid3 = -1; /* File IDs */
- hid_t fapl; /* File access property list */
- char filename[NAME_BUF_SIZE]; /* File name */
- hid_t did = -1, did1 = -1, did2 = -1, did3 = -1;
- hid_t sid = -1;
- hid_t dcpl = -1;
+ hid_t fid = H5I_INVALID_HID, fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID,
+ fid3 = H5I_INVALID_HID; /* File IDs */
+ hid_t fapl; /* File access property list */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ hid_t did = H5I_INVALID_HID, did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID, did3 = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
hsize_t chunk_dims[2] = {1, 2};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t dims[2] = {1, 1};
@@ -7728,12 +7729,12 @@ error:
int
main(void)
{
- 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 */
+ 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 */
+ bool use_file_locking; /* read from env var */
+ bool file_locking_enabled = false; /* Checks if the file system supports locks */
/* Testing setup */
h5_reset();
@@ -7741,7 +7742,7 @@ main(void)
/* Skip this test if SWMR I/O is not supported for the VFD specified
* by the environment variable.
*/
- driver = HDgetenv(HDF5_DRIVER);
+ driver = getenv(HDF5_DRIVER);
if (!H5FD__supports_swmr_test(driver)) {
printf("This VFD does not support SWMR I/O\n");
return EXIT_SUCCESS;
@@ -7751,11 +7752,11 @@ main(void)
* about file locking. File locking should be used unless explicitly
* disabled.
*/
- lock_env_var = HDgetenv(HDF5_USE_FILE_LOCKING);
- if (lock_env_var && !HDstrcmp(lock_env_var, "FALSE"))
- use_file_locking = FALSE;
+ lock_env_var = getenv(HDF5_USE_FILE_LOCKING);
+ if (lock_env_var && !strcmp(lock_env_var, "FALSE"))
+ use_file_locking = false;
else
- use_file_locking = TRUE;
+ use_file_locking = true;
/* Check if file locking is enabled on this file system */
if (use_file_locking)
@@ -7770,10 +7771,10 @@ main(void)
#ifdef OUT
nerrors += test_bug_refresh(fapl);
#endif
- nerrors += test_refresh_concur(fapl, TRUE);
- nerrors += test_refresh_concur(fapl, FALSE);
- nerrors += test_multiple_same(fapl, TRUE);
- nerrors += test_multiple_same(fapl, FALSE);
+ nerrors += test_refresh_concur(fapl, true);
+ nerrors += test_refresh_concur(fapl, false);
+ nerrors += test_multiple_same(fapl, true);
+ nerrors += test_multiple_same(fapl, false);
/* Tests on H5Pget/set_metadata_read_attempts() and H5Fget_metadata_read_retry_info() */
nerrors += test_metadata_read_attempts(fapl);
@@ -7785,12 +7786,12 @@ main(void)
* H5Fcreate(write, latest format) or H5Fcreate(SWMR write, non-latest-format)
* --both result in v3 superblock and latest version support
*/
- nerrors += test_start_swmr_write(fapl, TRUE);
- nerrors += test_start_swmr_write(fapl, FALSE);
- nerrors += test_err_start_swmr_write(fapl, TRUE);
- nerrors += test_err_start_swmr_write(fapl, FALSE);
- nerrors += test_start_swmr_write_concur(fapl, TRUE);
- nerrors += test_start_swmr_write_concur(fapl, FALSE);
+ nerrors += test_start_swmr_write(fapl, true);
+ nerrors += test_start_swmr_write(fapl, false);
+ nerrors += test_err_start_swmr_write(fapl, true);
+ nerrors += test_err_start_swmr_write(fapl, false);
+ nerrors += test_start_swmr_write_concur(fapl, true);
+ nerrors += test_start_swmr_write_concur(fapl, false);
nerrors += test_start_swmr_write_stress_ohdr(fapl);
nerrors += test_start_swmr_write_persist_dapl(fapl);
@@ -7827,7 +7828,7 @@ main(void)
/* Tests SWMR VFD compatibility flag.
* Only needs to run when the VFD is the default (sec2).
*/
- if (NULL == driver || !HDstrcmp(driver, "") || !HDstrcmp(driver, "sec2"))
+ if (NULL == driver || !strcmp(driver, "") || !strcmp(driver, "sec2"))
nerrors += test_swmr_vfd_flag();
/* Test multiple opens via different locking flags */
@@ -7838,10 +7839,10 @@ main(void)
* so they should be run last.
*/
if (use_file_locking && file_locking_enabled) {
- nerrors += test_file_locking(fapl, TRUE, TRUE);
- nerrors += test_file_locking(fapl, TRUE, FALSE);
- nerrors += test_file_locking(fapl, FALSE, TRUE);
- nerrors += test_file_locking(fapl, FALSE, FALSE);
+ nerrors += test_file_locking(fapl, true, true);
+ nerrors += test_file_locking(fapl, true, false);
+ nerrors += test_file_locking(fapl, false, true);
+ nerrors += test_file_locking(fapl, false, false);
}
if (nerrors)
diff --git a/test/swmr_common.c b/test/swmr_common.c
index ef4c550..dd7dd8e 100644
--- a/test/swmr_common.c
+++ b/test/swmr_common.c
@@ -181,7 +181,7 @@ generate_name(char *name_buf, size_t name_buf_length, unsigned level, unsigned c
{
assert(name_buf);
- HDsnprintf(name_buf, name_buf_length, "%u-%04u", level, count);
+ snprintf(name_buf, name_buf_length, "%u-%04u", level, count);
return 0;
} /* end generate_name() */
@@ -209,7 +209,7 @@ generate_symbols(void)
char name_buf[64];
generate_name(name_buf, sizeof(name_buf), u, v);
- symbol_info[u][v].name = HDstrdup(name_buf);
+ symbol_info[u][v].name = strdup(name_buf);
symbol_info[u][v].dsid = -1;
symbol_info[u][v].nrecords = 0;
} /* end for */
diff --git a/test/swmr_generator.c b/test/swmr_generator.c
index 75e392d..0259a30 100644
--- a/test/swmr_generator.c
+++ b/test/swmr_generator.c
@@ -44,7 +44,7 @@
/* Local Prototypes */
/********************/
-static int gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp_level,
+static int gen_skeleton(const char *filename, bool verbose, bool swmr_write, int comp_level,
const char *index_type, unsigned random_seed);
static void usage(void);
@@ -57,10 +57,10 @@ static void usage(void);
* Parameters: const char *filename
* The SWMR test file's name.
*
- * hbool_t verbose
+ * bool verbose
* Whether verbose console output is desired.
*
- * hbool_t swmr_write
+ * bool swmr_write
* Whether to create the file with SWMR writing enabled
*
* int comp_level
@@ -79,8 +79,8 @@ static void usage(void);
*-------------------------------------------------------------------------
*/
static int
-gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp_level,
- const char *index_type, unsigned random_seed)
+gen_skeleton(const char *filename, bool verbose, bool swmr_write, int comp_level, const char *index_type,
+ unsigned random_seed)
{
hid_t fid; /* File ID for new HDF5 file */
hid_t fcpl; /* File creation property list */
@@ -115,7 +115,7 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp
* With one unlimited dimension, we get the extensible array index
* type, with two unlimited dimensions, we get a v2 B-tree.
*/
- if (!HDstrcmp(index_type, "b2"))
+ if (!strcmp(index_type, "b2"))
max_dims[0] = H5S_UNLIMITED;
/* Create file creation property list */
@@ -182,10 +182,10 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp
/* Create the datasets */
for (u = 0; u < NLEVELS; u++)
for (v = 0; v < symbol_count[u]; v++) {
- hid_t dsid; /* Dataset ID */
- char name_buf[64];
- hbool_t move_dataspace_message =
- FALSE; /* Whether to move the dataspace message out of object header chunk #0 */
+ hid_t dsid; /* Dataset ID */
+ char name_buf[64];
+ bool move_dataspace_message =
+ false; /* Whether to move the dataspace message out of object header chunk #0 */
generate_name(name_buf, sizeof(name_buf), u, v);
if ((dsid = H5Dcreate2(fid, name_buf, tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -193,7 +193,7 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp
/* Determine if the dataspace message for this dataset should be
* moved out of chunk #0 of the object header
- * (Set to TRUE for every fourth dataset)
+ * (Set to true for every fourth dataset)
*/
move_dataspace_message = !(HDrandom() % 4);
if (move_dataspace_message) {
@@ -260,10 +260,10 @@ int
main(int argc, char *argv[])
{
int comp_level = -1; /* Compression level (-1 is no compression) */
- hbool_t verbose = TRUE; /* Whether to emit some informational messages */
- hbool_t swmr_write = FALSE; /* Whether to create file with SWMR_WRITE access */
+ bool verbose = true; /* Whether to emit some informational messages */
+ bool swmr_write = false; /* Whether to create file with SWMR_WRITE access */
const char *index_type = "b1"; /* Chunk index type */
- hbool_t use_seed = FALSE; /* Set to TRUE if a seed was set on the command line */
+ bool use_seed = false; /* Set to true if a seed was set on the command line */
unsigned random_seed = 0; /* Random # seed */
unsigned u; /* Local index variables */
int temp;
@@ -285,14 +285,14 @@ main(int argc, char *argv[])
/* Chunk index type */
case 'i':
index_type = argv[u + 1];
- if (HDstrcmp(index_type, "ea") != 0 && HDstrcmp(index_type, "b2") != 0)
+ if (strcmp(index_type, "ea") != 0 && strcmp(index_type, "b2") != 0)
usage();
u += 2;
break;
/* Random # seed */
case 'r':
- use_seed = TRUE;
+ use_seed = true;
temp = atoi(argv[u + 1]);
if (temp < 0)
usage();
@@ -303,13 +303,13 @@ main(int argc, char *argv[])
/* Be quiet */
case 'q':
- verbose = FALSE;
+ verbose = false;
u++;
break;
/* Run with SWMR_WRITE */
case 's':
- swmr_write = TRUE;
+ swmr_write = true;
u++;
break;
diff --git a/test/swmr_reader.c b/test/swmr_reader.c
index 08c6307..18f204d 100644
--- a/test/swmr_reader.c
+++ b/test/swmr_reader.c
@@ -34,16 +34,16 @@
/* Local Prototypes */
/********************/
-static int check_dataset(hid_t fid, hbool_t verbose, FILE *verbose_file, const char *sym_name,
- symbol_t *record, hid_t rec_sid);
-static int read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned random_seed,
+static int check_dataset(hid_t fid, bool verbose, FILE *verbose_file, const char *sym_name, symbol_t *record,
+ hid_t rec_sid);
+static int read_records(const char *filename, bool verbose, FILE *verbose_file, unsigned random_seed,
unsigned long nseconds, unsigned poll_time, unsigned ncommon, unsigned nrandom);
/*******************/
/* Local Variables */
/*******************/
-static hid_t symbol_tid = -1; /* The type ID for the SWMR datasets */
+static hid_t symbol_tid = H5I_INVALID_HID; /* The type ID for the SWMR datasets */
/*-------------------------------------------------------------------------
* Function: check_dataset
@@ -55,7 +55,7 @@ static hid_t symbol_tid = -1; /* The type ID for the SWMR datasets */
* Parameters: hid_t fid
* The SWMR test file's ID.
*
- * hbool_t verbose
+ * bool verbose
* Whether verbose console output is desired.
*
* FILE *verbose_file
@@ -78,7 +78,7 @@ static hid_t symbol_tid = -1; /* The type ID for the SWMR datasets */
*-------------------------------------------------------------------------
*/
static int
-check_dataset(hid_t fid, hbool_t verbose, FILE *verbose_file, const char *sym_name, symbol_t *record,
+check_dataset(hid_t fid, bool verbose, FILE *verbose_file, const char *sym_name, symbol_t *record,
hid_t rec_sid)
{
hid_t dsid; /* Dataset ID */
@@ -163,7 +163,7 @@ check_dataset(hid_t fid, hbool_t verbose, FILE *verbose_file, const char *sym_na
* Parameters: const char *filename
* The SWMR test file's name.
*
- * hbool_t verbose
+ * bool verbose
* Whether verbose console output is desired.
*
* FILE *verbose_file
@@ -190,7 +190,7 @@ check_dataset(hid_t fid, hbool_t verbose, FILE *verbose_file, const char *sym_na
*-------------------------------------------------------------------------
*/
static int
-read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned random_seed,
+read_records(const char *filename, bool verbose, FILE *verbose_file, unsigned random_seed,
unsigned long nseconds, unsigned poll_time, unsigned ncommon, unsigned nrandom)
{
time_t start_time; /* Starting time */
@@ -202,7 +202,7 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned
hid_t fapl; /* file access property list */
symbol_t record; /* The record to read from the dataset */
unsigned v; /* Local index variable */
- hbool_t use_log_vfd = FALSE; /* Use the log VFD (set this manually) */
+ bool use_log_vfd = false; /* Use the log VFD (set this manually) */
assert(filename);
assert(nseconds != 0);
@@ -278,7 +278,7 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned
if (use_log_vfd) {
char verbose_name[1024];
- HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_reader.log.%u", random_seed);
+ snprintf(verbose_name, sizeof(verbose_name), "swmr_reader.log.%u", random_seed);
H5Pset_fapl_log(fapl, verbose_name, H5FD_LOG_ALL, (size_t)(512 * 1024 * 1024));
} /* end if */
@@ -392,9 +392,9 @@ main(int argc, char *argv[])
int poll_time = 1; /* # of seconds between polling */
int ncommon = 5; /* # of common symbols to poll */
int nrandom = 10; /* # of random symbols to poll */
- hbool_t verbose = TRUE; /* Whether to emit some informational messages */
+ bool verbose = true; /* Whether to emit some informational messages */
FILE *verbose_file = NULL; /* File handle for verbose output */
- hbool_t use_seed = FALSE; /* Set to 1 if a seed was set on the command line */
+ bool use_seed = false; /* Set to 1 if a seed was set on the command line */
unsigned random_seed = 0; /* Random # seed */
unsigned u; /* Local index variables */
int temp;
@@ -425,13 +425,13 @@ main(int argc, char *argv[])
/* Be quiet */
case 'q':
- verbose = FALSE;
+ verbose = false;
u++;
break;
/* Random # seed */
case 'r':
- use_seed = TRUE;
+ use_seed = true;
temp = atoi(argv[u + 1]);
if (temp < 0)
usage();
@@ -481,7 +481,7 @@ main(int argc, char *argv[])
if (verbose) {
char verbose_name[1024];
- HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_reader.out.%u", random_seed);
+ snprintf(verbose_name, sizeof(verbose_name), "swmr_reader.out.%u", random_seed);
if (NULL == (verbose_file = fopen(verbose_name, "w"))) {
fprintf(stderr, "Can't open verbose output file!\n");
exit(EXIT_FAILURE);
diff --git a/test/swmr_remove_reader.c b/test/swmr_remove_reader.c
index 9a39356..614aed2 100644
--- a/test/swmr_remove_reader.c
+++ b/test/swmr_remove_reader.c
@@ -35,7 +35,7 @@
/* Local Variables */
/*******************/
-static hid_t symbol_tid = -1;
+static hid_t symbol_tid = H5I_INVALID_HID;
/********************/
/* Local Prototypes */
diff --git a/test/swmr_sparse_reader.c b/test/swmr_sparse_reader.c
index 5a2f464..a6d8fd4 100644
--- a/test/swmr_sparse_reader.c
+++ b/test/swmr_sparse_reader.c
@@ -41,7 +41,7 @@
/* Local Variables */
/*******************/
-static hid_t symbol_tid = (-1);
+static hid_t symbol_tid = (H5I_INVALID_HID);
/********************/
/* Local Prototypes */
diff --git a/test/swmr_sparse_writer.c b/test/swmr_sparse_writer.c
index edef5c6..88d0b51 100644
--- a/test/swmr_sparse_writer.c
+++ b/test/swmr_sparse_writer.c
@@ -173,7 +173,7 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
symbol_info_t *symbol; /* Symbol to write record to */
hid_t file_sid; /* Dataset's space ID */
hid_t aid; /* Attribute ID */
- hbool_t corked; /* Whether the dataset was corked */
+ bool corked; /* Whether the dataset was corked */
/* Get a random dataset, according to the symbol distribution */
symbol = choose_dataset();
@@ -188,7 +188,7 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
* flushed before the data has been written */
if (H5Odisable_mdc_flushes(symbol->dsid) < 0)
return -1;
- corked = TRUE;
+ corked = true;
if (H5Dset_extent(symbol->dsid, dim) < 0)
return -1;
@@ -204,7 +204,7 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
else {
if ((aid = H5Aopen(symbol->dsid, "seq", H5P_DEFAULT)) < 0)
return -1;
- corked = FALSE;
+ corked = false;
} /* end else */
/* Get the coordinate to write */
diff --git a/test/swmr_start_write.c b/test/swmr_start_write.c
index 2bea7d4..6254da8 100644
--- a/test/swmr_start_write.c
+++ b/test/swmr_start_write.c
@@ -35,10 +35,10 @@
/* Local Prototypes */
/********************/
-static hid_t create_file(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned random_seed);
-static int create_datasets(hid_t fid, int comp_level, hbool_t verbose, FILE *verbose_file,
+static hid_t create_file(const char *filename, bool verbose, FILE *verbose_file, unsigned random_seed);
+static int create_datasets(hid_t fid, int comp_level, bool verbose, FILE *verbose_file,
const char *index_type);
-static int add_records(hid_t fid, hbool_t verbose, FILE *verbose_file, unsigned long nrecords,
+static int add_records(hid_t fid, bool verbose, FILE *verbose_file, unsigned long nrecords,
unsigned long flush_count);
static void usage(void);
@@ -63,7 +63,7 @@ static void usage(void);
*-------------------------------------------------------------------------
*/
static hid_t
-create_file(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned random_seed)
+create_file(const char *filename, bool verbose, FILE *verbose_file, unsigned random_seed)
{
hid_t fid; /* File ID for new HDF5 file */
hid_t fcpl; /* File creation property list */
@@ -135,7 +135,7 @@ create_file(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned
*-------------------------------------------------------------------------
*/
static int
-create_datasets(hid_t fid, int comp_level, hbool_t verbose, FILE *verbose_file, const char *index_type)
+create_datasets(hid_t fid, int comp_level, bool verbose, FILE *verbose_file, const char *index_type)
{
hid_t dcpl; /* Dataset creation property list */
hid_t tid; /* Datatype for dataset elements */
@@ -155,7 +155,7 @@ create_datasets(hid_t fid, int comp_level, hbool_t verbose, FILE *verbose_file,
* With one unlimited dimension, we get the extensible array index
* type, with two unlimited dimensions, we get a v-2 B-tree.
*/
- if (!HDstrcmp(index_type, "b2"))
+ if (!strcmp(index_type, "b2"))
max_dims[0] = H5S_UNLIMITED;
/* Create dataspace for creating datasets */
@@ -209,7 +209,7 @@ create_datasets(hid_t fid, int comp_level, hbool_t verbose, FILE *verbose_file,
*-------------------------------------------------------------------------
*/
static int
-add_records(hid_t fid, hbool_t verbose, FILE *verbose_file, unsigned long nrecords, unsigned long flush_count)
+add_records(hid_t fid, bool verbose, FILE *verbose_file, unsigned long nrecords, unsigned long flush_count)
{
hid_t tid; /* Datatype ID for records */
hid_t mem_sid; /* Memory dataspace ID */
@@ -356,9 +356,9 @@ main(int argc, char *argv[])
hid_t fid; /* File ID for file opened */
long nrecords = 0; /* # of records to append */
long flush_count = 10000; /* # of records to write between flushing file */
- hbool_t verbose = TRUE; /* Whether to emit some informational messages */
+ bool verbose = true; /* Whether to emit some informational messages */
FILE *verbose_file = NULL; /* File handle for verbose output */
- hbool_t use_seed = FALSE; /* Set to TRUE if a seed was set on the command line */
+ bool use_seed = false; /* Set to true if a seed was set on the command line */
unsigned random_seed = 0; /* Random # seed */
int comp_level = -1; /* Compression level (-1 is no compression) */
const char *index_type = "b1"; /* Chunk index type */
@@ -384,7 +384,7 @@ main(int argc, char *argv[])
/* Chunk index type */
case 'i':
index_type = argv[u + 1];
- if (HDstrcmp(index_type, "ea") != 0 && HDstrcmp(index_type, "b2") != 0)
+ if (strcmp(index_type, "ea") != 0 && strcmp(index_type, "b2") != 0)
usage();
u += 2;
break;
@@ -399,13 +399,13 @@ main(int argc, char *argv[])
/* Be quiet */
case 'q':
- verbose = FALSE;
+ verbose = false;
u++;
break;
/* Random # seed */
case 'r':
- use_seed = TRUE;
+ use_seed = true;
temp = atoi(argv[u + 1]);
if (temp < 0)
usage();
@@ -448,7 +448,7 @@ main(int argc, char *argv[])
if (verbose) {
char verbose_name[1024];
- HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed);
+ snprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed);
if (NULL == (verbose_file = fopen(verbose_name, "w"))) {
fprintf(stderr, "Can't open verbose output file!\n");
exit(EXIT_FAILURE);
diff --git a/test/swmr_writer.c b/test/swmr_writer.c
index 8397c43..7fe1a31 100644
--- a/test/swmr_writer.c
+++ b/test/swmr_writer.c
@@ -34,9 +34,9 @@
/* Local Prototypes */
/********************/
-static hid_t open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned random_seed,
- hbool_t old);
-static int add_records(hid_t fid, hbool_t verbose, FILE *verbose_file, unsigned long nrecords,
+static hid_t open_skeleton(const char *filename, bool verbose, FILE *verbose_file, unsigned random_seed,
+ bool old);
+static int add_records(hid_t fid, bool verbose, FILE *verbose_file, unsigned long nrecords,
unsigned long flush_count);
static void usage(void);
@@ -48,7 +48,7 @@ static void usage(void);
* Parameters: const char *filename
* The filename of the SWMR HDF5 file to open
*
- * hbool_t verbose
+ * bool verbose
* Whether or not to emit verbose console messages
*
* FILE *verbose_file
@@ -57,7 +57,7 @@ static void usage(void);
* unsigned random_seed
* Random seed for the file (used for verbose logging)
*
- * hbool_t old
+ * bool old
* Whether to write in "old" file format
*
* Return: Success: The file ID of the opened SWMR file
@@ -68,12 +68,12 @@ static void usage(void);
*-------------------------------------------------------------------------
*/
static hid_t
-open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned random_seed, hbool_t old)
+open_skeleton(const char *filename, bool verbose, FILE *verbose_file, unsigned random_seed, bool old)
{
hid_t fid; /* File ID for new HDF5 file */
hid_t fapl; /* File access property list */
unsigned u, v; /* Local index variable */
- hbool_t use_log_vfd = FALSE; /* Use the log VFD (set this manually) */
+ bool use_log_vfd = false; /* Use the log VFD (set this manually) */
assert(filename);
@@ -90,7 +90,7 @@ open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file, unsigne
if (use_log_vfd) {
char verbose_name[1024];
- HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.log.%u", random_seed);
+ snprintf(verbose_name, sizeof(verbose_name), "swmr_writer.log.%u", random_seed);
H5Pset_fapl_log(fapl, verbose_name, H5FD_LOG_ALL, (size_t)(512 * 1024 * 1024));
} /* end if */
@@ -127,7 +127,7 @@ open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file, unsigne
* Parameters: hid_t fid
* The file ID of the SWMR HDF5 file
*
- * hbool_t verbose
+ * bool verbose
* Whether or not to emit verbose console messages
*
* FILE *verbose_file
@@ -145,7 +145,7 @@ open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file, unsigne
*-------------------------------------------------------------------------
*/
static int
-add_records(hid_t fid, hbool_t verbose, FILE *verbose_file, unsigned long nrecords, unsigned long flush_count)
+add_records(hid_t fid, bool verbose, FILE *verbose_file, unsigned long nrecords, unsigned long flush_count)
{
hid_t tid; /* Datatype ID for records */
hid_t mem_sid; /* Memory dataspace ID */
@@ -279,10 +279,10 @@ main(int argc, char *argv[])
hid_t fid; /* File ID for file opened */
long nrecords = 0; /* # of records to append */
long flush_count = 10000; /* # of records to write between flushing file */
- hbool_t verbose = TRUE; /* Whether to emit some informational messages */
+ bool verbose = true; /* Whether to emit some informational messages */
FILE *verbose_file = NULL; /* File handle for verbose output */
- hbool_t old = FALSE; /* Whether to use non-latest-format when opening file */
- hbool_t use_seed = FALSE; /* Set to TRUE if a seed was set on the command line */
+ bool old = false; /* Whether to use non-latest-format when opening file */
+ bool use_seed = false; /* Set to true if a seed was set on the command line */
unsigned random_seed = 0; /* Random # seed */
unsigned u; /* Local index variable */
int temp;
@@ -305,13 +305,13 @@ main(int argc, char *argv[])
/* Be quiet */
case 'q':
- verbose = FALSE;
+ verbose = false;
u++;
break;
/* Random # seed */
case 'r':
- use_seed = TRUE;
+ use_seed = true;
temp = atoi(argv[u + 1]);
random_seed = (unsigned)temp;
u += 2;
@@ -319,7 +319,7 @@ main(int argc, char *argv[])
/* Use non-latest-format when opening file */
case 'o':
- old = TRUE;
+ old = true;
u++;
break;
@@ -356,7 +356,7 @@ main(int argc, char *argv[])
if (verbose) {
char verbose_name[1024];
- HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed);
+ snprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed);
if (NULL == (verbose_file = fopen(verbose_name, "w"))) {
fprintf(stderr, "Can't open verbose output file!\n");
exit(EXIT_FAILURE);
diff --git a/test/tarray.c b/test/tarray.c
index b5ce921..494b65c 100644
--- a/test/tarray.c
+++ b/test/tarray.c
@@ -686,7 +686,7 @@ test_array_compound_atomic(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid2, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "i") != 0)
+ if (strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -705,7 +705,7 @@ test_array_compound_atomic(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid2, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "f") != 0)
+ if (strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -908,7 +908,7 @@ test_array_compound_array(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid2, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "i") != 0)
+ if (strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -927,7 +927,7 @@ test_array_compound_array(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid2, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "f") != 0)
+ if (strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -1664,9 +1664,9 @@ test_array_bkg(void)
for (i = 0; i < dtsinfo->nsubfields; i++)
dtsinfo->name[i] = (char *)calloc((size_t)20, sizeof(char));
- HDstrcpy(dtsinfo->name[0], "One");
- HDstrcpy(dtsinfo->name[1], "Two");
- HDstrcpy(dtsinfo->name[2], "Three");
+ strcpy(dtsinfo->name[0], "One");
+ strcpy(dtsinfo->name[1], "Two");
+ strcpy(dtsinfo->name[2], "Three");
/* Create file */
/* ----------- */
@@ -1918,7 +1918,7 @@ test_compat(void)
size_t off; /* Offset of compound field */
hid_t mtid; /* Datatype ID for field */
int i; /* Index variables */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -1966,7 +1966,7 @@ test_compat(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid1, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "i") != 0)
+ if (strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -1985,7 +1985,7 @@ test_compat(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid1, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "f") != 0)
+ if (strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -2004,7 +2004,7 @@ test_compat(void)
/* Check the 3rd field's name */
mname = H5Tget_member_name(tid1, 2);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "l") != 0)
+ if (strcmp(mname, "l") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -2047,7 +2047,7 @@ test_compat(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid1, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "i") != 0)
+ if (mname && strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
@@ -2067,7 +2067,7 @@ test_compat(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid1, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "f") != 0)
+ if (mname && strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
@@ -2115,7 +2115,7 @@ test_compat(void)
/* Check the 3rd field's name */
mname = H5Tget_member_name(tid1, 2);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "l") != 0)
+ if (mname && strcmp(mname, "l") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
@@ -2163,7 +2163,7 @@ test_compat(void)
/* Check the 4th field's name */
mname = H5Tget_member_name(tid1, 3);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "d") != 0)
+ if (mname && strcmp(mname, "d") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
diff --git a/test/tattr.c b/test/tattr.c
index 91cba51..2e391c5 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -164,7 +164,7 @@ typedef struct {
int stop; /* # of iterations to stop after */
hsize_t curr; /* Current creation order value */
size_t max_visit; /* Size of "visited attribute" flag array */
- hbool_t *visited; /* Pointer to array of "visited attribute" flags */
+ bool *visited; /* Pointer to array of "visited attribute" flags */
} attr_iter_info_t;
static herr_t attr_op1(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *op_data);
@@ -308,8 +308,8 @@ test_attr_basic_write(hid_t fapl)
if (attr_name) {
ret = (herr_t)H5Aget_name(attr, (size_t)(attr_name_size + 1), attr_name);
CHECK(ret, FAIL, "H5Aget_name");
- ret = HDstrcmp(attr_name, ATTR_TMP_NAME);
- VERIFY(ret, 0, "HDstrcmp");
+ ret = strcmp(attr_name, ATTR_TMP_NAME);
+ VERIFY(ret, 0, "strcmp");
free(attr_name);
attr_name = NULL;
@@ -345,8 +345,8 @@ test_attr_basic_write(hid_t fapl)
if (attr_name) {
ret = (herr_t)H5Aget_name(attr2, (size_t)(attr_name_size + 1), attr_name);
CHECK(ret, FAIL, "H5Aget_name");
- ret = HDstrcmp(attr_name, ATTR1A_NAME);
- VERIFY(ret, 0, "HDstrcmp");
+ ret = strcmp(attr_name, ATTR1A_NAME);
+ VERIFY(ret, 0, "strcmp");
free(attr_name);
attr_name = NULL;
@@ -870,8 +870,8 @@ test_attr_compound_read(hid_t fapl)
VERIFY(fields, 3, "H5Tget_nmembers");
for (i = 0; i < fields; i++) {
fieldname = H5Tget_member_name(type, (unsigned)i);
- if (!(HDstrcmp(fieldname, ATTR4_FIELDNAME1) != 0 || HDstrcmp(fieldname, ATTR4_FIELDNAME2) != 0 ||
- HDstrcmp(fieldname, ATTR4_FIELDNAME3) != 0))
+ if (!(strcmp(fieldname, ATTR4_FIELDNAME1) != 0 || strcmp(fieldname, ATTR4_FIELDNAME2) != 0 ||
+ strcmp(fieldname, ATTR4_FIELDNAME3) != 0))
TestErrPrintf("invalid field name for field #%d: %s\n", i, fieldname);
H5free_memory(fieldname);
} /* end for */
@@ -930,8 +930,8 @@ test_attr_compound_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR4_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR4_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR4_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR4_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR4_NAME);
/* Close attribute datatype */
@@ -1305,16 +1305,16 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR1_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR1_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR1_NAME);
/* Verify Name with too small of a buffer */
- name_len = H5Aget_name(attr, HDstrlen(ATTR1_NAME), attr_name);
- VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- HDstrcpy(temp_name, ATTR1_NAME); /* make a copy of the name */
- temp_name[HDstrlen(ATTR1_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name) != 0)
+ name_len = H5Aget_name(attr, strlen(ATTR1_NAME), attr_name);
+ VERIFY(name_len, strlen(ATTR1_NAME), "H5Aget_name");
+ strcpy(temp_name, ATTR1_NAME); /* make a copy of the name */
+ temp_name[strlen(ATTR1_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
+ if (strcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1363,16 +1363,16 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR2_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR2_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR2_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR2_NAME);
/* Verify Name with too small of a buffer */
- name_len = H5Aget_name(attr, HDstrlen(ATTR2_NAME), attr_name);
- VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name");
- HDstrcpy(temp_name, ATTR2_NAME); /* make a copy of the name */
- temp_name[HDstrlen(ATTR2_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name) != 0)
+ name_len = H5Aget_name(attr, strlen(ATTR2_NAME), attr_name);
+ VERIFY(name_len, strlen(ATTR2_NAME), "H5Aget_name");
+ strcpy(temp_name, ATTR2_NAME); /* make a copy of the name */
+ temp_name[strlen(ATTR2_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
+ if (strcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1425,16 +1425,16 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Verify Name with too small of a buffer */
- name_len = H5Aget_name(attr, HDstrlen(ATTR3_NAME), attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- HDstrcpy(temp_name, ATTR3_NAME); /* make a copy of the name */
- temp_name[HDstrlen(ATTR3_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name) != 0)
+ name_len = H5Aget_name(attr, strlen(ATTR3_NAME), attr_name);
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ strcpy(temp_name, ATTR3_NAME); /* make a copy of the name */
+ temp_name[strlen(ATTR3_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
+ if (strcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1463,19 +1463,19 @@ attr_op1(hid_t H5_ATTR_UNUSED loc_id, const char *name, const H5A_info_t H5_ATTR
switch (*count) {
case 0:
- if (HDstrcmp(name, ATTR1_NAME) != 0)
+ if (strcmp(name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR1_NAME);
(*count)++;
break;
case 1:
- if (HDstrcmp(name, ATTR2_NAME) != 0)
+ if (strcmp(name, ATTR2_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR2_NAME);
(*count)++;
break;
case 2:
- if (HDstrcmp(name, ATTR3_NAME) != 0)
+ if (strcmp(name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR3_NAME);
(*count)++;
break;
@@ -1620,8 +1620,8 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR1_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR1_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR1_NAME);
/* Close attribute */
@@ -1635,8 +1635,8 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Close attribute */
@@ -1659,8 +1659,8 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Close attribute */
@@ -2126,7 +2126,7 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
/* Re-open all the attributes by name and verify the data */
for (u = 0; u < max_attr; u++) {
/* Open attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Aopen(loc_id, attrname, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Aopen");
@@ -2151,10 +2151,10 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
CHECK(attr, FAIL, "H5Aopen_by_idx");
/* Verify Name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, check_name);
- VERIFY(name_len, HDstrlen(attrname), "H5Aget_name");
- if (HDstrcmp(check_name, attrname) != 0)
+ VERIFY(name_len, strlen(attrname), "H5Aget_name");
+ if (strcmp(check_name, attrname) != 0)
TestErrPrintf("attribute name different: attrname = '%s', should be '%s'\n", check_name,
attrname);
@@ -2246,12 +2246,12 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2266,17 +2266,17 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add one more attribute, to push into "dense" storage */
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -2392,12 +2392,12 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2416,17 +2416,17 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add one more attribute, to push into "dense" storage */
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -2501,7 +2501,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
*/
fcpl = H5Pcopy(fcpl);
CHECK(fcpl, FAIL, "H5Pcopy");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, 1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, 1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
}
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
@@ -2554,12 +2554,12 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes, until well into dense storage */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2579,7 +2579,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Close dataspace */
ret = H5Sclose(sid);
@@ -2604,7 +2604,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
/* Delete attributes until the attributes revert to compact storage again */
for (u--; u >= min_dense; u--) {
/* Delete attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -2615,29 +2615,29 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Delete one more attribute, which should cause reversion to compact storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Verify attributes still left */
ret = test_attr_dense_verify(dataset, (u - 1));
CHECK(ret, FAIL, "test_attr_dense_verify");
/* Delete another attribute, to verify deletion in compact storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (u - 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (u - 1));
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Verify attributes still left */
ret = test_attr_dense_verify(dataset, (u - 2));
@@ -2702,7 +2702,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
*/
fcpl = H5Pcopy(fcpl);
CHECK(fcpl, FAIL, "H5Pcopy");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, 1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, 1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
}
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
@@ -2742,7 +2742,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pget_attr_phase_change");
/* Using creation order or not */
- for (use_corder = FALSE; use_corder <= TRUE; use_corder++) {
+ for (use_corder = false; use_corder <= true; use_corder++) {
if (use_corder) {
ret = H5Pset_attr_creation_order(dcpl, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED);
@@ -2755,12 +2755,12 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes, until well into dense storage */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, H5I_INVALID_HID, "H5Acreate2");
@@ -2773,7 +2773,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Rename attribute */
- HDsnprintf(new_attrname, sizeof(new_attrname), "new attr %02u", u);
+ snprintf(new_attrname, sizeof(new_attrname), "new attr %02u", u);
/* Rename attribute */
ret = H5Arename_by_name(fid, DSET1_NAME, attrname, new_attrname, H5P_DEFAULT);
@@ -2787,7 +2787,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -2826,7 +2826,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
unsigned value; /* Attribute value */
/* Open attribute */
- HDsnprintf(attrname, sizeof(attrname), "new attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "new attr %02u", u);
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
CHECK(attr, H5I_INVALID_HID, "H5Aopen");
@@ -2898,7 +2898,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
*/
fcpl = H5Pcopy(fcpl);
CHECK(fcpl, FAIL, "H5Pcopy");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, 1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, 1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
}
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
@@ -2945,12 +2945,12 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes, until well into dense storage */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2970,7 +2970,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Close dataspace */
ret = H5Sclose(sid);
@@ -3087,13 +3087,13 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add first attribute, which should be immediately in dense storage */
/* Create attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3107,13 +3107,13 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Add second attribute, to allow deletions to be checked easily */
/* Create attribute */
u = 1;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3127,7 +3127,7 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Delete second attribute, attributes should still be stored densely */
@@ -3137,19 +3137,19 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Delete first attribute, attributes should not be stored densely */
/* Delete attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Close dataspace */
ret = H5Sclose(sid);
@@ -3247,12 +3247,12 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3267,7 +3267,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add one more attribute, to push into "dense" storage */
/* Create dataspace for attribute */
@@ -3275,13 +3275,13 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Open the attribute just created and get a second ID */
attr2 = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -3316,7 +3316,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Open first attribute for the dataset */
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -3368,7 +3368,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Open first attribute for the dataset */
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -3431,7 +3431,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Open first attribute for the dataset */
attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)4, H5P_DEFAULT, H5P_DEFAULT);
@@ -3485,7 +3485,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Open attribute of the dataset for the first time */
attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)2, H5P_DEFAULT, H5P_DEFAULT);
@@ -3499,7 +3499,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Open attribute for the second time */
attr2 = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)2, H5P_DEFAULT, H5P_DEFAULT);
@@ -3549,7 +3549,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Open attribute of the dataset for the first time */
attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)3, H5P_DEFAULT, H5P_DEFAULT);
@@ -3558,7 +3558,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Delete a few attributes until the storage switches to compact */
for (u = min_dense - 1; u <= max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
add_attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(add_attr, FAIL, "H5Acreate2");
@@ -3573,7 +3573,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Open attribute for the second time */
attr2 = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)3, H5P_DEFAULT, H5P_DEFAULT);
@@ -3626,7 +3626,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(gid1, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3645,7 +3645,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Check on group's attribute storage status */
is_dense = H5O__is_attr_dense_test(gid1);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Open the hard link just created */
gid2 = H5Gopen2(fid, GROUP2_NAME, H5P_DEFAULT);
@@ -3784,15 +3784,15 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add first "small" attribute, which should be in compact storage */
/* Create attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3802,15 +3802,15 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add second "small" attribute, which should stay in compact storage */
/* Create attribute */
u = 1;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3820,15 +3820,15 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add first "big" attribute, which should push storage into dense form */
/* Create attribute */
u = 2;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT);
if (low == H5F_LIBVER_LATEST) {
CHECK(attr, FAIL, "H5Acreate2");
@@ -3843,15 +3843,15 @@ test_attr_big(hid_t fcpl, hid_t fapl)
* form - QAK)
*/
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (nshared_indices ? false : true), "H5O__is_attr_dense_test");
/* Add second "big" attribute, which should leave storage in dense form */
/* Create attribute */
u = 3;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3865,63 +3865,63 @@ test_attr_big(hid_t fcpl, hid_t fapl)
* form - QAK)
*/
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (nshared_indices ? false : true), "H5O__is_attr_dense_test");
/* Delete second "small" attribute, attributes should still be stored densely */
/* Delete attribute */
u = 1;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (nshared_indices ? false : true), "H5O__is_attr_dense_test");
/* Delete second "big" attribute, attributes should still be stored densely */
/* Delete attribute */
u = 3;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, (nshared_indices ? FALSE : TRUE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (nshared_indices ? false : true), "H5O__is_attr_dense_test");
/* Delete first "big" attribute, attributes should _not_ be stored densely */
/* Delete attribute */
u = 2;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Delete first "small" attribute, should be no attributes now */
/* Delete attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
} /* end if */
else {
/* Shouldn't be able to create "big" attributes with older version of format */
@@ -3933,9 +3933,9 @@ test_attr_big(hid_t fcpl, hid_t fapl)
* form - QAK)
*/
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
} /* end else */
/* Close dataspaces */
@@ -4022,7 +4022,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Add attribute with 'null' dataspace */
/* Create attribute */
- HDstrcpy(attrname, "null attr");
+ strcpy(attrname, "null attr");
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4040,7 +4040,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Compare the dataspaces */
cmp = H5Sextent_equal(attr_sid, null_sid);
CHECK(cmp, FAIL, "H5Sextent_equal");
- VERIFY(cmp, TRUE, "H5Sextent_equal");
+ VERIFY(cmp, true, "H5Sextent_equal");
/* Close dataspace */
ret = H5Sclose(attr_sid);
@@ -4062,7 +4062,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Add another attribute with 'null' dataspace */
/* Create attribute */
- HDstrcpy(attrname, "null attr #2");
+ strcpy(attrname, "null attr #2");
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4096,7 +4096,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Open first attribute */
- HDstrcpy(attrname, "null attr #2");
+ strcpy(attrname, "null attr #2");
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Aopen");
@@ -4114,7 +4114,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Compare the dataspaces */
cmp = H5Sextent_equal(attr_sid, null_sid);
CHECK(cmp, FAIL, "H5Sextent_equal");
- VERIFY(cmp, TRUE, "H5Sextent_equal");
+ VERIFY(cmp, true, "H5Sextent_equal");
/* Close dataspace */
ret = H5Sclose(attr_sid);
@@ -4134,7 +4134,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Open second attribute */
- HDstrcpy(attrname, "null attr");
+ strcpy(attrname, "null attr");
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Aopen");
@@ -4239,7 +4239,7 @@ test_attr_deprec(hid_t fcpl, hid_t fapl)
/* Get number of attributes with bad ID */
H5E_BEGIN_TRY
{
- ret = H5Aget_num_attrs((hid_t)-1);
+ ret = H5Aget_num_attrs((hid_t)H5I_INVALID_HID);
}
H5E_END_TRY
VERIFY(ret, FAIL, "H5Aget_num_attrs");
@@ -4289,7 +4289,7 @@ test_attr_deprec(hid_t fcpl, hid_t fapl)
**
****************************************************************/
static void
-test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_many(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t gid; /* Group ID */
@@ -4318,22 +4318,22 @@ test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create many attributes */
for (u = 0; u < nattr; u++) {
- HDsnprintf(attrname, sizeof(attrname), "a-%06u", u);
+ snprintf(attrname, sizeof(attrname), "a-%06u", u);
exists = H5Aexists(gid, attrname);
- VERIFY(exists, FALSE, "H5Aexists");
+ VERIFY(exists, false, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, FALSE, "H5Aexists_by_name");
+ VERIFY(exists, false, "H5Aexists_by_name");
aid = H5Acreate2(gid, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
exists = H5Aexists(gid, attrname);
- VERIFY(exists, TRUE, "H5Aexists");
+ VERIFY(exists, true, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, TRUE, "H5Aexists_by_name");
+ VERIFY(exists, true, "H5Aexists_by_name");
ret = H5Awrite(aid, H5T_NATIVE_UINT, &u);
CHECK(ret, FAIL, "H5Awrite");
@@ -4342,10 +4342,10 @@ test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
exists = H5Aexists(gid, attrname);
- VERIFY(exists, TRUE, "H5Aexists");
+ VERIFY(exists, true, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, TRUE, "H5Aexists_by_name");
+ VERIFY(exists, true, "H5Aexists_by_name");
} /* end for */
/* Close group */
@@ -4370,22 +4370,22 @@ test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
for (u = 0; u < nattr; u++) {
unsigned value; /* Attribute value */
- HDsnprintf(attrname, sizeof(attrname), "a-%06u", u);
+ snprintf(attrname, sizeof(attrname), "a-%06u", u);
exists = H5Aexists(gid, attrname);
- VERIFY(exists, TRUE, "H5Aexists");
+ VERIFY(exists, true, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, TRUE, "H5Aexists_by_name");
+ VERIFY(exists, true, "H5Aexists_by_name");
aid = H5Aopen(gid, attrname, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Aopen");
exists = H5Aexists(gid, attrname);
- VERIFY(exists, TRUE, "H5Aexists");
+ VERIFY(exists, true, "H5Aexists");
exists = H5Aexists_by_name(fid, GROUP1_NAME, attrname, H5P_DEFAULT);
- VERIFY(exists, TRUE, "H5Aexists_by_name");
+ VERIFY(exists, true, "H5Aexists_by_name");
ret = H5Aread(aid, H5T_NATIVE_UINT, &value);
CHECK(ret, FAIL, "H5Aread");
@@ -4480,9 +4480,9 @@ test_attr_corder_create_basic(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -4506,9 +4506,9 @@ test_attr_corder_create_basic(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Retrieve dataset creation property list for group */
dcpl = H5Dget_create_plist(dataset);
@@ -4615,14 +4615,14 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Create several attributes, but keep storage in compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4639,9 +4639,9 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (u + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
} /* end for */
} /* end for */
@@ -4701,9 +4701,9 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Loop through attributes, checking their creation order values */
/* (the name index is used, but the creation order value is in the same order) */
@@ -4711,12 +4711,12 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
H5A_info_t ainfo; /* Attribute information */
/* Retrieve information for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Aget_info_by_name(my_dataset, ".", attrname, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_name");
/* Verify creation order of attribute */
- VERIFY(ainfo.corder_valid, TRUE, "H5Aget_info_by_name");
+ VERIFY(ainfo.corder_valid, true, "H5Aget_info_by_name");
VERIFY(ainfo.corder, u, "H5Aget_info_by_name");
} /* end for */
} /* end for */
@@ -4819,14 +4819,14 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Create several attributes, but keep storage in compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4843,13 +4843,13 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (u + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
} /* end for */
/* Create another attribute, to push into dense storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
+ snprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4866,9 +4866,9 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -4932,9 +4932,9 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Loop through attributes, checking their creation order values */
/* (the name index is used, but the creation order value is in the same order) */
@@ -4942,12 +4942,12 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
H5A_info_t ainfo; /* Attribute information */
/* Retrieve information for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Aget_info_by_name(my_dataset, ".", attrname, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_name");
/* Verify creation order of attribute */
- VERIFY(ainfo.corder_valid, TRUE, "H5Aget_info_by_name");
+ VERIFY(ainfo.corder_valid, true, "H5Aget_info_by_name");
VERIFY(ainfo.corder, u, "H5Aget_info_by_name");
} /* end for */
} /* end for */
@@ -4975,13 +4975,13 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
static void
test_attr_corder_create_reopen(hid_t fcpl, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t gcpl_id = -1; /* Group creation property list ID */
- hid_t gid = -1; /* Group ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t aid = -1; /* Attribute ID */
- int buf; /* Attribute data */
- herr_t ret; /* Generic return value */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gcpl_id = H5I_INVALID_HID; /* Group creation property list ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ int buf; /* Attribute data */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Creating Attributes w/New & Old Format\n"));
@@ -5160,9 +5160,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
} /* end for */
/* Close Datasets */
@@ -5215,7 +5215,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Create several attributes, but keep storage in compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5232,13 +5232,13 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (u + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
} /* end for */
/* Create another attribute, to push into dense storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
+ snprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5255,9 +5255,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5266,7 +5266,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Delete several attributes from object, until attribute storage resumes compact form */
for (u = max_compact; u >= min_dense; u--) {
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -5275,9 +5275,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, u, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5286,7 +5286,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end for */
/* Delete another attribute, to push attribute storage into compact form */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -5295,14 +5295,14 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (min_dense - 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Re-add attributes to get back into dense form */
for (u = (min_dense - 1); u < (max_compact + 1); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5320,9 +5320,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5378,9 +5378,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5389,7 +5389,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Delete several attributes from object, until attribute storage resumes compact form */
for (u = max_compact; u >= min_dense; u--) {
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -5398,9 +5398,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, u, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5409,7 +5409,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end for */
/* Delete another attribute, to push attribute storage into compact form */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -5418,14 +5418,14 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (min_dense - 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Re-add attributes to get back into dense form */
for (u = (min_dense - 1); u < (max_compact + 1); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5443,9 +5443,9 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact + 1), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5454,11 +5454,11 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Delete all attributes */
for (u = max_compact; u > 0; u--) {
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
} /* end for */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", 0);
+ snprintf(attrname, sizeof(attrname), "attr %02u", 0);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
} /* end for */
@@ -5535,7 +5535,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
/* Loop to leave file open when deleting dataset, or to close & re-open file
* before deleting dataset */
- for (reopen_file = FALSE; reopen_file <= TRUE; reopen_file++) {
+ for (reopen_file = false; reopen_file <= true; reopen_file++) {
/* Create test file */
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
CHECK(fid, FAIL, "H5Fopen");
@@ -5569,14 +5569,14 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Create attributes, until attribute storage is in dense form */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5594,9 +5594,9 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Retrieve & verify # of records in the name & creation order indices */
ret = H5O__attr_dense_info_test(my_dataset, &name_count, &corder_count);
@@ -5671,7 +5671,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
*-------------------------------------------------------------------------
*/
static int
-attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t use_index)
+attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, bool use_index)
{
char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */
H5A_info_t ainfo; /* Attribute info struct */
@@ -5698,7 +5698,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Don't test "native" order if there is no creation order index, since
@@ -5724,7 +5724,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
} /* end if */
@@ -5745,7 +5745,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Verify the information for first attribute, in increasing name order */
@@ -5765,7 +5765,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Don't test "native" order queries on link name order, since there's not
@@ -5789,7 +5789,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Retrieve current # of errors */
@@ -5806,7 +5806,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
**
****************************************************************/
static void
-test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_info_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -5848,7 +5848,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pget_attr_phase_change");
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Output message about test being performed */
if (use_index)
MESSAGE(5, ("Testing Querying Attribute Info By Index w/Creation Order Index\n"));
@@ -5860,7 +5860,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -5895,9 +5895,9 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for query on non-existent attribute */
H5E_BEGIN_TRY
@@ -5918,7 +5918,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5940,9 +5940,9 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for out of bound offset queries */
H5E_BEGIN_TRY
@@ -5970,7 +5970,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5984,7 +5984,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
/* Verify information for new attribute */
ret = attr_info_by_idx_check(my_dataset, attrname, (hsize_t)u, use_index);
@@ -5996,9 +5996,9 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -6288,7 +6288,7 @@ test_attr_get_name_invalid_buf(hid_t fcpl, hid_t fapl)
**
****************************************************************/
static void
-test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_delete_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -6338,7 +6338,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_DEC; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -6382,7 +6382,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -6417,9 +6417,9 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for deleting non-existent attribute */
H5E_BEGIN_TRY
@@ -6432,7 +6432,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6455,9 +6455,9 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for out of bound deletions */
H5E_BEGIN_TRY
@@ -6511,10 +6511,10 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (max_compact - (u + 2)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u", (max_compact - (u + 2)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6524,7 +6524,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of attribute storage (empty) */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
} /* end for */
/* Work on all the datasets */
@@ -6549,7 +6549,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6565,7 +6565,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
/* Verify information for new attribute */
@@ -6578,9 +6578,9 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -6643,11 +6643,10 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u",
- ((max_compact * 2) - (u + 2)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u", ((max_compact * 2) - (u + 2)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6657,7 +6656,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of attribute storage (empty) */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
/* Check for deletion on empty attribute storage again */
H5E_BEGIN_TRY
@@ -6692,7 +6691,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, to push into dense form */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6708,7 +6707,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
/* Verify information for new attribute */
@@ -6761,11 +6760,11 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 1));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u",
- ((max_compact * 2) - ((u * 2) + 2)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u",
+ ((max_compact * 2) - ((u * 2) + 2)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
} /* end for */
@@ -6814,11 +6813,11 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 3));
+ snprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 3));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u",
- ((max_compact * 2) - ((u * 2) + 4)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u",
+ ((max_compact * 2) - ((u * 2) + 4)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6828,7 +6827,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of attribute storage (empty) */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
/* Check for deletion on empty attribute storage again */
H5E_BEGIN_TRY
@@ -6902,8 +6901,8 @@ attr_iterate2_cb(hid_t loc_id, const char *attr_name, const H5A_info_t *info, vo
} /* end if */
/* Verify name of link */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (unsigned)my_info.corder);
- if (HDstrcmp(attr_name, attrname) != 0)
+ snprintf(attrname, sizeof(attrname), "attr %02u", (unsigned)my_info.corder);
+ if (strcmp(attr_name, attrname) != 0)
return (H5_ITER_ERROR);
/* Check if we've visited this link before */
@@ -6911,7 +6910,7 @@ attr_iterate2_cb(hid_t loc_id, const char *attr_name, const H5A_info_t *info, vo
return (H5_ITER_ERROR);
if (op_data->visited[op_data->curr])
return (H5_ITER_ERROR);
- op_data->visited[op_data->curr] = TRUE;
+ op_data->visited[op_data->curr] = true;
/* Advance to next value, in correct direction */
if (op_data->order != H5_ITER_DEC)
@@ -6990,14 +6989,14 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate2(obj_id, idx_type, order, &skip, attr_iterate2_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate2");
/* Verify that we visited all the attributes */
VERIFY(skip, max_attrs, "H5Aiterate2");
for (v = 0; v < max_attrs; v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate2");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate2");
/* Iterate over attributes on object */
iter_info->nskipped = (unsigned)(skip = 0);
@@ -7005,14 +7004,14 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
/* Verify that we visited all the attributes */
VERIFY(skip, max_attrs, "H5Aiterate_by_name");
for (v = 0; v < max_attrs; v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate_by_name");
/* Iterate over attributes on object */
iter_info->nskipped = (unsigned)(skip = 0);
@@ -7020,14 +7019,14 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(obj_id, ".", idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
/* Verify that we visited all the attributes */
VERIFY(skip, max_attrs, "H5Aiterate_by_name");
for (v = 0; v < max_attrs; v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate_by_name");
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Iterate over attributes on object, with H5Aiterate1 */
@@ -7036,14 +7035,14 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate1(obj_id, &oskip, attr_iterate1_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate1");
/* Verify that we visited all the attributes */
VERIFY(skip, max_attrs, "H5Aiterate1");
for (v = 0; v < max_attrs; v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate1");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate1");
#endif /* H5_NO_DEPRECATED_SYMBOLS */
/* Skip over some attributes on object */
@@ -7052,7 +7051,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_attrs - 1) - skip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate2(obj_id, idx_type, order, &skip, attr_iterate2_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate2");
@@ -7060,18 +7059,18 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
VERIFY(skip, max_attrs, "H5Aiterate2");
if (order == H5_ITER_INC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v + (max_attrs / 2)], TRUE, "H5Aiterate2");
+ VERIFY(iter_info->visited[v + (max_attrs / 2)], true, "H5Aiterate2");
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate2");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate2");
} /* end if */
else {
unsigned nvisit = 0; /* # of links visited */
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
VERIFY(nvisit, max_attrs, "H5Aiterate2");
@@ -7083,7 +7082,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_attrs - 1) - skip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
@@ -7091,18 +7090,18 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
VERIFY(skip, max_attrs, "H5Aiterate_by_name");
if (order == H5_ITER_INC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v + (max_attrs / 2)], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v + (max_attrs / 2)], true, "H5Aiterate_by_name");
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate_by_name");
} /* end if */
else {
unsigned nvisit = 0; /* # of links visited */
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
VERIFY(nvisit, max_attrs, "H5Aiterate_by_name");
@@ -7114,7 +7113,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_attrs - 1) - skip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(obj_id, ".", idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
@@ -7122,18 +7121,18 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
VERIFY(skip, max_attrs, "H5Aiterate_by_name");
if (order == H5_ITER_INC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v + (max_attrs / 2)], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v + (max_attrs / 2)], true, "H5Aiterate_by_name");
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate_by_name");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate_by_name");
} /* end if */
else {
unsigned nvisit = 0; /* # of links visited */
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
VERIFY(nvisit, max_attrs, "H5Aiterate_by_name");
@@ -7146,7 +7145,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = -1;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? (unsigned)oskip : ((max_attrs - 1) - oskip);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate1(obj_id, &oskip, attr_iterate1_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate1");
@@ -7154,18 +7153,18 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
VERIFY(oskip, max_attrs, "H5Aiterate1");
if (order == H5_ITER_INC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v + (max_attrs / 2)], TRUE, "H5Aiterate1");
+ VERIFY(iter_info->visited[v + (max_attrs / 2)], true, "H5Aiterate1");
} /* end if */
else if (order == H5_ITER_DEC) {
for (v = 0; v < (max_attrs / 2); v++)
- VERIFY(iter_info->visited[v], TRUE, "H5Aiterate1");
+ VERIFY(iter_info->visited[v], true, "H5Aiterate1");
} /* end if */
else {
unsigned nvisit = 0; /* # of links visited */
assert(order == H5_ITER_NATIVE);
for (v = 0; v < max_attrs; v++)
- if (iter_info->visited[v] == TRUE)
+ if (iter_info->visited[v] == true)
nvisit++;
VERIFY(nvisit, max_attrs, "H5Aiterate1");
@@ -7178,7 +7177,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate2(obj_id, idx_type, order, &skip, attr_iterate2_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate2");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate2");
@@ -7190,7 +7189,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate_by_name");
@@ -7202,7 +7201,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate_by_name(obj_id, ".", idx_type, order, &skip, attr_iterate2_cb, iter_info, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aiterate_by_name");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate_by_name");
@@ -7215,7 +7214,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
iter_info->stop = 3;
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_attrs - 1);
- memset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
+ memset(iter_info->visited, 0, sizeof(bool) * iter_info->max_visit);
ret = H5Aiterate1(obj_id, &oskip, attr_iterate1_cb, iter_info);
CHECK(ret, FAIL, "H5Aiterate1");
VERIFY(ret, CORDER_ITER_STOP, "H5Aiterate1");
@@ -7263,7 +7262,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
**
****************************************************************/
static void
-test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_iterate2(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -7281,7 +7280,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
attr_iter_info_t iter_info; /* Iterator info */
- hbool_t *visited = NULL; /* Array of flags for visiting links */
+ bool *visited = NULL; /* Array of flags for visiting links */
hsize_t idx; /* Start index for iteration */
unsigned use_index; /* Use index on creation order values */
const char *dsetname; /* Name of dataset for attributes */
@@ -7310,7 +7309,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Allocate the "visited link" array */
iter_info.max_visit = max_compact * 2;
- visited = (hbool_t *)malloc(sizeof(hbool_t) * iter_info.max_visit);
+ visited = (bool *)malloc(sizeof(bool) * iter_info.max_visit);
CHECK_PTR(visited, "malloc");
iter_info.visited = visited;
@@ -7319,7 +7318,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_DEC; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -7363,7 +7362,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -7401,9 +7400,9 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for iterating over object with no attributes (should be OK) */
ret = H5Aiterate2(my_dataset, idx_type, order, NULL, attr_iterate2_cb, NULL);
@@ -7420,7 +7419,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7443,9 +7442,9 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for out of bound iteration */
idx = u;
@@ -7504,7 +7503,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7520,7 +7519,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
/* Verify information for new attribute */
@@ -7533,9 +7532,9 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -7667,7 +7666,7 @@ attr_open_by_idx_check(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
**
****************************************************************/
static void
-test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_open_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -7714,7 +7713,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Loop over operating in different orders */
for (order = H5_ITER_INC; order <= H5_ITER_DEC; order++) {
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (idx_type == H5_INDEX_CRT_ORDER) {
if (order == H5_ITER_INC) {
@@ -7758,7 +7757,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -7793,9 +7792,9 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for opening an attribute on an object with no attributes */
H5E_BEGIN_TRY
@@ -7809,7 +7808,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7832,9 +7831,9 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for out of bound opening an attribute on an object */
H5E_BEGIN_TRY
@@ -7872,7 +7871,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7888,7 +7887,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
/* Verify information for new attribute */
@@ -7901,9 +7900,9 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -7978,7 +7977,7 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id, unsigned max_attr
/* Open each attribute on object by index and check that it's the correct one */
for (u = 0; u < max_attrs; u++) {
/* Open the attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr_id = H5Aopen(obj_id, attrname, H5P_DEFAULT);
CHECK(attr_id, FAIL, "H5Aopen");
@@ -8038,7 +8037,7 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id, unsigned max_attr
**
****************************************************************/
static void
-test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_open_by_name(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -8080,7 +8079,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pget_attr_phase_change");
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (use_index)
MESSAGE(5, ("Testing Opening Attributes By Name w/Creation Order Index\n"));
@@ -8092,7 +8091,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -8130,9 +8129,9 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for opening a non-existent attribute on an object with no attributes */
H5E_BEGIN_TRY
@@ -8159,7 +8158,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -8181,9 +8180,9 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Check for opening a non-existent attribute on an object with compact attribute storage */
H5E_BEGIN_TRY
@@ -8237,7 +8236,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -8252,7 +8251,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
/* Verify information for new attribute */
@@ -8265,9 +8264,9 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -8334,7 +8333,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
**
****************************************************************/
static void
-test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_create_by_name(bool new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -8375,7 +8374,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Pget_attr_phase_change");
/* Loop over using index for creation order value */
- for (use_index = FALSE; use_index <= TRUE; use_index++) {
+ for (use_index = false; use_index <= true; use_index++) {
/* Print appropriate test message */
if (use_index)
MESSAGE(5, ("Testing Creating Attributes By Name w/Creation Order Index\n"));
@@ -8387,7 +8386,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Set attribute creation order tracking & indexing for object */
- if (new_format == TRUE) {
+ if (new_format == true) {
ret = H5Pset_attr_creation_order(
dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
CHECK(ret, FAIL, "H5Pset_attr_creation_order");
@@ -8425,14 +8424,14 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, TRUE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, true, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate_by_name(fid, dsetname, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate_by_name");
@@ -8455,9 +8454,9 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, max_compact, "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Test opening attributes stored compactly */
ret = attr_open_check(fid, dsetname, my_dataset, u);
@@ -8489,7 +8488,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate_by_name(fid, dsetname, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate_by_name");
@@ -8505,7 +8504,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Verify state of object */
if (u >= max_compact) {
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
} /* end if */
/* Verify information for new attribute */
@@ -8518,9 +8517,9 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5O__num_attrs_test");
VERIFY(nattrs, (max_compact * 2), "H5O__num_attrs_test");
is_empty = H5O__is_attr_empty_test(my_dataset);
- VERIFY(is_empty, FALSE, "H5O__is_attr_empty_test");
+ VERIFY(is_empty, false, "H5O__is_attr_empty_test");
is_dense = H5O__is_attr_dense_test(my_dataset);
- VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O__is_attr_dense_test");
+ VERIFY(is_dense, (new_format ? true : false), "H5O__is_attr_dense_test");
if (new_format) {
/* Retrieve & verify # of records in the name & creation order indices */
@@ -8707,14 +8706,14 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Check on datasets' attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
is_dense = H5O__is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -8724,7 +8723,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -8738,7 +8737,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -8763,9 +8762,9 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -8775,7 +8774,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -8789,7 +8788,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -8814,9 +8813,9 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset2);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
} /* end for */
/* Close attribute's datatype */
@@ -9044,14 +9043,14 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Check on datasets' attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
is_dense = H5O__is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9061,7 +9060,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -9075,7 +9074,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9100,9 +9099,9 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9112,7 +9111,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -9126,7 +9125,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9151,12 +9150,12 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset2);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Create new attribute name */
- HDsnprintf(attrname2, sizeof(attrname2), "new attr %02u", u);
+ snprintf(attrname2, sizeof(attrname2), "new attr %02u", u);
/* Change second dataset's attribute's name */
ret = H5Arename_by_name(fid, DSET2_NAME, attrname, attrname2, H5P_DEFAULT);
@@ -9171,12 +9170,12 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9195,12 +9194,12 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9225,12 +9224,12 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9249,12 +9248,12 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9491,14 +9490,14 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check on datasets' attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
is_dense = H5O__is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9508,7 +9507,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -9522,7 +9521,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9547,9 +9546,9 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9559,7 +9558,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -9573,7 +9572,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9598,15 +9597,15 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset2);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
} /* end for */
/* Delete attributes from second dataset */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Delete second dataset's attribute */
ret = H5Adelete_by_name(fid, DSET2_NAME, attrname, H5P_DEFAULT);
@@ -9621,12 +9620,12 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9863,14 +9862,14 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check on datasets' attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
is_dense = H5O__is_attr_dense_test(dataset2);
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9880,7 +9879,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -9894,7 +9893,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* ChecFk that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9919,9 +9918,9 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9931,7 +9930,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -9945,7 +9944,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -9970,9 +9969,9 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check on dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset2);
if (u < max_compact)
- VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, false, "H5O__is_attr_dense_test");
else
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
} /* end for */
/* Close attribute's datatype */
@@ -9989,12 +9988,12 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check on first dataset's attribute storage status */
is_dense = H5O__is_attr_dense_test(dataset);
- VERIFY(is_dense, TRUE, "H5O__is_attr_dense_test");
+ VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Check ref count on attributes of first dataset */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Open attribute on first dataset */
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -10003,12 +10002,12 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
if (u % 2) {
/* Check that attribute is not shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A__is_shared_test");
+ VERIFY(is_shared, false, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
is_shared = H5A__is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A__is_shared_test");
+ VERIFY(is_shared, true, "H5A__is_shared_test");
/* Check refcount for attribute */
ret = H5A__get_shared_rc_test(attr, &shared_refcount);
@@ -10267,7 +10266,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Create attributes on group */
for (i = 0; i < BUG2_NATTR; i++) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
aid = H5Acreate2(gid, aname, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
@@ -10277,7 +10276,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Delete every other attribute */
for (i = 1; i < BUG2_NATTR; i += 2) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
ret = H5Adelete(gid, aname);
CHECK(ret, FAIL, "H5Adelete");
}
@@ -10301,7 +10300,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Open an attribute in the middle */
i = (BUG2_NATTR / 4) * 2;
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
aid = H5Aopen(gid, aname, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Aopen");
@@ -10310,7 +10309,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
CHECK(tid, FAIL, "H5Aget_type");
tri_ret = H5Tequal(tid, H5T_STD_I32LE);
- VERIFY(tri_ret, TRUE, "H5Tequal");
+ VERIFY(tri_ret, true, "H5Tequal");
/* Close IDs */
ret = H5Tclose(tid);
@@ -10344,7 +10343,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Create attributes on group */
for (i = 0; i < BUG2_NATTR2; i++) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
aid = H5Acreate2(gid, aname, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
@@ -10354,7 +10353,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Delete every other attribute */
for (i = 0; i < BUG2_NATTR2; i++) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
ret = H5Adelete(gid, aname);
CHECK(ret, FAIL, "H5Adelete");
}
@@ -11168,17 +11167,17 @@ test_attr_bug8(hid_t fcpl, hid_t fapl)
static void
test_attr_bug9(hid_t fcpl, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t sid = -1; /* Dataspace ID */
- hsize_t dims[1] = {32768}; /* Attribute dimensions */
- int create_link; /* Whether to create a soft link */
- unsigned max_compact; /* Setting from fcpl */
- unsigned min_dense; /* Setting from fcpl */
- char aname[11]; /* Attribute name */
- unsigned i; /* Local index variable */
- herr_t ret; /* Generic return status */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dims[1] = {32768}; /* Attribute dimensions */
+ int create_link; /* Whether to create a soft link */
+ unsigned max_compact; /* Setting from fcpl */
+ unsigned min_dense; /* Setting from fcpl */
+ char aname[11]; /* Attribute name */
+ unsigned i; /* Local index variable */
+ herr_t ret; /* Generic return status */
/* Output message about test being performed */
MESSAGE(5, ("Testing that attributes can always be added to named datatypes\n"));
@@ -11212,7 +11211,7 @@ test_attr_bug9(hid_t fcpl, hid_t fapl)
/* Create enough attributes to cause a change to dense storage */
for (i = 0; i < max_compact + 1; i++) {
/* Create attribute */
- HDsnprintf(aname, sizeof(aname), "%u", i);
+ snprintf(aname, sizeof(aname), "%u", i);
aid = H5Acreate2(gid, aname, H5T_NATIVE_CHAR, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
@@ -11414,13 +11413,13 @@ test_attr_delete_last_dense(hid_t fcpl, hid_t fapl)
void
test_attr(void)
{
- hid_t fapl = (-1), fapl2 = (-1); /* File access property lists */
- hid_t fcpl = (-1), fcpl2 = (-1); /* File creation property lists */
- hid_t dcpl = -1; /* Dataset creation property list */
- unsigned new_format; /* Whether to use the new format or not */
- unsigned use_shared; /* Whether to use shared attributes or not */
- unsigned minimize_dset_oh; /* Whether to use minimized dataset object headers */
- herr_t ret; /* Generic return value */
+ hid_t fapl = (H5I_INVALID_HID), fapl2 = (H5I_INVALID_HID); /* File access property lists */
+ hid_t fcpl = (H5I_INVALID_HID), fcpl2 = (H5I_INVALID_HID); /* File creation property lists */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ unsigned new_format; /* Whether to use the new format or not */
+ unsigned use_shared; /* Whether to use shared attributes or not */
+ unsigned minimize_dset_oh; /* Whether to use minimized dataset object headers */
+ herr_t ret; /* Generic return value */
MESSAGE(5, ("Testing Attributes\n"));
@@ -11454,12 +11453,12 @@ test_attr(void)
MESSAGE(7, ("testing with minimzied dataset object headers\n"));
dcpl = H5Pcreate(H5P_DATASET_CREATE);
CHECK(dcpl, FAIL, "H5Pcreate");
- ret = H5Pset_dset_no_attrs_hint(dcpl, TRUE);
+ ret = H5Pset_dset_no_attrs_hint(dcpl, true);
CHECK_I(ret, "H5Pset_dset_no_attrs_hint");
dcpl_g = dcpl;
}
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl;
/* Set the FAPL for the type of format */
@@ -11500,10 +11499,10 @@ test_attr(void)
/* This next test uses its own file information */
test_attr_duplicate_ids(my_fapl);
- for (use_shared = FALSE; use_shared <= TRUE; use_shared++) {
+ for (use_shared = false; use_shared <= true; use_shared++) {
hid_t my_fcpl;
- if (new_format == TRUE && use_shared) {
+ if (new_format == true && use_shared) {
MESSAGE(7, ("testing with shared attributes\n"));
my_fcpl = fcpl2;
}
@@ -11553,7 +11552,7 @@ test_attr(void)
through a different file handle */
/* tests specific to the "new format" */
- if (new_format == TRUE) {
+ if (new_format == true) {
/* General attribute tests */
test_attr_dense_create(my_fcpl, my_fapl); /* Test dense attribute storage creation */
test_attr_dense_open(my_fcpl, my_fapl); /* Test opening attributes in dense storage */
@@ -11584,7 +11583,7 @@ test_attr(void)
w/attribute creation order info */
/* More complex tests with exclusively both "new format" and "shared" attributes */
- if (use_shared == TRUE) {
+ if (use_shared == true) {
test_attr_shared_write(
my_fcpl,
my_fapl); /* Test writing to shared attributes in compact & dense storage */
diff --git a/test/tcheck_version.c b/test/tcheck_version.c
index 9e5e469..53ca861 100644
--- a/test/tcheck_version.c
+++ b/test/tcheck_version.c
@@ -109,13 +109,13 @@ abort_intercept(int H5_ATTR_UNUSED sig)
#ifdef H5_HAVE_WIN32_API
/* Turns off the modal dialog that is raised when the Windows CRT calls abort().
*
- * Returning TRUE here lets Windows know that we've handled the abort() and that there
+ * Returning true here lets Windows know that we've handled the abort() and that there
* is no need to alert the user with a modal dialog box.
*/
int
handle_crt_abort(int reportType, char *message, int *returnValue)
{
- return TRUE;
+ return true;
}
#endif
diff --git a/test/tcoords.c b/test/tcoords.c
index dbe6ab1..1a3a8b3 100644
--- a/test/tcoords.c
+++ b/test/tcoords.c
@@ -42,7 +42,7 @@ static int da_buffer[2][3][6][2];
**
*************************************************************/
static void
-test_singleEnd_selElements(hid_t file, hbool_t is_chunked)
+test_singleEnd_selElements(hid_t file, bool is_chunked)
{
hid_t sid, plid, did, msid;
char dset_name[NAME_LEN]; /* Dataset name */
@@ -87,9 +87,9 @@ test_singleEnd_selElements(hid_t file, hbool_t is_chunked)
/* Construct dataset's name */
memset(dset_name, 0, (size_t)NAME_LEN);
- HDstrcat(dset_name, SINGLE_END_DSET);
+ strcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
- HDstrcat(dset_name, "_chunked");
+ strcat(dset_name, "_chunked");
did = H5Dcreate2(file, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, plid, H5P_DEFAULT);
CHECK(did, FAIL, "H5Dcreate2");
@@ -225,7 +225,7 @@ test_singleEnd_selElements(hid_t file, hbool_t is_chunked)
**
*************************************************************/
static void
-test_singleEnd_selHyperslab(hid_t file, hbool_t is_chunked)
+test_singleEnd_selHyperslab(hid_t file, bool is_chunked)
{
hid_t sid, did, msid;
char dset_name[NAME_LEN]; /* Dataset name */
@@ -259,9 +259,9 @@ test_singleEnd_selHyperslab(hid_t file, hbool_t is_chunked)
/* Construct dataset's name */
memset(dset_name, 0, NAME_LEN);
- HDstrcat(dset_name, SINGLE_END_DSET);
+ strcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
- HDstrcat(dset_name, "_chunked");
+ strcat(dset_name, "_chunked");
/* Dataspace for the dataset in file */
sid = H5Screate_simple(4, da_dims, da_dims);
@@ -371,7 +371,7 @@ test_singleEnd_selHyperslab(hid_t file, hbool_t is_chunked)
**
*************************************************************/
static void
-test_multiple_ends(hid_t file, hbool_t is_chunked)
+test_multiple_ends(hid_t file, bool is_chunked)
{
hid_t sid, plid, did, msid;
char dset_name[NAME_LEN]; /* Dataset name */
@@ -462,9 +462,9 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
/* Construct dataset's name */
memset(dset_name, 0, NAME_LEN);
- HDstrcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET);
+ strcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET);
if (is_chunked)
- HDstrcat(dset_name, "_chunked");
+ strcat(dset_name, "_chunked");
did = H5Dcreate2(file, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, plid, H5P_DEFAULT);
CHECK(did, FAIL, "H5Dcreate2");
@@ -680,10 +680,10 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
void
test_coords(void)
{
- hid_t fid;
- hbool_t is_chunk[2] = {TRUE, FALSE};
- int i;
- herr_t ret; /* Generic error return */
+ hid_t fid;
+ bool is_chunk[2] = {true, false};
+ int i;
+ herr_t ret; /* Generic error return */
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fcreate");
diff --git a/test/aggr.h5 b/test/testfiles/aggr.h5
index b24365d..b24365d 100644
--- a/test/aggr.h5
+++ b/test/testfiles/aggr.h5
Binary files differ
diff --git a/test/bad_compound.h5 b/test/testfiles/bad_compound.h5
index 1834a2e..1834a2e 100644
--- a/test/bad_compound.h5
+++ b/test/testfiles/bad_compound.h5
Binary files differ
diff --git a/test/bad_offset.h5 b/test/testfiles/bad_offset.h5
index 231dca2..231dca2 100644
--- a/test/bad_offset.h5
+++ b/test/testfiles/bad_offset.h5
Binary files differ
diff --git a/test/be_data.h5 b/test/testfiles/be_data.h5
index e6629d3..e6629d3 100644
--- a/test/be_data.h5
+++ b/test/testfiles/be_data.h5
Binary files differ
diff --git a/test/be_extlink1.h5 b/test/testfiles/be_extlink1.h5
index f800185..f800185 100644
--- a/test/be_extlink1.h5
+++ b/test/testfiles/be_extlink1.h5
Binary files differ
diff --git a/test/be_extlink2.h5 b/test/testfiles/be_extlink2.h5
index 92ed32c..92ed32c 100644
--- a/test/be_extlink2.h5
+++ b/test/testfiles/be_extlink2.h5
Binary files differ
diff --git a/test/btree_idx_1_6.h5 b/test/testfiles/btree_idx_1_6.h5
index 92f939b..92f939b 100644
--- a/test/btree_idx_1_6.h5
+++ b/test/testfiles/btree_idx_1_6.h5
Binary files differ
diff --git a/test/btree_idx_1_8.h5 b/test/testfiles/btree_idx_1_8.h5
index 36662b2..36662b2 100644
--- a/test/btree_idx_1_8.h5
+++ b/test/testfiles/btree_idx_1_8.h5
Binary files differ
diff --git a/test/corrupt_stab_msg.h5 b/test/testfiles/corrupt_stab_msg.h5
index 4fa287c..4fa287c 100644
--- a/test/corrupt_stab_msg.h5
+++ b/test/testfiles/corrupt_stab_msg.h5
Binary files differ
diff --git a/test/cve_2020_10810.h5 b/test/testfiles/cve_2020_10810.h5
index 5cface3..5cface3 100644
--- a/test/cve_2020_10810.h5
+++ b/test/testfiles/cve_2020_10810.h5
Binary files differ
diff --git a/test/testfiles/cve_2020_10812.h5 b/test/testfiles/cve_2020_10812.h5
new file mode 100755
index 0000000..a20369d
--- /dev/null
+++ b/test/testfiles/cve_2020_10812.h5
Binary files differ
diff --git a/test/deflate.h5 b/test/testfiles/deflate.h5
index 2f62e25..2f62e25 100644
--- a/test/deflate.h5
+++ b/test/testfiles/deflate.h5
Binary files differ
diff --git a/test/family_v16-000000.h5 b/test/testfiles/family_v16-000000.h5
index ac75ea9..ac75ea9 100644
--- a/test/family_v16-000000.h5
+++ b/test/testfiles/family_v16-000000.h5
Binary files differ
diff --git a/test/family_v16-000001.h5 b/test/testfiles/family_v16-000001.h5
index bf55b32..bf55b32 100644
--- a/test/family_v16-000001.h5
+++ b/test/testfiles/family_v16-000001.h5
Binary files differ
diff --git a/test/family_v16-000002.h5 b/test/testfiles/family_v16-000002.h5
index 9bd0891..9bd0891 100644
--- a/test/family_v16-000002.h5
+++ b/test/testfiles/family_v16-000002.h5
Binary files differ
diff --git a/test/family_v16-000003.h5 b/test/testfiles/family_v16-000003.h5
index fedce2a..fedce2a 100644
--- a/test/family_v16-000003.h5
+++ b/test/testfiles/family_v16-000003.h5
Binary files differ
diff --git a/test/file_image_core_test.h5 b/test/testfiles/file_image_core_test.h5
index 1cc5130..1cc5130 100644
--- a/test/file_image_core_test.h5
+++ b/test/testfiles/file_image_core_test.h5
Binary files differ
diff --git a/test/filespace_1_6.h5 b/test/testfiles/filespace_1_6.h5
index 5afc718..5afc718 100644
--- a/test/filespace_1_6.h5
+++ b/test/testfiles/filespace_1_6.h5
Binary files differ
diff --git a/test/filespace_1_8.h5 b/test/testfiles/filespace_1_8.h5
index 3fa2822..3fa2822 100644
--- a/test/filespace_1_8.h5
+++ b/test/testfiles/filespace_1_8.h5
Binary files differ
diff --git a/test/fill18.h5 b/test/testfiles/fill18.h5
index c092f59..c092f59 100644
--- a/test/fill18.h5
+++ b/test/testfiles/fill18.h5
Binary files differ
diff --git a/test/fill_old.h5 b/test/testfiles/fill_old.h5
index e77f519..e77f519 100644
--- a/test/fill_old.h5
+++ b/test/testfiles/fill_old.h5
Binary files differ
diff --git a/test/filter_error.h5 b/test/testfiles/filter_error.h5
index 370cc1c..370cc1c 100644
--- a/test/filter_error.h5
+++ b/test/testfiles/filter_error.h5
Binary files differ
diff --git a/test/fsm_aggr_nopersist.h5 b/test/testfiles/fsm_aggr_nopersist.h5
index 159e7f7..159e7f7 100644
--- a/test/fsm_aggr_nopersist.h5
+++ b/test/testfiles/fsm_aggr_nopersist.h5
Binary files differ
diff --git a/test/fsm_aggr_persist.h5 b/test/testfiles/fsm_aggr_persist.h5
index 1a837dd..1a837dd 100644
--- a/test/fsm_aggr_persist.h5
+++ b/test/testfiles/fsm_aggr_persist.h5
Binary files differ
diff --git a/test/group_old.h5 b/test/testfiles/group_old.h5
index 58f66f8..58f66f8 100644
--- a/test/group_old.h5
+++ b/test/testfiles/group_old.h5
Binary files differ
diff --git a/test/h5fc_ext1_f.h5 b/test/testfiles/h5fc_ext1_f.h5
index b5c5867..b5c5867 100644
--- a/test/h5fc_ext1_f.h5
+++ b/test/testfiles/h5fc_ext1_f.h5
Binary files differ
diff --git a/test/h5fc_ext1_i.h5 b/test/testfiles/h5fc_ext1_i.h5
index 960a8d5..960a8d5 100644
--- a/test/h5fc_ext1_i.h5
+++ b/test/testfiles/h5fc_ext1_i.h5
Binary files differ
diff --git a/test/h5fc_ext2_if.h5 b/test/testfiles/h5fc_ext2_if.h5
index 88e42e7..88e42e7 100644
--- a/test/h5fc_ext2_if.h5
+++ b/test/testfiles/h5fc_ext2_if.h5
Binary files differ
diff --git a/test/h5fc_ext2_sf.h5 b/test/testfiles/h5fc_ext2_sf.h5
index c59a3ca..c59a3ca 100644
--- a/test/h5fc_ext2_sf.h5
+++ b/test/testfiles/h5fc_ext2_sf.h5
Binary files differ
diff --git a/test/h5fc_ext3_isf.h5 b/test/testfiles/h5fc_ext3_isf.h5
index d00fc55..d00fc55 100644
--- a/test/h5fc_ext3_isf.h5
+++ b/test/testfiles/h5fc_ext3_isf.h5
Binary files differ
diff --git a/test/h5fc_ext_none.h5 b/test/testfiles/h5fc_ext_none.h5
index b1b1553..b1b1553 100644
--- a/test/h5fc_ext_none.h5
+++ b/test/testfiles/h5fc_ext_none.h5
Binary files differ
diff --git a/test/le_data.h5 b/test/testfiles/le_data.h5
index e79ab47..e79ab47 100644
--- a/test/le_data.h5
+++ b/test/testfiles/le_data.h5
Binary files differ
diff --git a/test/le_extlink1.h5 b/test/testfiles/le_extlink1.h5
index 10ed0bc..10ed0bc 100644
--- a/test/le_extlink1.h5
+++ b/test/testfiles/le_extlink1.h5
Binary files differ
diff --git a/test/le_extlink2.h5 b/test/testfiles/le_extlink2.h5
index 92ed32c..92ed32c 100644
--- a/test/le_extlink2.h5
+++ b/test/testfiles/le_extlink2.h5
Binary files differ
diff --git a/test/memleak_H5O_dtype_decode_helper_H5Odtype.h5 b/test/testfiles/memleak_H5O_dtype_decode_helper_H5Odtype.h5
index b5980b7..b5980b7 100644
--- a/test/memleak_H5O_dtype_decode_helper_H5Odtype.h5
+++ b/test/testfiles/memleak_H5O_dtype_decode_helper_H5Odtype.h5
Binary files differ
diff --git a/test/mergemsg.h5 b/test/testfiles/mergemsg.h5
index 3a9e352..3a9e352 100644
--- a/test/mergemsg.h5
+++ b/test/testfiles/mergemsg.h5
Binary files differ
diff --git a/test/multi_file_v16-r.h5 b/test/testfiles/multi_file_v16-r.h5
index 36a4c88..36a4c88 100644
--- a/test/multi_file_v16-r.h5
+++ b/test/testfiles/multi_file_v16-r.h5
Binary files differ
diff --git a/test/multi_file_v16-s.h5 b/test/testfiles/multi_file_v16-s.h5
index e990e95..e990e95 100644
--- a/test/multi_file_v16-s.h5
+++ b/test/testfiles/multi_file_v16-s.h5
Binary files differ
diff --git a/test/noencoder.h5 b/test/testfiles/noencoder.h5
index 84f8752..84f8752 100644
--- a/test/noencoder.h5
+++ b/test/testfiles/noencoder.h5
Binary files differ
diff --git a/test/none.h5 b/test/testfiles/none.h5
index bb6ff56..bb6ff56 100644
--- a/test/none.h5
+++ b/test/testfiles/none.h5
Binary files differ
diff --git a/test/paged_nopersist.h5 b/test/testfiles/paged_nopersist.h5
index b6c945a..b6c945a 100644
--- a/test/paged_nopersist.h5
+++ b/test/testfiles/paged_nopersist.h5
Binary files differ
diff --git a/test/paged_persist.h5 b/test/testfiles/paged_persist.h5
index f0ae836..f0ae836 100644
--- a/test/paged_persist.h5
+++ b/test/testfiles/paged_persist.h5
Binary files differ
diff --git a/test/specmetaread.h5 b/test/testfiles/specmetaread.h5
index 50b0e69..50b0e69 100644
--- a/test/specmetaread.h5
+++ b/test/testfiles/specmetaread.h5
Binary files differ
diff --git a/test/tarrold.h5 b/test/testfiles/tarrold.h5
index 7747ce4..7747ce4 100644
--- a/test/tarrold.h5
+++ b/test/testfiles/tarrold.h5
Binary files differ
diff --git a/test/tbad_msg_count.h5 b/test/testfiles/tbad_msg_count.h5
index ca5eb65..ca5eb65 100644
--- a/test/tbad_msg_count.h5
+++ b/test/testfiles/tbad_msg_count.h5
Binary files differ
diff --git a/test/tbogus.h5 b/test/testfiles/tbogus.h5
index efcbd79..efcbd79 100644
--- a/test/tbogus.h5
+++ b/test/testfiles/tbogus.h5
Binary files differ
diff --git a/test/test_filters_be.h5 b/test/testfiles/test_filters_be.h5
index c4c127b..c4c127b 100644
--- a/test/test_filters_be.h5
+++ b/test/testfiles/test_filters_be.h5
Binary files differ
diff --git a/test/test_filters_le.h5 b/test/testfiles/test_filters_le.h5
index ff8b846..ff8b846 100644
--- a/test/test_filters_le.h5
+++ b/test/testfiles/test_filters_le.h5
Binary files differ
diff --git a/test/th5s.h5 b/test/testfiles/th5s.h5
index 7a0bfb3..7a0bfb3 100644
--- a/test/th5s.h5
+++ b/test/testfiles/th5s.h5
Binary files differ
diff --git a/test/tlayouto.h5 b/test/testfiles/tlayouto.h5
index a038e68..a038e68 100644
--- a/test/tlayouto.h5
+++ b/test/testfiles/tlayouto.h5
Binary files differ
diff --git a/test/tmtimen.h5 b/test/testfiles/tmtimen.h5
index 96e5fb3..96e5fb3 100644
--- a/test/tmtimen.h5
+++ b/test/testfiles/tmtimen.h5
Binary files differ
diff --git a/test/tmtimeo.h5 b/test/testfiles/tmtimeo.h5
index 8cacf4a..8cacf4a 100644
--- a/test/tmtimeo.h5
+++ b/test/testfiles/tmtimeo.h5
Binary files differ
diff --git a/test/testfiles/tnullspace.h5 b/test/testfiles/tnullspace.h5
new file mode 100644
index 0000000..b5dac5d
--- /dev/null
+++ b/test/testfiles/tnullspace.h5
Binary files differ
diff --git a/test/tsizeslheap.h5 b/test/testfiles/tsizeslheap.h5
index c7f2adb..c7f2adb 100644
--- a/test/tsizeslheap.h5
+++ b/test/testfiles/tsizeslheap.h5
Binary files differ
diff --git a/test/testframe.c b/test/testframe.c
index ed60520..2b65027 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -49,6 +49,7 @@ static const void *Test_parameters = NULL;
static const char *TestProgName = NULL;
static void (*TestPrivateUsage)(void) = NULL;
static int (*TestPrivateParser)(int ac, char *av[]) = NULL;
+int mpi_rank_framework_g = 0;
/*
* Setup a test function and add it to the list of tests.
@@ -68,11 +69,11 @@ AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const
const void *Parameters)
{
/* Sanity checking */
- if (HDstrlen(TheDescr) >= MAXTESTDESC) {
+ if (strlen(TheDescr) >= MAXTESTDESC) {
printf("Test description ('%s') too long, increase MAXTESTDESC(%d).\n", TheDescr, MAXTESTDESC);
exit(EXIT_FAILURE);
}
- if (HDstrlen(TheName) >= MAXTESTNAME) {
+ if (strlen(TheName) >= MAXTESTNAME) {
printf("Test name too long, increase MAXTESTNAME(%d).\n", MAXTESTNAME);
exit(EXIT_FAILURE);
}
@@ -95,13 +96,13 @@ AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const
}
/* Set up test function */
- HDstrcpy(Test[Index].Description, TheDescr);
+ strcpy(Test[Index].Description, TheDescr);
if (*TheName != '-') {
- HDstrcpy(Test[Index].Name, TheName);
+ strcpy(Test[Index].Name, TheName);
Test[Index].SkipFlag = 0;
}
else { /* skip test by default */
- HDstrcpy(Test[Index].Name, TheName + 1);
+ strcpy(Test[Index].Name, TheName + 1);
Test[Index].SkipFlag = 1;
}
Test[Index].Call = TheCall;
@@ -166,7 +167,7 @@ TestUsage(void)
print_func("verbose controls the amount of information displayed\n");
print_func("exclude to exclude tests by name\n");
print_func("only to name tests which should be run\n");
- print_func("begin start at the name of the test givin\n");
+ print_func("begin start at the name of the test given\n");
print_func("summary prints a summary of test results at the end\n");
print_func("cleanoff does not delete *.hdf files after execution of tests\n");
print_func("help print out this information\n");
@@ -209,11 +210,11 @@ TestInfo(const char *ProgName)
void
TestParseCmdLine(int argc, char *argv[])
{
- hbool_t skipped_all = FALSE;
- int ret_code;
+ bool skipped_all = false;
+ int ret_code;
while ((void)argv++, --argc > 0) {
- if ((HDstrcmp(*argv, "-verbose") == 0) || (HDstrcmp(*argv, "-v") == 0)) {
+ if ((strcmp(*argv, "-verbose") == 0) || (strcmp(*argv, "-v") == 0)) {
if (argc > 0) {
--argc;
++argv;
@@ -224,7 +225,7 @@ TestParseCmdLine(int argc, char *argv[])
exit(EXIT_FAILURE);
}
}
- else if (((HDstrcmp(*argv, "-exclude") == 0) || (HDstrcmp(*argv, "-x") == 0))) {
+ else if (((strcmp(*argv, "-exclude") == 0) || (strcmp(*argv, "-x") == 0))) {
if (argc > 0) {
--argc;
++argv;
@@ -235,7 +236,7 @@ TestParseCmdLine(int argc, char *argv[])
exit(EXIT_FAILURE);
}
}
- else if (((HDstrcmp(*argv, "-begin") == 0) || (HDstrcmp(*argv, "-b") == 0))) {
+ else if (((strcmp(*argv, "-begin") == 0) || (strcmp(*argv, "-b") == 0))) {
if (argc > 0) {
--argc;
++argv;
@@ -246,7 +247,7 @@ TestParseCmdLine(int argc, char *argv[])
exit(EXIT_FAILURE);
}
}
- else if (((HDstrcmp(*argv, "-only") == 0) || (HDstrcmp(*argv, "-o") == 0))) {
+ else if (((strcmp(*argv, "-only") == 0) || (strcmp(*argv, "-o") == 0))) {
if (argc > 0) {
unsigned Loop;
@@ -257,7 +258,7 @@ TestParseCmdLine(int argc, char *argv[])
if (!skipped_all) {
for (Loop = 0; Loop < Index; Loop++)
Test[Loop].SkipFlag = 1;
- skipped_all = TRUE;
+ skipped_all = true;
} /* end if */
SetTest(*argv, ONLYTEST);
}
@@ -266,15 +267,15 @@ TestParseCmdLine(int argc, char *argv[])
exit(EXIT_FAILURE);
}
}
- else if ((HDstrcmp(*argv, "-summary") == 0) || (HDstrcmp(*argv, "-s") == 0))
+ else if ((strcmp(*argv, "-summary") == 0) || (strcmp(*argv, "-s") == 0))
Summary = 1;
- else if (HDstrcmp(*argv, "-enable-error-stack") == 0)
+ else if (strcmp(*argv, "-enable-error-stack") == 0)
enable_error_stack = 1;
- else if ((HDstrcmp(*argv, "-help") == 0) || (HDstrcmp(*argv, "-h") == 0)) {
+ else if ((strcmp(*argv, "-help") == 0) || (strcmp(*argv, "-h") == 0)) {
TestUsage();
exit(EXIT_SUCCESS);
}
- else if ((HDstrcmp(*argv, "-cleanoff") == 0) || (HDstrcmp(*argv, "-c") == 0))
+ else if ((strcmp(*argv, "-cleanoff") == 0) || (strcmp(*argv, "-c") == 0))
SetTestNoCleanup();
else {
/* non-standard option. Break out. */
@@ -303,7 +304,8 @@ PerformTests(void)
MESSAGE(2, ("Skipping -- %s (%s) \n", Test[Loop].Description, Test[Loop].Name));
}
else {
- MESSAGE(2, ("Testing -- %s (%s) \n", Test[Loop].Description, Test[Loop].Name));
+ if (mpi_rank_framework_g == 0)
+ MESSAGE(2, ("Testing -- %s (%s) \n", Test[Loop].Description, Test[Loop].Name));
MESSAGE(5, ("===============================================\n"));
Test[Loop].NumErrors = num_errs;
Test_parameters = Test[Loop].Parameters;
@@ -316,12 +318,14 @@ PerformTests(void)
}
Test_parameters = NULL; /* clear it. */
- MESSAGE(2, ("\n\n"));
- if (num_errs)
- print_func("!!! %d Error(s) were detected !!!\n\n", (int)num_errs);
- else
- print_func("All tests were successful. \n\n");
+ if (mpi_rank_framework_g == 0) {
+ MESSAGE(2, ("\n\n"));
+ if (num_errs)
+ print_func("!!! %d Error(s) were detected !!!\n\n", (int)num_errs);
+ else
+ print_func("All tests were successful. \n\n");
+ }
}
/*
@@ -441,13 +445,13 @@ GetTestExpress(void)
#endif
/* Check if HDF5TestExpress is set to override the default level */
- env_val = HDgetenv("HDF5TestExpress");
+ env_val = getenv("HDF5TestExpress");
if (env_val) {
- if (HDstrcmp(env_val, "0") == 0)
+ if (strcmp(env_val, "0") == 0)
express_val = 0;
- else if (HDstrcmp(env_val, "1") == 0)
+ else if (strcmp(env_val, "1") == 0)
express_val = 1;
- else if (HDstrcmp(env_val, "2") == 0)
+ else if (strcmp(env_val, "2") == 0)
express_val = 2;
else
express_val = 3;
@@ -566,7 +570,7 @@ TestErrPrintf(const char *format, ...)
/* Print the requested information */
va_start(arglist, format);
- ret_value = HDvprintf(format, arglist);
+ ret_value = vprintf(format, arglist);
va_end(arglist);
/* Return the length of the string produced (like printf() does) */
@@ -588,14 +592,14 @@ SetTest(const char *testname, int action)
switch (action) {
case SKIPTEST:
for (Loop = 0; Loop < Index; Loop++)
- if (HDstrcmp(testname, Test[Loop].Name) == 0) {
+ if (strcmp(testname, Test[Loop].Name) == 0) {
Test[Loop].SkipFlag = 1;
break;
}
break;
case BEGINTEST:
for (Loop = 0; Loop < Index; Loop++) {
- if (HDstrcmp(testname, Test[Loop].Name) != 0)
+ if (strcmp(testname, Test[Loop].Name) != 0)
Test[Loop].SkipFlag = 1;
else {
/* Found it. Set it to run. Done. */
@@ -606,7 +610,7 @@ SetTest(const char *testname, int action)
break;
case ONLYTEST:
for (Loop = 0; Loop < Index; Loop++) {
- if (HDstrcmp(testname, Test[Loop].Name) == 0) {
+ if (strcmp(testname, Test[Loop].Name) == 0) {
/* Found it. Set it to run. Break to skip the rest. */
Test[Loop].SkipFlag = 0;
break;
@@ -629,8 +633,8 @@ void
TestAlarmOn(void)
{
#ifdef H5_HAVE_ALARM
- char *env_val = HDgetenv("HDF5_ALARM_SECONDS"); /* Alarm environment */
- unsigned long alarm_sec = H5_ALARM_SEC; /* Number of seconds before alarm goes off */
+ char *env_val = getenv("HDF5_ALARM_SECONDS"); /* Alarm environment */
+ unsigned long alarm_sec = H5_ALARM_SEC; /* Number of seconds before alarm goes off */
/* Get the alarm value from the environment variable, if set */
if (env_val != NULL)
diff --git a/test/testhdf5.c b/test/testhdf5.c
index 82bc2b6..93da1d8 100644
--- a/test/testhdf5.c
+++ b/test/testhdf5.c
@@ -80,7 +80,7 @@ main(int argc, char *argv[])
TestSummary();
/* Clean up test files, if allowed */
- if (GetTestCleanup() && !HDgetenv(HDF5_NOCLEANUP))
+ if (GetTestCleanup() && !getenv(HDF5_NOCLEANUP))
TestCleanup();
/* Release test infrastructure */
diff --git a/test/testhdf5.h b/test/testhdf5.h
index 1ebd619..75c94ee 100644
--- a/test/testhdf5.h
+++ b/test/testhdf5.h
@@ -135,7 +135,7 @@
"%s \n", \
(where), (int)__LINE__, __FILE__, x); \
} \
- if (HDstrcmp(x, val) != 0) { \
+ if (strcmp(x, val) != 0) { \
TestErrPrintf("*** UNEXPECTED VALUE from %s should be %s, but is %s at line %4d " \
"in %s\n", \
where, val, x, (int)__LINE__, __FILE__); \
diff --git a/test/testmeta.c b/test/testmeta.c
index 048e3a6..14388f0 100644
--- a/test/testmeta.c
+++ b/test/testmeta.c
@@ -82,7 +82,7 @@ main(void)
for (i = 0; i < NEXTARRAYS; i++) {
/* Create dataset */
- HDsnprintf(name, sizeof(name), "/ExtArray%06d", i);
+ snprintf(name, sizeof(name), "/ExtArray%06d", i);
dataset_id =
H5Dcreate2(file_id, name, H5T_NATIVE_FLOAT, dataspace_id, H5P_DEFAULT, prop_id, H5P_DEFAULT);
@@ -107,7 +107,7 @@ main(void)
floatval = (float)j;
/* Create group to hold data arrays for this object */
- HDsnprintf(name, sizeof(name), "/DataArray/%06d", j);
+ snprintf(name, sizeof(name), "/DataArray/%06d", j);
group_id = H5Gcreate2(file_id, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (group_id < 0) {
fprintf(stderr, "Failed to create DataArray group.\n");
@@ -123,7 +123,7 @@ main(void)
dataspace_id = H5Screate_simple(1, dims, maxdims);
/* Create dataset */
- HDsnprintf(name, sizeof(name), "DataArray%06d", i);
+ snprintf(name, sizeof(name), "DataArray%06d", i);
dataset_id = H5Dcreate2(group_id, name, H5T_NATIVE_FLOAT, dataspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT);
if (dataset_id < 0) {
@@ -169,7 +169,7 @@ main(void)
/* Extend attribute arrays */
for (i = 0; i < NEXTARRAYS; i++) {
/* Open extendable dataset */
- HDsnprintf(name, sizeof(name), "/ExtArray%06d", i);
+ snprintf(name, sizeof(name), "/ExtArray%06d", i);
dataset_id = H5Dopen2(file_id, name, H5P_DEFAULT);
if (dataset_id < 0) {
fprintf(stderr, "Failed to open ExtArray dataset.\n");
diff --git a/test/tfile.c b/test/tfile.c
index 7eed105..d11de11 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -653,12 +653,12 @@ test_file_open(const char *env_h5_drvr)
static void
test_file_reopen(void)
{
- hid_t fid = -1; /* file ID from initial open */
- hid_t rfid = -1; /* file ID from reopen */
- hid_t did = -1; /* dataset ID (both opens) */
- hid_t sid = -1; /* dataspace ID for dataset creation */
- hsize_t dims = 6; /* dataspace size */
- herr_t ret; /* Generic return value */
+ hid_t fid = H5I_INVALID_HID; /* file ID from initial open */
+ hid_t rfid = H5I_INVALID_HID; /* file ID from reopen */
+ hid_t did = H5I_INVALID_HID; /* dataset ID (both opens) */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID for dataset creation */
+ hsize_t dims = 6; /* dataspace size */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing File Re-opening\n"));
@@ -1188,14 +1188,14 @@ test_get_obj_ids(void)
/* creates NGROUPS groups under the root group */
for (m = 0; m < NGROUPS; m++) {
- HDsnprintf(gname, sizeof(gname), "group%d", m);
+ snprintf(gname, sizeof(gname), "group%d", m);
gid[m] = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(gid[m], FAIL, "H5Gcreate2");
}
/* create NDSETS datasets under the root group */
for (n = 0; n < NDSETS; n++) {
- HDsnprintf(dname, sizeof(dname), "dataset%d", n);
+ snprintf(dname, sizeof(dname), "dataset%d", n);
dset[n] = H5Dcreate2(fid, dname, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dset[n], FAIL, "H5Dcreate2");
}
@@ -1255,7 +1255,7 @@ test_get_obj_ids(void)
/* Open NDSETS datasets under the root group */
for (n = 0; n < NDSETS; n++) {
- HDsnprintf(dname, sizeof(dname), "dataset%d", n);
+ snprintf(dname, sizeof(dname), "dataset%d", n);
dset[n] = H5Dopen2(fid, dname, H5P_DEFAULT);
CHECK(dset[n], FAIL, "H5Dcreate2");
}
@@ -1730,7 +1730,7 @@ test_file_is_accessible(const char *env_h5_drvr)
unsigned char buf[1024]; /* Buffer of data to write */
htri_t is_hdf5; /* Whether a file is an HDF5 file */
int posix_ret; /* Return value from POSIX calls */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Return value from HDF5 calls */
/* Output message about test being performed */
@@ -1765,7 +1765,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_accessible(filename, fapl_id);
- VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
+ VERIFY(is_hdf5, true, "H5Fis_accessible");
/*****************************************/
/* Newly created file that is still open */
@@ -1784,7 +1784,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_accessible(filename, fapl_id);
- VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
+ VERIFY(is_hdf5, true, "H5Fis_accessible");
/* Close file */
ret = H5Fclose(fid);
@@ -1797,7 +1797,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* This test is not currently working for the family VFD.
* There are failures when creating files with userblocks.
*/
- if (0 != HDstrcmp(env_h5_drvr, "family")) {
+ if (0 != strcmp(env_h5_drvr, "family")) {
/* Create a file creation property list with a non-default user block size */
fcpl_id = H5Pcreate(H5P_FILE_CREATE);
CHECK(fcpl_id, H5I_INVALID_HID, "H5Pcreate");
@@ -1819,7 +1819,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_accessible(filename, fapl_id);
- VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
+ VERIFY(is_hdf5, true, "H5Fis_accessible");
} /* end if */
if (driver_is_default_compatible) {
@@ -1837,7 +1837,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is NOT an HDF5 file using the base filename */
is_hdf5 = H5Fis_accessible(non_hdf5_filename, fapl_id);
- VERIFY(is_hdf5, FALSE, "H5Fis_accessible (empty non-HDF5 file)");
+ VERIFY(is_hdf5, false, "H5Fis_accessible (empty non-HDF5 file)");
/***************************/
/* Non-empty non-HDF5 file */
@@ -1861,7 +1861,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* Verify that the file is not an HDF5 file */
is_hdf5 = H5Fis_accessible(non_hdf5_filename, fapl_id);
- VERIFY(is_hdf5, FALSE, "H5Fis_accessible (non-HDF5 file)");
+ VERIFY(is_hdf5, false, "H5Fis_accessible (non-HDF5 file)");
}
/* Clean up files */
@@ -1930,7 +1930,7 @@ test_file_ishdf5(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_hdf5(sb_filename);
- VERIFY(is_hdf5, TRUE, "H5Fis_hdf5");
+ VERIFY(is_hdf5, true, "H5Fis_hdf5");
/*******************************/
/* Non-default user block size */
@@ -1957,7 +1957,7 @@ test_file_ishdf5(const char *env_h5_drvr)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_hdf5(sb_filename);
- VERIFY(is_hdf5, TRUE, "H5Fis_hdf5");
+ VERIFY(is_hdf5, true, "H5Fis_hdf5");
/***************************/
/* Non-empty non-HDF5 file */
@@ -1984,7 +1984,7 @@ test_file_ishdf5(const char *env_h5_drvr)
/* Verify that the file is not an HDF5 file */
is_hdf5 = H5Fis_hdf5(sb_filename);
- VERIFY(is_hdf5, FALSE, "H5Fis_hdf5");
+ VERIFY(is_hdf5, false, "H5Fis_hdf5");
/* Clean up files */
h5_delete_test_file(filename, fapl_id);
@@ -2033,7 +2033,7 @@ test_file_delete(hid_t fapl_id)
/* Verify that the file is an HDF5 file */
is_hdf5 = H5Fis_accessible(filename, fapl_id);
- VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
+ VERIFY(is_hdf5, true, "H5Fis_accessible");
/* Delete the file */
ret = H5Fdelete(filename, fapl_id);
@@ -2077,7 +2077,7 @@ test_file_delete(hid_t fapl_id)
is_hdf5 = H5Fis_accessible(filename, fapl_id);
}
H5E_END_TRY
- CHECK(is_hdf5, TRUE, "H5Fis_accessible");
+ CHECK(is_hdf5, true, "H5Fis_accessible");
/* Try to delete it (should fail) */
H5E_BEGIN_TRY
@@ -2590,19 +2590,19 @@ test_file_double_dataset_open(void)
**
*****************************************************************/
static void
-test_file_double_file_dataset_open(hbool_t new_format)
+test_file_double_file_dataset_open(bool new_format)
{
- hid_t fapl = -1; /* File access property list */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t did1 = -1, did2 = -1; /* Dataset IDs */
- hid_t sid1 = -1, sid2 = -1; /* Dataspace IDs */
- hid_t tid1 = -1, tid2 = -1; /* Datatype IDs */
- hsize_t dims[1] = {5}, dims2[2] = {1, 4}; /* Dimension sizes */
- hsize_t e_ext_dims[1] = {7}; /* Expanded dimension sizes */
- hsize_t s_ext_dims[1] = {3}; /* Shrunk dimension sizes */
- hsize_t max_dims0[1] = {8}; /* Maximum dimension sizes */
- hsize_t max_dims1[1] = {H5S_UNLIMITED}; /* Maximum dimension sizes for extensible array index */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t sid1 = H5I_INVALID_HID, sid2 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t tid1 = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hsize_t dims[1] = {5}, dims2[2] = {1, 4}; /* Dimension sizes */
+ hsize_t e_ext_dims[1] = {7}; /* Expanded dimension sizes */
+ hsize_t s_ext_dims[1] = {3}; /* Shrunk dimension sizes */
+ hsize_t max_dims0[1] = {8}; /* Maximum dimension sizes */
+ hsize_t max_dims1[1] = {H5S_UNLIMITED}; /* Maximum dimension sizes for extensible array index */
hsize_t max_dims2[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* Maximum dimension sizes for v2 B-tree index */
hsize_t chunks[1] = {2}, chunks2[2] = {4, 5}; /* Chunk dimension sizes */
hsize_t size; /* File size */
@@ -3005,8 +3005,8 @@ test_userblock_file_size(const char *env_h5_drvr)
herr_t ret; /* Generic return value */
/* Don't run with multi/split, family or direct drivers */
- if (!HDstrcmp(env_h5_drvr, "multi") || !HDstrcmp(env_h5_drvr, "split") ||
- !HDstrcmp(env_h5_drvr, "family") || !HDstrcmp(env_h5_drvr, "direct"))
+ if (!strcmp(env_h5_drvr, "multi") || !strcmp(env_h5_drvr, "split") || !strcmp(env_h5_drvr, "family") ||
+ !strcmp(env_h5_drvr, "direct"))
return;
/* Output message about test being performed */
@@ -3187,7 +3187,7 @@ cal_chksum(const char *file, uint32_t *chksum)
if (file_data) {
/* Read file's data into memory */
bytes_read = HDread(fdes, file_data, (size_t)sb.st_size);
- CHECK(bytes_read == sb.st_size, FALSE, "malloc");
+ CHECK(bytes_read == sb.st_size, false, "malloc");
/* Calculate checksum */
*chksum = H5_checksum_lookup3(file_data, sizeof(file_data), 0);
@@ -3318,7 +3318,7 @@ test_userblock_alignment_helper1(hid_t fcpl, hid_t fapl)
**
*****************************************************************/
static int
-test_userblock_alignment_helper2(hid_t fapl, hbool_t open_rw)
+test_userblock_alignment_helper2(hid_t fapl, bool open_rw)
{
hid_t fid; /* File ID */
int curr_num_errs = GetTestNumErrs(); /* Retrieve the current # of errors */
@@ -3418,7 +3418,7 @@ test_userblock_alignment(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3448,7 +3448,7 @@ test_userblock_alignment(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3478,7 +3478,7 @@ test_userblock_alignment(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3582,9 +3582,9 @@ test_userblock_alignment(const char *env_h5_drvr)
CHECK(ret, FAIL, "H5Pset_alignment");
/* Call helper routines to perform file manipulations */
- ret = test_userblock_alignment_helper2(fapl, FALSE);
+ ret = test_userblock_alignment_helper2(fapl, false);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3642,13 +3642,13 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
CHECK(ret, FAIL, "H5Pset_libver_bounds");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3672,7 +3672,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)512);
/* Create file access property list */
@@ -3684,7 +3684,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3746,7 +3746,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3760,7 +3760,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3784,7 +3784,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3824,7 +3824,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)1023);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3864,7 +3864,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)1023);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3878,7 +3878,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3902,7 +3902,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3942,7 +3942,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)1024);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3956,7 +3956,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
/* Call helper routines to perform file manipulations */
ret = test_userblock_alignment_helper1(fcpl, fapl);
CHECK(ret, FAIL, "test_userblock_alignment_helper1");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -3982,7 +3982,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
ret = H5Pset_userblock(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_userblock");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, (hsize_t)512);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -4002,9 +4002,9 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
CHECK(ret, FAIL, "H5Pset_alignment");
/* Call helper routines to perform file manipulations */
- ret = test_userblock_alignment_helper2(fapl, FALSE);
+ ret = test_userblock_alignment_helper2(fapl, false);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
- ret = test_userblock_alignment_helper2(fapl, TRUE);
+ ret = test_userblock_alignment_helper2(fapl, true);
CHECK(ret, FAIL, "test_userblock_alignment_helper2");
/* Release property lists */
@@ -4034,7 +4034,7 @@ test_filespace_info(const char *env_h5_drvr)
hid_t fapl, new_fapl; /* File access property lists */
hid_t fcpl, fcpl1, fcpl2; /* File creation property lists */
H5F_fspace_strategy_t strategy; /* File space strategy */
- hbool_t persist; /* Persist free-space or not */
+ bool persist; /* Persist free-space or not */
hsize_t threshold; /* Free-space section threshold */
unsigned new_format; /* New or old format */
H5F_fspace_strategy_t fs_strategy; /* File space strategy--iteration variable */
@@ -4042,14 +4042,14 @@ test_filespace_info(const char *env_h5_drvr)
hsize_t fs_threshold; /* Free-space section threshold--iteration variable */
hsize_t fsp_size; /* File space page size */
char filename[FILENAME_LEN]; /* Filename to use */
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing file creation public routines: H5Pget/set_file_space_strategy & "
"H5Pget/set_file_space_page_size\n"));
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
fapl = h5_fileaccess();
h5_fixname(FILESPACE_NAME[0], fapl, filename, sizeof filename);
@@ -4067,7 +4067,7 @@ test_filespace_info(const char *env_h5_drvr)
* Check file space information from a default file creation property list.
* Values expected:
* strategy--H5F_FILE_SPACE_AGGR
- * persist--FALSE
+ * persist--false
* threshold--1
* file space page size--4096
*/
@@ -4081,7 +4081,7 @@ test_filespace_info(const char *env_h5_drvr)
/* Verify file space information */
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Retrieve file space page size */
@@ -4152,7 +4152,7 @@ test_filespace_info(const char *env_h5_drvr)
* Check file space information when creating a file with default properties.
* Values expected:
* strategy--H5F_FILE_SPACE_AGGR
- * persist--FALSE
+ * persist--false
* threshold--1
* file space page size--4096
*/
@@ -4170,7 +4170,7 @@ test_filespace_info(const char *env_h5_drvr)
/* Verify file space information */
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Retrieve file space page size */
@@ -4190,7 +4190,7 @@ test_filespace_info(const char *env_h5_drvr)
* latest library format and default properties.
* Values expected:
* strategy--H5F_FILE_SPACE_AGGR
- * persist--FALSE
+ * persist--false
* threshold--1
* file space page size--4096
*/
@@ -4208,7 +4208,7 @@ test_filespace_info(const char *env_h5_drvr)
/* Verify file space information */
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Retrieve file space page size */
@@ -4235,7 +4235,7 @@ test_filespace_info(const char *env_h5_drvr)
* File space page size: set to 512
*
*/
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl;
/* Set the FAPL for the type of format */
@@ -4248,8 +4248,8 @@ test_filespace_info(const char *env_h5_drvr)
my_fapl = fapl;
} /* end else */
- /* Test with TRUE or FALSE for persisting free-space */
- for (fs_persist = FALSE; fs_persist <= TRUE; fs_persist++) {
+ /* Test with true or false for persisting free-space */
+ for (fs_persist = false; fs_persist <= true; fs_persist++) {
/* Test with free-space section threshold size: 0 to 10 */
for (fs_threshold = 0; fs_threshold <= TEST_THRESHOLD10; fs_threshold++) {
@@ -4266,7 +4266,7 @@ test_filespace_info(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
/* Set file space information */
- ret = H5Pset_file_space_strategy(fcpl, fs_strategy, (hbool_t)fs_persist, fs_threshold);
+ ret = H5Pset_file_space_strategy(fcpl, fs_strategy, (bool)fs_persist, fs_threshold);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE512);
@@ -4280,11 +4280,11 @@ test_filespace_info(const char *env_h5_drvr)
VERIFY(strategy, fs_strategy, "H5Pget_file_space_strategy");
if (fs_strategy < H5F_FSPACE_STRATEGY_AGGR) {
- VERIFY(persist, (hbool_t)fs_persist, "H5Pget_file_space_strategy");
+ VERIFY(persist, (bool)fs_persist, "H5Pget_file_space_strategy");
VERIFY(threshold, fs_threshold, "H5Pget_file_space_strategy");
}
else {
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
}
@@ -4313,7 +4313,7 @@ test_filespace_info(const char *env_h5_drvr)
VERIFY(threshold, fs_threshold, "H5Pget_file_space_strategy");
}
else {
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
}
@@ -4345,7 +4345,7 @@ test_filespace_info(const char *env_h5_drvr)
VERIFY(threshold, fs_threshold, "H5Pget_file_space_strategy");
}
else {
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
}
@@ -4384,13 +4384,13 @@ test_filespace_info(const char *env_h5_drvr)
**
*****************************************************************/
static int
-set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split)
+set_multi_split(hid_t fapl, hsize_t pagesize, bool split)
{
H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl_arr[H5FD_MEM_NTYPES];
char *memb_name[H5FD_MEM_NTYPES];
haddr_t memb_addr[H5FD_MEM_NTYPES];
- hbool_t relax;
+ bool relax;
H5FD_mem_t mt;
assert(split);
@@ -4453,13 +4453,13 @@ test_file_freespace(const char *env_h5_drvr)
char filename[FILENAME_LEN]; /* Filename to use */
char name[32]; /* Dataset name */
unsigned new_format; /* To use old or new format */
- hbool_t split_vfd, multi_vfd; /* Indicate multi/split driver */
+ bool split_vfd, multi_vfd; /* Indicate multi/split driver */
hsize_t expected_freespace; /* Freespace expected */
hsize_t expected_fs_del; /* Freespace expected after delete */
herr_t ret; /* Return value */
- split_vfd = !HDstrcmp(env_h5_drvr, "split");
- multi_vfd = !HDstrcmp(env_h5_drvr, "multi");
+ split_vfd = !strcmp(env_h5_drvr, "split");
+ multi_vfd = !strcmp(env_h5_drvr, "multi");
if (!split_vfd && !multi_vfd) {
fapl = h5_fileaccess();
@@ -4476,7 +4476,7 @@ test_file_freespace(const char *env_h5_drvr)
CHECK(fcpl, FAIL, "H5Pcreate");
/* Test with old & new format */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl;
/* Set the FAPL for the type of format */
@@ -4490,7 +4490,7 @@ test_file_freespace(const char *env_h5_drvr)
CHECK(ret, FAIL, "set_multi_split");
}
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5P_set_file_space_strategy");
expected_freespace = 4534;
@@ -4546,7 +4546,7 @@ test_file_freespace(const char *env_h5_drvr)
/* Create datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
dset = H5Dcreate2(file, name, H5T_STD_U32LE, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dcreate2");
@@ -4569,7 +4569,7 @@ test_file_freespace(const char *env_h5_drvr)
/* Delete datasets in file */
for (k = 9; k >= 0; k--) {
- HDsnprintf(name, sizeof(name), "Dataset %u", (unsigned)k);
+ snprintf(name, sizeof(name), "Dataset %u", (unsigned)k);
ret = H5Ldelete(file, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
} /* end for */
@@ -4604,7 +4604,7 @@ test_file_freespace(const char *env_h5_drvr)
**
*****************************************************************/
static void
-test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
+test_sects_freespace(const char *env_h5_drvr, bool new_format)
{
char filename[FILENAME_LEN]; /* Filename to use */
hid_t file; /* File ID */
@@ -4628,14 +4628,14 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
hsize_t dims[1]; /* Dimension sizes */
unsigned u; /* Local index variable */
H5FD_mem_t type;
- hbool_t split_vfd = FALSE, multi_vfd = FALSE;
+ bool split_vfd = false, multi_vfd = false;
herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing H5Fget_free_sections()--free-space section info in the file\n"));
- split_vfd = !HDstrcmp(env_h5_drvr, "split");
- multi_vfd = !HDstrcmp(env_h5_drvr, "multi");
+ split_vfd = !strcmp(env_h5_drvr, "split");
+ multi_vfd = !strcmp(env_h5_drvr, "multi");
if (!split_vfd && !multi_vfd) {
@@ -4651,7 +4651,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
CHECK(ret, FAIL, "H5Pset_libver_bounds");
/* Set to paged aggregation and persistent free-space */
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1);
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
/* Set up paged aligned address space for multi/split driver */
@@ -4661,7 +4661,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
}
}
else {
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1);
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
}
@@ -4697,7 +4697,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
/* Create datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
dset = H5Dcreate2(file, name, H5T_STD_U32LE, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dcreate2");
@@ -4715,7 +4715,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
/* Delete odd-numbered datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
if (u % 2) {
ret = H5Ldelete(file, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
@@ -4857,8 +4857,8 @@ static void
test_filespace_compatible(void)
{
int fd_old = (-1), fd_new = (-1); /* File descriptors for copying data */
- hid_t fid = -1; /* File id */
- hid_t did = -1; /* Dataset id */
+ hid_t fid = H5I_INVALID_HID; /* File id */
+ hid_t did = H5I_INVALID_HID; /* Dataset id */
hid_t fcpl; /* File creation property list template */
int check[100]; /* Temporary buffer for verifying dataset data */
int rdbuf[100]; /* Temporary buffer for reading in dataset data */
@@ -4866,7 +4866,7 @@ test_filespace_compatible(void)
ssize_t nread; /* Number of bytes read in */
unsigned i, j; /* Local index variable */
hssize_t free_space; /* Amount of free-space in the file */
- hbool_t persist; /* Persist free-space or not */
+ bool persist; /* Persist free-space or not */
hsize_t threshold; /* Free-space section threshold */
H5F_fspace_strategy_t strategy; /* File space handling strategy */
herr_t ret; /* Return value */
@@ -4913,10 +4913,10 @@ test_filespace_compatible(void)
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
/* File space handling strategy should be H5F_FSPACE_STRATEGY_FSM_AGGR */
- /* Persisting free-space should be FALSE */
+ /* Persisting free-space should be false */
/* Free-space section threshold should be 1 */
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Generate raw data */
@@ -4988,17 +4988,17 @@ test_filespace_compatible(void)
static void
test_filespace_1_10_0_compatible(void)
{
- hid_t fid = -1; /* File id */
- hid_t did = -1; /* Dataset id */
- hid_t fcpl; /* File creation property list */
- hbool_t persist; /* Persist free-space or not */
- hsize_t threshold; /* Free-space section threshold */
- H5F_fspace_strategy_t strategy; /* File space handling strategy */
- int wbuf[24]; /* Buffer for dataset data */
- int rdbuf[24]; /* Buffer for dataset data */
- int status; /* Status from copying the existing file */
- unsigned i, j; /* Local index variable */
- herr_t ret; /* Return value */
+ hid_t fid = H5I_INVALID_HID; /* File id */
+ hid_t did = H5I_INVALID_HID; /* Dataset id */
+ hid_t fcpl; /* File creation property list */
+ bool persist; /* Persist free-space or not */
+ hsize_t threshold; /* Free-space section threshold */
+ H5F_fspace_strategy_t strategy; /* File space handling strategy */
+ int wbuf[24]; /* Buffer for dataset data */
+ int rdbuf[24]; /* Buffer for dataset data */
+ int status; /* Status from copying the existing file */
+ unsigned i, j; /* Local index variable */
+ herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("File space compatibility testing for 1.10.0 files\n"));
@@ -5044,7 +5044,7 @@ test_filespace_1_10_0_compatible(void)
case 1:
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, TRUE, "H5Pget_file_space_strategy");
+ VERIFY(persist, true, "H5Pget_file_space_strategy");
VERIFY(threshold, H5F_FREE_SPACE_THRESHOLD_DEF, "H5Pget_file_space_strategy");
/* Open the dataset */
@@ -5302,15 +5302,15 @@ test_filespace_1_10_0_compatible(void)
static void
test_filespace_round_compatible(void)
{
- hid_t fid = -1; /* File id */
- hid_t fcpl = -1; /* File creation property list ID */
- unsigned j; /* Local index variable */
- H5F_fspace_strategy_t strategy; /* File space strategy */
- hbool_t persist; /* Persist free-space or not */
- hsize_t threshold; /* Free-space section threshold */
- hssize_t free_space; /* Amount of free space in the file */
- int status; /* Status from copying the existing file */
- herr_t ret; /* Return value */
+ hid_t fid = H5I_INVALID_HID; /* File id */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ unsigned j; /* Local index variable */
+ H5F_fspace_strategy_t strategy; /* File space strategy */
+ bool persist; /* Persist free-space or not */
+ hsize_t threshold; /* Free-space section threshold */
+ hssize_t free_space; /* Amount of free space in the file */
+ int status; /* Status from copying the existing file */
+ herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("File space compatibility testing for files from trunk to 1_8 to trunk\n"));
@@ -5331,7 +5331,7 @@ test_filespace_round_compatible(void)
ret = H5Pget_file_space_strategy(fcpl, &strategy, &persist, &threshold);
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* There should not be any free space in the file */
@@ -5467,12 +5467,12 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create, H5F
static void
test_libver_bounds_open(void)
{
- hid_t file = -1; /* File ID */
- hid_t space = -1; /* Dataspace ID */
- hid_t dset = -1; /* Dataset ID */
- hid_t fapl = -1; /* File access property list ID */
- hid_t new_fapl = -1; /* File access property list ID for reopened file */
- hid_t dcpl = -1; /* Dataset creation property list ID */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t space = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t new_fapl = H5I_INVALID_HID; /* File access property list ID for reopened file */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
hsize_t dim[1] = {SPACE1_DIM1}; /* Dataset dimensions */
H5F_libver_t low, high; /* File format bounds */
hsize_t chunk_dim[1] = {SPACE1_DIM1}; /* Chunk dimensions */
@@ -5563,7 +5563,7 @@ test_libver_bounds_open(void)
/* Get new low bound and verify that it has been upgraded properly */
ret = H5Pget_libver_bounds(new_fapl, &new_low, NULL);
CHECK(ret, FAIL, "H5Pget_libver_bounds");
- VERIFY(new_low >= H5F_LIBVER_V110, TRUE, "Low bound should be upgraded to at least H5F_LIBVER_V110");
+ VERIFY(new_low >= H5F_LIBVER_V110, true, "Low bound should be upgraded to at least H5F_LIBVER_V110");
ret = H5Pclose(new_fapl);
CHECK(ret, FAIL, "H5Pclose");
@@ -5604,12 +5604,12 @@ test_libver_bounds_open(void)
static void
test_libver_bounds_copy(void)
{
- hid_t src_fid = -1; /* File ID */
- hid_t dst_fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list ID */
- const char *src_fname; /* Source file name */
- herr_t ret; /* Generic return value */
- hbool_t driver_is_default_compatible;
+ hid_t src_fid = H5I_INVALID_HID; /* File ID */
+ hid_t dst_fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ const char *src_fname; /* Source file name */
+ herr_t ret; /* Generic return value */
+ bool driver_is_default_compatible;
/* Output message about the test being performed */
MESSAGE(5, ("Testing H5Ocopy a dataset in a 1.8 library file to a 1.10 library file\n"));
@@ -5795,14 +5795,14 @@ test_libver_bounds_super(hid_t fapl, const char *env_h5_drvr)
/* Verify superblock version when creating a file with input fapl,
fcpl #A and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_create(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_create(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_create(fapl, fcpl, true, false);
+ test_libver_bounds_super_create(fapl, fcpl, false, false);
/* Verify superblock version when opening a file which is created
with input fapl, fcpl #A and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_open(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_open(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_open(fapl, fcpl, true, false);
+ test_libver_bounds_super_open(fapl, fcpl, false, false);
/* Close the fcpl */
ret = H5Pclose(fcpl);
@@ -5818,14 +5818,14 @@ test_libver_bounds_super(hid_t fapl, const char *env_h5_drvr)
/* Verify superblock version when creating a file with input fapl,
fcpl #B and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_create(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_create(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_create(fapl, fcpl, true, false);
+ test_libver_bounds_super_create(fapl, fcpl, false, false);
/* Verify superblock version when opening a file which is created
with input fapl, fcpl #B and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_open(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_open(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_open(fapl, fcpl, true, false);
+ test_libver_bounds_super_open(fapl, fcpl, false, false);
/* Close the fcpl */
ret = H5Pclose(fcpl);
@@ -5843,14 +5843,14 @@ test_libver_bounds_super(hid_t fapl, const char *env_h5_drvr)
/* Verify superblock version when creating a file with input fapl,
fcpl #C and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_create(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_create(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_create(fapl, fcpl, true, false);
+ test_libver_bounds_super_create(fapl, fcpl, false, false);
/* Verify superblock version when opening a file which is created
with input fapl, fcpl #C and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_open(fapl, fcpl, TRUE, FALSE);
- test_libver_bounds_super_open(fapl, fcpl, FALSE, FALSE);
+ test_libver_bounds_super_open(fapl, fcpl, true, false);
+ test_libver_bounds_super_open(fapl, fcpl, false, false);
/* Close the fcpl */
ret = H5Pclose(fcpl);
@@ -5867,14 +5867,14 @@ test_libver_bounds_super(hid_t fapl, const char *env_h5_drvr)
/* Verify superblock version when creating a file with input fapl,
fcpl #D and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_create(fapl, fcpl, TRUE, TRUE);
- test_libver_bounds_super_create(fapl, fcpl, FALSE, TRUE);
+ test_libver_bounds_super_create(fapl, fcpl, true, true);
+ test_libver_bounds_super_create(fapl, fcpl, false, true);
/* Verify superblock version when opening a file which is created
with input fapl, fcpl #D and with/without SWMR access */
if (H5FD__supports_swmr_test(env_h5_drvr))
- test_libver_bounds_super_open(fapl, fcpl, TRUE, TRUE);
- test_libver_bounds_super_open(fapl, fcpl, FALSE, TRUE);
+ test_libver_bounds_super_open(fapl, fcpl, true, true);
+ test_libver_bounds_super_open(fapl, fcpl, false, true);
/* Close the fcpl */
ret = H5Pclose(fcpl);
@@ -5938,7 +5938,7 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n
hid_t fid = H5I_INVALID_HID; /* File ID */
H5F_t *f = NULL; /* Internal file pointer */
H5F_libver_t low, high; /* Low and high bounds */
- hbool_t ok; /* The result is ok or not */
+ bool ok; /* The result is ok or not */
herr_t ret; /* The return value */
/* Try to create the file */
@@ -5963,15 +5963,15 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n
else if (is_swmr) { /* SWMR is enabled */
if (high >= H5F_LIBVER_V110) { /* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fcreate");
+ VERIFY(fid >= 0, true, "H5Fcreate");
VERIFY(HDF5_SUPERBLOCK_VERSION_3, f->shared->sblock->super_vers, "HDF5_superblock_ver_bounds");
- VERIFY(f->shared->low_bound >= H5F_LIBVER_V110, TRUE, "HDF5_superblock_ver_bounds");
+ VERIFY(f->shared->low_bound >= H5F_LIBVER_V110, true, "HDF5_superblock_ver_bounds");
}
else /* Should fail */
- VERIFY(fid >= 0, FALSE, "H5Fcreate");
+ VERIFY(fid >= 0, false, "H5Fcreate");
}
else { /* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fcreate");
+ VERIFY(fid >= 0, true, "H5Fcreate");
VERIFY(low, f->shared->low_bound, "HDF5_superblock_ver_bounds");
switch (low) {
@@ -5979,19 +5979,19 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n
ok = (f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_DEF ||
f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_1 ||
f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_2);
- VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds");
+ VERIFY(ok, true, "HDF5_superblock_ver_bounds");
break;
case H5F_LIBVER_V18:
ok = (f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_2);
- VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds");
+ VERIFY(ok, true, "HDF5_superblock_ver_bounds");
break;
case H5F_LIBVER_V110:
case H5F_LIBVER_V112:
case H5F_LIBVER_V114:
ok = (f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_3);
- VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds");
+ VERIFY(ok, true, "HDF5_superblock_ver_bounds");
break;
case H5F_LIBVER_ERROR:
@@ -6123,7 +6123,7 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
VERIFY(fid, H5I_INVALID_HID, "H5Fcreate");
}
else {
- VERIFY(fid >= 0, TRUE, "H5Fcreate");
+ VERIFY(fid >= 0, true, "H5Fcreate");
/* Get the internal file pointer */
f = (H5F_t *)H5VL_object(fid);
@@ -6176,8 +6176,8 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
case 3:
if (high >= H5F_LIBVER_V110) {
/* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fopen");
- VERIFY(f->shared->low_bound >= H5F_LIBVER_V110, TRUE,
+ VERIFY(fid >= 0, true, "H5Fopen");
+ VERIFY(f->shared->low_bound >= H5F_LIBVER_V110, true,
"HDF5_superblock_ver_bounds");
/* Close the file */
@@ -6185,15 +6185,15 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
CHECK(ret, FAIL, "H5Fclose");
}
else /* Should fail */
- VERIFY(fid >= 0, FALSE, "H5Fopen");
+ VERIFY(fid >= 0, false, "H5Fopen");
break;
case 2:
if (is_swmr) /* Should fail */
- VERIFY(fid >= 0, FALSE, "H5Fopen");
+ VERIFY(fid >= 0, false, "H5Fopen");
else { /* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fopen");
- VERIFY(f->shared->low_bound >= H5F_LIBVER_V18, TRUE,
+ VERIFY(fid >= 0, true, "H5Fopen");
+ VERIFY(f->shared->low_bound >= H5F_LIBVER_V18, true,
"HDF5_superblock_ver_bounds");
/* Close the file */
@@ -6205,9 +6205,9 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
case 1:
case 0:
if (is_swmr) /* Should fail */
- VERIFY(fid >= 0, FALSE, "H5Fopen");
+ VERIFY(fid >= 0, false, "H5Fopen");
else { /* Should succeed */
- VERIFY(fid >= 0, TRUE, "H5Fopen");
+ VERIFY(fid >= 0, true, "H5Fopen");
VERIFY(f->shared->low_bound, low, "HDF5_superblock_ver_bounds");
ret = H5Fclose(fid);
@@ -7521,37 +7521,37 @@ test_libver_macros(void)
/* Output message about test being performed */
MESSAGE(5, ("Testing macros for library version comparison\n"));
- VERIFY(H5_VERSION_GE(major, minor, release), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major - 1, minor, release), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major - 1, minor + 1, release), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major - 1, minor, release + 1), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor - 1, release), TRUE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor - 1, release + 1), TRUE, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor, release), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major - 1, minor, release), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major - 1, minor + 1, release), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major - 1, minor, release + 1), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor - 1, release), true, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor - 1, release + 1), true, "H5_VERSION_GE");
if (H5_VERS_RELEASE > 0)
- VERIFY(H5_VERSION_GE(major, minor, release - 1), TRUE, "H5_VERSION_GE");
-
- VERIFY(H5_VERSION_GE(major + 1, minor, release), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major + 1, minor - 1, release), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major + 1, minor - 1, release - 1), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor + 1, release), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor + 1, release - 1), FALSE, "H5_VERSION_GE");
- VERIFY(H5_VERSION_GE(major, minor, release + 1), FALSE, "H5_VERSION_GE");
-
- VERIFY(H5_VERSION_LE(major, minor, release), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major + 1, minor, release), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major + 1, minor - 1, release), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major + 1, minor - 1, release - 1), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor + 1, release), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor + 1, release - 1), TRUE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor, release + 1), TRUE, "H5_VERSION_LE");
-
- VERIFY(H5_VERSION_LE(major - 1, minor, release), FALSE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major - 1, minor + 1, release), FALSE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major - 1, minor + 1, release + 1), FALSE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor - 1, release), FALSE, "H5_VERSION_LE");
- VERIFY(H5_VERSION_LE(major, minor - 1, release + 1), FALSE, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_GE(major, minor, release - 1), true, "H5_VERSION_GE");
+
+ VERIFY(H5_VERSION_GE(major + 1, minor, release), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major + 1, minor - 1, release), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major + 1, minor - 1, release - 1), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor + 1, release), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor + 1, release - 1), false, "H5_VERSION_GE");
+ VERIFY(H5_VERSION_GE(major, minor, release + 1), false, "H5_VERSION_GE");
+
+ VERIFY(H5_VERSION_LE(major, minor, release), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major + 1, minor, release), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major + 1, minor - 1, release), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major + 1, minor - 1, release - 1), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor + 1, release), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor + 1, release - 1), true, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor, release + 1), true, "H5_VERSION_LE");
+
+ VERIFY(H5_VERSION_LE(major - 1, minor, release), false, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major - 1, minor + 1, release), false, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major - 1, minor + 1, release + 1), false, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor - 1, release), false, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor - 1, release + 1), false, "H5_VERSION_LE");
if (H5_VERS_RELEASE > 0)
- VERIFY(H5_VERSION_LE(major, minor, release - 1), FALSE, "H5_VERSION_LE");
+ VERIFY(H5_VERSION_LE(major, minor, release - 1), false, "H5_VERSION_LE");
} /* test_libver_macros() */
/****************************************************************
@@ -7599,7 +7599,7 @@ test_libver_macros2(void)
CHECK(ret, FAIL, "H5Lunlink");
status = H5Lexists(file, "Group", H5P_DEFAULT);
- VERIFY(status, FALSE, "H5Lexists");
+ VERIFY(status, false, "H5Lexists");
#else
ret = H5Gunlink(file, "Group");
CHECK(ret, FAIL, "H5Gunlink");
@@ -7630,20 +7630,20 @@ test_libver_macros2(void)
static void
test_incr_filesize(void)
{
- hid_t fid; /* File opened with read-write permission */
- h5_stat_size_t filesize; /* Size of file when empty */
- hid_t fcpl; /* File creation property list */
- hid_t fapl; /* File access property list */
- hid_t dspace; /* Dataspace ID */
- hid_t dset; /* Dataset ID */
- hid_t dcpl; /* Dataset creation property list */
- unsigned u; /* Local index variable */
- char filename[FILENAME_LEN]; /* Filename to use */
- char name[32]; /* Dataset name */
- haddr_t stored_eoa; /* The stored EOA value */
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
- herr_t ret; /* Return value */
+ hid_t fid; /* File opened with read-write permission */
+ h5_stat_size_t filesize; /* Size of file when empty */
+ hid_t fcpl; /* File creation property list */
+ hid_t fapl; /* File access property list */
+ hid_t dspace; /* Dataspace ID */
+ hid_t dset; /* Dataset ID */
+ hid_t dcpl; /* Dataset creation property list */
+ unsigned u; /* Local index variable */
+ char filename[FILENAME_LEN]; /* Filename to use */
+ char name[32]; /* Dataset name */
+ haddr_t stored_eoa; /* The stored EOA value */
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
+ herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing H5Fincrement_filesize() and H5Fget_eoa())\n"));
@@ -7665,7 +7665,7 @@ test_incr_filesize(void)
CHECK(fcpl, FAIL, "H5Pcreate");
/* Set file space strategy */
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, false, (hsize_t)1);
CHECK(ret, FAIL, "H5P_set_file_space_strategy");
/* Create the test file */
@@ -7686,7 +7686,7 @@ test_incr_filesize(void)
/* Create datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
dset = H5Dcreate2(fid, name, H5T_STD_U32LE, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dcreate2");
@@ -7759,9 +7759,9 @@ test_min_dset_ohdr(void)
{
const char basename[] = "min_dset_ohdr_testfile";
char filename[FILENAME_LEN] = "";
- hid_t file_id = -1;
- hid_t file2_id = -1;
- hbool_t minimize;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t file2_id = H5I_INVALID_HID;
+ bool minimize;
herr_t ret;
MESSAGE(5, ("Testing dataset object header minimization\n"));
@@ -7784,17 +7784,17 @@ test_min_dset_ohdr(void)
*/
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, FALSE, "minimize flag");
+ VERIFY(minimize, false, "minimize flag");
/*----------------------------------------
- * TEST set to TRUE
+ * TEST set to true
*/
- ret = H5Fset_dset_no_attrs_hint(file_id, TRUE);
+ ret = H5Fset_dset_no_attrs_hint(file_id, true);
CHECK(ret, FAIL, "H5Fset_dset_no_attrs_hint");
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, TRUE, "minimize flag");
+ VERIFY(minimize, true, "minimize flag");
/*----------------------------------------
* TEST second file open on same filename
@@ -7802,41 +7802,41 @@ test_min_dset_ohdr(void)
file2_id = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT);
CHECK_I(file2_id, "H5Fopen");
- /* verify TRUE setting on second open
+ /* verify true setting on second open
*/
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, TRUE, "minimize flag");
+ VERIFY(minimize, true, "minimize flag");
- /* re-set to FALSE on first open
+ /* re-set to false on first open
*/
- ret = H5Fset_dset_no_attrs_hint(file_id, FALSE);
+ ret = H5Fset_dset_no_attrs_hint(file_id, false);
CHECK(ret, FAIL, "H5Fset_dset_no_attrs_hint");
- /* verify FALSE set on both opens
+ /* verify false set on both opens
*/
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, FALSE, "minimize flag");
+ VERIFY(minimize, false, "minimize flag");
ret = H5Fget_dset_no_attrs_hint(file2_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, FALSE, "minimize flag");
+ VERIFY(minimize, false, "minimize flag");
- /* re-set to TRUE on second open
+ /* re-set to true on second open
*/
- ret = H5Fset_dset_no_attrs_hint(file2_id, TRUE);
+ ret = H5Fset_dset_no_attrs_hint(file2_id, true);
CHECK(ret, FAIL, "H5Fset_dset_no_attrs_hint");
- /* verify TRUE set on both opens
+ /* verify true set on both opens
*/
ret = H5Fget_dset_no_attrs_hint(file_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, TRUE, "minimize flag");
+ VERIFY(minimize, true, "minimize flag");
ret = H5Fget_dset_no_attrs_hint(file2_id, &minimize);
CHECK(ret, FAIL, "H5Fget_dset_no_attrs_hint");
- VERIFY(minimize, TRUE, "minimize flag");
+ VERIFY(minimize, true, "minimize flag");
/*----------------------------------------
* TEST error cases
@@ -7845,7 +7845,7 @@ test_min_dset_ohdr(void)
/* trying to set with invalid file ID */
H5E_BEGIN_TRY
{
- ret = H5Fset_dset_no_attrs_hint(-1, TRUE);
+ ret = H5Fset_dset_no_attrs_hint(-1, true);
}
H5E_END_TRY
VERIFY(ret, FAIL, "H5Fset_dset_no_attrs_hint");
@@ -8115,14 +8115,14 @@ test_file(void)
{
const char *env_h5_drvr; /* File Driver value from environment */
hid_t fapl_id = H5I_INVALID_HID; /* VFD-dependent fapl ID */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret;
/* Output message about test being performed */
MESSAGE(5, ("Testing Low-Level File I/O\n"));
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -8150,8 +8150,8 @@ test_file(void)
test_file_double_group_open(); /* Test opening same group from two files works properly */
test_file_double_dataset_open(); /* Test opening same dataset from two files works properly */
test_file_double_datatype_open(); /* Test opening same named datatype from two files works properly */
- test_file_double_file_dataset_open(TRUE);
- test_file_double_file_dataset_open(FALSE);
+ test_file_double_file_dataset_open(true);
+ test_file_double_file_dataset_open(false);
test_userblock_file_size(
env_h5_drvr); /* Tests that files created with a userblock have the correct size */
test_cached_stab_info(); /* Tests that files are created with cached stab info in the superblock */
@@ -8171,10 +8171,10 @@ test_file(void)
/* Skipped testing for multi/split drivers */
/* Setup for multi/split drivers are there already */
test_sects_freespace(env_h5_drvr,
- TRUE); /* Test file public routine H5Fget_free_sections() for new format */
+ true); /* Test file public routine H5Fget_free_sections() for new format */
/* Skipped testing for multi/split drivers */
/* Setup for multi/split drivers are there already */
- test_sects_freespace(env_h5_drvr, FALSE); /* Test file public routine H5Fget_free_sections() */
+ test_sects_freespace(env_h5_drvr, false); /* Test file public routine H5Fget_free_sections() */
/* Skipped testing for multi/split drivers */
if (driver_is_default_compatible) {
diff --git a/test/tgenprop.c b/test/tgenprop.c
index b4bd6c3..586ab33 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -94,7 +94,7 @@ test_genprop_basic_class(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
@@ -125,7 +125,7 @@ test_genprop_basic_class(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS2_NAME) != 0)
+ if (strcmp(name, CLASS2_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS2_NAME=%s\n", name, CLASS2_NAME);
H5free_memory(name);
@@ -313,7 +313,7 @@ test_genprop_iter1(hid_t H5_ATTR_UNUSED id, const char *name, void *iter_data)
{
iter_data_t *idata = (iter_data_t *)iter_data;
- return HDstrcmp(name, idata->names[idata->iter_count++]);
+ return strcmp(name, idata->names[idata->iter_count++]);
}
/****************************************************************
@@ -868,7 +868,7 @@ test_genprop_iter2(hid_t H5_ATTR_UNUSED id, const char *name, void *iter_data)
{
iter_data_t *idata = (iter_data_t *)iter_data;
- return HDstrcmp(name, idata->names[idata->iter_count++]);
+ return strcmp(name, idata->names[idata->iter_count++]);
}
/****************************************************************
@@ -1026,7 +1026,7 @@ test_genprop_prop_crt_cb1(const char *name, size_t size, void *def_value)
{
/* Set the information from the creation call */
prop1_cb_info.crt_count++;
- prop1_cb_info.crt_name = HDstrdup(name);
+ prop1_cb_info.crt_name = strdup(name);
prop1_cb_info.crt_value = malloc(size);
memcpy(prop1_cb_info.crt_value, def_value, size);
@@ -1045,7 +1045,7 @@ test_genprop_prop_set_cb1(hid_t plist_id, const char *name, size_t size, void *v
prop1_cb_info.set_count++;
prop1_cb_info.set_plist_id = plist_id;
if (prop1_cb_info.set_name == NULL)
- prop1_cb_info.set_name = HDstrdup(name);
+ prop1_cb_info.set_name = strdup(name);
if (prop1_cb_info.set_value == NULL)
prop1_cb_info.set_value = malloc(size);
memcpy(prop1_cb_info.set_value, value, size);
@@ -1065,7 +1065,7 @@ test_genprop_prop_get_cb1(hid_t plist_id, const char *name, size_t size, void *v
prop1_cb_info.get_count++;
prop1_cb_info.get_plist_id = plist_id;
if (prop1_cb_info.get_name == NULL)
- prop1_cb_info.get_name = HDstrdup(name);
+ prop1_cb_info.get_name = strdup(name);
if (prop1_cb_info.get_value == NULL)
prop1_cb_info.get_value = malloc(size);
memcpy(prop1_cb_info.get_value, value, size);
@@ -1084,7 +1084,7 @@ test_genprop_prop_cop_cb1(const char *name, size_t size, void *value)
/* Set the information from the get call */
prop1_cb_info.cop_count++;
if (prop1_cb_info.cop_name == NULL)
- prop1_cb_info.cop_name = HDstrdup(name);
+ prop1_cb_info.cop_name = strdup(name);
if (prop1_cb_info.cop_value == NULL)
prop1_cb_info.cop_value = malloc(size);
memcpy(prop1_cb_info.cop_value, value, size);
@@ -1131,7 +1131,7 @@ test_genprop_prop_cls_cb1(const char *name, size_t size, void *value)
/* Set the information from the close call */
prop1_cb_info.cls_count++;
if (prop1_cb_info.cls_name == NULL)
- prop1_cb_info.cls_name = HDstrdup(name);
+ prop1_cb_info.cls_name = strdup(name);
if (prop1_cb_info.cls_value == NULL)
prop1_cb_info.cls_value = malloc(size);
memcpy(prop1_cb_info.cls_value, value, size);
@@ -1150,7 +1150,7 @@ test_genprop_prop_del_cb2(hid_t plist_id, const char *name, size_t size, void *v
/* Set the information from the delete call */
prop2_cb_info.del_count++;
prop2_cb_info.del_plist_id = plist_id;
- prop2_cb_info.del_name = HDstrdup(name);
+ prop2_cb_info.del_name = strdup(name);
prop2_cb_info.del_value = malloc(size);
memcpy(prop2_cb_info.del_value, value, size);
@@ -1238,7 +1238,7 @@ test_genprop_list_callback(void)
/* Verify creation callback information for properties tracked */
VERIFY(prop1_cb_info.crt_count, 1, "H5Pcreate");
- if (HDstrcmp(prop1_cb_info.crt_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.crt_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.crt_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1274,7 +1274,7 @@ test_genprop_list_callback(void)
/* Verify get callback information for properties tracked */
VERIFY(prop1_cb_info.get_count, 1, "H5Pget");
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
- if (HDstrcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.get_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1286,7 +1286,7 @@ test_genprop_list_callback(void)
/* Verify set callback information for properties tracked */
VERIFY(prop1_cb_info.set_count, 1, "H5Pset");
VERIFY(prop1_cb_info.set_plist_id, lid1, "H5Pset");
- if (HDstrcmp(prop1_cb_info.set_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.set_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.set_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1309,7 +1309,7 @@ test_genprop_list_callback(void)
/* Verify get callback information again for properties tracked */
VERIFY(prop1_cb_info.get_count, 2, "H5Pget");
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
- if (HDstrcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.get_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1321,7 +1321,7 @@ test_genprop_list_callback(void)
/* Verify delete callback information for properties tracked */
VERIFY(prop2_cb_info.del_count, 1, "H5Premove");
VERIFY(prop2_cb_info.del_plist_id, lid1, "H5Premove");
- if (HDstrcmp(prop2_cb_info.del_name, PROP2_NAME) != 0)
+ if (strcmp(prop2_cb_info.del_name, PROP2_NAME) != 0)
TestErrPrintf("Property #2 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop2_cb_info.del_value, PROP2_DEF_VALUE, PROP2_SIZE) != 0)
TestErrPrintf("Property #2 value doesn't match!, line=%d\n", __LINE__);
@@ -1332,7 +1332,7 @@ test_genprop_list_callback(void)
/* Verify copy callback information for properties tracked */
VERIFY(prop1_cb_info.cop_count, 1, "H5Pcopy");
- if (HDstrcmp(prop1_cb_info.cop_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.cop_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.cop_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1355,7 +1355,7 @@ test_genprop_list_callback(void)
/* Verify close callback information for properties tracked */
VERIFY(prop1_cb_info.cls_count, 1, "H5Pclose");
- if (HDstrcmp(prop1_cb_info.cls_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.cls_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.cls_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1809,7 +1809,7 @@ test_genprop_path(void)
/* Get full path for first class */
path = H5P__get_class_path_test(cid1);
CHECK_PTR(path, "H5P__get_class_path_test");
- if (HDstrcmp(path, CLASS1_PATH) != 0)
+ if (strcmp(path, CLASS1_PATH) != 0)
TestErrPrintf("Class names don't match!, path=%s, CLASS1_PATH=%s\n", path, CLASS1_PATH);
H5free_memory(path);
@@ -1825,7 +1825,7 @@ test_genprop_path(void)
/* Get full path for second class */
path = H5P__get_class_path_test(cid2);
CHECK_PTR(path, "H5P__get_class_path_test");
- if (HDstrcmp(path, CLASS2_PATH) != 0)
+ if (strcmp(path, CLASS2_PATH) != 0)
TestErrPrintf("Class names don't match!, path=%s, CLASS2_PATH=%s\n", path, CLASS2_PATH);
/* Open a copy of the class with the path name */
@@ -1886,7 +1886,7 @@ test_genprop_refcount(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
@@ -1905,7 +1905,7 @@ test_genprop_refcount(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
@@ -1916,7 +1916,7 @@ test_genprop_refcount(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
diff --git a/test/th5_system.c b/test/th5_system.c
index 33728ca..eb6787f 100644
--- a/test/th5_system.c
+++ b/test/th5_system.c
@@ -50,7 +50,7 @@ test_h5_dirname(void)
/* Check that H5_dirname fails for a NULL dirname pointer */
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir%sfinaldir", H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir%sfinaldir", H5_DIR_SEPS, H5_DIR_SEPS);
H5E_BEGIN_TRY
{
ret = H5_dirname(path, NULL);
@@ -72,7 +72,7 @@ test_h5_dirname(void)
* doesn't contain the system file separator character
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdirname");
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdirname");
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, ".", "comparing H5_dirname with non-separated path to \".\"");
H5MM_free(dirname);
@@ -82,7 +82,7 @@ test_h5_dirname(void)
* for the simple path containing just the system file separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS, "comparing H5_dirname with file separator path to file separator");
H5MM_free(dirname);
@@ -93,7 +93,7 @@ test_h5_dirname(void)
* component
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir", H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir", H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS, "comparing H5_dirname with leading separator path to file separator");
H5MM_free(dirname);
@@ -104,8 +104,8 @@ test_h5_dirname(void)
* a path component
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS, "comparing H5_dirname with leading separators path to file separator");
H5MM_free(dirname);
@@ -115,7 +115,7 @@ test_h5_dirname(void)
* contains a path component and a trailing separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s", H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s", H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, ".", "comparing H5_dirname with trailing separator path to \".\"");
H5MM_free(dirname);
@@ -125,8 +125,8 @@ test_h5_dirname(void)
* contains a path component and several trailing separators
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, ".", "comparing H5_dirname with trailing separators path to \".\"");
H5MM_free(dirname);
@@ -137,7 +137,7 @@ test_h5_dirname(void)
* component and a trailing separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS,
"comparing H5_dirname with leading and trailing separator path to file separator");
@@ -149,8 +149,8 @@ test_h5_dirname(void)
* path component and a trailing separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(
dirname, H5_DIR_SEPS,
@@ -163,8 +163,8 @@ test_h5_dirname(void)
* component and several trailing separators
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS,
"comparing H5_dirname with leading separator and trailing separators path to file separator");
@@ -176,8 +176,8 @@ test_h5_dirname(void)
* path component and several trailing separators
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS,
"comparing H5_dirname with leading and trailing separators path to file separator");
@@ -188,7 +188,7 @@ test_h5_dirname(void)
* "normal" pathname that has no leading separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir", H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir", H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, "topdir", "comparing H5_dirname with normal path to proper dirname");
H5MM_free(dirname);
@@ -198,7 +198,7 @@ test_h5_dirname(void)
* "normal" pathname that has a leading separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir", H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir", H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS "topdir", "comparing H5_dirname with normal path to proper dirname");
H5MM_free(dirname);
@@ -208,7 +208,7 @@ test_h5_dirname(void)
* "normal" pathname that has a leading and trailing separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS "topdir", "comparing H5_dirname with normal path to proper dirname");
H5MM_free(dirname);
@@ -218,8 +218,8 @@ test_h5_dirname(void)
* contrived pathname
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s%s%sfinaldir%s", H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s%s%sfinaldir%s", H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS "topdir" H5_DIR_SEPS "underdir",
"comparing H5_dirname with contrived path to proper dirname");
@@ -254,7 +254,7 @@ test_h5_basename(void)
/* Check that H5_basename fails for a NULL basename pointer */
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir%sfinaldir", H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir%sfinaldir", H5_DIR_SEPS, H5_DIR_SEPS);
H5E_BEGIN_TRY
{
ret = H5_basename(path, NULL);
@@ -276,7 +276,7 @@ test_h5_basename(void)
* path that doesn't contain the system file separator character
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdirname");
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdirname");
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdirname", "comparing H5_basename with non-separated path to same path");
H5MM_free(basename);
@@ -286,7 +286,7 @@ test_h5_basename(void)
* for the simple path containing just the system file separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, H5_DIR_SEPS, "comparing H5_basename with file separator path to file separator");
H5MM_free(basename);
@@ -297,7 +297,7 @@ test_h5_basename(void)
* component
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir", H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir", H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdir",
"comparing H5_basename with leading separator path to filename component");
@@ -309,8 +309,8 @@ test_h5_basename(void)
* component
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdir",
"comparing H5_basename with leading separators path to filename component");
@@ -321,7 +321,7 @@ test_h5_basename(void)
* path which contains a path component and a trailing separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s", H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s", H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdir",
"comparing H5_basename with trailing separator path to filename component");
@@ -333,8 +333,8 @@ test_h5_basename(void)
* separators
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdir",
"comparing H5_basename with trailing separators path to filename component");
@@ -346,7 +346,7 @@ test_h5_basename(void)
* and a trailing separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdir",
"comparing H5_basename with leading and trailing separator path to filename component");
@@ -358,8 +358,8 @@ test_h5_basename(void)
* component and a trailing separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(
basename, "testdir",
@@ -372,8 +372,8 @@ test_h5_basename(void)
* and several trailing separators
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(
basename, "testdir",
@@ -386,8 +386,8 @@ test_h5_basename(void)
* component and several trailing separators
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdir",
"comparing H5_basename with leading and trailing separators path to filename component");
@@ -398,7 +398,7 @@ test_h5_basename(void)
* a "normal" pathname that has no leading separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir", H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir", H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "underdir", "comparing H5_basename with normal path to proper basename");
H5MM_free(basename);
@@ -408,7 +408,7 @@ test_h5_basename(void)
* a "normal" pathname that has a leading separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir", H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir", H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "underdir", "comparing H5_basename with normal path to proper basename");
H5MM_free(basename);
@@ -418,7 +418,7 @@ test_h5_basename(void)
* a "normal" pathname that has a leading and trailing separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "underdir", "comparing H5_basename with normal path to proper basename");
H5MM_free(basename);
@@ -428,8 +428,8 @@ test_h5_basename(void)
* contrived pathname
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s%s%sfinaldir%s", H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s%s%sfinaldir%s", H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "finaldir", "comparing H5_basename with contrived path to proper basename");
H5MM_free(basename);
@@ -532,7 +532,7 @@ test_h5_strndup(void)
str = H5MM_xfree(str);
/* Check that H5_strndup correctly performs identical copies */
- str = H5_strndup(teststr, HDstrlen(teststr));
+ str = H5_strndup(teststr, strlen(teststr));
CHECK_PTR(str, "H5_strndup for identical copy");
if (str)
VERIFY_STR(str, teststr, "comparing H5_strndup for identical copy to original string");
@@ -542,7 +542,7 @@ test_h5_strndup(void)
* Check that H5_strndup correctly performs copies when
* `n` is greater than the original string
*/
- str = H5_strndup(teststr, HDstrlen(teststr) + 2);
+ str = H5_strndup(teststr, strlen(teststr) + 2);
CHECK_PTR(str, "H5_strndup for larger 'n'");
if (str)
VERIFY_STR(str, teststr, "comparing H5_strndup with larger 'n' value to original string");
diff --git a/test/th5o.c b/test/th5o.c
index 9031b28..17cfad7 100644
--- a/test/th5o.c
+++ b/test/th5o.c
@@ -934,13 +934,13 @@ test_h5o_plist(void)
static void
test_h5o_link(void)
{
- hid_t file_id = -1;
- hid_t group_id = -1;
- hid_t space_id = -1;
- hid_t dset_id = -1;
- hid_t type_id = -1;
- hid_t fapl_id = -1;
- hid_t lcpl_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t type_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t lcpl_id = H5I_INVALID_HID;
char filename[1024];
hsize_t dims[2] = {TEST6_DIM1, TEST6_DIM2};
htri_t committed; /* Whether the named datatype is committed */
@@ -973,7 +973,7 @@ test_h5o_link(void)
/* Create LCPL with intermediate group creation flag set */
lcpl_id = H5Pcreate(H5P_LINK_CREATE);
CHECK(lcpl_id, FAIL, "H5Pcreate");
- ret = H5Pset_create_intermediate_group(lcpl_id, TRUE);
+ ret = H5Pset_create_intermediate_group(lcpl_id, true);
CHECK(ret, FAIL, "H5Pset_create_intermediate_group");
/* Create a file access property list */
@@ -1008,7 +1008,7 @@ test_h5o_link(void)
ret = H5Tcommit_anon(file_id, type_id, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit_anon");
committed = H5Tcommitted(type_id);
- VERIFY(committed, TRUE, "H5Tcommitted");
+ VERIFY(committed, true, "H5Tcommitted");
/* Create a dataset with no name using the committed datatype*/
dset_id = H5Dcreate_anon(file_id, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT);
@@ -1203,7 +1203,7 @@ test_h5o_comment(void)
len = H5Oget_comment(fid, check_comment, (size_t)comment_len + 1);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(file_comment, check_comment);
+ ret_value = strcmp(file_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Open the group */
@@ -1217,7 +1217,7 @@ test_h5o_comment(void)
len = H5Oget_comment(grp, check_comment, (size_t)comment_len + 1);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(grp_comment, check_comment);
+ ret_value = strcmp(grp_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Open the datatype */
@@ -1231,7 +1231,7 @@ test_h5o_comment(void)
len = H5Oget_comment(dtype, check_comment, (size_t)comment_len + 1);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(dtype_comment, check_comment);
+ ret_value = strcmp(dtype_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Open the dataset */
@@ -1245,7 +1245,7 @@ test_h5o_comment(void)
len = H5Oget_comment(dset, check_comment, (size_t)comment_len + 1);
CHECK(ret, len, "H5Oget_comment");
- ret_value = HDstrcmp(dset_comment, check_comment);
+ ret_value = strcmp(dset_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Close the IDs */
@@ -1378,7 +1378,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(fid, ".", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment_by_name");
- ret_value = HDstrcmp(file_comment, check_comment);
+ ret_value = strcmp(file_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Open the group */
@@ -1392,7 +1392,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(fid, "group", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment_by_name");
- ret_value = HDstrcmp(grp_comment, check_comment);
+ ret_value = strcmp(grp_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Getting the comment on the datatype and verify it */
@@ -1402,7 +1402,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(grp, "datatype", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(dtype_comment, check_comment);
+ ret_value = strcmp(dtype_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Getting the comment on the dataset and verify it */
@@ -1412,7 +1412,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(fid, "dataset", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment_by_name");
- ret_value = HDstrcmp(dset_comment, check_comment);
+ ret_value = strcmp(dset_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Close the IDs */
@@ -1699,16 +1699,16 @@ visit_obj_cb(hid_t group_id, const char *name, const H5O_info1_t *oinfo1, void H
H5O_info1_t oinfo2; /* Object info structs */
/* Verify the object info for "group1", "group2" and the root group */
- if (!(HDstrcmp(name, "group1"))) {
+ if (!(strcmp(name, "group1"))) {
H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_NUM_ATTRS, H5P_DEFAULT);
VERIFY(oinfo1->num_attrs, oinfo2.num_attrs, "obj info from H5Ovisit1");
}
- else if (!(HDstrcmp(name, "group2"))) {
+ else if (!(strcmp(name, "group2"))) {
H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_HDR, H5P_DEFAULT);
VERIFY(oinfo1->hdr.nmesgs, oinfo2.hdr.nmesgs, "obj info from H5Ovisit1/H5Oget_info2");
VERIFY(oinfo1->hdr.nchunks, oinfo2.hdr.nchunks, "obj info from H5Ovisit1/H5Oget_info2");
}
- else if (!(HDstrcmp(name, "."))) {
+ else if (!(strcmp(name, "."))) {
H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_META_SIZE, H5P_DEFAULT);
VERIFY(oinfo1->meta_size.obj.index_size, oinfo2.meta_size.obj.index_size,
"obj info from H5Ovisit1/H5Oget_info2");
@@ -1731,10 +1731,10 @@ visit_obj_cb(hid_t group_id, const char *name, const H5O_info1_t *oinfo1, void H
static void
test_h5o_getinfo_visit(void)
{
- hid_t fid = -1; /* HDF5 File ID */
- hid_t gid1 = -1, gid2 = -1; /* Group IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t aid = -1; /* Attribute ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 File ID */
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
char filename[1024];
H5O_info1_t oinfo1, oinfo2; /* Object info structs */
char attrname[25]; /* Attribute name */
@@ -1761,7 +1761,7 @@ test_h5o_getinfo_visit(void)
/* Attach 10 attributes to "group1" */
for (j = 0; j < 10; j++) {
/* Create the attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr%u", j);
+ snprintf(attrname, sizeof(attrname), "attr%u", j);
/* Create the attribute */
aid = H5Acreate2(gid1, attrname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
diff --git a/test/th5s.c b/test/th5s.c
index 6d703da..7343653 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -125,7 +125,7 @@ test_h5s_basic(void)
hsize_t tdims[4]; /* Dimension array to test with */
hsize_t tmax[4];
hssize_t n; /* Number of dataspace elements */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -1210,8 +1210,8 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
{
hid_t sid1, sid2, sid3; /* Dataspace ID */
hid_t decoded_sid1, decoded_sid2, decoded_sid3;
- int rank; /* Logical rank of dataspace */
- hid_t fapl = -1; /* File access property list ID */
+ int rank; /* Logical rank of dataspace */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
size_t sbuf_size = 0, null_size = 0, scalar_size = 0;
unsigned char *sbuf = NULL, *null_sbuf = NULL, *scalar_buf = NULL;
@@ -1606,11 +1606,11 @@ test_h5s_encode1(void)
****************************************************************/
static herr_t
test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, uint32_t expected_version, uint8_t expected_enc_size,
- hbool_t expected_to_fail)
+ bool expected_to_fail)
{
- char *buf = NULL; /* Pointer to the encoded buffer */
- size_t buf_size; /* Size of the encoded buffer */
- hid_t d_sid = -1; /* The decoded dataspace ID */
+ char *buf = NULL; /* Pointer to the encoded buffer */
+ size_t buf_size; /* Size of the encoded buffer */
+ hid_t d_sid = H5I_INVALID_HID; /* The decoded dataspace ID */
htri_t check;
hsize_t in_low_bounds[1]; /* The low bounds for the selection for in_sid */
hsize_t in_high_bounds[1]; /* The high bounds for the selection for in_sid */
@@ -1649,7 +1649,7 @@ test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, uint32_t expected_version,
/* Verify if the two dataspace selections (in_sid, d_sid) are the same shape */
check = H5Sselect_shape_same(in_sid, d_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare the starting/ending coordinates of the bounding box for in_sid and d_sid */
ret = H5Sget_select_bounds(in_sid, in_low_bounds, in_high_bounds);
@@ -1711,10 +1711,10 @@ test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, uint32_t expected_version,
static void
test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
{
- hid_t fapl = -1; /* File access property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hsize_t numparticles = 8388608; /* Used to calculate dimension size */
- unsigned num_dsets = 513; /* Used to calculate dimension size */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t numparticles = 8388608; /* Used to calculate dimension size */
+ unsigned num_dsets = 513; /* Used to calculate dimension size */
hsize_t total_particles = numparticles * num_dsets;
hsize_t vdsdims[1] = {total_particles}; /* Dimension size */
hsize_t start, stride, count, block; /* Selection info */
@@ -1741,7 +1741,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
/* Testing with each configuration */
for (config = CONFIG_16; config <= CONFIG_32; config++) {
- hbool_t expected_to_fail = FALSE;
+ bool expected_to_fail = false;
/* Testing with unlimited or not */
for (unlim = 0; unlim <= 1; unlim++) {
@@ -1749,7 +1749,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
count = unlim ? H5S_UNLIMITED : 2;
if ((high <= H5F_LIBVER_V18) && (unlim || config == CONFIG_32))
- expected_to_fail = TRUE;
+ expected_to_fail = true;
if (low >= H5F_LIBVER_V112)
expected_version = 3;
@@ -1906,7 +1906,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
static void
test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
{
- hid_t fapl = -1; /* File access property list ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
hid_t sid; /* Dataspace ID */
hsize_t numparticles = 8388608; /* Used to calculate dimension size */
unsigned num_dsets = 513; /* Used to calculate dimension size */
@@ -1934,7 +1934,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
/* Testing with each configuration */
for (config = CONFIG_8; config <= CONFIG_32; config++) {
- hbool_t expected_to_fail = FALSE; /* Whether H5Sencode2 is expected to fail */
+ bool expected_to_fail = false; /* Whether H5Sencode2 is expected to fail */
uint32_t expected_version = 0; /* Expected version for selection info */
uint32_t expected_enc_size = 0; /* Expected encoded size for selection info */
@@ -1945,7 +1945,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
/* H5Sencode2 is expected to fail for library v110 and below
when the selection exceeds the 32 bits integer limit */
if (high <= H5F_LIBVER_V110 && config == CONFIG_32)
- expected_to_fail = TRUE;
+ expected_to_fail = true;
if (low >= H5F_LIBVER_V112 || config == CONFIG_32)
expected_version = 3;
@@ -2005,7 +2005,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
/* Should be irregular hyperslab */
is_regular = H5Sis_regular_hyperslab(sid);
- VERIFY(is_regular, FALSE, "H5Sis_regular_hyperslab");
+ VERIFY(is_regular, false, "H5Sis_regular_hyperslab");
/* Verify the version and encoded size expected for the configuration */
assert(expected_enc_size <= 255);
@@ -2031,7 +2031,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
static void
test_h5s_encode_points(H5F_libver_t low, H5F_libver_t high)
{
- hid_t fapl = -1; /* File access property list ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
hid_t sid; /* Dataspace ID */
hsize_t numparticles = 8388608; /* Used to calculate dimension size */
unsigned num_dsets = 513; /* used to calculate dimension size */
@@ -2039,7 +2039,7 @@ test_h5s_encode_points(H5F_libver_t low, H5F_libver_t high)
hsize_t vdsdims[1] = {total_particles}; /* Dimension size */
hsize_t coord[4]; /* The point coordinates */
herr_t ret; /* Generic return value */
- hbool_t expected_to_fail = FALSE; /* Expected to fail or not */
+ bool expected_to_fail = false; /* Expected to fail or not */
uint32_t expected_version = 0; /* Expected version for selection info */
uint8_t expected_enc_size = 0; /* Expected encoded size of selection info */
@@ -2066,7 +2066,7 @@ test_h5s_encode_points(H5F_libver_t low, H5F_libver_t high)
ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)4, coord);
CHECK(ret, FAIL, "H5Sselect_elements");
- expected_to_fail = FALSE;
+ expected_to_fail = false;
expected_enc_size = 4;
expected_version = 1;
@@ -2091,7 +2091,7 @@ test_h5s_encode_points(H5F_libver_t low, H5F_libver_t high)
/* test 3 */
if (high <= H5F_LIBVER_V110)
- expected_to_fail = TRUE;
+ expected_to_fail = true;
if (high >= H5F_LIBVER_V112) {
expected_version = 2;
@@ -2659,423 +2659,423 @@ test_h5s_extent_equal(void)
/* Compare null dataspace against all others, including itself */
ext_equal = H5Sextent_equal(null_space, null_space);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(null_space, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare scalar dataspace against all others, including itself */
ext_equal = H5Sextent_equal(scalar_space, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, scalar_space);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(scalar_space, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 1-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d1_space1, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d1_space1);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space1, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare larger 1-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d1_space2, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d1_space2);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space2, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 1-D dataspace w/fixed max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d1_space3, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d1_space3);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space3, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 1-D dataspace w/unlimited max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d1_space4, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d1_space4);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d1_space4, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d2_space1, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d2_space1);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space1, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare larger 2-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d2_space2, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d2_space2);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space2, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/fixed max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d2_space3, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d2_space3);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space3, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/unlimited max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d2_space4, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d2_space4);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d2_space4, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 3-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d3_space1, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d3_space1);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space1, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare larger 2-D dataspace w/no max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d3_space2, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d3_space2);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space2, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/fixed max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d3_space3, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d3_space3);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space3, d3_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
/* Compare small 2-D dataspace w/unlimited max. dims against all others, including itself */
ext_equal = H5Sextent_equal(d3_space4, null_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, scalar_space);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d1_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d1_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d1_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d1_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d2_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d2_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d2_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d2_space4);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d3_space1);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d3_space2);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d3_space3);
- VERIFY(ext_equal, FALSE, "H5Sextent_equal");
+ VERIFY(ext_equal, false, "H5Sextent_equal");
ext_equal = H5Sextent_equal(d3_space4, d3_space4);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
/* Close dataspaces */
ret = H5Sclose(null_space);
@@ -3120,8 +3120,11 @@ test_h5s_extent_equal(void)
static void
test_h5s_extent_copy(void)
{
- hid_t spaces[14] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; /* Array of all dataspaces */
- hid_t tmp_space = -1;
+ hid_t spaces[14] = {
+ H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID}; /* Array of all dataspaces */
+ hid_t tmp_space = H5I_INVALID_HID;
hsize_t d1_dims1[1] = {10}, /* 1-D dimensions */
d1_dims2[1] = {20}, d1_dims3[1] = {H5S_UNLIMITED};
hsize_t d2_dims1[2] = {10, 10}, /* 2-D dimensions */
@@ -3198,7 +3201,7 @@ test_h5s_extent_copy(void)
/* Verify that the extents are equal */
ext_equal = H5Sextent_equal(tmp_space, spaces[j]);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
/* Verify that the correct number of elements is selected */
npoints_ret = H5Sget_select_npoints(tmp_space);
@@ -3210,7 +3213,7 @@ test_h5s_extent_copy(void)
/* Verify that the extents are equal */
ext_equal = H5Sextent_equal(tmp_space, spaces[i]);
- VERIFY(ext_equal, TRUE, "H5Sextent_equal");
+ VERIFY(ext_equal, true, "H5Sextent_equal");
/* Verify that the correct number of elements is selected */
npoints_ret = H5Sget_select_npoints(tmp_space);
@@ -3261,7 +3264,7 @@ test_h5s_bug1(void)
/* Check that space1's selection is valid */
select_valid = H5Sselect_valid(space1);
CHECK(select_valid, FAIL, "H5Sselect_valid");
- VERIFY(select_valid, TRUE, "H5Sselect_valid result");
+ VERIFY(select_valid, true, "H5Sselect_valid result");
/* Close dataspaces */
ret = H5Sclose(space1);
@@ -3309,7 +3312,7 @@ test_h5s_bug2(void)
/* Check that space's selection is valid */
select_valid = H5Sselect_valid(space);
CHECK(select_valid, FAIL, "H5Sselect_valid");
- VERIFY(select_valid, TRUE, "H5Sselect_valid result");
+ VERIFY(select_valid, true, "H5Sselect_valid result");
/* Check that 4 elements are selected */
elements_selected = H5Sget_select_npoints(space);
@@ -3342,15 +3345,15 @@ test_h5s_bug2(void)
static void
test_versionbounds(void)
{
- hid_t file = -1; /* File ID */
- hid_t space = -1; /* Dataspace ID */
- hid_t dset = -1; /* Dataset ID */
- hid_t fapl = -1; /* File access property list ID */
- hid_t dset_space = -1; /* Retrieved dataset's dataspace ID */
- hsize_t dim[1]; /* Dataset dimensions */
- H5F_libver_t low, high; /* File format bounds */
- H5S_t *spacep = NULL; /* Pointer to internal dataspace */
- herr_t ret = 0; /* Generic return value */
+ hid_t file = H5I_INVALID_HID; /* File ID */
+ hid_t space = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ hid_t dset_space = H5I_INVALID_HID; /* Retrieved dataset's dataspace ID */
+ hsize_t dim[1]; /* Dataset dimensions */
+ H5F_libver_t low, high; /* File format bounds */
+ H5S_t *spacep = NULL; /* Pointer to internal dataspace */
+ herr_t ret = 0; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Version Bounds\n"));
diff --git a/test/thread_id.c b/test/thread_id.c
index d42a483..ed1e0a8 100644
--- a/test/thread_id.c
+++ b/test/thread_id.c
@@ -36,9 +36,9 @@ my_errx(int code, const char *fmt, ...)
(void)fprintf(stderr, "thread_id: ");
va_start(ap, fmt);
- (void)HDvfprintf(stderr, fmt, ap);
+ (void)vfprintf(stderr, fmt, ap);
va_end(ap);
- (void)HDfputc('\n', stderr);
+ (void)fputc('\n', stderr);
exit(code);
}
@@ -96,7 +96,7 @@ barrier_lock(pthread_barrier_t *barrier)
int rc;
if ((rc = pthread_mutex_lock(&barrier->mtx)) != 0) {
- my_errx(EXIT_FAILURE, "%s: pthread_mutex_lock: %s", __func__, HDstrerror(rc));
+ my_errx(EXIT_FAILURE, "%s: pthread_mutex_lock: %s", __func__, strerror(rc));
}
}
@@ -106,7 +106,7 @@ barrier_unlock(pthread_barrier_t *barrier)
int rc;
if ((rc = pthread_mutex_unlock(&barrier->mtx)) != 0) {
- my_errx(EXIT_FAILURE, "%s: pthread_mutex_unlock: %s", __func__, HDstrerror(rc));
+ my_errx(EXIT_FAILURE, "%s: pthread_mutex_unlock: %s", __func__, strerror(rc));
}
}
@@ -178,15 +178,15 @@ my_err(int code, const char *fmt, ...)
(void)fprintf(stderr, "thread_id: ");
va_start(ap, fmt);
- (void)HDvfprintf(stderr, fmt, ap);
+ (void)vfprintf(stderr, fmt, ap);
va_end(ap);
- (void)fprintf(stderr, ": %s\n", HDstrerror(errno_copy));
+ (void)fprintf(stderr, ": %s\n", strerror(errno_copy));
exit(code);
}
#define threads_failure(_call, _result) \
do { \
- my_errx(EXIT_FAILURE, "%s.%d: " #_call ": %s", __func__, __LINE__, HDstrerror(_result)); \
+ my_errx(EXIT_FAILURE, "%s.%d: " #_call ": %s", __func__, __LINE__, strerror(_result)); \
} while (false)
#define NTHREADS 5
@@ -204,7 +204,7 @@ atomic_printf(const char *fmt, ...)
ssize_t nprinted, nwritten;
va_start(ap, fmt);
- nprinted = HDvsnprintf(buf, sizeof(buf), fmt, ap);
+ nprinted = vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
if (nprinted == -1)
diff --git a/test/tid.c b/test/tid.c
index 0cb16ab..bf557fa 100644
--- a/test/tid.c
+++ b/test/tid.c
@@ -380,15 +380,15 @@ test_is_valid(void)
/* Check that the ID is valid */
tri_ret = H5Iis_valid(dtype);
- VERIFY(tri_ret, TRUE, "H5Iis_valid");
- if (tri_ret != TRUE)
+ VERIFY(tri_ret, true, "H5Iis_valid");
+ if (tri_ret != true)
goto out;
/* Artificially manipulate the reference counts so app_count is 0, and dtype
* appears to be an internal id. This takes advantage of the fact that
* H5Ipkg is included.
*/
- ret = H5I_inc_ref(dtype, FALSE);
+ ret = H5I_inc_ref(dtype, false);
CHECK(ret, FAIL, "H5I_inc_ref");
if (ret < 0)
goto out;
@@ -399,8 +399,8 @@ test_is_valid(void)
/* Check that dtype is invalid */
tri_ret = H5Iis_valid(dtype);
- VERIFY(tri_ret, FALSE, "H5Iis_valid");
- if (tri_ret != FALSE)
+ VERIFY(tri_ret, false, "H5Iis_valid");
+ if (tri_ret != false)
goto out;
/* Close dtype and verify that it has been closed */
@@ -419,14 +419,14 @@ test_is_valid(void)
/* Check that dtype is invalid */
tri_ret = H5Iis_valid(dtype);
- VERIFY(tri_ret, FALSE, "H5Iis_valid");
- if (tri_ret != FALSE)
+ VERIFY(tri_ret, false, "H5Iis_valid");
+ if (tri_ret != false)
goto out;
/* Check that an id of -1 is invalid */
- tri_ret = H5Iis_valid((hid_t)-1);
- VERIFY(tri_ret, FALSE, "H4Iis_valid");
- if (tri_ret != FALSE)
+ tri_ret = H5Iis_valid((hid_t)H5I_INVALID_HID);
+ VERIFY(tri_ret, false, "H4Iis_valid");
+ if (tri_ret != false)
goto out;
return 0;
@@ -465,7 +465,7 @@ test_get_type(void)
goto out;
/* Check that the ID is correct */
- type_ret = H5Iget_type((hid_t)-1);
+ type_ret = H5Iget_type((hid_t)H5I_INVALID_HID);
VERIFY(type_ret, H5I_BADID, "H5Iget_type");
if (type_ret != H5I_BADID)
goto out;
@@ -602,7 +602,7 @@ typedef struct rct_obj_t {
/* Whether we are currently freeing this object directly
* through H5Idec_ref().
*/
- hbool_t freeing;
+ bool freeing;
/* Pointer to the master list of all objects */
rct_obj_list_t *list;
@@ -660,7 +660,7 @@ rct_free_cb(void *_obj, void H5_ATTR_UNUSED **_ctx)
* not free another object. We don't want to recursively free the
* entire list when we free the first ID.
*/
- obj->list->objects[i].freeing = TRUE;
+ obj->list->objects[i].freeing = true;
/* Decrement the reference count on the object */
ret = H5Idec_ref(obj->list->objects[i].id);
@@ -669,7 +669,7 @@ rct_free_cb(void *_obj, void H5_ATTR_UNUSED **_ctx)
goto error;
/* Unset the "freeing" flag */
- obj->list->objects[i].freeing = FALSE;
+ obj->list->objects[i].freeing = false;
}
/* Verify the number of objects remaining in the master list is non-negative */
@@ -734,7 +734,7 @@ test_remove_clear_type(void)
/* Object setup */
objects[j].nfrees = 0;
- objects[j].freeing = FALSE;
+ objects[j].freeing = false;
objects[j].list = &obj_list;
/* Register an ID for it */
@@ -753,13 +753,13 @@ test_remove_clear_type(void)
}
/******************************************
- * Clear the type with force set to FALSE *
+ * Clear the type with force set to false *
******************************************/
- /* Clear the type. Since force is FALSE, only
+ /* Clear the type. Since force is false, only
* IDs with a reference count of 1 will be cleared.
*/
- ret = H5Iclear_type(obj_type, FALSE);
+ ret = H5Iclear_type(obj_type, false);
CHECK(ret, FAIL, "H5Iclear_type");
if (ret == FAIL)
goto error;
@@ -782,8 +782,8 @@ test_remove_clear_type(void)
}
/* No object should still be marked as "freeing" */
- VERIFY(objects[j].freeing, FALSE, "object marked as freeing");
- if (objects[j].freeing != FALSE)
+ VERIFY(objects[j].freeing, false, "object marked as freeing");
+ if (objects[j].freeing != false)
goto error;
}
@@ -804,11 +804,11 @@ test_remove_clear_type(void)
goto error;
/*****************************************
- * Clear the type with force set to TRUE *
+ * Clear the type with force set to true *
*****************************************/
- /* Clear the type. Since force is TRUE, all IDs will be cleared. */
- ret = H5Iclear_type(obj_type, TRUE);
+ /* Clear the type. Since force is true, all IDs will be cleared. */
+ ret = H5Iclear_type(obj_type, true);
CHECK(ret, FAIL, "H5Iclear_type");
if (ret == FAIL)
goto error;
@@ -822,8 +822,8 @@ test_remove_clear_type(void)
goto error;
/* No object should still be marked as "freeing" */
- VERIFY(objects[j].freeing, FALSE, "object marked as freeing");
- if (objects[j].freeing != FALSE)
+ VERIFY(objects[j].freeing, false, "object marked as freeing");
+ if (objects[j].freeing != false)
goto error;
}
@@ -1339,7 +1339,7 @@ test_future_ids(void)
CHECK(ret, FAIL, "H5Pisa_class");
if (FAIL == ret)
goto error;
- if (TRUE != ret)
+ if (true != ret)
goto error;
/* Verify that the application believes the ID is still a property list */
diff --git a/test/timer.c b/test/timer.c
index 9d92d0d..e992cba 100644
--- a/test/timer.c
+++ b/test/timer.c
@@ -35,55 +35,55 @@ test_time_formatting(void)
/* < 0, N/A */
s = H5_timer_get_time_string(-1.0);
- if (NULL == s || HDstrcmp(s, "N/A") != 0)
+ if (NULL == s || strcmp(s, "N/A") != 0)
TEST_ERROR;
free(s);
/* 0 0 */
s = H5_timer_get_time_string(0.0);
- if (NULL == s || HDstrcmp(s, "0.0 s") != 0)
+ if (NULL == s || strcmp(s, "0.0 s") != 0)
TEST_ERROR;
free(s);
/* < 1 us nanoseconds */
s = H5_timer_get_time_string(123.0E-9);
- if (NULL == s || HDstrcmp(s, "123 ns") != 0)
+ if (NULL == s || strcmp(s, "123 ns") != 0)
TEST_ERROR;
free(s);
/* < 1 ms microseconds */
s = H5_timer_get_time_string(23.456E-6);
- if (NULL == s || HDstrcmp(s, "23.5 us") != 0)
+ if (NULL == s || strcmp(s, "23.5 us") != 0)
TEST_ERROR;
free(s);
/* < 1 s milliseconds */
s = H5_timer_get_time_string(4.56789E-3);
- if (NULL == s || HDstrcmp(s, "4.6 ms") != 0)
+ if (NULL == s || strcmp(s, "4.6 ms") != 0)
TEST_ERROR;
free(s);
/* < 1 min seconds */
s = H5_timer_get_time_string(3.14);
- if (NULL == s || HDstrcmp(s, "3.14 s") != 0)
+ if (NULL == s || strcmp(s, "3.14 s") != 0)
TEST_ERROR;
free(s);
/* < 1 hr mins, secs */
s = H5_timer_get_time_string(2521.0);
- if (NULL == s || HDstrcmp(s, "42 m 1 s") != 0)
+ if (NULL == s || strcmp(s, "42 m 1 s") != 0)
TEST_ERROR;
free(s);
/* < 1 d hrs, mins, secs */
s = H5_timer_get_time_string(9756.0);
- if (NULL == s || HDstrcmp(s, "2 h 42 m 36 s") != 0)
+ if (NULL == s || strcmp(s, "2 h 42 m 36 s") != 0)
TEST_ERROR;
free(s);
/* > 1 d days, hrs, mins, secs */
s = H5_timer_get_time_string(280802.0);
- if (NULL == s || HDstrcmp(s, "3 d 6 h 0 m 2 s") != 0)
+ if (NULL == s || strcmp(s, "3 d 6 h 0 m 2 s") != 0)
TEST_ERROR;
free(s);
diff --git a/test/titerate.c b/test/titerate.c
index 8f5e44c..57b4d06 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -52,8 +52,8 @@ typedef struct {
#define CORRUPTED_ATNAMELEN_FILE "memleak_H5O_dtype_decode_helper_H5Odtype.h5"
#define DSET_NAME "image"
typedef struct searched_err_t {
- char message[256];
- hbool_t found;
+ char message[256];
+ bool found;
} searched_err_t;
/* Call back function for test_corrupted_attnamelen */
@@ -74,7 +74,7 @@ herr_t aiter_cb(hid_t group, const char *name, const H5A_info_t *ainfo, v
H5_ATTR_PURE int
iter_strcmp(const void *s1, const void *s2)
{
- return (HDstrcmp(*(const char *const *)s1, *(const char *const *)s2));
+ return (strcmp(*(const char *const *)s1, *(const char *const *)s2));
}
/****************************************************************
@@ -90,7 +90,7 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t H5_ATTR
static int count = 0;
static int count2 = 0;
- HDstrcpy(info->name, name);
+ strcpy(info->name, name);
switch (info->command) {
case RET_ZERO:
@@ -119,7 +119,7 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t H5_ATTR
**
****************************************************************/
static void
-test_iter_group(hid_t fapl, hbool_t new_format)
+test_iter_group(hid_t fapl, bool new_format)
{
hid_t file; /* File ID */
hid_t dataset; /* Dataset ID */
@@ -155,12 +155,12 @@ test_iter_group(hid_t fapl, hbool_t new_format)
CHECK(filespace, FAIL, "H5Screate");
for (i = 0; i < NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "Dataset %d", i);
+ snprintf(name, sizeof(name), "Dataset %d", i);
dataset = H5Dcreate2(file, name, datatype, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate2");
/* Keep a copy of the dataset names around for later */
- lnames[i] = HDstrdup(name);
+ lnames[i] = strdup(name);
CHECK_PTR(lnames[i], "strdup");
ret = H5Dclose(dataset);
@@ -171,13 +171,13 @@ test_iter_group(hid_t fapl, hbool_t new_format)
grp = H5Gcreate2(file, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Gcreate2");
- lnames[NDATASETS] = HDstrdup("grp");
+ lnames[NDATASETS] = strdup("grp");
CHECK_PTR(lnames[NDATASETS], "strdup");
ret = H5Tcommit2(file, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit2");
- lnames[NDATASETS + 1] = HDstrdup("dtype");
+ lnames[NDATASETS + 1] = strdup("dtype");
CHECK_PTR(lnames[NDATASETS], "strdup");
/* Close everything up */
@@ -319,7 +319,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
TestErrPrintf("Group iteration function walked too far!\n");
/* Verify that the correct name is retrieved */
- if (HDstrcmp(info.name, lnames[(size_t)(idx - 1)]) != 0)
+ if (strcmp(info.name, lnames[(size_t)(idx - 1)]) != 0)
TestErrPrintf(
"Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n",
(unsigned)(idx - 1), lnames[(size_t)(idx - 1)]);
@@ -348,7 +348,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
TestErrPrintf("Group iteration function walked too far!\n");
/* Verify that the correct name is retrieved */
- if (HDstrcmp(info.name, lnames[(size_t)(idx - 1)]) != 0)
+ if (strcmp(info.name, lnames[(size_t)(idx - 1)]) != 0)
TestErrPrintf(
"Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n",
(unsigned)(idx - 1), lnames[(size_t)(idx - 1)]);
@@ -379,7 +379,7 @@ aiter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5A_info_t H5_ATTR_
static int count = 0;
static int count2 = 0;
- HDstrcpy(info->name, name);
+ strcpy(info->name, name);
switch (info->command) {
case RET_ZERO:
@@ -408,7 +408,7 @@ aiter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5A_info_t H5_ATTR_
**
****************************************************************/
static void
-test_iter_attr(hid_t fapl, hbool_t new_format)
+test_iter_attr(hid_t fapl, bool new_format)
{
hid_t file; /* File ID */
hid_t dataset; /* Common Dataset ID */
@@ -435,12 +435,12 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
CHECK(dataset, FAIL, "H5Dcreate2");
for (i = 0; i < NATTR; i++) {
- HDsnprintf(name, sizeof(name), "Attribute %02d", i);
+ snprintf(name, sizeof(name), "Attribute %02d", i);
attribute = H5Acreate2(dataset, name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attribute, FAIL, "H5Acreate2");
/* Keep a copy of the attribute names around for later */
- anames[i] = HDstrdup(name);
+ anames[i] = strdup(name);
CHECK_PTR(anames[i], "strdup");
ret = H5Aclose(attribute);
@@ -509,7 +509,7 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
/* Don't check name when new format is used */
if (!new_format) {
/* Verify that the correct name is retrieved */
- if (HDstrcmp(info.name, anames[(size_t)idx - 1]) != 0)
+ if (strcmp(info.name, anames[(size_t)idx - 1]) != 0)
TestErrPrintf("%u: Attribute iteration function didn't set names correctly, info.name = "
"'%s', anames[%u] = '%s'!\n",
__LINE__, info.name, (unsigned)(idx - 1), anames[(size_t)idx - 1]);
@@ -538,7 +538,7 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
/* Don't check name when new format is used */
if (!new_format) {
/* Verify that the correct name is retrieved */
- if (HDstrcmp(info.name, anames[(size_t)idx - 1]) != 0)
+ if (strcmp(info.name, anames[(size_t)idx - 1]) != 0)
TestErrPrintf("%u: Attribute iteration function didn't set names correctly, info.name = "
"'%s', anames[%u] = '%s'!\n",
__LINE__, info.name, (unsigned)(idx - 1), anames[(size_t)idx - 1]);
@@ -569,7 +569,7 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
H5_ATTR_PURE int
iter_strcmp2(const void *s1, const void *s2)
{
- return (HDstrcmp((const char *)s1, (const char *)s2));
+ return (strcmp((const char *)s1, (const char *)s2));
} /* end iter_strcmp2() */
/****************************************************************
@@ -584,7 +584,7 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info2_t H5_ATTR_UNUSED *link
H5O_info2_t oinfo;
herr_t ret; /* Generic return value */
- if (HDstrcmp(name, test_info->name) != 0) {
+ if (strcmp(name, test_info->name) != 0) {
TestErrPrintf("name = '%s', test_info = '%s'\n", name, test_info->name);
return (H5_ITER_ERROR);
} /* end if */
@@ -648,10 +648,10 @@ test_iter_group_large(hid_t fapl)
/* Create a bunch of groups */
for (i = 0; i < ITER_NGROUPS; i++) {
- HDsnprintf(gname, sizeof(gname), "Group_%d", i);
+ snprintf(gname, sizeof(gname), "Group_%d", i);
/* Add the name to the list of objects in the root group */
- HDstrcpy(names[i].name, gname);
+ strcpy(names[i].name, gname);
names[i].type = H5O_TYPE_GROUP;
/* Create a group */
@@ -668,7 +668,7 @@ test_iter_group_large(hid_t fapl)
CHECK(dataset, FAIL, "H5Dcreate2");
/* Add the name to the list of objects in the root group */
- HDstrcpy(names[ITER_NGROUPS].name, "Dataset1");
+ strcpy(names[ITER_NGROUPS].name, "Dataset1");
names[ITER_NGROUPS].type = H5O_TYPE_DATASET;
/* Close Dataset */
@@ -698,7 +698,7 @@ test_iter_group_large(hid_t fapl)
CHECK(ret, FAIL, "H5Tcommit2");
/* Add the name to the list of objects in the root group */
- HDstrcpy(names[ITER_NGROUPS + 1].name, "Datatype1");
+ strcpy(names[ITER_NGROUPS + 1].name, "Datatype1");
names[ITER_NGROUPS + 1].type = H5O_TYPE_NAMED_DATATYPE;
/* Close datatype */
@@ -765,12 +765,12 @@ test_grp_memb_funcs(hid_t fapl)
CHECK(filespace, FAIL, "H5Screate");
for (i = 0; i < NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "Dataset %d", i);
+ snprintf(name, sizeof(name), "Dataset %d", i);
dataset = H5Dcreate2(file, name, datatype, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate2");
/* Keep a copy of the dataset names around for later */
- dnames[i] = HDstrdup(name);
+ dnames[i] = strdup(name);
CHECK_PTR(dnames[i], "strdup");
ret = H5Dclose(dataset);
@@ -781,13 +781,13 @@ test_grp_memb_funcs(hid_t fapl)
grp = H5Gcreate2(file, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Gcreate2");
- dnames[NDATASETS] = HDstrdup("grp");
+ dnames[NDATASETS] = strdup("grp");
CHECK_PTR(dnames[NDATASETS], "strdup");
ret = H5Tcommit2(file, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit2");
- dnames[NDATASETS + 1] = HDstrdup("dtype");
+ dnames[NDATASETS + 1] = strdup("dtype");
CHECK_PTR(dnames[NDATASETS], "strdup");
/* Close everything up */
@@ -836,18 +836,18 @@ test_grp_memb_funcs(hid_t fapl)
VERIFY(ret, name_len, "H5Lget_name_by_idx");
/* Keep a copy of the dataset names around for later */
- obj_names[i] = HDstrdup(dataset_name);
+ obj_names[i] = strdup(dataset_name);
CHECK_PTR(obj_names[i], "strdup");
ret = H5Oget_info_by_idx3(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo,
H5O_INFO_BASIC, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_idx3");
- if (!HDstrcmp(dataset_name, "grp"))
+ if (!strcmp(dataset_name, "grp"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- if (!HDstrcmp(dataset_name, "dtype"))
+ if (!strcmp(dataset_name, "dtype"))
VERIFY(oinfo.type, H5O_TYPE_NAMED_DATATYPE, "H5Lget_name_by_idx");
- if (!HDstrncmp(dataset_name, "Dataset", (size_t)7))
+ if (!strncmp(dataset_name, "Dataset", (size_t)7))
VERIFY(oinfo.type, H5O_TYPE_DATASET, "H5Lget_name_by_idx");
} /* end for */
@@ -865,8 +865,8 @@ test_grp_memb_funcs(hid_t fapl)
/* Compare object names */
for (i = 0; i < (int)ginfo.nlinks; i++) {
- ret = HDstrcmp(dnames[i], obj_names[i]);
- VERIFY(ret, 0, "HDstrcmp");
+ ret = strcmp(dnames[i], obj_names[i]);
+ VERIFY(ret, 0, "strcmp");
} /* end for */
ret = H5Gclose(root_group);
@@ -944,11 +944,11 @@ test_links(hid_t fapl)
CHECK(ret, FAIL, "H5Oget_info_by_idx3");
} /* end if */
- if (!HDstrcmp(obj_name, "g1.1"))
+ if (!strcmp(obj_name, "g1.1"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "hardlink"))
+ else if (!strcmp(obj_name, "hardlink"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "softlink"))
+ else if (!strcmp(obj_name, "softlink"))
VERIFY(linfo.type, H5L_TYPE_SOFT, "H5Lget_name_by_idx");
else
ERROR("unknown object name");
@@ -985,8 +985,8 @@ find_err_msg_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *_
return H5_ITER_ERROR;
/* If the searched error message is found, stop the iteration */
- if (err_desc->desc != NULL && HDstrcmp(err_desc->desc, searched_err->message) == 0) {
- searched_err->found = TRUE;
+ if (err_desc->desc != NULL && strcmp(err_desc->desc, searched_err->message) == 0) {
+ searched_err->found = true;
status = H5_ITER_STOP;
}
@@ -1003,12 +1003,12 @@ find_err_msg_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *_
static void
test_corrupted_attnamelen(void)
{
- hid_t fid = -1; /* File ID */
- hid_t did = -1; /* Dataset ID */
- searched_err_t err_caught; /* Data to be passed to callback func */
- int err_status; /* Status returned by H5Aiterate2 */
- herr_t ret; /* Return value */
- hbool_t driver_is_default_compatible;
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ searched_err_t err_caught; /* Data to be passed to callback func */
+ int err_status; /* Status returned by H5Aiterate2 */
+ herr_t ret; /* Return value */
+ bool driver_is_default_compatible;
const char *testfile = H5_get_srcdir_filename(CORRUPTED_ATNAMELEN_FILE); /* Corrected test file name */
/* The error message produced when the failure occurs
@@ -1043,15 +1043,15 @@ test_corrupted_attnamelen(void)
/* Make sure the intended error was caught */
if (err_status == -1) {
/* Initialize client data */
- HDstrcpy(err_caught.message, err_message);
- err_caught.found = FALSE;
+ strcpy(err_caught.message, err_message);
+ err_caught.found = false;
/* Look for the correct error message */
ret = H5Ewalk2(H5E_DEFAULT, H5E_WALK_UPWARD, find_err_msg_cb, &err_caught);
CHECK(ret, FAIL, "H5Ewalk2");
/* Fail if the indicated message is not found */
- CHECK(err_caught.found, FALSE, "test_corrupted_attnamelen: Expected error not found");
+ CHECK(err_caught.found, false, "test_corrupted_attnamelen: Expected error not found");
}
/* Close the dataset and file */
@@ -1126,11 +1126,11 @@ test_links_deprec(hid_t fapl)
CHECK(ret, FAIL, "H5Oget_info_by_idx");
} /* end if */
- if (!HDstrcmp(obj_name, "g1.1"))
+ if (!strcmp(obj_name, "g1.1"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "hardlink"))
+ else if (!strcmp(obj_name, "hardlink"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "softlink"))
+ else if (!strcmp(obj_name, "softlink"))
VERIFY(linfo.type, H5L_TYPE_SOFT, "H5Lget_name_by_idx");
else
ERROR("unknown object name");
@@ -1175,7 +1175,7 @@ test_iterate(void)
CHECK(ret, FAIL, "H5Pset_libver_bounds");
/* These next tests use the same file */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
test_iter_group(new_format ? fapl2 : fapl, new_format); /* Test group iteration */
test_iter_group_large(new_format ? fapl2 : fapl); /* Test group iteration for large # of objects */
test_iter_attr(new_format ? fapl2 : fapl, new_format); /* Test attribute iteration */
diff --git a/test/tmisc.c b/test/tmisc.c
index b66a80e..c43f54f 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -448,8 +448,8 @@ test_misc2_write_attribute(void)
hid_t type;
herr_t ret;
misc2_struct data, data_check;
- char *string_att1 = HDstrdup("string attribute in file one");
- char *string_att2 = HDstrdup("string attribute in file two");
+ char *string_att1 = strdup("string attribute in file one");
+ char *string_att2 = strdup("string attribute in file two");
type = misc2_create_type();
@@ -1088,7 +1088,7 @@ test_misc6(void)
/* Loop through adding attributes to each dataset */
for (u = 0; u < MISC6_NUMATTR; u++) {
/* Create name for attribute */
- HDsnprintf(attr_name, sizeof(attr_name), "Attr#%u", u);
+ snprintf(attr_name, sizeof(attr_name), "Attr#%u", u);
/* Open the file */
loc_id = H5Fopen(MISC6_FILE, H5F_ACC_RDWR, H5P_DEFAULT);
@@ -1800,7 +1800,7 @@ test_misc10(void)
hid_t dcpl; /* Dataset creation property list */
hid_t space, type; /* Old dataset's dataspace & datatype */
const char *testfile = H5_get_srcdir_filename(MISC10_FILE_OLD); /* Corrected test file name */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret;
/* Output message about test being performed */
@@ -1883,7 +1883,7 @@ test_misc11(void)
H5F_info2_t finfo; /* global information about file */
H5F_fspace_strategy_t strategy; /* File space strategy */
hsize_t threshold; /* Free-space section threshold */
- hbool_t persist; /* To persist free-space or not */
+ bool persist; /* To persist free-space or not */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -1944,7 +1944,7 @@ test_misc11(void)
ret = H5Pset_shared_mesg_nindexes(fcpl, MISC11_NINDEXES);
CHECK(ret, FAIL, "H5Pset_shared_mesg");
- ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, FALSE, (hsize_t)1);
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, false, (hsize_t)1);
CHECK(ret, FAIL, "H5Pset_file_space");
/* Creating a file with the non-default file creation property list should
@@ -2011,7 +2011,7 @@ test_misc11(void)
ret = H5Pget_file_space_strategy(fcpl, &strategy, &persist, &threshold);
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
VERIFY(strategy, 3, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(persist, false, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
/* Close file */
@@ -2115,11 +2115,11 @@ test_misc12(void)
CHECK(ret, FAIL, "H5Dread");
for (i = 0; i < MISC12_SPACE1_DIM1; i++)
- if (HDstrcmp(wdata[i], rdata[i]) != 0)
+ if (strcmp(wdata[i], rdata[i]) != 0)
TestErrPrintf("Error on line %d: wdata[%d]=%s, rdata[%d]=%s\n", __LINE__, i, wdata[i], i,
rdata[i]);
for (; i < (MISC12_SPACE1_DIM1 + MISC12_APPEND_SIZE); i++)
- if (HDstrcmp(wdata1[i - MISC12_SPACE1_DIM1], rdata[i]) != 0)
+ if (strcmp(wdata1[i - MISC12_SPACE1_DIM1], rdata[i]) != 0)
TestErrPrintf("Error on line %d: wdata1[%d]=%s, rdata[%d]=%s\n", __LINE__, i - MISC12_SPACE1_DIM1,
wdata1[i - MISC12_SPACE1_DIM1], i, rdata[i]);
@@ -2157,25 +2157,25 @@ misc13_init_data(unsigned *original_data)
original_data[u] = u;
}
-static hbool_t
+static bool
misc13_verify_data_match(const unsigned *original_data, const unsigned *read_data)
{
unsigned u;
for (u = 0; u < MISC13_DIM1; u++)
if (original_data[u] != read_data[u])
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
static void
misc13_create_dataset(hid_t loc_id, const char *name, hid_t dcpl, const unsigned *data)
{
- hid_t dsid = -1; /* Dataset ID */
- hid_t sid = -1; /* Dataspace ID */
- hsize_t dims[MISC13_RANK]; /* Dataset dimensions */
- herr_t ret; /* Generic return value */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dims[MISC13_RANK]; /* Dataset dimensions */
+ herr_t ret; /* Generic return value */
/* Create dataspace for use with dataset */
dims[0] = MISC13_DIM1;
@@ -2203,9 +2203,9 @@ misc13_create_dataset(hid_t loc_id, const char *name, hid_t dcpl, const unsigned
static void
misc13_verify_dataset(hid_t loc_id, const char *name, const unsigned *data)
{
- unsigned *read_data = NULL; /* Data to write to dataset */
- hid_t dsid = -1; /* Dataset ID */
- herr_t ret; /* Generic return value */
+ unsigned *read_data = NULL; /* Data to write to dataset */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
+ herr_t ret; /* Generic return value */
/* Create a data buffer for the dataset read */
read_data = (unsigned *)calloc(MISC13_DIM1, sizeof(unsigned));
@@ -2235,13 +2235,13 @@ misc13_verify_dataset(hid_t loc_id, const char *name, const unsigned *data)
static void
misc13_create_hdf_file(const char *name, const unsigned *data)
{
- hid_t fid = -1; /* File ID */
- hid_t gid1 = -1; /* Group ID (level 1) */
- hid_t gid2 = -1; /* Group ID (level 2) */
- hid_t tid = -1; /* Datatype ID */
- hid_t dcplid = -1; /* Dataset creation property list ID */
- hsize_t chunk_dims[MISC13_RANK]; /* Chunk dimensions */
- herr_t ret; /* Generic return value */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid1 = H5I_INVALID_HID; /* Group ID (level 1) */
+ hid_t gid2 = H5I_INVALID_HID; /* Group ID (level 2) */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t dcplid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hsize_t chunk_dims[MISC13_RANK]; /* Chunk dimensions */
+ herr_t ret; /* Generic return value */
/* Create file */
fid = H5Fcreate(name, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -2338,7 +2338,7 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
CHECK_PTR(user_block, "calloc");
/* Copy in the user block data */
- memcpy(user_block, str, HDstrlen(str));
+ memcpy(user_block, str, strlen(str));
/* Open the new file */
new_fp = fopen(new_name, "wb");
@@ -2380,16 +2380,15 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
} /* end misc13_insert_user_block() */
static void
-misc13_verify_file(const char *name, const unsigned *data, hsize_t userblock_size,
- hbool_t check_for_new_dataset)
+misc13_verify_file(const char *name, const unsigned *data, hsize_t userblock_size, bool check_for_new_dataset)
{
- hid_t fid = -1; /* File ID */
- hid_t gid1 = -1; /* Group IDs */
- hid_t gid2 = -1; /* Group IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t fcplid = -1; /* File creation property list ID */
- hsize_t ub_size_out; /* Userblock size retrieved from FCPL */
- herr_t ret; /* Generic return value */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid1 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t fcplid = H5I_INVALID_HID; /* File creation property list ID */
+ hsize_t ub_size_out; /* Userblock size retrieved from FCPL */
+ herr_t ret; /* Generic return value */
/* Open the file */
fid = H5Fopen(name, H5F_ACC_RDONLY, H5P_DEFAULT);
@@ -2425,7 +2424,7 @@ misc13_verify_file(const char *name, const unsigned *data, hsize_t userblock_siz
CHECK(tid, FAIL, "H5Topen2");
/* Verify the type is correct */
- VERIFY(H5Tequal(tid, H5T_NATIVE_INT), TRUE, "H5Tequal");
+ VERIFY(H5Tequal(tid, H5T_NATIVE_INT), true, "H5Tequal");
/* Close named datatype */
ret = H5Tclose(tid);
@@ -2446,7 +2445,7 @@ misc13_verify_file(const char *name, const unsigned *data, hsize_t userblock_siz
CHECK(tid, FAIL, "H5Topen2");
/* Verify the type is correct */
- VERIFY(H5Tequal(tid, H5T_NATIVE_INT), TRUE, "H5Tequal");
+ VERIFY(H5Tequal(tid, H5T_NATIVE_INT), true, "H5Tequal");
/* Close named datatype */
ret = H5Tclose(tid);
@@ -2473,8 +2472,8 @@ misc13_verify_file(const char *name, const unsigned *data, hsize_t userblock_siz
static void
misc13_add_to_new_file(const char *name, const unsigned *data)
{
- hid_t fid = -1; /* File ID */
- herr_t ret; /* Generic return value */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ herr_t ret; /* Generic return value */
/* Open the file */
fid = H5Fopen(name, H5F_ACC_RDWR, H5P_DEFAULT);
@@ -2500,7 +2499,7 @@ test_misc13(void)
{
unsigned *data = NULL; /* Data to write to dataset */
hsize_t userblock_size; /* Correct size of userblock */
- hbool_t check_for_new_dataset; /* Whether to check for the post-userblock-creation dataset */
+ bool check_for_new_dataset; /* Whether to check for the post-userblock-creation dataset */
/* Create a data buffer for the datasets */
data = (unsigned *)calloc(MISC13_DIM1, sizeof(unsigned));
@@ -2514,7 +2513,7 @@ test_misc13(void)
/* Verify file contents are correct */
userblock_size = 0;
- check_for_new_dataset = FALSE;
+ check_for_new_dataset = false;
misc13_verify_file(MISC13_FILE_1, data, userblock_size, check_for_new_dataset);
/* Create a new file by inserting a user block in front of the first file */
@@ -2522,7 +2521,7 @@ test_misc13(void)
/* Verify file contents are still correct */
userblock_size = MISC13_USERBLOCK_SIZE;
- check_for_new_dataset = FALSE;
+ check_for_new_dataset = false;
misc13_verify_file(MISC13_FILE_2, data, userblock_size, check_for_new_dataset);
/* Make certain we can modify the new file */
@@ -2530,7 +2529,7 @@ test_misc13(void)
/* Verify file contents are still correct */
userblock_size = MISC13_USERBLOCK_SIZE;
- check_for_new_dataset = TRUE;
+ check_for_new_dataset = true;
misc13_verify_file(MISC13_FILE_2, data, userblock_size, check_for_new_dataset);
/* Free the dataset buffer */
@@ -2870,13 +2869,13 @@ test_misc16(void)
/* Compare data read in */
for (i = 0; i < MISC16_SPACE_DIM; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf(
"Line %u: VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",
- (unsigned)__LINE__, (int)i, (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (unsigned)__LINE__, (int)i, (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("Line %u: VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",
(unsigned)__LINE__, (int)i, wdata[i], (int)i, rdata[i]);
continue;
@@ -2955,13 +2954,13 @@ test_misc17(void)
/* Compare data in the way of strings. */
for (i = 0; i < MISC17_SPACE_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf(
"Line %u: VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",
- (unsigned)__LINE__, (int)i, (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (unsigned)__LINE__, (int)i, (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("Line %u: VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",
(unsigned)__LINE__, (int)i, wdata[i], (int)i, rdata[i]);
continue;
@@ -3067,7 +3066,7 @@ test_misc18(void)
/* Loop creating attributes on each dataset, flushing them to the file each time */
for (u = 0; u < 10; u++) {
/* Set up attribute name */
- HDsnprintf(attr_name, sizeof(attr_name), "Attr %u", u);
+ snprintf(attr_name, sizeof(attr_name), "Attr %u", u);
/* Create & close attribute on first dataset */
aid = H5Acreate2(did1, attr_name, H5T_STD_U32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
@@ -3154,23 +3153,23 @@ test_misc18(void)
static void
test_misc19(void)
{
- hid_t fid = -1; /* File ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t plid = -1; /* Property List ID */
- hid_t pcid = -1; /* Property Class ID */
- hid_t gid = -1; /* Group ID */
- hid_t ecid = -1; /* Error Class ID */
- hid_t emid = -1; /* Error Message ID */
- hid_t esid = -1; /* Error Stack ID */
- hid_t vfdid = -1; /* Virtual File Driver ID */
- hid_t volid = -1; /* Virtual Object Layer ID */
- H5FD_class_t *vfd_cls = NULL; /* VFD class */
- H5VL_class_t *vol_cls = NULL; /* VOL class */
- int rc; /* Reference count */
- herr_t ret; /* Generic return value */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t plid = H5I_INVALID_HID; /* Property List ID */
+ hid_t pcid = H5I_INVALID_HID; /* Property Class ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t ecid = H5I_INVALID_HID; /* Error Class ID */
+ hid_t emid = H5I_INVALID_HID; /* Error Message ID */
+ hid_t esid = H5I_INVALID_HID; /* Error Stack ID */
+ hid_t vfdid = H5I_INVALID_HID; /* Virtual File Driver ID */
+ hid_t volid = H5I_INVALID_HID; /* Virtual Object Layer ID */
+ H5FD_class_t *vfd_cls = NULL; /* VFD class */
+ H5VL_class_t *vol_cls = NULL; /* VOL class */
+ int rc; /* Reference count */
+ herr_t ret; /* Generic return value */
/* Check H5I operations on files */
@@ -3703,7 +3702,7 @@ test_misc20(void)
unsigned version; /* Version of storage layout info */
hsize_t contig_size; /* Size of contiguous storage size from layout into */
const char *testfile = H5_get_srcdir_filename(MISC20_FILE_OLD); /* Corrected test file name */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -4180,7 +4179,7 @@ test_misc23(void)
CHECK(create_id, FAIL, "H5Pcreate");
/* Set flag for intermediate group creation */
- status = H5Pset_create_intermediate_group(create_id, TRUE);
+ status = H5Pset_create_intermediate_group(create_id, true);
CHECK(status, FAIL, "H5Pset_create_intermediate_group");
tmp_id = H5Gcreate2(file_id, "/A/B01/grp", create_id, H5P_DEFAULT, access_id);
@@ -4241,7 +4240,7 @@ test_misc23(void)
CHECK(create_id, FAIL, "H5Pcreate");
/* Set flag for intermediate group creation */
- status = H5Pset_create_intermediate_group(create_id, TRUE);
+ status = H5Pset_create_intermediate_group(create_id, true);
CHECK(status, FAIL, "H5Pset_create_intermediate_group");
tmp_id = H5Dcreate2(file_id, "/A/B06/dset", type_id, space_id, create_id, H5P_DEFAULT, H5P_DEFAULT);
@@ -4292,7 +4291,7 @@ test_misc23(void)
CHECK(create_id, FAIL, "H5Pcreate");
/* Set flag for intermediate group creation */
- status = H5Pset_create_intermediate_group(create_id, TRUE);
+ status = H5Pset_create_intermediate_group(create_id, true);
CHECK(status, FAIL, "H5Pset_create_intermediate_group");
tmp_id = H5Tcopy(H5T_NATIVE_INT16);
@@ -4352,17 +4351,17 @@ test_misc23(void)
CHECK(create_id, FAIL, "H5Pcreate");
/* Set flag for intermediate group creation */
- status = H5Pset_create_intermediate_group(create_id, TRUE);
+ status = H5Pset_create_intermediate_group(create_id, true);
CHECK(status, FAIL, "H5Pset_create_intermediate_group");
status = H5Lcopy(file_id, "/A/B01/grp", file_id, "/A/B16/grp", create_id, access_id);
CHECK(status, FAIL, "H5Lcopy");
tri_status = H5Lexists(file_id, "/A/B16/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
tri_status = H5Lexists(file_id, "/A/B01/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
/**********************************************************************
* test H5Lmove()
@@ -4372,10 +4371,10 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lmove");
tri_status = H5Lexists(file_id, "/A/B17/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
tri_status = H5Lexists(file_id, "/A/B16/grp", access_id);
- VERIFY(tri_status, FALSE, "H5Lexists");
+ VERIFY(tri_status, false, "H5Lexists");
/**********************************************************************
* test H5Lcreate_hard()
@@ -4385,7 +4384,7 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lcreate_hard");
tri_status = H5Lexists(file_id, "/A/B18/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
/**********************************************************************
* test H5Lcreate_soft()
@@ -4395,7 +4394,7 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lcreate_soft");
tri_status = H5Lexists(file_id, "/A/B19/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
/**********************************************************************
* test H5Lcreate_external()
@@ -4405,7 +4404,7 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lcreate_external");
tri_status = H5Lexists(file_id, "/A/B20/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
/**********************************************************************
* test H5Lcreate_ud()
@@ -4416,7 +4415,7 @@ test_misc23(void)
CHECK(status, FAIL, "H5Lcreate_ud");
tri_status = H5Lexists(file_id, "/A/B21/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
+ VERIFY(tri_status, true, "H5Lexists");
/**********************************************************************
* close
@@ -4999,7 +4998,7 @@ test_misc25b(void)
hid_t fid; /* File ID */
hid_t gid; /* Group ID */
const char *testfile = H5_get_srcdir_filename(MISC25B_FILE); /* Corrected test file name */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -5260,7 +5259,7 @@ test_misc27(void)
hid_t fid; /* File ID */
hid_t gid; /* Group ID */
const char *testfile = H5_get_srcdir_filename(MISC27_FILE); /* Corrected test file name */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -5483,9 +5482,9 @@ test_misc28(void)
static void
test_misc29(void)
{
- hbool_t driver_is_default_compatible;
- hid_t fid; /* File ID */
- herr_t ret; /* Generic return value */
+ bool driver_is_default_compatible;
+ hid_t fid; /* File ID */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Speculative metadata reads\n"));
@@ -5546,7 +5545,7 @@ test_misc30(void)
/* Output message about test being performed */
MESSAGE(5, ("Local heap dropping free block info\n"));
- for (get_info = FALSE; get_info <= TRUE; get_info++) {
+ for (get_info = false; get_info <= true; get_info++) {
hid_t fid; /* File ID */
hid_t gid; /* Group ID */
int i; /* Local index counter */
@@ -5573,7 +5572,7 @@ test_misc30(void)
CHECK(ret, FAIL, "test_misc30_get_info");
}
- HDsnprintf(gname, sizeof(gname), "/g0/group%d", i);
+ snprintf(gname, sizeof(gname), "/g0/group%d", i);
gid = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(gid, FAIL, "H5Gcreate2");
@@ -5726,15 +5725,15 @@ test_misc32(void)
/* Size zero returns NULL.
* Also checks that a size of zero and setting the buffer clear flag
- * to TRUE can be used together.
+ * to true can be used together.
*
* Note that we have asserts in the code, so only check when NDEBUG
* is defined.
*/
#ifdef NDEBUG
- buffer = H5allocate_memory(0, FALSE);
+ buffer = H5allocate_memory(0, false);
CHECK_PTR_NULL(buffer, "H5allocate_memory"); /*BAD*/
- buffer = H5allocate_memory(0, TRUE);
+ buffer = H5allocate_memory(0, true);
CHECK_PTR_NULL(buffer, "H5allocate_memory"); /*BAD*/
#endif /* NDEBUG */
@@ -5742,7 +5741,7 @@ test_misc32(void)
/* Size zero returns NULL. Valgrind will confirm buffer is freed. */
size = 1024;
- buffer = H5allocate_memory(size, TRUE);
+ buffer = H5allocate_memory(size, true);
resized = H5resize_memory(buffer, 0);
CHECK_PTR_NULL(resized, "H5resize_memory");
@@ -5772,10 +5771,10 @@ test_misc32(void)
static void
test_misc33(void)
{
- hid_t fid = -1; /* File ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
const char *testfile = H5_get_srcdir_filename(MISC33_FILE); /* Corrected test file name */
H5O_info2_t oinfo; /* Structure for object metadata information */
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -5955,15 +5954,15 @@ static int test_misc36_context;
static void
test_misc36_cb1(void *_ctx)
{
- int *ctx = (int *)_ctx; /* Set up context pointer */
- hbool_t is_terminating; /* Flag indicating the library is terminating */
- herr_t ret; /* Return value */
+ int *ctx = (int *)_ctx; /* Set up context pointer */
+ bool is_terminating; /* Flag indicating the library is terminating */
+ herr_t ret; /* Return value */
/* Check whether the library thinks it's terminating */
- is_terminating = FALSE;
+ is_terminating = false;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, TRUE, "H5is_library_terminating");
+ VERIFY(is_terminating, true, "H5is_library_terminating");
/* Verify correct ordering for 'atclose' callbacks */
if (0 != *ctx)
@@ -5976,15 +5975,15 @@ test_misc36_cb1(void *_ctx)
static void
test_misc36_cb2(void *_ctx)
{
- int *ctx = (int *)_ctx; /* Set up context pointer */
- hbool_t is_terminating; /* Flag indicating the library is terminating */
- herr_t ret; /* Return value */
+ int *ctx = (int *)_ctx; /* Set up context pointer */
+ bool is_terminating; /* Flag indicating the library is terminating */
+ herr_t ret; /* Return value */
/* Check whether the library thinks it's terminating */
- is_terminating = FALSE;
+ is_terminating = false;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, TRUE, "H5is_library_terminating");
+ VERIFY(is_terminating, true, "H5is_library_terminating");
/* Verify correct ordering for 'atclose' callbacks */
if (1 != *ctx)
@@ -6002,27 +6001,27 @@ test_misc36_cb2(void *_ctx)
static void
test_misc36(void)
{
- hbool_t is_terminating; /* Flag indicating the library is terminating */
- herr_t ret; /* Return value */
+ bool is_terminating; /* Flag indicating the library is terminating */
+ herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("H5atclose and H5is_library_terminating API calls"));
/* Check whether the library thinks it's terminating */
- is_terminating = TRUE;
+ is_terminating = true;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, FALSE, "H5is_library_terminating");
+ VERIFY(is_terminating, false, "H5is_library_terminating");
/* Shut the library down */
test_misc36_context = 0;
H5close();
/* Check whether the library thinks it's terminating */
- is_terminating = TRUE;
+ is_terminating = true;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, FALSE, "H5is_library_terminating");
+ VERIFY(is_terminating, false, "H5is_library_terminating");
/* Check the close context was not changed */
VERIFY(test_misc36_context, 0, "H5atclose");
@@ -6031,10 +6030,10 @@ test_misc36(void)
H5open();
/* Check whether the library thinks it's terminating */
- is_terminating = TRUE;
+ is_terminating = true;
ret = H5is_library_terminating(&is_terminating);
CHECK(ret, FAIL, "H5is_library_terminating");
- VERIFY(is_terminating, FALSE, "H5is_library_terminating");
+ VERIFY(is_terminating, false, "H5is_library_terminating");
/* Register the 'atclose' callbacks */
/* (Note that these will be called in reverse order, which is checked) */
@@ -6073,7 +6072,7 @@ static void
test_misc37(void)
{
const char *testfile = H5_get_srcdir_filename(CVE_2020_10812_FILENAME);
- hbool_t driver_is_default_compatible;
+ bool driver_is_default_compatible;
hid_t fid;
herr_t ret;
@@ -6110,7 +6109,7 @@ test_misc37(void)
void
test_misc(void)
{
- hbool_t default_driver = h5_using_default_driver(NULL);
+ bool default_driver = h5_using_default_driver(NULL);
/* Output message about test being performed */
MESSAGE(5, ("Testing Miscellaneous Routines\n"));
diff --git a/test/trefer.c b/test/trefer.c
index 577fc69..f17e114 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -1305,7 +1305,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
H5E_END_TRY
if (dset1 < 0) {
- VERIFY(libver_high <= H5F_LIBVER_V110, TRUE, "H5Dcreate2");
+ VERIFY(libver_high <= H5F_LIBVER_V110, true, "H5Dcreate2");
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
@@ -1603,7 +1603,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(hssize_ret, (hssize_t)H5S_UNLIMITED, "H5Sget_select_npoints");
tri_ret = H5Sis_regular_hyperslab(sid2);
CHECK(tri_ret, FAIL, "H5Sis_regular_hyperslab");
- VERIFY(tri_ret, TRUE, "H5Sis_regular_hyperslab Result");
+ VERIFY(tri_ret, true, "H5Sis_regular_hyperslab Result");
ret = H5Sget_regular_hyperslab(sid2, start, stride, count, block);
CHECK(ret, FAIL, "H5Sget_regular_hyperslab");
VERIFY(start[0], (hsize_t)1, "Hyperslab Coordinates");
@@ -1762,7 +1762,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
if (dset1 < 0) {
- VERIFY(libver_high <= H5F_LIBVER_V110, TRUE, "H5Dcreate2");
+ VERIFY(libver_high <= H5F_LIBVER_V110, true, "H5Dcreate2");
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
@@ -2121,19 +2121,19 @@ test_deref_iter_op(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2
/* Simple check for correct names */
if (*count == 0) {
- if (HDstrcmp(name, DSETNAME2) == 0)
+ if (strcmp(name, DSETNAME2) == 0)
ret_value = 0;
else
ret_value = -1;
} /* end if */
else if (*count == 1) {
- if (HDstrcmp(name, GROUPNAME2) == 0)
+ if (strcmp(name, GROUPNAME2) == 0)
ret_value = 0;
else
ret_value = -1;
} /* end if */
else if (*count == 2) {
- if (HDstrcmp(name, GROUPNAME3) == 0)
+ if (strcmp(name, GROUPNAME3) == 0)
ret_value = 0;
else
ret_value = -1;
@@ -2155,17 +2155,17 @@ test_deref_iter_op(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2
static void
test_reference_group(void)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t did; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- H5R_ref_t wref; /* Reference to write */
- H5R_ref_t rref; /* Reference to read */
- H5G_info_t ginfo; /* Group info struct */
- char objname[NAME_SIZE]; /* Buffer to store name */
- H5O_info2_t oinfo; /* Object info struct */
- int count = 0; /* Count within iterated group */
- ssize_t size; /* Name length */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t did; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ H5R_ref_t wref; /* Reference to write */
+ H5R_ref_t rref; /* Reference to read */
+ H5G_info_t ginfo; /* Group info struct */
+ char objname[NAME_SIZE]; /* Buffer to store name */
+ H5O_info2_t oinfo; /* Object info struct */
+ int count = 0; /* Count within iterated group */
+ ssize_t size; /* Name length */
herr_t ret;
/* Create file with a group and a dataset containing an object reference to the group */
@@ -3564,7 +3564,7 @@ test_reference(void)
MESSAGE(5, ("Testing References\n"));
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -3588,7 +3588,7 @@ test_reference(void)
} /* end low bound */
/* The following test is currently broken with the Direct VFD */
- if (HDstrcmp(env_h5_drvr, "direct") != 0) {
+ if (strcmp(env_h5_drvr, "direct") != 0) {
test_reference_obj_deleted(); /* Test H5R object reference code for deleted objects */
}
diff --git a/test/trefer_deprec.c b/test/trefer_deprec.c
index 209708b..5bb1f13 100644
--- a/test/trefer_deprec.c
+++ b/test/trefer_deprec.c
@@ -166,25 +166,25 @@ test_reference_params(void)
CHECK(ret, FAIL, "H5Dcreate2");
/* Test parameters to H5Rcreate */
- ret = H5Rcreate(NULL, fid1, "/Group1/Dataset1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(NULL, fid1, "/Group1/Dataset1", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
VERIFY(ret, FAIL, "H5Rcreate ref");
- ret = H5Rcreate(&wbuf[0], (hid_t)-1, "/Group1/Dataset1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf[0], (hid_t)H5I_INVALID_HID, "/Group1/Dataset1", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
VERIFY(ret, FAIL, "H5Rcreate loc_id");
- ret = H5Rcreate(&wbuf[0], fid1, NULL, H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf[0], fid1, NULL, H5R_OBJECT, (hid_t)H5I_INVALID_HID);
VERIFY(ret, FAIL, "H5Rcreate name");
- ret = H5Rcreate(&wbuf[0], fid1, "", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf[0], fid1, "", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
VERIFY(ret, FAIL, "H5Rcreate null name");
- ret = H5Rcreate(&wbuf[0], fid1, "/Group1/Dataset1", H5R_MAXTYPE, (hid_t)-1);
+ ret = H5Rcreate(&wbuf[0], fid1, "/Group1/Dataset1", H5R_MAXTYPE, (hid_t)H5I_INVALID_HID);
VERIFY(ret, FAIL, "H5Rcreate type");
- ret = H5Rcreate(&wbuf[0], fid1, "/Group1/Dataset1", H5R_DATASET_REGION, (hid_t)-1);
+ ret = H5Rcreate(&wbuf[0], fid1, "/Group1/Dataset1", H5R_DATASET_REGION, (hid_t)H5I_INVALID_HID);
VERIFY(ret, FAIL, "H5Rcreate region space");
ret = H5Rcreate(&wbuf[0], fid1, "/Group1/Dataset1", H5R_MAXTYPE, (hid_t)0);
VERIFY(ret, FAIL, "H5Rcreate space");
/* Test parameters to H5Rdereference */
- dset2 = H5Rdereference2((hid_t)-1, H5P_DEFAULT, H5R_OBJECT, &rbuf[0]);
+ dset2 = H5Rdereference2((hid_t)H5I_INVALID_HID, H5P_DEFAULT, H5R_OBJECT, &rbuf[0]);
VERIFY(dset2, FAIL, "H5Rdereference2 loc_id");
- dset2 = H5Rdereference2(dataset, (hid_t)-1, H5R_OBJECT, &rbuf[0]);
+ dset2 = H5Rdereference2(dataset, (hid_t)H5I_INVALID_HID, H5R_OBJECT, &rbuf[0]);
VERIFY(dset2, FAIL, "H5Rdereference2 oapl_id");
dset2 = H5Rdereference2(dataset, dapl_id, H5R_OBJECT, NULL);
VERIFY(dset2, FAIL, "H5Rdereference2 ref");
@@ -192,7 +192,7 @@ test_reference_params(void)
VERIFY(dset2, FAIL, "H5Rdereference2 type");
/* Test parameters to H5Rget_obj_type2 */
- ret = H5Rget_obj_type2((hid_t)-1, H5R_OBJECT, &rbuf[0], NULL);
+ ret = H5Rget_obj_type2((hid_t)H5I_INVALID_HID, H5R_OBJECT, &rbuf[0], NULL);
VERIFY(ret, FAIL, "H5Rget_obj_type2 loc_id");
ret = H5Rget_obj_type2(fid1, H5R_OBJECT, NULL, NULL);
VERIFY(ret, FAIL, "H5Rget_obj_type2 ref");
@@ -200,7 +200,7 @@ test_reference_params(void)
VERIFY(ret, FAIL, "H5Rget_obj_type2 type");
/* Test parameters to H5Rget_name */
- name_size = H5Rget_name((hid_t)-1, H5R_DATASET_REGION, &rbuf[0], NULL, 0);
+ name_size = H5Rget_name((hid_t)H5I_INVALID_HID, H5R_DATASET_REGION, &rbuf[0], NULL, 0);
VERIFY(name_size, FAIL, "H5Rget_name loc_id");
name_size = H5Rget_name(fid1, H5R_DATASET_REGION, NULL, NULL, 0);
VERIFY(name_size, FAIL, "H5Rget_name ref");
@@ -208,7 +208,7 @@ test_reference_params(void)
VERIFY(name_size, FAIL, "H5Rget_name type");
/* Test parameters to H5Rget_region */
- ret_id = H5Rget_region((hid_t)-1, H5R_OBJECT, &rbuf[0]);
+ ret_id = H5Rget_region((hid_t)H5I_INVALID_HID, H5R_OBJECT, &rbuf[0]);
VERIFY(ret_id, FAIL, "H5Rget_region loc_id");
ret_id = H5Rget_region(fid1, H5R_OBJECT, NULL);
VERIFY(ret_id, FAIL, "H5Rget_region ref");
@@ -351,28 +351,28 @@ test_reference_obj(void)
CHECK(dataset, FAIL, "H5Dcreate2");
/* Create reference to dataset */
- ret = H5Rcreate(&wbuf[0], fid1, "/Group1/Dataset1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf[0], fid1, "/Group1/Dataset1", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
ret = H5Rget_obj_type2(dataset, H5R_OBJECT, &wbuf[0], &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type2");
VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type2");
/* Create reference to dataset */
- ret = H5Rcreate(&wbuf[1], fid1, "/Group1/Dataset2", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf[1], fid1, "/Group1/Dataset2", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
ret = H5Rget_obj_type2(dataset, H5R_OBJECT, &wbuf[1], &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type2");
VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type2");
/* Create reference to group */
- ret = H5Rcreate(&wbuf[2], fid1, "/Group1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf[2], fid1, "/Group1", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
ret = H5Rget_obj_type2(dataset, H5R_OBJECT, &wbuf[2], &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type2");
VERIFY(obj_type, H5O_TYPE_GROUP, "H5Rget_obj_type2");
/* Create reference to named datatype */
- ret = H5Rcreate(&wbuf[3], fid1, "/Group1/Datatype1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf[3], fid1, "/Group1/Datatype1", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
ret = H5Rget_obj_type2(dataset, H5R_OBJECT, &wbuf[3], &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type2");
@@ -437,7 +437,7 @@ test_reference_obj(void)
CHECK(size, FAIL, "H5Oget_comment");
/* Check for correct comment value */
- if (HDstrcmp(write_comment, read_comment) != 0)
+ if (strcmp(write_comment, read_comment) != 0)
TestErrPrintf("Error! Incorrect group comment, wanted: %s, got: %s\n", write_comment, read_comment);
/* Close group */
@@ -504,13 +504,13 @@ test_reference_obj(void)
static void
test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t fapl = -1; /* File access property list */
- hid_t dset1, /* Dataset ID */
- dset2; /* Dereferenced dataset ID */
- hid_t sid1, /* Dataspace ID #1 */
- sid2; /* Dataspace ID #2 */
- hid_t dapl_id; /* Dataset access property list */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t dset1, /* Dataset ID */
+ dset2; /* Dereferenced dataset ID */
+ hid_t sid1, /* Dataspace ID #1 */
+ sid2; /* Dataspace ID #2 */
+ hid_t dapl_id; /* Dataset access property list */
hsize_t dims1[] = {SPACE1_DIM1}, dims2[] = {SPACE2_DIM1, SPACE2_DIM2};
hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
@@ -883,7 +883,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(hssize_ret, (hssize_t)H5S_UNLIMITED, "H5Sget_select_npoints");
tri_ret = H5Sis_regular_hyperslab(sid2);
CHECK(tri_ret, FAIL, "H5Sis_regular_hyperslab");
- VERIFY(tri_ret, TRUE, "H5Sis_regular_hyperslab Result");
+ VERIFY(tri_ret, true, "H5Sis_regular_hyperslab Result");
ret = H5Sget_regular_hyperslab(sid2, start, stride, count, block);
CHECK(ret, FAIL, "H5Sget_regular_hyperslab");
VERIFY(start[0], (hsize_t)1, "Hyperslab Coordinates");
@@ -950,13 +950,13 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
static void
test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t fapl = -1; /* File access property list */
- hid_t dset1, /* Dataset ID */
- dset3; /* Dereferenced dataset ID */
- hid_t sid1, /* Dataspace ID #1 */
- sid3; /* Dataspace ID #3 */
- hid_t dapl_id; /* Dataset access property list */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t dset1, /* Dataset ID */
+ dset3; /* Dereferenced dataset ID */
+ hid_t sid1, /* Dataspace ID #1 */
+ sid3; /* Dataspace ID #3 */
+ hid_t dapl_id; /* Dataset access property list */
hsize_t dims1[] = {SPACE1_DIM1}, dims3[] = {SPACE3_DIM1};
hsize_t start[SPACE3_RANK]; /* Starting location of hyperslab */
hsize_t stride[SPACE3_RANK]; /* Stride of hyperslab */
@@ -1279,7 +1279,7 @@ test_reference_obj_deleted(void)
CHECK(dataset, FAIL, "H5Dcreate2");
/* Create reference to dataset */
- ret = H5Rcreate(&oref, fid1, "/Dataset1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&oref, fid1, "/Dataset1", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
ret = H5Rget_obj_type2(dataset, H5R_OBJECT, &oref, &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type2");
@@ -1355,19 +1355,19 @@ test_deref_iter_op(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2
/* Simple check for correct names */
if (*count == 0) {
- if (HDstrcmp(name, DSETNAME2) == 0)
+ if (strcmp(name, DSETNAME2) == 0)
ret_value = 0;
else
ret_value = -1;
} /* end if */
else if (*count == 1) {
- if (HDstrcmp(name, GROUPNAME2) == 0)
+ if (strcmp(name, GROUPNAME2) == 0)
ret_value = 0;
else
ret_value = -1;
} /* end if */
else if (*count == 2) {
- if (HDstrcmp(name, GROUPNAME3) == 0)
+ if (strcmp(name, GROUPNAME3) == 0)
ret_value = 0;
else
ret_value = -1;
@@ -1389,17 +1389,17 @@ test_deref_iter_op(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2
static void
test_reference_group(void)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t did; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hobj_ref_t wref; /* Reference to write */
- hobj_ref_t rref; /* Reference to read */
- H5G_info_t ginfo; /* Group info struct */
- char objname[NAME_SIZE]; /* Buffer to store name */
- H5O_info2_t oinfo; /* Object info struct */
- int count = 0; /* Count within iterated group */
- ssize_t size; /* Name length */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t did; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hobj_ref_t wref; /* Reference to write */
+ hobj_ref_t rref; /* Reference to read */
+ H5G_info_t ginfo; /* Group info struct */
+ char objname[NAME_SIZE]; /* Buffer to store name */
+ H5O_info2_t oinfo; /* Object info struct */
+ int count = 0; /* Count within iterated group */
+ ssize_t size; /* Name length */
herr_t ret;
/* Create file with a group and a dataset containing an object reference to the group */
@@ -1439,7 +1439,7 @@ test_reference_group(void)
CHECK(did, FAIL, "H5Dcreate2");
/* Create reference to group */
- ret = H5Rcreate(&wref, fid, GROUPNAME, H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wref, fid, GROUPNAME, H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
/* Write reference to disk */
@@ -1607,19 +1607,19 @@ test_reference_compat(void)
CHECK(dataset, FAIL, "H5Dcreate2");
/* Create reference to dataset */
- ret = H5Rcreate(&wbuf_obj[0], fid1, "/Group1/Dataset1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf_obj[0], fid1, "/Group1/Dataset1", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
/* Create reference to dataset */
- ret = H5Rcreate(&wbuf_obj[1], fid1, "/Group1/Dataset2", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf_obj[1], fid1, "/Group1/Dataset2", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
/* Create reference to group */
- ret = H5Rcreate(&wbuf_obj[2], fid1, "/Group1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf_obj[2], fid1, "/Group1", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
/* Create reference to named datatype */
- ret = H5Rcreate(&wbuf_obj[3], fid1, "/Group1/Datatype1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf_obj[3], fid1, "/Group1/Datatype1", H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
/* Write references to disk */
diff --git a/test/trefstr.c b/test/trefstr.c
index 1895fb6..cd7ddcb 100644
--- a/test/trefstr.c
+++ b/test/trefstr.c
@@ -235,7 +235,7 @@ test_refstr_wrap(void)
MESSAGE(5, ("Testing Wrapping Ref-Counted Strings\n"));
/* Initialize buffer */
- HDstrcpy(buf, "foo");
+ strcpy(buf, "foo");
/* Wrap ref-counted string around existing buffer */
rs = H5RS_wrap(buf);
@@ -245,8 +245,8 @@ test_refstr_wrap(void)
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
CHECK_PTR_EQ(s, buf, "wrapping");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Increment reference count (should duplicate string) */
ret = H5RS_incr(rs);
@@ -261,7 +261,7 @@ test_refstr_wrap(void)
if (s == buf)
TestErrPrintf("%d: Should not have gotten the same pointer from reference-counted string!\n",
__LINE__);
- cmp = HDstrcmp(s, buf);
+ cmp = strcmp(s, buf);
if (cmp <= 0)
TestErrPrintf("%d: string comparison incorrect!\n", __LINE__);
@@ -302,9 +302,9 @@ test_refstr_asprintf_cat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDsnprintf(buf, sizeof(buf), "%d-%s", (int)10, "foo");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ snprintf(buf, sizeof(buf), "%d-%s", (int)10, "foo");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Append more output to ref-counted string */
ret = H5RS_asprintf_cat(rs, "-%f", (double)20.0);
@@ -313,9 +313,9 @@ test_refstr_asprintf_cat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDsnprintf(buf, sizeof(buf), "%d-%s-%f", (int)10, "foo", (double)20.0);
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ snprintf(buf, sizeof(buf), "%d-%s-%f", (int)10, "foo", (double)20.0);
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Decrement reference count for string */
ret = H5RS_decr(rs);
@@ -353,9 +353,9 @@ test_refstr_acat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDsnprintf(buf, sizeof(buf), "%s", "foo");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ snprintf(buf, sizeof(buf), "%s", "foo");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Append another string to ref-counted string */
ret = H5RS_acat(rs, "bar");
@@ -364,9 +364,9 @@ test_refstr_acat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDsnprintf(buf, sizeof(buf), "%s", "foobar");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ snprintf(buf, sizeof(buf), "%s", "foobar");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Append a large string to ref-counted string */
large_str = malloc(1024);
@@ -379,14 +379,14 @@ test_refstr_acat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDsnprintf(buf, sizeof(buf), "%s", "foobar");
+ snprintf(buf, sizeof(buf), "%s", "foobar");
large_str2 = malloc(1024 + 6);
CHECK_PTR(large_str2, "malloc");
- HDstrcpy(large_str2, "foobar");
+ strcpy(large_str2, "foobar");
memset(&large_str2[6], 'a', 1024);
large_str2[1029] = '\0';
- cmp = HDstrcmp(s, large_str2);
- VERIFY(cmp, 0, "HDstrcmp");
+ cmp = strcmp(s, large_str2);
+ VERIFY(cmp, 0, "strcmp");
/* Decrement reference count for string */
ret = H5RS_decr(rs);
@@ -426,9 +426,9 @@ test_refstr_ancat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDstrcpy(buf, "fo");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ strcpy(buf, "fo");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Append another string to ref-counted string */
ret = H5RS_ancat(rs, "bar", 2);
@@ -437,9 +437,9 @@ test_refstr_ancat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDstrcpy(buf, "foba");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ strcpy(buf, "foba");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Decrement reference count for string */
ret = H5RS_decr(rs);
@@ -475,9 +475,9 @@ test_refstr_aputc(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDstrcpy(buf, "f");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ strcpy(buf, "f");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Append another character to ref-counted string */
ret = H5RS_aputc(rs, 'o');
@@ -486,9 +486,9 @@ test_refstr_aputc(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDstrcpy(buf, "fo");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ strcpy(buf, "fo");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Decrement reference count for string */
ret = H5RS_decr(rs);
diff --git a/test/tselect.c b/test/tselect.c
index 3c6f4bb..55599b3 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -1882,13 +1882,13 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t H5_ATTR
uint16_t expected_value; /* Expected value in dataset */
unsigned i, j, k, l, m; /* Local index variables */
size_t s; /* Local index variable */
- hbool_t mis_match; /* Flag to indicate mismatch in expected value */
+ bool mis_match; /* Flag to indicate mismatch in expected value */
assert(cube_buf);
assert(cube_size > 0);
expected_value = 0;
- mis_match = FALSE;
+ mis_match = false;
cube_ptr = cube_buf;
s = 0;
i = 0;
@@ -1906,7 +1906,7 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t H5_ATTR
/* Check for correct value */
if (*cube_ptr != expected_value)
- mis_match = TRUE;
+ mis_match = true;
/* Advance to next element */
cube_ptr++;
@@ -1940,7 +1940,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
unsigned edge_size, unsigned chunk_edge_size, unsigned small_rank,
unsigned large_rank, hid_t dset_type, hid_t xfer_plist)
{
- hbool_t mis_match; /* Flag indicating a value read in wasn't what was expected */
+ bool mis_match; /* Flag indicating a value read in wasn't what was expected */
hid_t fapl; /* File access property list */
hid_t fid1; /* File ID */
hid_t small_cube_sid; /* Dataspace ID for small cube in memory & file */
@@ -2011,7 +2011,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
CHECK(fapl, FAIL, "H5Pcreate");
/* Use the 'core' VFD for this test */
- ret = H5Pset_fapl_core(fapl, (size_t)(1024 * 1024), FALSE);
+ ret = H5Pset_fapl_core(fapl, (size_t)(1024 * 1024), false);
CHECK(ret, FAIL, "H5Pset_fapl_core");
/* Create file */
@@ -2158,7 +2158,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
* selections as having the same shape.
*/
check = H5Sselect_shape_same(small_cube_sid, file_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Read selection from disk */
ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid, file_large_cube_sid,
@@ -2166,14 +2166,14 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
CHECK(ret, FAIL, "H5Dread");
/* verify that expected data is retrieved */
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = small_cube_buf_1;
expected_value = (uint16_t)((u * edge_size * edge_size * edge_size * edge_size) +
(v * edge_size * edge_size * edge_size) +
(w * edge_size * edge_size) + (x * edge_size));
for (s = 0; s < small_cube_size; s++) {
if (*ptr_1 != expected_value)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
expected_value++;
} /* end for */
@@ -2223,7 +2223,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
* selections as having the same shape.
*/
check = H5Sselect_shape_same(small_cube_sid, mem_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Read selection from disk */
ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid, small_cube_sid,
@@ -2241,23 +2241,23 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
assert(start_index < stop_index);
assert(stop_index <= large_cube_size);
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = large_cube_buf_1;
expected_value = 0;
for (s = 0; s < start_index; s++) {
if (*ptr_1 != 0)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
} /* end for */
for (; s <= stop_index; s++) {
if (*ptr_1 != expected_value)
- mis_match = TRUE;
+ mis_match = true;
expected_value++;
ptr_1++;
} /* end for */
for (; s < large_cube_size; s++) {
if (*ptr_1 != 0)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
} /* end for */
if (mis_match)
@@ -2322,7 +2322,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
* on disk full small cube selections as having the same shape.
*/
check = H5Sselect_shape_same(small_cube_sid, mem_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* write the slice from the in memory large cube to the on disk small cube */
ret = H5Dwrite(small_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid, small_cube_sid,
@@ -2335,14 +2335,14 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
CHECK(ret, FAIL, "H5Dread");
/* verify that expected data is retrieved */
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = small_cube_buf_1;
expected_value = (uint16_t)((u * edge_size * edge_size * edge_size * edge_size) +
(v * edge_size * edge_size * edge_size) +
(w * edge_size * edge_size) + (x * edge_size));
for (s = 0; s < small_cube_size; s++) {
if (*ptr_1 != expected_value)
- mis_match = TRUE;
+ mis_match = true;
expected_value++;
ptr_1++;
} /* end for */
@@ -2409,7 +2409,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
* as having the same shape.
*/
check = H5Sselect_shape_same(small_cube_sid, file_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* write the cube from memory to the target slice of the disk cube */
ret = H5Dwrite(large_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid, file_large_cube_sid,
@@ -2435,23 +2435,23 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co
assert(start_index < stop_index);
assert(stop_index <= large_cube_size);
- mis_match = FALSE;
+ mis_match = false;
ptr_1 = large_cube_buf_1;
expected_value = 0;
for (s = 0; s < start_index; s++) {
if (*ptr_1 != 0)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
} /* end for */
for (; s <= stop_index; s++) {
if (*ptr_1 != expected_value)
- mis_match = TRUE;
+ mis_match = true;
expected_value++;
ptr_1++;
} /* end for */
for (; s < large_cube_size; s++) {
if (*ptr_1 != 0)
- mis_match = TRUE;
+ mis_match = true;
ptr_1++;
} /* end for */
if (mis_match)
@@ -2584,7 +2584,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u
unsigned edge_size, unsigned checker_edge_size,
unsigned sel_rank, const hsize_t sel_start[])
{
- hbool_t first_selection = TRUE;
+ bool first_selection = true;
unsigned n_cube_offset;
unsigned sel_offset;
hsize_t base_count;
@@ -2719,7 +2719,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u
if (((i + j + k + l + m) % 2) == 0) {
if (first_selection) {
- first_selection = FALSE;
+ first_selection = false;
ret = H5Sselect_hyperslab(tgt_n_cube_sid, H5S_SELECT_SET,
&(start[n_cube_offset]), &(stride[n_cube_offset]),
@@ -2768,7 +2768,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u
** test_select_hyper_checker_board_dr__verify_data():
**
** Examine the supplied buffer to see if it contains the
-** expected data. Return TRUE if it does, and FALSE
+** expected data. Return true if it does, and false
** otherwise.
**
** The supplied buffer is presumed to contain the results
@@ -2805,14 +2805,14 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u
** a selected or an unselected checker.
**
****************************************************************/
-H5_ATTR_PURE static hbool_t
+H5_ATTR_PURE static bool
test_select_hyper_checker_board_dr__verify_data(uint16_t *buf_ptr, unsigned rank, unsigned edge_size,
unsigned checker_edge_size, uint16_t first_expected_val,
- hbool_t buf_starts_in_checker)
+ bool buf_starts_in_checker)
{
- hbool_t good_data = TRUE;
- hbool_t in_checker;
- hbool_t start_in_checker[5];
+ bool good_data = true;
+ bool in_checker;
+ bool start_in_checker[5];
uint16_t expected_value;
uint16_t *val_ptr;
unsigned i, j, k, l, m; /* to track position in n-cube */
@@ -2877,11 +2877,11 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t *buf_ptr, unsigned rank
if (in_checker) {
if (*val_ptr != expected_value)
- good_data = FALSE;
+ good_data = false;
} /* end if */
else {
if (*val_ptr != 0)
- good_data = FALSE;
+ good_data = false;
} /* end else */
val_ptr++;
@@ -2921,7 +2921,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
unsigned chunk_edge_size, unsigned small_rank,
unsigned large_rank, hid_t dset_type, hid_t xfer_plist)
{
- hbool_t data_ok;
+ bool data_ok;
hid_t fapl; /* File access property list */
hid_t fid; /* HDF5 File IDs */
hid_t full_small_cube_sid; /* Dataspace for small cube w/all selection */
@@ -2996,7 +2996,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
CHECK(fapl, FAIL, "H5Pcreate");
/* Use the 'core' VFD for this test */
- ret = H5Pset_fapl_core(fapl, (size_t)(1024 * 1024), FALSE);
+ ret = H5Pset_fapl_core(fapl, (size_t)(1024 * 1024), false);
CHECK(ret, FAIL, "H5Pset_fapl_core");
/* Create file */
@@ -3163,7 +3163,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(mem_small_cube_sid, file_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* zero the buffer that we will be using for reading */
memset(small_cube_buf_1, 0, sizeof(*small_cube_buf_1) * small_cube_size);
@@ -3179,7 +3179,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
data_ok = test_select_hyper_checker_board_dr__verify_data(small_cube_buf_1, small_rank,
edge_size, checker_edge_size,
- expected_value, (hbool_t)TRUE);
+ expected_value, (bool)true);
if (!data_ok)
TestErrPrintf("small cube read from largecube has bad data! Line=%d\n", __LINE__);
@@ -3243,7 +3243,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(file_small_cube_sid, mem_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* zero out the in memory large cube */
memset(large_cube_buf_1, 0, sizeof(*large_cube_buf_1) * large_cube_size);
@@ -3256,7 +3256,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the expected data and only the
* expected data was read.
*/
- data_ok = TRUE;
+ data_ok = true;
ptr_1 = large_cube_buf_1;
expected_value = 0;
start_index = (u * edge_size * edge_size * edge_size * edge_size) +
@@ -3270,13 +3270,13 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the large cube contains only zeros before the slice */
for (s = 0; s < start_index; s++) {
if (*ptr_1 != 0)
- data_ok = FALSE;
+ data_ok = false;
ptr_1++;
} /* end for */
assert(s == start_index);
data_ok &= test_select_hyper_checker_board_dr__verify_data(
- ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (hbool_t)TRUE);
+ ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (bool)true);
ptr_1 += small_cube_size;
s += small_cube_size;
@@ -3286,7 +3286,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the large cube contains only zeros after the slice */
for (s = stop_index + 1; s < large_cube_size; s++) {
if (*ptr_1 != 0)
- data_ok = FALSE;
+ data_ok = false;
ptr_1++;
} /* end for */
if (!data_ok)
@@ -3363,7 +3363,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(file_small_cube_sid, mem_large_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* write the slice from the in memory large cube to the
* on disk small cube
@@ -3386,7 +3386,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
data_ok = test_select_hyper_checker_board_dr__verify_data(small_cube_buf_1, small_rank,
edge_size, checker_edge_size,
- expected_value, (hbool_t)TRUE);
+ expected_value, (bool)true);
if (!data_ok)
TestErrPrintf("small cube read from largecube has bad data! Line=%d\n", __LINE__);
@@ -3458,7 +3458,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* selections as having the same shape.
*/
check = H5Sselect_shape_same(file_large_cube_sid, mem_small_cube_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* write the checker board selection of the in memory
* small cube to a slice through the on disk large
@@ -3480,7 +3480,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* expected data was written to the on disk large
* cube.
*/
- data_ok = TRUE;
+ data_ok = true;
ptr_1 = large_cube_buf_1;
expected_value = 0;
start_index = (u * edge_size * edge_size * edge_size * edge_size) +
@@ -3494,14 +3494,14 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the large cube contains only zeros before the slice */
for (s = 0; s < start_index; s++) {
if (*ptr_1 != 0)
- data_ok = FALSE;
+ data_ok = false;
ptr_1++;
} /* end for */
assert(s == start_index);
/* verify that the slice contains the expected data */
data_ok &= test_select_hyper_checker_board_dr__verify_data(
- ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (hbool_t)TRUE);
+ ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (bool)true);
ptr_1 += small_cube_size;
s += small_cube_size;
@@ -3511,7 +3511,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that the large cube contains only zeros after the slice */
for (s = stop_index + 1; s < large_cube_size; s++) {
if (*ptr_1 != 0)
- data_ok = FALSE;
+ data_ok = false;
ptr_1++;
} /* end for */
if (!data_ok)
@@ -4115,7 +4115,7 @@ test_select_hyper_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Check an invalid offset */
offset[0] = 10;
@@ -4124,7 +4124,7 @@ test_select_hyper_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
/* Reset offset */
offset[0] = 0;
@@ -4133,7 +4133,7 @@ test_select_hyper_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Select 15x26 hyperslab for memory dataset */
start[0] = 15;
@@ -4153,7 +4153,7 @@ test_select_hyper_offset(void)
ret = H5Soffset_simple(sid2, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid2);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Create a dataset */
dataset = H5Dcreate2(fid1, SPACE1_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -4284,7 +4284,7 @@ test_select_hyper_offset2(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Select 4x10 hyperslab for memory dataset */
start[0] = 1;
@@ -4300,7 +4300,7 @@ test_select_hyper_offset2(void)
ret = H5Soffset_simple(sid2, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid2);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Create a dataset */
dataset = H5Dcreate2(fid1, SPACE7_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -4441,7 +4441,7 @@ test_select_point_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Check an invalid offset */
offset[0] = 10;
@@ -4450,7 +4450,7 @@ test_select_point_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
/* Reset offset */
offset[0] = 0;
@@ -4459,7 +4459,7 @@ test_select_point_offset(void)
ret = H5Soffset_simple(sid1, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid1);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Select sequence of ten points for write dataset */
coord2[0][0] = 12;
@@ -4491,7 +4491,7 @@ test_select_point_offset(void)
ret = H5Soffset_simple(sid2, offset);
CHECK(ret, FAIL, "H5Soffset_simple");
valid = H5Sselect_valid(sid2);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
/* Create a dataset */
dataset = H5Dcreate2(fid1, SPACE1_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -5541,11 +5541,11 @@ test_select_hyper_union_3d(void)
static void
test_select_hyper_valid_combination(void)
{
- hid_t single_pt_sid; /* Dataspace ID with single point selection */
- hid_t single_hyper_sid; /* Dataspace ID with single block hyperslab selection */
- hid_t regular_hyper_sid; /* Dataspace ID with regular hyperslab selection */
- hid_t non_existent_sid = -1; /* A non-existent space id */
- hid_t tmp_sid; /* Temporary dataspace ID */
+ hid_t single_pt_sid; /* Dataspace ID with single point selection */
+ hid_t single_hyper_sid; /* Dataspace ID with single block hyperslab selection */
+ hid_t regular_hyper_sid; /* Dataspace ID with regular hyperslab selection */
+ hid_t non_existent_sid = H5I_INVALID_HID; /* A non-existent space id */
+ hid_t tmp_sid; /* Temporary dataspace ID */
hsize_t dims2D[] = {SPACE9_DIM1, SPACE9_DIM2};
hsize_t dims3D[] = {SPACE4_DIM1, SPACE4_DIM2, SPACE4_DIM3};
@@ -6974,13 +6974,13 @@ test_select_valid(void)
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
error = H5Sselect_hyperslab(sub_space, H5S_SELECT_OR, safe_start, NULL, safe_count, NULL);
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, TRUE, "H5Sselect_valid");
+ VERIFY(valid, true, "H5Sselect_valid");
error = H5Sclose(sub_space);
CHECK(error, FAIL, "H5Sclose");
@@ -6997,13 +6997,13 @@ test_select_valid(void)
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
error = H5Sselect_hyperslab(sub_space, H5S_SELECT_OR, safe_start, NULL, safe_count, NULL);
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
error = H5Sclose(sub_space);
CHECK(error, FAIL, "H5Sclose");
@@ -7020,13 +7020,13 @@ test_select_valid(void)
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
error = H5Sselect_hyperslab(sub_space, H5S_SELECT_OR, safe_start, NULL, safe_count, NULL);
CHECK(error, FAIL, "H5Sselect_hyperslab");
valid = H5Sselect_valid(sub_space);
- VERIFY(valid, FALSE, "H5Sselect_valid");
+ VERIFY(valid, false, "H5Sselect_valid");
error = H5Sclose(sub_space);
CHECK(error, FAIL, "H5Sclose");
@@ -8629,289 +8629,289 @@ test_shape_same(void)
/* Compare "all" selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(all_sid, all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(all_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "none" selection */
check = H5Sselect_shape_same(all_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(all_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(all_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(all_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(all_sid, single_hyper_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(all_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(all_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(all_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(all_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(all_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(all_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare "none" selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(none_sid, none_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(none_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(none_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(none_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(none_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(none_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(none_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(none_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(none_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(none_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(none_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(none_sid, none_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(none_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(none_sid, scalar_none_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare single point selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(single_pt_sid, single_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_pt_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(single_pt_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(single_pt_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(single_pt_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(single_pt_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, single_hyper_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, scalar_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(single_pt_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare multiple point selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(mult_pt_sid, mult_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(mult_pt_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(mult_pt_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(mult_pt_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(mult_pt_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(mult_pt_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(mult_pt_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare single "normal" hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(single_hyper_sid, single_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_hyper_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(single_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(single_hyper_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(single_hyper_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(single_hyper_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(single_hyper_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
#ifdef NOT_YET
/* In theory, these two selections are the same shape, but the
@@ -8938,7 +8938,7 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -8969,69 +8969,69 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare single "all" hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(single_hyper_all_sid, single_hyper_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_hyper_all_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(single_hyper_all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(single_hyper_all_sid, all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(single_hyper_all_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(single_hyper_all_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(single_hyper_all_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
#ifdef NOT_YET
/* In theory, these two selections are the same shape, but the
@@ -9057,7 +9057,7 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -9088,128 +9088,128 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_all_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare single "point" hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(single_hyper_pt_sid, single_hyper_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_hyper_pt_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(single_hyper_pt_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, single_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, scalar_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(single_hyper_pt_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare regular, strided hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(regular_hyper_sid, regular_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(regular_hyper_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(regular_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(regular_hyper_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(regular_hyper_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(regular_hyper_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(regular_hyper_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Construct point selection which matches regular, strided hyperslab selection */
/* Create dataspace for point selection */
@@ -9228,7 +9228,7 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -9258,7 +9258,7 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -9283,69 +9283,69 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(regular_hyper_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare irregular hyperslab selection to all the selections created */
/* Compare against itself */
check = H5Sselect_shape_same(irreg_hyper_sid, irreg_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(irreg_hyper_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(irreg_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(irreg_hyper_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(irreg_hyper_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(irreg_hyper_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(irreg_hyper_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Construct hyperslab selection which matches irregular hyperslab selection */
/* Create dataspace for hyperslab selection */
@@ -9379,138 +9379,138 @@ test_shape_same(void)
/* Compare against hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(irreg_hyper_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare scalar "all" dataspace with all selections created */
/* Compare against itself */
check = H5Sselect_shape_same(scalar_all_sid, scalar_all_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(scalar_all_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(scalar_all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(scalar_all_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(scalar_all_sid, none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(scalar_all_sid, single_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(scalar_all_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, single_hyper_pt_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against scalar "none" hyperslab selection */
check = H5Sselect_shape_same(scalar_all_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare scalar "none" dataspace with all selections created */
/* Compare against itself */
check = H5Sselect_shape_same(scalar_none_sid, scalar_none_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against copy of itself */
tmp_sid = H5Scopy(scalar_none_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5Sselect_shape_same(scalar_none_sid, tmp_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
check = H5Sselect_shape_same(scalar_none_sid, all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "none" selection */
check = H5Sselect_shape_same(scalar_none_sid, none_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against single point selection */
check = H5Sselect_shape_same(scalar_none_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against multiple point selection */
check = H5Sselect_shape_same(scalar_none_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "plain" single hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "all" single hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "single point" single hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against regular, strided hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against irregular hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "no" hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, none_hyper_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Compare against scalar "all" hyperslab selection */
check = H5Sselect_shape_same(scalar_none_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(all_sid);
@@ -9552,16 +9552,16 @@ test_shape_same(void)
** xz plane, and three parallel to the yz plane.
**
** Assuming that z is the fastest changing dimension,
-** H5Sselect_shape_same() should return TRUE when comparing
+** H5Sselect_shape_same() should return true when comparing
** the full 2-D space against any hyperslab parallel to the
-** yz plane in the 3-D space, and FALSE when comparing the
+** yz plane in the 3-D space, and false when comparing the
** full 2-D space against the other two hyperslabs.
**
** Also create two additional 3-D dataspaces (10 X 10 X 10),
** and select a (10 X 10 X 2) hyperslab parallel to the yz
** axis in one of them, and two parallel (10 X 10 X 1) hyper
** slabs parallel to the yz axis in the other.
-** H5Sselect_shape_same() should return FALSE when comparing
+** H5Sselect_shape_same() should return false when comparing
** each to the 2-D selection.
**
****************************************************************/
@@ -9736,39 +9736,39 @@ test_shape_same_dr__smoke_check_1(void)
/* Compare against "xy" selection */
check = H5Sselect_shape_same(small_cube_xy_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "xz" selection */
check = H5Sselect_shape_same(small_cube_xz_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "yz" selection */
check = H5Sselect_shape_same(small_cube_yz_slice_0_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_1_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_2_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_3_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_4_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(small_square_sid);
@@ -9837,17 +9837,17 @@ test_shape_same_dr__smoke_check_1(void)
** to the yz plane.
**
** Assuming that z is the fastest changing dimension,
-** H5Sselect_shape_same() should return TRUE when comparing
+** H5Sselect_shape_same() should return true when comparing
** the 2-D space checker board selection against a checker
** board hyperslab parallel to the yz plane in the 3-D
-** space, and FALSE when comparing the 2-D checkerboard
+** space, and false when comparing the 2-D checkerboard
** selection against two hyperslabs parallel to the xy
** or xz planes.
**
** Also create an additional 3-D dataspaces (10 X 10 X 10),
** and select a checker board parallel with the yz axis,
** save with some squares being on different planes.
-** H5Sselect_shape_same() should return FALSE when
+** H5Sselect_shape_same() should return false when
** comparing this selection to the 2-D selection.
**
****************************************************************/
@@ -10113,36 +10113,36 @@ test_shape_same_dr__smoke_check_2(void)
/* Compare against "xy" selection */
check = H5Sselect_shape_same(small_cube_xy_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "xz" selection */
check = H5Sselect_shape_same(small_cube_xz_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "yz" selection */
check = H5Sselect_shape_same(small_cube_yz_slice_0_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_1_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_2_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_3_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(small_square_sid);
@@ -10211,10 +10211,10 @@ test_shape_same_dr__smoke_check_2(void)
** cases.
**
** Assuming that z is the fastest changing dimension,
-** H5Sselect_shape_same() should return TRUE when
+** H5Sselect_shape_same() should return true when
** comparing the 2-D irregular hyperslab selection
** against the irregular hyperslab selections parallel
-** to the yz plane in the 3-D space, and FALSE when
+** to the yz plane in the 3-D space, and false when
** comparing it against the irregular hyperslabs
** selections parallel to the xy or xz planes.
**
@@ -10594,33 +10594,33 @@ test_shape_same_dr__smoke_check_3(void)
/* Compare against "xy" selection */
check = H5Sselect_shape_same(small_cube_xy_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xy_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "xz" selection */
check = H5Sselect_shape_same(small_cube_xz_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_xz_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Compare against "yz" selection */
check = H5Sselect_shape_same(small_cube_yz_slice_0_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_1_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(small_cube_yz_slice_2_sid, small_square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(small_square_sid);
@@ -10680,8 +10680,8 @@ test_shape_same_dr__smoke_check_3(void)
**
** Compare the 2-D space against all the other spaces
** with H5Sselect_shape_same(). The (1 X 10 X 10) &
-** (1 X 1 X 10 X 10) should return TRUE. All others
-** should return FALSE.
+** (1 X 1 X 10 X 10) should return true. All others
+** should return false.
**
****************************************************************/
static void
@@ -10796,37 +10796,37 @@ test_shape_same_dr__smoke_check_4(void)
/* setup is done -- run the tests: */
check = H5Sselect_shape_same(three_d_space_0_sid, square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(three_d_space_1_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(three_d_space_2_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(three_d_space_3_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_0_sid, square_sid);
- VERIFY(check, TRUE, "H5Sselect_shape_same");
+ VERIFY(check, true, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_1_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_2_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_3_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_4_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_5_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
check = H5Sselect_shape_same(four_d_space_6_sid, square_sid);
- VERIFY(check, FALSE, "H5Sselect_shape_same");
+ VERIFY(check, false, "H5Sselect_shape_same");
/* Close dataspaces */
ret = H5Sclose(square_sid);
@@ -10873,7 +10873,7 @@ test_shape_same_dr__smoke_check_4(void)
** of an m-cube (m > n) in a call to H5Sselect_shape_same().
** Note that this test does not require the n-cube and the
** n-dimensional slice to have the same rank (although
-** H5Sselect_shape_same() should always return FALSE if
+** H5Sselect_shape_same() should always return false if
** they don't).
**
** Per Quincey's suggestion, only test up to 5 dimensional
@@ -10882,7 +10882,7 @@ test_shape_same_dr__smoke_check_4(void)
****************************************************************/
static void
test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_rank, int offset,
- hsize_t edge_size, hbool_t dim_selected[], hbool_t expected_result)
+ hsize_t edge_size, bool dim_selected[], bool expected_result)
{
char test_desc_0[128];
char test_desc_1[256];
@@ -10909,15 +10909,13 @@ test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_
assert(edge_size > 0);
assert(edge_size <= 1000);
- HDsnprintf(test_desc_0, sizeof(test_desc_0), "\tn-cube slice through m-cube (n <= m) test %d.\n",
- test_num);
+ snprintf(test_desc_0, sizeof(test_desc_0), "\tn-cube slice through m-cube (n <= m) test %d.\n", test_num);
MESSAGE(7, ("%s", test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- HDsnprintf(test_desc_1, sizeof(test_desc_1),
- "\t\tranks: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d.\n", small_rank, large_rank, offset,
- (int)dim_selected[0], (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3],
- (int)dim_selected[4]);
+ snprintf(test_desc_1, sizeof(test_desc_1), "\t\tranks: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d.\n",
+ small_rank, large_rank, offset, (int)dim_selected[0], (int)dim_selected[1], (int)dim_selected[2],
+ (int)dim_selected[3], (int)dim_selected[4]);
MESSAGE(7, ("%s", test_desc_1));
/* copy the edge size into the dims array */
@@ -11011,8 +11009,8 @@ test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_
static void
test_shape_same_dr__run_full_space_vs_slice_tests(void)
{
- hbool_t dim_selected[5];
- hbool_t expected_result;
+ bool dim_selected[5];
+ bool expected_result;
int i, j;
int v, w, x, y, z;
int test_num = 0;
@@ -11025,52 +11023,52 @@ test_shape_same_dr__run_full_space_vs_slice_tests(void)
v = 0;
do {
if (v == 0)
- dim_selected[0] = FALSE;
+ dim_selected[0] = false;
else
- dim_selected[0] = TRUE;
+ dim_selected[0] = true;
w = 0;
do {
if (w == 0)
- dim_selected[1] = FALSE;
+ dim_selected[1] = false;
else
- dim_selected[1] = TRUE;
+ dim_selected[1] = true;
x = 0;
do {
if (x == 0)
- dim_selected[2] = FALSE;
+ dim_selected[2] = false;
else
- dim_selected[2] = TRUE;
+ dim_selected[2] = true;
y = 0;
do {
if (y == 0)
- dim_selected[3] = FALSE;
+ dim_selected[3] = false;
else
- dim_selected[3] = TRUE;
+ dim_selected[3] = true;
z = 0;
do {
if (z == 0)
- dim_selected[4] = FALSE;
+ dim_selected[4] = false;
else
- dim_selected[4] = TRUE;
+ dim_selected[4] = true;
/* compute the expected result: */
i = 0;
j = 4;
- expected_result = TRUE;
+ expected_result = true;
while ((i < small_rank) && expected_result) {
if (!dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
}
while ((i < large_rank) && expected_result) {
if (dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
}
@@ -11116,7 +11114,7 @@ test_shape_same_dr__run_full_space_vs_slice_tests(void)
**
** Note that this test does not require the n-cube and the
** n-dimensional slice to have the same rank (although
-** H5Sselect_shape_same() should always return FALSE if
+** H5Sselect_shape_same() should always return false if
** they don't).
**
** Per Quincey's suggestion, only test up to 5 dimensional
@@ -11125,7 +11123,7 @@ test_shape_same_dr__run_full_space_vs_slice_tests(void)
****************************************************************/
static void
test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, int offset, hsize_t edge_size,
- hsize_t checker_size, hbool_t dim_selected[], hbool_t expected_result)
+ hsize_t checker_size, bool dim_selected[], bool expected_result)
{
char test_desc_0[128];
char test_desc_1[256];
@@ -11163,22 +11161,22 @@ test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, i
assert(offset < (int)edge_size);
for (i = SS_DR_MAX_RANK - large_rank; i < SS_DR_MAX_RANK; i++)
- if (dim_selected[i] == TRUE)
+ if (dim_selected[i] == true)
dims_selected++;
assert(dims_selected >= 0);
assert(dims_selected <= large_rank);
- HDsnprintf(test_desc_0, sizeof(test_desc_0),
- "\tcheckerboard n-cube slice through m-cube (n <= m) test %d.\n", test_num);
+ snprintf(test_desc_0, sizeof(test_desc_0),
+ "\tcheckerboard n-cube slice through m-cube (n <= m) test %d.\n", test_num);
MESSAGE(7, ("%s", test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- HDsnprintf(test_desc_1, sizeof(test_desc_1),
- "\tranks: %d/%d edge/chkr size: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d:%d.\n",
- small_rank, large_rank, (int)edge_size, (int)checker_size, offset, (int)dim_selected[0],
- (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4],
- dims_selected);
+ snprintf(test_desc_1, sizeof(test_desc_1),
+ "\tranks: %d/%d edge/chkr size: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d:%d.\n", small_rank,
+ large_rank, (int)edge_size, (int)checker_size, offset, (int)dim_selected[0],
+ (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4],
+ dims_selected);
MESSAGE(7, ("%s", test_desc_1));
/* copy the edge size into the dims array */
@@ -11450,65 +11448,65 @@ test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, i
static void
test_shape_same_dr__run_checkerboard_tests(void)
{
- hbool_t dim_selected[5];
- hbool_t expected_result;
- int i, j;
- int v, w, x, y, z;
- int test_num = 0;
- int small_rank;
- int large_rank;
+ bool dim_selected[5];
+ bool expected_result;
+ int i, j;
+ int v, w, x, y, z;
+ int test_num = 0;
+ int small_rank;
+ int large_rank;
for (large_rank = 1; large_rank <= 5; large_rank++) {
for (small_rank = 1; small_rank <= large_rank; small_rank++) {
v = 0;
do {
if (v == 0)
- dim_selected[0] = FALSE;
+ dim_selected[0] = false;
else
- dim_selected[0] = TRUE;
+ dim_selected[0] = true;
w = 0;
do {
if (w == 0)
- dim_selected[1] = FALSE;
+ dim_selected[1] = false;
else
- dim_selected[1] = TRUE;
+ dim_selected[1] = true;
x = 0;
do {
if (x == 0)
- dim_selected[2] = FALSE;
+ dim_selected[2] = false;
else
- dim_selected[2] = TRUE;
+ dim_selected[2] = true;
y = 0;
do {
if (y == 0)
- dim_selected[3] = FALSE;
+ dim_selected[3] = false;
else
- dim_selected[3] = TRUE;
+ dim_selected[3] = true;
z = 0;
do {
if (z == 0)
- dim_selected[4] = FALSE;
+ dim_selected[4] = false;
else
- dim_selected[4] = TRUE;
+ dim_selected[4] = true;
/* compute the expected result: */
i = 0;
j = 4;
- expected_result = TRUE;
+ expected_result = true;
while ((i < small_rank) && expected_result) {
if (!dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
} /* end while */
while ((i < large_rank) && expected_result) {
if (dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
} /* end while */
@@ -11628,13 +11626,13 @@ test_shape_same_dr__run_checkerboard_tests(void)
**
** Note that this test does not require the n-cube and the
** n-dimensional slice to have the same rank (although
-** H5Sselect_shape_same() should always return FALSE if
+** H5Sselect_shape_same() should always return false if
** they don't).
**
****************************************************************/
static void
test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int pattern_offset,
- int slice_offset, hbool_t dim_selected[], hbool_t expected_result)
+ int slice_offset, bool dim_selected[], bool expected_result)
{
char test_desc_0[128];
char test_desc_1[256];
@@ -11708,22 +11706,21 @@ test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int
assert(pattern_offset <= 2);
for (i = SS_DR_MAX_RANK - large_rank; i < SS_DR_MAX_RANK; i++)
- if (dim_selected[i] == TRUE)
+ if (dim_selected[i] == true)
dims_selected++;
assert(dims_selected >= 0);
assert(dims_selected <= large_rank);
- HDsnprintf(test_desc_0, sizeof(test_desc_0),
- "\tirregular sub set of n-cube slice through m-cube (n <= m) test %d.\n", test_num);
+ snprintf(test_desc_0, sizeof(test_desc_0),
+ "\tirregular sub set of n-cube slice through m-cube (n <= m) test %d.\n", test_num);
MESSAGE(7, ("%s", test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- HDsnprintf(test_desc_1, sizeof(test_desc_1),
- "\tranks: %d/%d edge: %d s/p offset: %d/%d dim_selected: %d/%d/%d/%d/%d:%d.\n", small_rank,
- large_rank, edge_size, slice_offset, pattern_offset, (int)dim_selected[0],
- (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4],
- dims_selected);
+ snprintf(test_desc_1, sizeof(test_desc_1),
+ "\tranks: %d/%d edge: %d s/p offset: %d/%d dim_selected: %d/%d/%d/%d/%d:%d.\n", small_rank,
+ large_rank, edge_size, slice_offset, pattern_offset, (int)dim_selected[0], (int)dim_selected[1],
+ (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4], dims_selected);
MESSAGE(7, ("%s", test_desc_1));
/* copy the edge size into the dims array */
@@ -11891,65 +11888,65 @@ test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int
static void
test_shape_same_dr__run_irregular_tests(void)
{
- hbool_t dim_selected[5];
- hbool_t expected_result;
- int i, j;
- int v, w, x, y, z;
- int test_num = 0;
- int small_rank;
- int large_rank;
+ bool dim_selected[5];
+ bool expected_result;
+ int i, j;
+ int v, w, x, y, z;
+ int test_num = 0;
+ int small_rank;
+ int large_rank;
for (large_rank = 1; large_rank <= 5; large_rank++) {
for (small_rank = 1; small_rank <= large_rank; small_rank++) {
v = 0;
do {
if (v == 0)
- dim_selected[0] = FALSE;
+ dim_selected[0] = false;
else
- dim_selected[0] = TRUE;
+ dim_selected[0] = true;
w = 0;
do {
if (w == 0)
- dim_selected[1] = FALSE;
+ dim_selected[1] = false;
else
- dim_selected[1] = TRUE;
+ dim_selected[1] = true;
x = 0;
do {
if (x == 0)
- dim_selected[2] = FALSE;
+ dim_selected[2] = false;
else
- dim_selected[2] = TRUE;
+ dim_selected[2] = true;
y = 0;
do {
if (y == 0)
- dim_selected[3] = FALSE;
+ dim_selected[3] = false;
else
- dim_selected[3] = TRUE;
+ dim_selected[3] = true;
z = 0;
do {
if (z == 0)
- dim_selected[4] = FALSE;
+ dim_selected[4] = false;
else
- dim_selected[4] = TRUE;
+ dim_selected[4] = true;
/* compute the expected result: */
i = 0;
j = 4;
- expected_result = TRUE;
+ expected_result = true;
while ((i < small_rank) && expected_result) {
if (!dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
} /* end while */
while ((i < large_rank) && expected_result) {
if (dim_selected[j])
- expected_result = FALSE;
+ expected_result = false;
i++;
j--;
} /* end while */
@@ -12142,9 +12139,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
}
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg1, sid_reg_ori1);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
/* For irregular hyperslab */
@@ -12229,9 +12226,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
} /* end if */
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg2, sid_reg_ori2);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
/* 2-D irregular case */
@@ -12326,9 +12323,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
}
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg3, sid_reg_ori3);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
sid_irreg3 = H5Screate_simple(SPACERE3_RANK, dims3, NULL);
@@ -12434,9 +12431,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
}
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg4, sid_reg_ori4);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
/* Testing irregular selection */
@@ -12558,9 +12555,9 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5S_hyper_rebuild");
}
if (ret != FAIL) {
- /* In this case, rebuild_check should be TRUE. */
+ /* In this case, rebuild_check should be true. */
rebuild_check = H5Sselect_shape_same(sid_reg5, sid_reg_ori5);
- CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
+ CHECK(rebuild_check, false, "H5Sselect_shape_same");
}
sid_irreg5 = H5Screate_simple(SPACERE5_RANK, dims5, NULL);
@@ -12622,7 +12619,7 @@ test_space_rebuild(void)
/* No need to do shape comparison */
/* We use 5-D to test a special case with
- rebuilding routine TRUE, FALSE and TRUE */
+ rebuilding routine true, false and true */
sid_spec = H5Screate_simple(SPACERE5_RANK, dims5, NULL);
/* Build up the original five dimensional regular selection */
@@ -14200,9 +14197,9 @@ test_hyper_regular(void)
ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* Query if 'hyperslab' selection is regular hyperslab (should be TRUE) */
+ /* Query if 'hyperslab' selection is regular hyperslab (should be true) */
is_regular = H5Sis_regular_hyperslab(sid);
- VERIFY(is_regular, TRUE, "H5Sis_regular_hyperslab");
+ VERIFY(is_regular, true, "H5Sis_regular_hyperslab");
/* Retrieve the hyperslab parameters */
ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block);
@@ -14230,9 +14227,9 @@ test_hyper_regular(void)
ret = H5Sselect_hyperslab(sid, H5S_SELECT_OR, t_start, NULL, t_count, NULL);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* Query if 'hyperslab' selection is regular hyperslab (should be FALSE) */
+ /* Query if 'hyperslab' selection is regular hyperslab (should be false) */
is_regular = H5Sis_regular_hyperslab(sid);
- VERIFY(is_regular, FALSE, "H5Sis_regular_hyperslab");
+ VERIFY(is_regular, false, "H5Sis_regular_hyperslab");
/* Query regular hyperslab selection info (should fail) */
H5E_BEGIN_TRY
@@ -14252,9 +14249,9 @@ test_hyper_regular(void)
ret = H5Sselect_hyperslab(sid, H5S_SELECT_XOR, t_start, NULL, t_count, NULL);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* Query if 'hyperslab' selection is regular hyperslab (should be TRUE) */
+ /* Query if 'hyperslab' selection is regular hyperslab (should be true) */
is_regular = H5Sis_regular_hyperslab(sid);
- VERIFY(is_regular, TRUE, "H5Sis_regular_hyperslab");
+ VERIFY(is_regular, true, "H5Sis_regular_hyperslab");
/* Retrieve the hyperslab parameters */
ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block);
@@ -14945,54 +14942,54 @@ test_internal_consistency(void)
CHECK(tmp_sid, FAIL, "H5Scopy");
check = H5S__internal_consistency_test(tmp_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Test "none" selection */
check = H5S__internal_consistency_test(none_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test single point selection */
check = H5S__internal_consistency_test(single_pt_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test multiple point selection */
check = H5S__internal_consistency_test(mult_pt_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test "plain" single hyperslab selection */
check = H5S__internal_consistency_test(single_hyper_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test "all" single hyperslab selection */
check = H5S__internal_consistency_test(single_hyper_all_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test "single point" single hyperslab selection */
check = H5S__internal_consistency_test(single_hyper_pt_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test regular, strided hyperslab selection */
check = H5S__internal_consistency_test(regular_hyper_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test irregular hyperslab selection */
check = H5S__internal_consistency_test(irreg_hyper_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test "no" hyperslab selection */
check = H5S__internal_consistency_test(none_hyper_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test scalar "all" hyperslab selection */
check = H5S__internal_consistency_test(scalar_all_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Test scalar "none" hyperslab selection */
check = H5S__internal_consistency_test(scalar_none_sid);
- VERIFY(check, TRUE, "H5S__internal_consistency_test");
+ VERIFY(check, true, "H5S__internal_consistency_test");
/* Close dataspaces */
ret = H5Sclose(all_sid);
@@ -15719,7 +15716,7 @@ test_select_intersect_block(void)
/* Test block intersection with 'none' selection (always false) */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* Set selection to 'all' */
ret = H5Sselect_all(sid);
@@ -15727,7 +15724,7 @@ test_select_intersect_block(void)
/* Test block intersection with 'all' selection (always true) */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
/* Select sequence of ten points */
coord[0][0] = 0;
@@ -15755,9 +15752,9 @@ test_select_intersect_block(void)
/* Test block intersection with 'point' selection */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
status = H5Sselect_intersect_block(sid, block_start, block_end4);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* Select single 4x6 hyperslab block at (2,1) */
start[0] = 2;
@@ -15773,9 +15770,9 @@ test_select_intersect_block(void)
/* Test block intersection with single 'hyperslab' selection */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
status = H5Sselect_intersect_block(sid, block_start, block_end4);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* 'OR' another hyperslab block in, making an irregular hyperslab selection */
start[0] = 3;
@@ -15791,9 +15788,9 @@ test_select_intersect_block(void)
/* Test block intersection with 'hyperslab' selection */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
status = H5Sselect_intersect_block(sid, block_start, block_end4);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* Select regular, strided hyperslab selection */
start[0] = 2;
@@ -15809,9 +15806,9 @@ test_select_intersect_block(void)
/* Test block intersection with single 'hyperslab' selection */
status = H5Sselect_intersect_block(sid, block_start, block_end);
- VERIFY(status, TRUE, "H5Sselect_intersect_block");
+ VERIFY(status, true, "H5Sselect_intersect_block");
status = H5Sselect_intersect_block(sid, block_start, block_end4);
- VERIFY(status, FALSE, "H5Sselect_intersect_block");
+ VERIFY(status, false, "H5Sselect_intersect_block");
/* Close dataspace */
ret = H5Sclose(sid);
@@ -16026,7 +16023,7 @@ test_h5s_set_extent_none(void)
null_sid = H5Screate(H5S_NULL);
CHECK(null_sid, H5I_INVALID_HID, "H5Screate");
equal = H5Sextent_equal(sid, null_sid);
- VERIFY(equal, TRUE, "H5Sextent_equal");
+ VERIFY(equal, true, "H5Sextent_equal");
/* Close */
ret = H5Sclose(sid);
@@ -16060,7 +16057,7 @@ test_select(void)
MESSAGE(5, ("Testing Selections\n"));
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -16127,7 +16124,7 @@ test_select(void)
test_select_hyper_valid_combination(); /* Test different input combinations */
/* The following tests are currently broken with the Direct VFD */
- if (HDstrcmp(env_h5_drvr, "direct") != 0) {
+ if (strcmp(env_h5_drvr, "direct") != 0) {
test_select_hyper_and_2d(); /* Test hyperslab intersection (AND) code for 2-D dataset */
test_select_hyper_xor_2d(); /* Test hyperslab XOR code for 2-D dataset */
test_select_hyper_notb_2d(); /* Test hyperslab NOTB code for 2-D dataset */
diff --git a/test/tskiplist.c b/test/tskiplist.c
index e94e3c0..7d4cda0 100644
--- a/test/tskiplist.c
+++ b/test/tskiplist.c
@@ -1519,7 +1519,7 @@ test_skiplist_remove_first_many(void)
/* Remove objects from the skip list */
for (u = 0; u < NUM_ELEMS; u++) {
found_item = (int *)H5SL_remove_first(slist);
- VERIFY(*found_item > prev_item, TRUE, "H5SL_remove_first");
+ VERIFY(*found_item > prev_item, true, "H5SL_remove_first");
prev_item = *found_item;
} /* end for */
diff --git a/test/tsohm.c b/test/tsohm.c
index fd931a0..b3f48d3 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -193,9 +193,9 @@ verify_fcpl_values(hid_t fcpl_id, const unsigned nindexes_expected, const unsign
static void
test_sohm_fcpl(void)
{
- hid_t fid = -1;
- hid_t fcpl_id = -1;
- hid_t fcpl2_id = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t fcpl_id = H5I_INVALID_HID;
+ hid_t fcpl2_id = H5I_INVALID_HID;
unsigned x;
herr_t ret;
@@ -328,8 +328,8 @@ test_sohm_fcpl(void)
static void
test_sohm_fcpl_errors(void)
{
- hid_t fcpl_id = -1;
- hid_t fid = -1;
+ hid_t fcpl_id = H5I_INVALID_HID;
+ hid_t fid = H5I_INVALID_HID;
unsigned x;
herr_t ret;
@@ -417,8 +417,8 @@ test_sohm_fcpl_errors(void)
static hid_t
make_dtype_1(void)
{
- hid_t dtype1_id = -1;
- hid_t str_id = -1;
+ hid_t dtype1_id = H5I_INVALID_HID;
+ hid_t str_id = H5I_INVALID_HID;
/* Create compound datatype. */
if ((dtype1_id = H5Tcreate(H5T_COMPOUND, sizeof(struct dtype1_struct))) < 0)
@@ -480,9 +480,9 @@ error:
static hid_t
make_dtype_2(void)
{
- hid_t dtype2_id = -1;
- hid_t enum_id = -1;
- hid_t int_id = -1;
+ hid_t dtype2_id = H5I_INVALID_HID;
+ hid_t enum_id = H5I_INVALID_HID;
+ hid_t int_id = H5I_INVALID_HID;
int x;
hsize_t dims[] = {2, 1, 2, 4};
size_t size;
@@ -566,7 +566,7 @@ error:
*
* Purpose: Creates object headers that use a large datatype message.
*
- * Set test_file_closing to TRUE to add file closing and reopening
+ * Set test_file_closing to true to add file closing and reopening
* whenever possible (to test that SOHMs are written correctly
* on disk and not just in memory).
*
@@ -576,7 +576,7 @@ error:
*-------------------------------------------------------------------------
*/
static hid_t
-size1_helper(hid_t file, const char *filename, hid_t fapl_id, hbool_t test_file_closing)
+size1_helper(hid_t file, const char *filename, hid_t fapl_id, bool test_file_closing)
{
dtype1_struct wdata;
dtype1_struct rdata;
@@ -604,7 +604,7 @@ size1_helper(hid_t file, const char *filename, hid_t fapl_id, hbool_t test_file_
printf("Can't read data\n"); \
goto error; \
} \
- if ((rdata.i1 != wdata.i1) || (rdata.i2 != wdata.i2) || HDstrcmp(rdata.str, wdata.str) != 0) { \
+ if ((rdata.i1 != wdata.i1) || (rdata.i2 != wdata.i2) || strcmp(rdata.str, wdata.str) != 0) { \
H5_FAILED(); \
AT(); \
printf("incorrect read data\n"); \
@@ -616,12 +616,12 @@ size1_helper(hid_t file, const char *filename, hid_t fapl_id, hbool_t test_file_
* local disks. Don't close and reopen if express testing is enabled.
*/
if (GetTestExpress() > 1)
- test_file_closing = FALSE;
+ test_file_closing = false;
/* Initialize wdata */
memset(&wdata, 0, sizeof(wdata));
wdata.i1 = 11;
- HDstrcpy(wdata.str, "string");
+ strcpy(wdata.str, "string");
wdata.i2 = 22;
wdata.i3 = 33;
wdata.i4 = 44;
@@ -750,7 +750,7 @@ error:
*----------------------------------------------------------------------------
*/
static h5_stat_size_t
-getsize_testsize1(const char *filename, hid_t fcpl_id, hid_t fapl_id, hbool_t test_file_closing,
+getsize_testsize1(const char *filename, hid_t fcpl_id, hid_t fapl_id, bool test_file_closing,
H5O_native_info_t *ninfo)
{
hid_t fid = H5I_INVALID_HID;
@@ -759,7 +759,7 @@ getsize_testsize1(const char *filename, hid_t fcpl_id, hid_t fapl_id, hbool_t te
fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl_id, fapl_id);
CHECK(fid, H5I_INVALID_HID, "H5Fcreate");
- /* If test_file_closing is TRUE, you will get back a different ID,
+ /* If test_file_closing is true, you will get back a different ID,
* which will need to be closed. The helper will close your passed-in
* ID.
*/
@@ -785,9 +785,9 @@ getsize_testsize1(const char *filename, hid_t fcpl_id, hid_t fapl_id, hbool_t te
static void
test_sohm_size1(void)
{
- hid_t file = -1;
- hid_t fcpl_id = -1;
- hid_t fapl_id = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t fcpl_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
unsigned use_shared = 0;
unsigned use_btree = 0;
@@ -833,7 +833,7 @@ test_sohm_size1(void)
for (use_shared = 0; use_shared < 2; use_shared++) {
for (use_btree = 0; use_btree < 2; use_btree++) {
- hbool_t test_open_close;
+ bool test_open_close;
/* cannot use btree indexing without shared messages; skip case */
if (use_btree && !use_shared)
@@ -871,9 +871,9 @@ test_sohm_size1(void)
file_sizes[size_index++] = h5_get_file_size(FILENAME, fapl_id);
/* size of populated file, with different populating behaviors */
- test_open_close = TRUE;
+ test_open_close = true;
file_sizes[size_index++] = getsize_testsize1(FILENAME, fcpl_id, fapl_id, test_open_close, &ninfo);
- test_open_close = FALSE;
+ test_open_close = false;
file_sizes[size_index++] = getsize_testsize1(FILENAME, fcpl_id, fapl_id, test_open_close, &ninfo);
oh_sizes[oh_size_index++] = ninfo.hdr.space.total;
@@ -970,9 +970,9 @@ test_sohm_size1(void)
static void
test_sohm_size_consistency_open_create(void)
{
- hid_t file = -1;
- hid_t fcpl_id = -1;
- hid_t fapl_id = -1;
+ hid_t file = H5I_INVALID_HID;
+ hid_t fcpl_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
unsigned use_btree;
hsize_t oh_size_open;
hsize_t oh_size_create;
@@ -1022,7 +1022,7 @@ test_sohm_size_consistency_open_create(void)
* Add messages to previously-created file */
file = H5Fopen(FILENAME, H5F_ACC_RDWR, fapl_id);
CHECK_I(file, "H5Fopen");
- file = size1_helper(file, FILENAME, fapl_id, FALSE);
+ file = size1_helper(file, FILENAME, fapl_id, false);
CHECK_I(file, "size1_helper");
/* Get the size of a dataset object header */
@@ -1037,7 +1037,7 @@ test_sohm_size_consistency_open_create(void)
* Add messages to a newly-created file */
file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl_id, fapl_id);
CHECK_I(file, "H5Fcreate");
- file = size1_helper(file, FILENAME, fapl_id, FALSE);
+ file = size1_helper(file, FILENAME, fapl_id, false);
CHECK_I(file, "size1_helper");
/* Get the size of a dataset object header */
@@ -1101,10 +1101,10 @@ sohm_attr_helper(hid_t fcpl_id)
* 2 - committed datatype, read through second ID
*/
for (op_index = 0; op_index < TSOHM_SAH_OP_COUNT; op_index++) {
- hid_t type_id = -1;
- hid_t group_id = -1;
- hid_t attr_id = -1;
- hid_t attr_id2 = -1;
+ hid_t type_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t attr_id = H5I_INVALID_HID;
+ hid_t attr_id2 = H5I_INVALID_HID;
hid_t attr_read_id;
/* create group in file with name unique to op_index */
@@ -1486,7 +1486,7 @@ size2_verify_plist2(hid_t plist)
static void
size2_dump_struct(const char *name, size2_helper_struct *sizes)
{
- HDputs(name);
+ puts(name);
printf(" empty size: %llu\n", (unsigned long long)sizes->empty_size);
printf(" first dataset: %llu \tdelta: %llu\n", (unsigned long long)sizes->first_dset,
(unsigned long long)(sizes->first_dset - sizes->empty_size));
@@ -1525,18 +1525,18 @@ size2_dump_struct(const char *name, size2_helper_struct *sizes)
static int
size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_sizes)
{
- hid_t file_id = -1;
- hid_t dtype1_id = -1;
- hid_t dtype2_id = -1;
- hid_t dspace1_id = -1;
- hid_t dspace2_id = -1;
- hid_t dcpl1_id = -1;
- hid_t dcpl2_id = -1;
- hid_t dset_id = -1;
- hid_t attr_type_id = -1;
- hid_t attr_space_id = -1;
- hid_t attr_id = -1;
- hid_t group_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dtype1_id = H5I_INVALID_HID;
+ hid_t dtype2_id = H5I_INVALID_HID;
+ hid_t dspace1_id = H5I_INVALID_HID;
+ hid_t dspace2_id = H5I_INVALID_HID;
+ hid_t dcpl1_id = H5I_INVALID_HID;
+ hid_t dcpl2_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t attr_type_id = H5I_INVALID_HID;
+ hid_t attr_space_id = H5I_INVALID_HID;
+ hid_t attr_id = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
char attr_string1[NAME_BUF_SIZE];
char attr_string2[NAME_BUF_SIZE];
char attr_name[NAME_BUF_SIZE];
@@ -1631,8 +1631,8 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
/* Set up attribute data */
memset(attr_string1, 0, (size_t)NAME_BUF_SIZE);
memset(attr_string2, 0, (size_t)NAME_BUF_SIZE);
- HDstrcpy(attr_string1, LONG_STRING);
- HDstrcpy(attr_string2, LONG_STRING);
+ strcpy(attr_string1, LONG_STRING);
+ strcpy(attr_string2, LONG_STRING);
attr_string2[1] = '1'; /* The second string starts "01 index..." */
/* Set up attribute metadata */
@@ -1788,7 +1788,7 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
group_id = H5Gopen2(file_id, "group", H5P_DEFAULT);
CHECK_I(group_id, "H5Gopen2");
- HDstrcpy(attr_name, "00 index");
+ strcpy(attr_name, "00 index");
for (x = 0; x < NUM_ATTRIBUTES; ++x) {
/* Create a unique name and value for each attribute */
@@ -1894,10 +1894,10 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
static void
size2_verify(void)
{
- hid_t file_id = -1;
- hid_t dset_id = -1;
- hid_t plist_id = -1;
- hid_t space_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t plist_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
hid_t group1_id, group2_id;
hid_t attr1_id, attr2_id;
hid_t attr_type_id;
@@ -2038,8 +2038,8 @@ size2_verify(void)
memset(attr_string, 0, (size_t)NAME_BUF_SIZE);
memset(attr_correct_string, 0, (size_t)NAME_BUF_SIZE);
- HDstrcpy(attr_correct_string, LONG_STRING);
- HDstrcpy(attr_name, "00 index");
+ strcpy(attr_correct_string, LONG_STRING);
+ strcpy(attr_name, "00 index");
for (x = 0; x < NUM_ATTRIBUTES; ++x) {
/* Create the name and correct value for each attribute */
@@ -2096,7 +2096,7 @@ size2_verify(void)
static void
test_sohm_size2(int close_reopen)
{
- hid_t fcpl_id = -1;
+ hid_t fcpl_id = H5I_INVALID_HID;
/* Sizes for file with no shared messages at all */
size2_helper_struct norm_sizes;
/* Sizes for files with all messages in one index */
@@ -2672,8 +2672,8 @@ test_sohm_size2(int close_reopen)
static void
delete_helper_write(hid_t file_id, hid_t *dspace_id, hid_t *dcpl_id, int x)
{
- hid_t dset_id = -1;
- hid_t attr_id = -1;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t attr_id = H5I_INVALID_HID;
char wdata;
herr_t ret;
@@ -2706,8 +2706,8 @@ delete_helper_write(hid_t file_id, hid_t *dspace_id, hid_t *dcpl_id, int x)
static void
delete_helper_read(hid_t file_id, hid_t *dspace_id, int x)
{
- hid_t dset_id = -1;
- hid_t attr_id = -1;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t attr_id = H5I_INVALID_HID;
char rdata;
herr_t ret;
@@ -2750,7 +2750,7 @@ delete_helper_read(hid_t file_id, hid_t *dspace_id, int x)
static void
delete_helper(hid_t fcpl_id, hid_t *dspace_id, hid_t *dcpl_id)
{
- hid_t file_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
int x;
h5_stat_size_t norm_filesize;
h5_stat_size_t deleted_filesize;
@@ -3135,10 +3135,10 @@ test_sohm_delete_revert(void)
static void
verify_dset_create_and_open_through_extlink_with_sohm(hid_t src_fcpl_id, hid_t dst_fcpl_id)
{
- hid_t src_file_id = -1;
- hid_t dst_file_id = -1;
- hid_t space_id = -1;
- hid_t dset_id = -1;
+ hid_t src_file_id = H5I_INVALID_HID;
+ hid_t dst_file_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
hsize_t dims[] = {1, 1};
herr_t ret;
@@ -3198,9 +3198,9 @@ verify_dset_create_and_open_through_extlink_with_sohm(hid_t src_fcpl_id, hid_t d
static void
test_sohm_extlink(void)
{
- hid_t fcpl_id = -1;
- hbool_t driver_is_default_compatible;
- herr_t ret;
+ hid_t fcpl_id = H5I_INVALID_HID;
+ bool driver_is_default_compatible;
+ herr_t ret;
MESSAGE(5, ("Testing SOHM creation through external links\n"));
@@ -3233,13 +3233,13 @@ test_sohm_extlink(void)
* Purpose: Tests extending a dataset's dataspace when sharing is
* enabled.
*
- * If close_reopen is TRUE, closes and reopens the file to
+ * If close_reopen is true, closes and reopens the file to
* ensure that data is correctly written to disk.
*
*-------------------------------------------------------------------------
*/
static int
-verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen)
+verify_dataset_extension(hid_t fcpl_id, bool close_reopen)
{
hid_t file_id = H5I_INVALID_HID;
hid_t orig_space_id = H5I_INVALID_HID;
@@ -3499,7 +3499,7 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen)
static void
test_sohm_extend_dset(void)
{
- hid_t fcpl_id = -1;
+ hid_t fcpl_id = H5I_INVALID_HID;
herr_t ret;
MESSAGE(5, ("Testing extending shared dataspaces\n"));
@@ -3510,54 +3510,54 @@ test_sohm_extend_dset(void)
CHECK_I(ret, "H5Pset_shared_mesg_nindexes");
/* No shared messages */
- ret = verify_dataset_extension(fcpl_id, FALSE);
+ ret = verify_dataset_extension(fcpl_id, false);
CHECK_I(ret, "verify_dataset_extension");
- ret = verify_dataset_extension(fcpl_id, TRUE);
+ ret = verify_dataset_extension(fcpl_id, true);
CHECK_I(ret, "verify_dataset_extension");
/* Only dataspaces */
ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_SDSPACE_FLAG, 16);
CHECK_I(ret, "H5Pset_shared_mesg_index");
- ret = verify_dataset_extension(fcpl_id, FALSE);
+ ret = verify_dataset_extension(fcpl_id, false);
CHECK_I(ret, "verify_dataset_extension");
- ret = verify_dataset_extension(fcpl_id, TRUE);
+ ret = verify_dataset_extension(fcpl_id, true);
CHECK_I(ret, "verify_dataset_extension");
/* All messages */
ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ALL_FLAG, 16);
CHECK_I(ret, "H5Pset_shared_mesg_index");
- ret = verify_dataset_extension(fcpl_id, FALSE);
+ ret = verify_dataset_extension(fcpl_id, false);
CHECK_I(ret, "verify_dataset_extension");
- ret = verify_dataset_extension(fcpl_id, TRUE);
+ ret = verify_dataset_extension(fcpl_id, true);
CHECK_I(ret, "verify_dataset_extension");
/* All messages in lists */
ret = H5Pset_shared_mesg_phase_change(fcpl_id, 100, 50);
CHECK_I(ret, "H5Pset_shared_mesg_phase_change");
- ret = verify_dataset_extension(fcpl_id, FALSE);
+ ret = verify_dataset_extension(fcpl_id, false);
CHECK_I(ret, "verify_dataset_extension");
- ret = verify_dataset_extension(fcpl_id, TRUE);
+ ret = verify_dataset_extension(fcpl_id, true);
CHECK_I(ret, "verify_dataset_extension");
/* All messages in lists converted to B-trees */
ret = H5Pset_shared_mesg_phase_change(fcpl_id, 1, 0);
CHECK_I(ret, "H5Pset_shared_mesg_phase_change");
- ret = verify_dataset_extension(fcpl_id, FALSE);
+ ret = verify_dataset_extension(fcpl_id, false);
CHECK_I(ret, "verify_dataset_extension");
- ret = verify_dataset_extension(fcpl_id, TRUE);
+ ret = verify_dataset_extension(fcpl_id, true);
CHECK_I(ret, "verify_dataset_extension");
/* All messages in B-trees */
ret = H5Pset_shared_mesg_phase_change(fcpl_id, 0, 0);
CHECK_I(ret, "H5Pset_shared_mesg_phase_change");
- ret = verify_dataset_extension(fcpl_id, FALSE);
+ ret = verify_dataset_extension(fcpl_id, false);
CHECK_I(ret, "verify_dataset_extension");
- ret = verify_dataset_extension(fcpl_id, TRUE);
+ ret = verify_dataset_extension(fcpl_id, true);
CHECK_I(ret, "verify_dataset_extension");
ret = H5Pclose(fcpl_id);
@@ -3711,12 +3711,12 @@ void
test_sohm(void)
{
const char *env_h5_drvr;
- hbool_t default_driver;
+ bool default_driver;
MESSAGE(5, ("Testing Shared Object Header Messages\n"));
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
diff --git a/test/ttsafe.c b/test/ttsafe.c
index 2f792f5..6fe14fc 100644
--- a/test/ttsafe.c
+++ b/test/ttsafe.c
@@ -53,15 +53,15 @@ num_digits(int num)
void
tts_is_threadsafe(void)
{
- hbool_t is_ts;
- hbool_t should_be;
+ bool is_ts;
+ bool should_be;
#ifdef H5_HAVE_THREADSAFE
- is_ts = FALSE;
- should_be = TRUE;
+ is_ts = false;
+ should_be = true;
#else /* H5_HAVE_THREADSAFE */
- is_ts = TRUE;
- should_be = FALSE;
+ is_ts = true;
+ should_be = false;
#endif /* H5_HAVE_THREADSAFE */
if (H5is_library_threadsafe(&is_ts) != SUCCEED)
@@ -81,7 +81,7 @@ gen_name(int value)
length = num_digits(MAX_NUM_NAME - 1);
temp = (char *)malloc(NAME_OFFSET + length + 1);
- temp = HDstrcpy(temp, "attrib");
+ temp = strcpy(temp, "attrib");
temp[NAME_OFFSET + length] = '\0';
for (i = (int)(length - 1); i >= 0; i--) {
@@ -131,7 +131,7 @@ main(int argc, char *argv[])
TestSummary();
/* Clean up test files, if allowed */
- if (GetTestCleanup() && !HDgetenv(HDF5_NOCLEANUP))
+ if (GetTestCleanup() && !getenv(HDF5_NOCLEANUP))
TestCleanup();
/* Release test infrastructure */
diff --git a/test/tunicode.c b/test/tunicode.c
index 6b6e584..705bdfd 100644
--- a/test/tunicode.c
+++ b/test/tunicode.c
@@ -94,7 +94,7 @@ test_fl_string(hid_t fid, const char *string)
ret = H5Dread(dset_id, dtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf);
CHECK(ret, FAIL, "H5Dread");
- VERIFY(HDstrcmp(string, read_buf), 0, "strcmp");
+ VERIFY(strcmp(string, read_buf), 0, "strcmp");
/* Close all */
ret = H5Dclose(dset_id);
@@ -137,14 +137,14 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* the right number of bytes (even or odd, depending on the test).
* We create a 'new_string' whose length is convenient by prepending
* an 'x' to 'string' when necessary. */
- length = HDstrlen(string);
+ length = strlen(string);
if (length % 2 != 1) {
- HDstrcpy(new_string, "x");
- HDstrcat(new_string, string);
+ strcpy(new_string, "x");
+ strcat(new_string, string);
length++;
}
else {
- HDstrcpy(new_string, string);
+ strcpy(new_string, string);
}
/* Convert a null-terminated string to a shorter and longer null
@@ -163,8 +163,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Fill the buffer with two copies of the UTF-8 string, each with a
* terminating NULL. It will look like "abcdefg\0abcdefg\0". */
- HDstrncpy(buf, new_string, big_len);
- HDstrncpy(&buf[big_len], new_string, big_len);
+ strncpy(buf, new_string, big_len);
+ strncpy(&buf[big_len], new_string, big_len);
ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tconvert");
@@ -174,11 +174,11 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* like; UTF-8 characters may well have been truncated.
* To check that the conversion worked properly, we'll build this
* string manually. */
- HDstrncpy(cmpbuf, new_string, small_len - 1);
+ strncpy(cmpbuf, new_string, small_len - 1);
cmpbuf[small_len - 1] = '\0';
- HDstrncpy(&cmpbuf[small_len], new_string, small_len - 1);
+ strncpy(&cmpbuf[small_len], new_string, small_len - 1);
cmpbuf[2 * small_len - 1] = '\0';
- HDstrcpy(&cmpbuf[2 * small_len], new_string);
+ strcpy(&cmpbuf[2 * small_len], new_string);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -190,8 +190,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* First fill the buffer with NULLs */
memset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
- HDstrncpy(cmpbuf, new_string, small_len - 1);
- HDstrncpy(&cmpbuf[big_len], new_string, small_len - 1);
+ strncpy(cmpbuf, new_string, small_len - 1);
+ strncpy(&cmpbuf[big_len], new_string, small_len - 1);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -203,14 +203,14 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Now test null padding. Null-padded strings do *not* need
* terminating NULLs, so the sizes of the datatypes are slightly
* different and we want a string with an even number of characters. */
- length = HDstrlen(string);
+ length = strlen(string);
if (length % 2 != 0) {
- HDstrcpy(new_string, "x");
- HDstrcat(new_string, string);
+ strcpy(new_string, "x");
+ strcat(new_string, string);
length++;
}
else {
- HDstrcpy(new_string, string);
+ strcpy(new_string, string);
}
/* Create a src_type that holds the UTF-8 string */
@@ -225,8 +225,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Fill the buffer with two copies of the UTF-8 string.
* It will look like "abcdefghabcdefgh". */
- HDstrncpy(buf, new_string, big_len);
- HDstrncpy(&buf[big_len], new_string, big_len);
+ strncpy(buf, new_string, big_len);
+ strncpy(&buf[big_len], new_string, big_len);
ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tconvert");
@@ -236,9 +236,9 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* like; UTF-8 characters may well have been truncated.
* To check that the conversion worked properly, we'll build this
* string manually. */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[small_len], new_string, small_len);
- HDstrncpy(&cmpbuf[2 * small_len], new_string, big_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[small_len], new_string, small_len);
+ strncpy(&cmpbuf[2 * small_len], new_string, big_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -250,8 +250,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* First fill the buffer with NULLs */
memset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[big_len], new_string, small_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[big_len], new_string, small_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -270,8 +270,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Fill the buffer with two copies of the UTF-8 string.
* It will look like "abcdefghabcdefgh". */
- HDstrcpy(buf, new_string);
- HDstrcpy(&buf[big_len], new_string);
+ strcpy(buf, new_string);
+ strcpy(&buf[big_len], new_string);
ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tconvert");
@@ -281,9 +281,9 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* like; UTF-8 characters may have been truncated.
* To check that the conversion worked properly, we'll build this
* string manually. */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[small_len], new_string, small_len);
- HDstrncpy(&cmpbuf[2 * small_len], new_string, big_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[small_len], new_string, small_len);
+ strncpy(&cmpbuf[2 * small_len], new_string, big_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -295,8 +295,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* First fill the buffer with spaces */
memset(cmpbuf, ' ', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[big_len], new_string, small_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[big_len], new_string, small_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -340,14 +340,14 @@ test_vl_string(hid_t fid, const char *string)
/* Make certain the correct amount of memory will be used */
ret = H5Dvlen_get_buf_size(dset_id, type_id, space_id, &size);
CHECK(ret, FAIL, "H5Dvlen_get_buf_size");
- VERIFY(size, (hsize_t)HDstrlen(string) + 1, "H5Dvlen_get_buf_size");
+ VERIFY(size, (hsize_t)strlen(string) + 1, "H5Dvlen_get_buf_size");
/* Read dataset from disk */
ret = H5Dread(dset_id, type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf);
CHECK(ret, FAIL, "H5Dread");
/* Compare data read in */
- VERIFY(HDstrcmp(string, read_buf[0]), 0, "strcmp");
+ VERIFY(strcmp(string, read_buf[0]), 0, "strcmp");
/* Reclaim the read VL data */
ret = H5Treclaim(type_id, space_id, H5P_DEFAULT, read_buf);
@@ -399,7 +399,7 @@ test_objnames(hid_t fid, const char *string)
ret = H5Gclose(grp_id);
CHECK(ret, FAIL, "H5Gclose");
- VERIFY(HDstrcmp(string, read_buf), 0, "strcmp");
+ VERIFY(strcmp(string, read_buf), 0, "strcmp");
/* Create a new dataset with a UTF-8 name */
grp1_id = H5Gcreate2(fid, GROUP1_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -449,7 +449,7 @@ test_objnames(hid_t fid, const char *string)
CHECK(ret, FAIL, "H5Dcreate2");
/* Create reference to named datatype */
- ret = H5Rcreate(&obj_ref, grp2_id, string, H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&obj_ref, grp2_id, string, H5R_OBJECT, (hid_t)H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
/* Write selection and read it back*/
ret = H5Dwrite(dset_id, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, &obj_ref);
@@ -483,9 +483,9 @@ test_objnames(hid_t fid, const char *string)
ret = H5Lcreate_hard(fid, GROUP2_NAME, grp3_id, GROUP2_NAME, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Lcreate_hard");
- HDstrcpy(path_buf, GROUP2_NAME);
- HDstrcat(path_buf, "/");
- HDstrcat(path_buf, string);
+ strcpy(path_buf, GROUP2_NAME);
+ strcat(path_buf, "/");
+ strcat(path_buf, string);
ret = H5Lcreate_hard(grp3_id, path_buf, H5L_SAME_LOC, string, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Lcreate_hard");
@@ -531,7 +531,7 @@ test_attrname(hid_t fid, const char *string)
CHECK(attr_id, FAIL, "H5Acreate2");
size = H5Aget_name(attr_id, (size_t)MAX_STRING_LENGTH, read_buf);
CHECK(size, FAIL, "H5Aget_name");
- ret = HDstrcmp(read_buf, string);
+ ret = strcmp(read_buf, string);
VERIFY(ret, 0, "strcmp");
read_buf[0] = '\0';
@@ -540,7 +540,7 @@ test_attrname(hid_t fid, const char *string)
CHECK(ret, FAIL, "H5Awrite");
ret = H5Aread(attr_id, dtype_id, read_buf);
CHECK(ret, FAIL, "H5Aread");
- ret = HDstrcmp(read_buf, string);
+ ret = strcmp(read_buf, string);
VERIFY(ret, 0, "strcmp");
/* Clean up */
@@ -598,7 +598,7 @@ test_compound(hid_t fid, const char *string)
/* Check that the field name was stored correctly */
readbuf = H5Tget_member_name(s1_tid, 0);
- ret = HDstrcmp(readbuf, string);
+ ret = strcmp(readbuf, string);
VERIFY(ret, 0, "strcmp");
H5free_memory(readbuf);
@@ -681,7 +681,7 @@ test_enum(hid_t H5_ATTR_UNUSED fid, const char *string)
VERIFY(val, E1_WHITE, "H5Tenum_valueof");
ret = H5Tenum_nameof(type_id, &val, readbuf, (size_t)MAX_STRING_LENGTH);
CHECK(ret, FAIL, "H5Tenum_nameof");
- ret = HDstrcmp(readbuf, string);
+ ret = strcmp(readbuf, string);
VERIFY(ret, 0, "strcmp");
/* Close the datatype */
@@ -708,7 +708,7 @@ test_opaque(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Read the tag back. */
read_buf = H5Tget_tag(type_id);
- ret = HDstrcmp(read_buf, string);
+ ret = strcmp(read_buf, string);
VERIFY(ret, 0, "H5Tget_tag");
H5free_memory(read_buf);
@@ -782,7 +782,7 @@ dump_string(const char *string)
printf("The string was:\n %s", string);
printf("Or in hex:\n");
- length = HDstrlen(string);
+ length = strlen(string);
for (x = 0; x < length; x++)
printf("%x ", string[x] & (0x000000FF));
diff --git a/test/tvlstr.c b/test/tvlstr.c
index e36239d..a3ea041 100644
--- a/test/tvlstr.c
+++ b/test/tvlstr.c
@@ -186,7 +186,7 @@ test_vlstrings_basic(void)
/* Count the actual number of bytes used by the strings */
for (i = 0, str_used = 0; i < SPACE1_DIM1; i++)
- str_used += HDstrlen(wdata[i]) + 1;
+ str_used += strlen(wdata[i]) + 1;
/* Compare against the strings actually written */
VERIFY(size, (hsize_t)str_used, "H5Dvlen_get_buf_size");
@@ -200,12 +200,12 @@ test_vlstrings_basic(void)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
(int)i, rdata[i]);
continue;
@@ -304,16 +304,16 @@ test_vlstrings_special(void)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
if ((wdata[i] == NULL && rdata[i] != NULL) || (rdata[i] == NULL && wdata[i] != NULL)) {
TestErrPrintf("VL data values don't match!\n");
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
(int)i, rdata[i]);
continue;
@@ -424,12 +424,12 @@ test_vlstring_type(void)
ret = H5Tget_class(tid_vlstr);
VERIFY(ret, H5T_STRING, "H5Tget_class");
ret = H5Tis_variable_str(tid_vlstr);
- VERIFY(ret, TRUE, "H5Tis_variable_str");
+ VERIFY(ret, true, "H5Tis_variable_str");
/* Verify that the class detects as a string */
vl_str = H5Tdetect_class(tid_vlstr, H5T_STRING);
CHECK(vl_str, FAIL, "H5Tdetect_class");
- VERIFY(vl_str, TRUE, "H5Tdetect_class");
+ VERIFY(vl_str, true, "H5Tdetect_class");
/* Check default character set and padding */
cset = H5Tget_cset(tid_vlstr);
@@ -533,12 +533,12 @@ test_compact_vlstring(void)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
(int)i, rdata[i]);
continue;
@@ -611,7 +611,7 @@ test_write_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att) != 0)
+ if (strcmp(string_att_check, string_att) != 0)
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n", string_att,
string_att_check);
@@ -634,7 +634,7 @@ test_write_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att_write) != 0)
+ if (strcmp(string_att_check, string_att_write) != 0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",
string_att_write, string_att_check);
@@ -695,7 +695,7 @@ test_read_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att) != 0)
+ if (strcmp(string_att_check, string_att) != 0)
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n", string_att,
string_att_check);
@@ -713,7 +713,7 @@ test_read_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att_write) != 0)
+ if (strcmp(string_att_check, string_att_write) != 0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",
string_att_write, string_att_check);
@@ -772,7 +772,7 @@ read_scalar_dset(hid_t file, hid_t type, hid_t space, char *name, char *data)
ret = H5Dclose(dset);
CHECK(ret, FAIL, "H5Dclose");
- if (HDstrcmp(data, data_read) != 0)
+ if (strcmp(data, data_read) != 0)
TestErrPrintf("Expected %s for dataset %s but read %s\n", data, name, data_read);
ret = H5Treclaim(type, space, H5P_DEFAULT, &data_read);
@@ -816,33 +816,33 @@ test_vl_rewrite(void)
/* Create in file 1 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
write_scalar_dset(file1, type, space, name, name);
}
/* Effectively copy data from file 1 to 2 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
read_scalar_dset(file1, type, space, name, name);
write_scalar_dset(file2, type, space, name, name);
}
/* Read back from file 2 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
read_scalar_dset(file2, type, space, name, name);
} /* end for */
/* Remove from file 2. */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
ret = H5Ldelete(file2, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
} /* end for */
/* Effectively copy from file 1 to file 2 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
read_scalar_dset(file1, type, space, name, name);
write_scalar_dset(file2, type, space, name, name);
} /* end for */
diff --git a/test/tvltypes.c b/test/tvltypes.c
index 88401d4..4c88130 100644
--- a/test/tvltypes.c
+++ b/test/tvltypes.c
@@ -1241,9 +1241,9 @@ test_vltypes_compound_vlstr(void)
wdata[i].v.p = (s2 *)malloc((i + L3_INCM) * sizeof(s2));
wdata[i].v.len = i + L3_INCM;
for (t1 = (s2 *)((wdata[i].v).p), j = 0; j < (i + L3_INCM); j++, t1++) {
- HDstrcat(str, "m");
- t1->string = (char *)malloc(HDstrlen(str) * sizeof(char) + 1);
- HDstrcpy(t1->string, str);
+ strcat(str, "m");
+ t1->string = (char *)malloc(strlen(str) * sizeof(char) + 1);
+ strcpy(t1->string, str);
/*t1->color = red;*/
t1->color = blue;
}
@@ -1384,7 +1384,7 @@ test_vltypes_compound_vlstr(void)
for (t1 = (s2 *)(wdata[i].v.p), t2 = (s2 *)(rdata[i].v.p), j = 0; j < rdata[i].v.len;
j++, t1++, t2++) {
- if (HDstrcmp(t1->string, t2->string) != 0) {
+ if (strcmp(t1->string, t2->string) != 0) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n", t1->string,
t2->string);
continue;
@@ -1406,14 +1406,14 @@ test_vltypes_compound_vlstr(void)
CHECK(ret, FAIL, "H5Treclaim");
/* Use this part for new data */
- HDstrcpy(str, "bbbbbbbb\0");
+ strcpy(str, "bbbbbbbb\0");
for (i = 0; i < SPACE1_DIM1; i++) {
wdata2[i].v.p = (s2 *)malloc((i + 1) * sizeof(s2));
wdata2[i].v.len = i + 1;
for (t1 = (s2 *)(wdata2[i].v).p, j = 0; j < i + 1; j++, t1++) {
- HDstrcat(str, "pp");
- t1->string = (char *)malloc(HDstrlen(str) * sizeof(char) + 1);
- HDstrcpy(t1->string, str);
+ strcat(str, "pp");
+ t1->string = (char *)malloc(strlen(str) * sizeof(char) + 1);
+ strcpy(t1->string, str);
t1->color = green;
}
} /* end for */
@@ -1445,7 +1445,7 @@ test_vltypes_compound_vlstr(void)
for (t1 = (s2 *)(wdata2[i].v.p), t2 = (s2 *)(rdata2[i].v.p), j = 0; j < rdata2[i].v.len;
j++, t1++, t2++) {
- if (HDstrcmp(t1->string, t2->string) != 0) {
+ if (strcmp(t1->string, t2->string) != 0) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n", t1->string,
t2->string);
continue;
@@ -2499,33 +2499,33 @@ test_vltypes_fill_value(void)
const char *str_unit;
} dtype1_struct;
- herr_t ret;
- hid_t file_id;
- hid_t dtype1_id = -1;
- hid_t str_id = -1;
- hid_t small_dspace_id; /* Dataspace ID for small datasets */
- hid_t large_dspace_id; /* Dataspace ID for large datasets */
- hid_t small_select_dspace_id; /* Dataspace ID for selection in small datasets */
- hid_t large_select_dspace_id; /* Dataspace ID for selection in large datasets */
- hid_t dset_dspace_id = -1; /* Dataspace ID for a particular dataset */
- hid_t dset_select_dspace_id = -1; /* Dataspace ID for selection in a particular dataset */
- hid_t scalar_dspace_id; /* Dataspace ID for scalar dataspace */
- hid_t single_dspace_id; /* Dataspace ID for single element selection */
- hsize_t single_offset[] = {2}; /* Offset of single element selection */
- hsize_t single_block[] = {1}; /* Block size of single element selection */
- hsize_t select_offset[] = {0}; /* Offset of non-contiguous element selection */
- hsize_t select_stride[] = {2}; /* Stride size of non-contiguous element selection */
- hsize_t small_select_count[] = {SPACE4_DIM_SMALL /
+ herr_t ret;
+ hid_t file_id;
+ hid_t dtype1_id = H5I_INVALID_HID;
+ hid_t str_id = H5I_INVALID_HID;
+ hid_t small_dspace_id; /* Dataspace ID for small datasets */
+ hid_t large_dspace_id; /* Dataspace ID for large datasets */
+ hid_t small_select_dspace_id; /* Dataspace ID for selection in small datasets */
+ hid_t large_select_dspace_id; /* Dataspace ID for selection in large datasets */
+ hid_t dset_dspace_id = H5I_INVALID_HID; /* Dataspace ID for a particular dataset */
+ hid_t dset_select_dspace_id = H5I_INVALID_HID; /* Dataspace ID for selection in a particular dataset */
+ hid_t scalar_dspace_id; /* Dataspace ID for scalar dataspace */
+ hid_t single_dspace_id; /* Dataspace ID for single element selection */
+ hsize_t single_offset[] = {2}; /* Offset of single element selection */
+ hsize_t single_block[] = {1}; /* Block size of single element selection */
+ hsize_t select_offset[] = {0}; /* Offset of non-contiguous element selection */
+ hsize_t select_stride[] = {2}; /* Stride size of non-contiguous element selection */
+ hsize_t small_select_count[] = {SPACE4_DIM_SMALL /
2}; /* Count of small non-contiguous element selection */
- hsize_t large_select_count[] = {SPACE4_DIM_LARGE /
+ hsize_t large_select_count[] = {SPACE4_DIM_LARGE /
2}; /* Count of large non-contiguous element selection */
- hsize_t select_block[] = {1}; /* Block size of non-contiguous element selection */
- hid_t dcpl_id, xfer_pid;
- hid_t dset_id;
- hsize_t small_dims[] = {SPACE4_DIM_SMALL};
- hsize_t large_dims[] = {SPACE4_DIM_LARGE};
- size_t dset_elmts = 0; /* Number of elements in a particular dataset */
- const dtype1_struct fill1 = {1, 2, "foobar", "", NULL, "\0", "dead",
+ hsize_t select_block[] = {1}; /* Block size of non-contiguous element selection */
+ hid_t dcpl_id, xfer_pid;
+ hid_t dset_id;
+ hsize_t small_dims[] = {SPACE4_DIM_SMALL};
+ hsize_t large_dims[] = {SPACE4_DIM_LARGE};
+ size_t dset_elmts = 0; /* Number of elements in a particular dataset */
+ const dtype1_struct fill1 = {1, 2, "foobar", "", NULL, "\0", "dead",
3, 4.0, 100.0, 1.0, "liquid", "meter"};
const dtype1_struct wdata = {3, 4, "", NULL, "\0", "foo", "two", 6, 8.0, 200.0, 2.0, "solid", "yard"};
dtype1_struct *rbuf = NULL; /* Buffer for reading data */
@@ -2654,16 +2654,16 @@ test_vltypes_fill_value(void)
/* Layout specific actions */
switch (layout) {
case H5D_COMPACT:
- HDstrcpy(dset_name1, "dataset1-compact");
- HDstrcpy(dset_name2, "dataset2-compact");
+ strcpy(dset_name1, "dataset1-compact");
+ strcpy(dset_name2, "dataset2-compact");
dset_dspace_id = small_dspace_id;
ret = H5Pset_layout(tmp_dcpl_id, H5D_COMPACT);
CHECK(ret, FAIL, "H5Pset_layout");
break;
case H5D_CONTIGUOUS:
- HDstrcpy(dset_name1, "dataset1-contig");
- HDstrcpy(dset_name2, "dataset2-contig");
+ strcpy(dset_name1, "dataset1-contig");
+ strcpy(dset_name2, "dataset2-contig");
dset_dspace_id = large_dspace_id;
break;
@@ -2675,15 +2675,15 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Pset_chunk");
#ifdef H5_HAVE_FILTER_DEFLATE
if (test_loop == 1) {
- HDstrcpy(dset_name1, "dataset1-chunked-compressed");
- HDstrcpy(dset_name2, "dataset2-chunked-compressed");
+ strcpy(dset_name1, "dataset1-chunked-compressed");
+ strcpy(dset_name2, "dataset2-chunked-compressed");
ret = H5Pset_deflate(tmp_dcpl_id, 3);
CHECK(ret, FAIL, "H5Pset_deflate");
} /* end if */
else {
#endif /* H5_HAVE_FILTER_DEFLATE */
- HDstrcpy(dset_name1, "dataset1-chunked");
- HDstrcpy(dset_name2, "dataset2-chunked");
+ strcpy(dset_name1, "dataset1-chunked");
+ strcpy(dset_name2, "dataset2-chunked");
#ifdef H5_HAVE_FILTER_DEFLATE
} /* end else */
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -2764,16 +2764,16 @@ test_vltypes_fill_value(void)
/* Layout specific actions */
switch (layout) {
case H5D_COMPACT:
- HDstrcpy(dset_name1, "dataset1-compact");
- HDstrcpy(dset_name2, "dataset2-compact");
+ strcpy(dset_name1, "dataset1-compact");
+ strcpy(dset_name2, "dataset2-compact");
dset_dspace_id = small_dspace_id;
dset_select_dspace_id = small_select_dspace_id;
dset_elmts = SPACE4_DIM_SMALL;
break;
case H5D_CONTIGUOUS:
- HDstrcpy(dset_name1, "dataset1-contig");
- HDstrcpy(dset_name2, "dataset2-contig");
+ strcpy(dset_name1, "dataset1-contig");
+ strcpy(dset_name2, "dataset2-contig");
dset_dspace_id = large_dspace_id;
dset_select_dspace_id = large_select_dspace_id;
dset_elmts = SPACE4_DIM_LARGE;
@@ -2782,13 +2782,13 @@ test_vltypes_fill_value(void)
case H5D_CHUNKED:
#ifdef H5_HAVE_FILTER_DEFLATE
if (test_loop == 1) {
- HDstrcpy(dset_name1, "dataset1-chunked-compressed");
- HDstrcpy(dset_name2, "dataset2-chunked-compressed");
+ strcpy(dset_name1, "dataset1-chunked-compressed");
+ strcpy(dset_name2, "dataset2-chunked-compressed");
} /* end if */
else {
#endif /* H5_HAVE_FILTER_DEFLATE */
- HDstrcpy(dset_name1, "dataset1-chunked");
- HDstrcpy(dset_name2, "dataset2-chunked");
+ strcpy(dset_name1, "dataset1-chunked");
+ strcpy(dset_name2, "dataset2-chunked");
#ifdef H5_HAVE_FILTER_DEFLATE
} /* end else */
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -2818,10 +2818,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 || HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2841,11 +2841,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2876,10 +2875,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 || HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2899,11 +2898,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2951,16 +2949,16 @@ test_vltypes_fill_value(void)
/* Layout specific actions */
switch (layout) {
case H5D_COMPACT:
- HDstrcpy(dset_name1, "dataset1-compact");
- HDstrcpy(dset_name2, "dataset2-compact");
+ strcpy(dset_name1, "dataset1-compact");
+ strcpy(dset_name2, "dataset2-compact");
dset_dspace_id = small_dspace_id;
dset_select_dspace_id = small_select_dspace_id;
dset_elmts = SPACE4_DIM_SMALL;
break;
case H5D_CONTIGUOUS:
- HDstrcpy(dset_name1, "dataset1-contig");
- HDstrcpy(dset_name2, "dataset2-contig");
+ strcpy(dset_name1, "dataset1-contig");
+ strcpy(dset_name2, "dataset2-contig");
dset_dspace_id = large_dspace_id;
dset_select_dspace_id = large_select_dspace_id;
dset_elmts = SPACE4_DIM_LARGE;
@@ -2969,13 +2967,13 @@ test_vltypes_fill_value(void)
case H5D_CHUNKED:
#ifdef H5_HAVE_FILTER_DEFLATE
if (test_loop == 1) {
- HDstrcpy(dset_name1, "dataset1-chunked-compressed");
- HDstrcpy(dset_name2, "dataset2-chunked-compressed");
+ strcpy(dset_name1, "dataset1-chunked-compressed");
+ strcpy(dset_name2, "dataset2-chunked-compressed");
} /* end if */
else {
#endif /* H5_HAVE_FILTER_DEFLATE */
- HDstrcpy(dset_name1, "dataset1-chunked");
- HDstrcpy(dset_name2, "dataset2-chunked");
+ strcpy(dset_name1, "dataset1-chunked");
+ strcpy(dset_name2, "dataset2-chunked");
#ifdef H5_HAVE_FILTER_DEFLATE
} /* end else */
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -3018,22 +3016,21 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3054,23 +3051,23 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 ||
+ strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3106,22 +3103,21 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3142,23 +3138,23 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 ||
+ strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
diff --git a/test/twriteorder.c b/test/twriteorder.c
index b5ae2ea..9bfe87b 100644
--- a/test/twriteorder.c
+++ b/test/twriteorder.c
@@ -379,7 +379,7 @@ main(int argc, char *argv[])
if (launch_g == UC_READWRITE) {
/* fork process */
if ((childpid = fork()) < 0) {
- HDperror("fork");
+ perror("fork");
Hgoto_error(1);
}
}
@@ -417,7 +417,7 @@ main(int argc, char *argv[])
/* ================================================ */
if (launch_g == UC_READWRITE) {
if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) {
- HDperror("waitpid");
+ perror("waitpid");
Hgoto_error(1);
}
if (WIFEXITED(child_status)) {
diff --git a/test/unlink.c b/test/unlink.c
index df5b5b3..ae8da98 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -77,7 +77,7 @@ static const char *FILENAME[] = {"unlink", "new_move_a", "new_move_
static int
test_one(hid_t file)
{
- hid_t work = -1, grp = -1;
+ hid_t work = H5I_INVALID_HID, grp = H5I_INVALID_HID;
herr_t status;
/* Create a test group */
@@ -149,7 +149,7 @@ error:
static int
test_many(hid_t file)
{
- hid_t work = -1, grp = -1;
+ hid_t work = H5I_INVALID_HID, grp = H5I_INVALID_HID;
int i;
const int how_many = 500;
char name[32];
@@ -165,12 +165,12 @@ test_many(hid_t file)
/* Create a bunch of names and unlink them in order */
TESTING("forward unlink");
for (i = 0; i < how_many; i++) {
- HDsnprintf(name, sizeof(name), "obj_%05d", i);
+ snprintf(name, sizeof(name), "obj_%05d", i);
if (H5Lcreate_hard(work, "/test_many_foo", H5L_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
for (i = 0; i < how_many; i++) {
- HDsnprintf(name, sizeof(name), "obj_%05d", i);
+ snprintf(name, sizeof(name), "obj_%05d", i);
if (H5Ldelete(work, name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -179,12 +179,12 @@ test_many(hid_t file)
/* Create a bunch of names and unlink them in reverse order */
TESTING("backward unlink");
for (i = 0; i < how_many; i++) {
- HDsnprintf(name, sizeof(name), "obj_%05d", i);
+ snprintf(name, sizeof(name), "obj_%05d", i);
if (H5Lcreate_hard(work, "/test_many_foo", H5L_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
for (i = (how_many - 1); i >= 0; --i) {
- HDsnprintf(name, sizeof(name), "obj_%05d", i);
+ snprintf(name, sizeof(name), "obj_%05d", i);
if (H5Ldelete(work, name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -193,15 +193,15 @@ test_many(hid_t file)
/* Create a bunch of names and unlink them from both directions */
TESTING("inward unlink");
for (i = 0; i < how_many; i++) {
- HDsnprintf(name, sizeof(name), "obj_%05d", i);
+ snprintf(name, sizeof(name), "obj_%05d", i);
if (H5Lcreate_hard(work, "/test_many_foo", H5L_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
for (i = 0; i < how_many; i++) {
if (i % 2)
- HDsnprintf(name, sizeof(name), "obj_%05d", how_many - (1 + i / 2));
+ snprintf(name, sizeof(name), "obj_%05d", how_many - (1 + i / 2));
else
- HDsnprintf(name, sizeof(name), "obj_%05d", i / 2);
+ snprintf(name, sizeof(name), "obj_%05d", i / 2);
if (H5Ldelete(work, name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -210,15 +210,15 @@ test_many(hid_t file)
/* Create a bunch of names and unlink them from the midle */
TESTING("outward unlink");
for (i = 0; i < how_many; i++) {
- HDsnprintf(name, sizeof(name), "obj_%05d", i);
+ snprintf(name, sizeof(name), "obj_%05d", i);
if (H5Lcreate_hard(work, "/test_many_foo", H5L_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
for (i = (how_many - 1); i >= 0; --i) {
if (i % 2)
- HDsnprintf(name, sizeof(name), "obj_%05d", how_many - (1 + i / 2));
+ snprintf(name, sizeof(name), "obj_%05d", how_many - (1 + i / 2));
else
- HDsnprintf(name, sizeof(name), "obj_%05d", i / 2);
+ snprintf(name, sizeof(name), "obj_%05d", i / 2);
if (H5Ldelete(work, name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -253,7 +253,7 @@ error:
static int
test_symlink(hid_t file)
{
- hid_t work = -1;
+ hid_t work = H5I_INVALID_HID;
TESTING("symlink removal");
@@ -295,7 +295,7 @@ error:
static int
test_rename(hid_t file)
{
- hid_t work = -1, foo = -1, inner = -1;
+ hid_t work = H5I_INVALID_HID, foo = H5I_INVALID_HID, inner = H5I_INVALID_HID;
/* Create a test group and rename something */
TESTING("object renaming");
@@ -356,9 +356,10 @@ error:
static int
test_new_move(hid_t fapl)
{
- hid_t file_a, file_b = (-1);
- hid_t grp_1 = (-1), grp_2 = (-1), grp_move = (-1), moved_grp = (-1);
- char filename[1024];
+ hid_t file_a, file_b = (H5I_INVALID_HID);
+ hid_t grp_1 = (H5I_INVALID_HID), grp_2 = (H5I_INVALID_HID), grp_move = (H5I_INVALID_HID),
+ moved_grp = (H5I_INVALID_HID);
+ char filename[1024];
TESTING("new move");
@@ -484,7 +485,7 @@ check_new_move(hid_t fapl)
/* Check soft links */
if (H5Lget_val(file, "group2/soft", linkval, sizeof(linkval), H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(linkval, "/group1/group_move") != 0)
+ if (strcmp(linkval, "/group1/group_move") != 0)
FAIL_PUTS_ERROR(" Soft link test failed. Wrong link value");
/* Cleanup */
@@ -544,7 +545,7 @@ test_filespace(hid_t fapl)
size_t rdcc_nbytes;
double rdcc_w0;
- HDputs("Testing file space gets reused:");
+ puts("Testing file space gets reused:");
/* Open file */
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
@@ -901,7 +902,7 @@ test_filespace(hid_t fapl)
/* Alternate adding attributes to each one */
for (u = 0; u < FILESPACE_NATTR; u++) {
/* Set the name of the attribute to create */
- HDsnprintf(objname, sizeof(objname), "%s %u", ATTRNAME, u);
+ snprintf(objname, sizeof(objname), "%s %u", ATTRNAME, u);
/* Create an attribute on the first dataset */
if ((attr = H5Acreate2(dataset, objname, H5T_NATIVE_INT, attr_space, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -1033,7 +1034,7 @@ test_filespace(hid_t fapl)
/* Create a many groups to remove */
for (u = 0; u < UNLINK_NGROUPS; u++) {
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUPNAME, u);
+ snprintf(objname, sizeof(objname), "%s %u", GROUPNAME, u);
if ((group = H5Gcreate2(file, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Gclose(group) < 0)
@@ -1043,7 +1044,7 @@ test_filespace(hid_t fapl)
/* Remove the all the groups */
/* (Remove them in reverse order just to make file size calculation easier -QAK) */
for (u = UNLINK_NGROUPS; u > 0; u--) {
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUPNAME, (u - 1));
+ snprintf(objname, sizeof(objname), "%s %u", GROUPNAME, (u - 1));
if (H5Ldelete(file, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1111,21 +1112,21 @@ test_filespace(hid_t fapl)
/* Create a complex group hierarchy to remove */
for (u = 0; u < FILESPACE_TOP_GROUPS; u++) {
/* Create group */
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUPNAME, u);
+ snprintf(objname, sizeof(objname), "%s %u", GROUPNAME, u);
if ((group = H5Gcreate2(file, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
/* Create nested groups inside top groups */
for (v = 0; v < FILESPACE_NESTED_GROUPS; v++) {
/* Create group */
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUP2NAME, v);
+ snprintf(objname, sizeof(objname), "%s %u", GROUP2NAME, v);
if ((group2 = H5Gcreate2(group, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
/* Create datasets inside nested groups */
for (w = 0; w < FILESPACE_NDATASETS; w++) {
/* Create & close a dataset */
- HDsnprintf(objname, sizeof(objname), "%s %u", DATASETNAME, w);
+ snprintf(objname, sizeof(objname), "%s %u", DATASETNAME, w);
if ((dataset = H5Dcreate2(group2, objname, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
@@ -1147,21 +1148,21 @@ test_filespace(hid_t fapl)
/* (Remove them in reverse order just to make file size calculation easier -QAK) */
for (u = FILESPACE_TOP_GROUPS; u > 0; u--) {
/* Open group */
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUPNAME, (u - 1));
+ snprintf(objname, sizeof(objname), "%s %u", GROUPNAME, (u - 1));
if ((group = H5Gopen2(file, objname, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
/* Open nested groups inside top groups */
for (v = 0; v < FILESPACE_NESTED_GROUPS; v++) {
/* Create group */
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUP2NAME, v);
+ snprintf(objname, sizeof(objname), "%s %u", GROUP2NAME, v);
if ((group2 = H5Gopen2(group, objname, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
/* Remove datasets inside nested groups */
for (w = 0; w < FILESPACE_NDATASETS; w++) {
/* Remove dataset */
- HDsnprintf(objname, sizeof(objname), "%s %u", DATASETNAME, w);
+ snprintf(objname, sizeof(objname), "%s %u", DATASETNAME, w);
if (H5Ldelete(group2, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1171,7 +1172,7 @@ test_filespace(hid_t fapl)
FAIL_STACK_ERROR;
/* Remove nested group */
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUP2NAME, v);
+ snprintf(objname, sizeof(objname), "%s %u", GROUP2NAME, v);
if (H5Ldelete(group, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1181,7 +1182,7 @@ test_filespace(hid_t fapl)
FAIL_STACK_ERROR;
/* Remove top group */
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUPNAME, (u - 1));
+ snprintf(objname, sizeof(objname), "%s %u", GROUPNAME, (u - 1));
if (H5Ldelete(file, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1460,7 +1461,7 @@ test_create_unlink(const char *msg, hid_t fapl)
/* Create a many groups to remove */
for (u = 0; u < UNLINK_NGROUPS; u++) {
- HDsnprintf(groupname, sizeof(groupname), "%s %u", GROUPNAME, u);
+ snprintf(groupname, sizeof(groupname), "%s %u", GROUPNAME, u);
if ((group = H5Gcreate2(file, groupname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
printf("group %s creation failed\n", groupname);
@@ -1475,7 +1476,7 @@ test_create_unlink(const char *msg, hid_t fapl)
/* Remove the all the groups */
for (u = 0; u < UNLINK_NGROUPS; u++) {
- HDsnprintf(groupname, sizeof(groupname), "%s %u", GROUPNAME, u);
+ snprintf(groupname, sizeof(groupname), "%s %u", GROUPNAME, u);
if (H5Ldelete(file, groupname, H5P_DEFAULT) < 0) {
H5_FAILED();
printf("Unlinking group %s failed\n", groupname);
@@ -1664,7 +1665,7 @@ delete_node(hid_t pid, hid_t id)
return (-1);
/* If this object is the right-most child, try opening the previous object */
- if (HDstrcmp(name, "/Zone81") == 0) {
+ if (strcmp(name, "/Zone81") == 0) {
hid_t gid;
if ((gid = H5Gopen2(pid, "/Zone80", H5P_DEFAULT)) < 0)
@@ -1691,11 +1692,11 @@ delete_node(hid_t pid, hid_t id)
static int
test_unlink_rightleaf(hid_t fid)
{
- hid_t rootid = -1, /* Group ID for root group */
- *gids = NULL; /* Array of IDs for groups created */
- int n, /* Local index variable */
- ngroups = 150; /* Number of groups to create */
- char name[256]; /* Name of object to create */
+ hid_t rootid = H5I_INVALID_HID, /* Group ID for root group */
+ *gids = NULL; /* Array of IDs for groups created */
+ int n, /* Local index variable */
+ ngroups = 150; /* Number of groups to create */
+ char name[256]; /* Name of object to create */
TESTING("deleting right-most child in non-leaf B-tree node");
@@ -1708,7 +1709,7 @@ test_unlink_rightleaf(hid_t fid)
/* Create all the groups */
for (n = 0; n < ngroups; n++) {
- HDsnprintf(name, sizeof(name), "Zone%d", n + 1);
+ snprintf(name, sizeof(name), "Zone%d", n + 1);
if ((gids[n] = H5Gcreate2(rootid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
} /* end for */
@@ -1717,7 +1718,7 @@ test_unlink_rightleaf(hid_t fid)
for (n = 0; n < ngroups; n++) {
if (delete_node(rootid, gids[n]) < 0)
TEST_ERROR;
- HDsnprintf(name, sizeof(name), "Zone%d", n + 1);
+ snprintf(name, sizeof(name), "Zone%d", n + 1);
if ((gids[n] = H5Gcreate2(rootid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
} /* end for */
@@ -1775,11 +1776,11 @@ error:
static int
test_unlink_rightnode(hid_t fid)
{
- hid_t rootid = -1, /* Group ID for root group */
- *gids = NULL; /* Array of IDs for groups created */
- int n, /* Local index variable */
- ngroups = 150; /* Number of groups to create */
- char name[256]; /* Name of object to create */
+ hid_t rootid = H5I_INVALID_HID, /* Group ID for root group */
+ *gids = NULL; /* Array of IDs for groups created */
+ int n, /* Local index variable */
+ ngroups = 150; /* Number of groups to create */
+ char name[256]; /* Name of object to create */
TESTING("deleting right-most child in non-leaf B-tree node");
@@ -1792,7 +1793,7 @@ test_unlink_rightnode(hid_t fid)
/* Create all the groups */
for (n = 0; n < ngroups; n++) {
- HDsnprintf(name, sizeof(name), "ZoneB%d", n + 1);
+ snprintf(name, sizeof(name), "ZoneB%d", n + 1);
if ((gids[n] = H5Gcreate2(rootid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1862,11 +1863,11 @@ error:
static int
test_unlink_middlenode(hid_t fid)
{
- hid_t rootid = -1, /* Group ID for root group */
- *gids = NULL; /* Array of IDs for groups created */
- int n, /* Local index variable */
- ngroups = 250; /* Number of groups to create */
- char name[256]; /* Name of object to create */
+ hid_t rootid = H5I_INVALID_HID, /* Group ID for root group */
+ *gids = NULL; /* Array of IDs for groups created */
+ int n, /* Local index variable */
+ ngroups = 250; /* Number of groups to create */
+ char name[256]; /* Name of object to create */
TESTING("deleting right-most child in non-leaf B-tree node");
@@ -1879,7 +1880,7 @@ test_unlink_middlenode(hid_t fid)
/* Create all the groups */
for (n = 0; n < ngroups; n++) {
- HDsnprintf(name, sizeof(name), "ZoneC%d", n + 1);
+ snprintf(name, sizeof(name), "ZoneC%d", n + 1);
if ((gids[n] = H5Gcreate2(rootid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -2235,7 +2236,7 @@ error:
static int
test_resurrect_dataset(hid_t fapl)
{
- hid_t f = -1, s = -1, d = -1;
+ hid_t f = H5I_INVALID_HID, s = H5I_INVALID_HID, d = H5I_INVALID_HID;
char filename[1024];
TESTING("resurrecting dataset after deletion");
@@ -2315,7 +2316,7 @@ error:
static int
test_resurrect_datatype(hid_t fapl)
{
- hid_t file = -1, type = -1;
+ hid_t file = H5I_INVALID_HID, type = H5I_INVALID_HID;
char filename[1024];
TESTING("resurrecting datatype after deletion");
@@ -2392,7 +2393,7 @@ error:
static int
test_resurrect_group(hid_t fapl)
{
- hid_t file = -1, group = -1;
+ hid_t file = H5I_INVALID_HID, group = H5I_INVALID_HID;
char filename[1024];
TESTING("resurrecting group after deletion");
@@ -2466,10 +2467,10 @@ error:
static int
test_unlink_chunked_dataset(hid_t fapl)
{
- hid_t file_id = -1;
- hid_t dset_id = -1;
- hid_t space_id = -1;
- hid_t dcpl_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t dcpl_id = H5I_INVALID_HID;
hsize_t dims[FILESPACE_NDIMS] = {FILESPACE_DIM0, FILESPACE_DIM1, FILESPACE_DIM2};
hsize_t max_dims[FILESPACE_NDIMS] = {H5S_UNLIMITED, H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[FILESPACE_NDIMS] = {FILESPACE_CHUNK0, FILESPACE_CHUNK1, FILESPACE_CHUNK2};
@@ -2561,15 +2562,15 @@ error:
static int
test_full_group_compact(hid_t fapl)
{
- hid_t file_id = -1;
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- H5O_info2_t oi; /* Stat buffer for object */
- char objname[128]; /* Buffer for name of objects to create */
- char objname2[128]; /* Buffer for name of objects to create */
- char filename[1024]; /* Buffer for filename */
- h5_stat_size_t keep_size; /* Size of the file with objects to keep */
- h5_stat_size_t file_size; /* Size of each file created */
- unsigned u; /* Local index variable */
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ H5O_info2_t oi; /* Stat buffer for object */
+ char objname[128]; /* Buffer for name of objects to create */
+ char objname2[128]; /* Buffer for name of objects to create */
+ char filename[1024]; /* Buffer for filename */
+ h5_stat_size_t keep_size; /* Size of the file with objects to keep */
+ h5_stat_size_t file_size; /* Size of each file created */
+ unsigned u; /* Local index variable */
TESTING("unlinking non-empty compact group");
@@ -2586,7 +2587,7 @@ test_full_group_compact(hid_t fapl)
/* Create several objects to link to */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "keep %u\n", u);
+ snprintf(objname, sizeof(objname), "keep %u\n", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Gclose(gid2) < 0)
@@ -2623,15 +2624,15 @@ test_full_group_compact(hid_t fapl)
/* Create hard links to objects in group to keep */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
- HDsnprintf(objname2, sizeof(objname2), "keep %u\n", u);
+ snprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
+ snprintf(objname2, sizeof(objname2), "keep %u\n", u);
if (H5Lcreate_hard(file_id, objname, gid, objname2, H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
/* Create several objects to delete */
for (u = 0; u < FULL_GROUP_NUM_DELETE_COMPACT; u++) {
- HDsnprintf(objname, sizeof(objname), "delete %u\n", u);
+ snprintf(objname, sizeof(objname), "delete %u\n", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Gclose(gid2) < 0)
@@ -2639,11 +2640,11 @@ test_full_group_compact(hid_t fapl)
} /* end for */
/* Check on group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) != TRUE)
+ if (H5G__has_links_test(gid, NULL) != true)
TEST_ERROR;
- if (H5G__has_stab_test(gid) == TRUE)
+ if (H5G__has_stab_test(gid) == true)
TEST_ERROR;
/* Close group with objects to delete */
@@ -2652,7 +2653,7 @@ test_full_group_compact(hid_t fapl)
/* Check reference count on objects to keep */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
+ snprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
if (H5Oget_info_by_name3(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
if (oi.rc != 2)
@@ -2673,7 +2674,7 @@ test_full_group_compact(hid_t fapl)
/* Check reference count on objects to keep */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
+ snprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
if (H5Oget_info_by_name3(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
if (oi.rc != 1)
@@ -2719,16 +2720,16 @@ error:
static int
test_full_group_dense(hid_t fapl)
{
- hid_t file_id = -1;
- hid_t gcpl = (-1); /* Group creation property list ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- H5O_info2_t oi; /* Stat buffer for object */
- char objname[128]; /* Buffer for name of objects to create */
- char objname2[128]; /* Buffer for name of objects to create */
- char filename[1024]; /* Buffer for filename */
- h5_stat_size_t keep_size; /* Size of the file with objects to keep */
- h5_stat_size_t file_size; /* Size of each file created */
- unsigned u; /* Local index variable */
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t gcpl = (H5I_INVALID_HID); /* Group creation property list ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ H5O_info2_t oi; /* Stat buffer for object */
+ char objname[128]; /* Buffer for name of objects to create */
+ char objname2[128]; /* Buffer for name of objects to create */
+ char filename[1024]; /* Buffer for filename */
+ h5_stat_size_t keep_size; /* Size of the file with objects to keep */
+ h5_stat_size_t file_size; /* Size of each file created */
+ unsigned u; /* Local index variable */
TESTING("unlinking non-empty dense group");
@@ -2745,7 +2746,7 @@ test_full_group_dense(hid_t fapl)
/* Create several objects to link to */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "keep %u\n", u);
+ snprintf(objname, sizeof(objname), "keep %u\n", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Gclose(gid2) < 0)
@@ -2797,15 +2798,15 @@ test_full_group_dense(hid_t fapl)
/* Create hard links to objects in group to keep */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
- HDsnprintf(objname2, sizeof(objname2), "keep %u\n", u);
+ snprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
+ snprintf(objname2, sizeof(objname2), "keep %u\n", u);
if (H5Lcreate_hard(file_id, objname, gid, objname2, H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
/* Create several objects to delete */
for (u = 0; u < FULL_GROUP_NUM_DELETE_DENSE; u++) {
- HDsnprintf(objname, sizeof(objname), "delete %u\n", u);
+ snprintf(objname, sizeof(objname), "delete %u\n", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Gclose(gid2) < 0)
@@ -2813,11 +2814,11 @@ test_full_group_dense(hid_t fapl)
} /* end for */
/* Check on group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Close group with objects to delete */
@@ -2826,7 +2827,7 @@ test_full_group_dense(hid_t fapl)
/* Check reference count on objects to keep */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
+ snprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
if (H5Oget_info_by_name3(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
if (oi.rc != 2)
@@ -2847,7 +2848,7 @@ test_full_group_dense(hid_t fapl)
/* Check reference count on objects to keep */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
+ snprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
if (H5Oget_info_by_name3(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
if (oi.rc != 1)
@@ -2920,16 +2921,16 @@ main(void)
TEST_ERROR;
/* Test with old & new format groups */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl;
/* Set the FAPL for the type of format */
if (new_format) {
- HDputs("\nTesting with new group format:");
+ puts("\nTesting with new group format:");
my_fapl = fapl2;
} /* end if */
else {
- HDputs("Testing with old group format:");
+ puts("Testing with old group format:");
my_fapl = fapl;
} /* end else */
@@ -3016,7 +3017,7 @@ main(void)
exit(EXIT_FAILURE);
}
- HDputs("All unlink tests passed.");
+ puts("All unlink tests passed.");
h5_cleanup(FILENAME, fapl);
diff --git a/test/unregister.c b/test/unregister.c
index d225881..e1576c0 100644
--- a/test/unregister.c
+++ b/test/unregister.c
@@ -114,7 +114,7 @@ test_unregister_filters(hid_t fapl_id)
/* Register DUMMY filter */
if (H5Zregister(H5Z_DUMMY) < 0)
goto error;
- if (H5Zfilter_avail(H5Z_FILTER_DUMMY) != TRUE)
+ if (H5Zfilter_avail(H5Z_FILTER_DUMMY) != true)
goto error;
/*******************
@@ -133,7 +133,7 @@ test_unregister_filters(hid_t fapl_id)
/* Create multiple groups under the main group */
for (i = 0; i < GROUP_ITERATION; i++) {
- HDsnprintf(group_name, sizeof(group_name), "group_%d", i);
+ snprintf(group_name, sizeof(group_name), "group_%d", i);
if ((gid_loop = H5Gcreate2(gid, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if (H5Gclose(gid_loop) < 0)
@@ -275,9 +275,9 @@ error:
int
main(void)
{
- hid_t fapl_id = H5I_INVALID_HID;
- int nerrors = 0;
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ hid_t fapl_id = H5I_INVALID_HID;
+ int nerrors = 0;
+ bool api_ctx_pushed = false; /* Whether API context pushed */
/* Testing setup */
h5_reset();
@@ -286,7 +286,7 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
/* Test unregistering filter in its own file */
nerrors += (test_unregister_filters(fapl_id) < 0 ? 1 : 0);
@@ -298,9 +298,9 @@ main(void)
printf("All filter unregistration tests passed.\n");
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
- api_ctx_pushed = FALSE;
+ api_ctx_pushed = false;
exit(EXIT_SUCCESS);
@@ -309,7 +309,7 @@ error:
printf("***** %d FILTER UNREGISTRATION TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/use.h b/test/use.h
index 4317ab1..217c155 100644
--- a/test/use.h
+++ b/test/use.h
@@ -51,7 +51,7 @@ typedef struct options_t {
hsize_t nplanes; /* number of planes to write, default proportional to chunksize */
char *filename; /* use case data filename */
part_t launch; /* launch writer, reader or both */
- hbool_t use_swmr; /* use swmr open (1) or not */
+ bool use_swmr; /* use swmr open (1) or not */
int iterations; /* iterations, default 1 */
hid_t fapl_id; /* instance-specific FAPL ID */
const char *progname; /* Program name (used in usage and dset name) */
@@ -63,5 +63,5 @@ int setup_parameters(int argc, char *const argv[], options_t *opts);
void show_parameters(options_t *opts);
void usage(const char *prog);
int create_uc_file(options_t *opts);
-int write_uc_file(hbool_t tosend, hid_t file_id, options_t *opts);
-int read_uc_file(hbool_t towait, options_t *opts);
+int write_uc_file(bool tosend, hid_t file_id, options_t *opts);
+int read_uc_file(bool towait, options_t *opts);
diff --git a/test/use_append_chunk.c b/test/use_append_chunk.c
index 4f64a66..3b3d69c 100644
--- a/test/use_append_chunk.c
+++ b/test/use_append_chunk.c
@@ -78,7 +78,7 @@ setup_parameters(int argc, char *const argv[], options_t *opts)
/* use case defaults */
memset(opts, 0, sizeof(options_t));
opts->chunksize = Chunksize_DFT;
- opts->use_swmr = TRUE; /* use swmr open */
+ opts->use_swmr = true; /* use swmr open */
opts->iterations = 1;
opts->chunkplanes = 1;
opts->progname = USE_APPEND_CHUNK_PROGNAME;
@@ -110,15 +110,15 @@ setup_parameters(int argc, char *const argv[], options_t *opts)
int
main(int argc, char *argv[])
{
- pid_t childpid = 0;
- pid_t mypid, tmppid;
- int child_status;
- int child_wait_option = 0;
- int ret_value = 0;
- int child_ret_value;
- hbool_t send_wait = FALSE;
- hid_t fapl = -1; /* File access property list */
- hid_t fid = -1; /* File ID */
+ pid_t childpid = 0;
+ pid_t mypid, tmppid;
+ int child_status;
+ int child_wait_option = 0;
+ int ret_value = 0;
+ int child_ret_value;
+ bool send_wait = false;
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
if (setup_parameters(argc, argv, &UC_opts) < 0) {
Hgoto_error(1);
@@ -127,7 +127,7 @@ main(int argc, char *argv[])
/* Determine the need to send/wait message file*/
if (UC_opts.launch == UC_READWRITE) {
HDunlink(WRITER_MESSAGE);
- send_wait = TRUE;
+ send_wait = true;
}
/* ==============================================================*/
@@ -168,7 +168,7 @@ main(int argc, char *argv[])
/* ============ */
if (UC_opts.launch == UC_READWRITE) {
if ((childpid = fork()) < 0) {
- HDperror("fork");
+ perror("fork");
Hgoto_error(1);
}
}
@@ -241,7 +241,7 @@ main(int argc, char *argv[])
/* ================================================ */
if (UC_opts.launch == UC_READWRITE) {
if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) {
- HDperror("waitpid");
+ perror("waitpid");
Hgoto_error(1);
}
diff --git a/test/use_append_chunk_mirror.c b/test/use_append_chunk_mirror.c
index 0620c68..e9e2726 100644
--- a/test/use_append_chunk_mirror.c
+++ b/test/use_append_chunk_mirror.c
@@ -118,7 +118,7 @@ setup_parameters(int argc, char *const argv[], options_t *opts)
/* use case defaults */
memset(opts, 0, sizeof(options_t));
opts->chunksize = Chunksize_DFT;
- opts->use_swmr = TRUE;
+ opts->use_swmr = true;
opts->iterations = 1;
opts->chunkplanes = 1;
opts->progname = THIS_PROGNAME;
@@ -156,7 +156,7 @@ main(int argc, char *argv[])
int child_wait_option = 0;
int ret_value = 0;
int child_ret_value;
- hbool_t send_wait = FALSE;
+ bool send_wait = false;
hid_t fid = H5I_INVALID_HID;
H5FD_mirror_fapl_t mirr_fa;
H5FD_splitter_vfd_config_t *split_fa = NULL;
@@ -169,7 +169,7 @@ main(int argc, char *argv[])
mirr_fa.magic = H5FD_MIRROR_FAPL_MAGIC;
mirr_fa.version = H5FD_MIRROR_CURR_FAPL_T_VERSION;
mirr_fa.handshake_port = SERVER_PORT;
- HDstrncpy(mirr_fa.remote_ip, SERVER_IP, H5FD_MIRROR_MAX_IP_LEN);
+ strncpy(mirr_fa.remote_ip, SERVER_IP, H5FD_MIRROR_MAX_IP_LEN);
if (NULL == (split_fa = calloc(1, sizeof(H5FD_splitter_vfd_config_t)))) {
fprintf(stderr, "can't allocate memory for splitter config\n");
@@ -181,13 +181,13 @@ main(int argc, char *argv[])
split_fa->magic = H5FD_SPLITTER_MAGIC;
split_fa->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
split_fa->log_file_path[0] = '\0'; /* none */
- split_fa->ignore_wo_errs = FALSE;
- HDstrncpy(split_fa->wo_path, MIRROR_FILE_NAME, H5FD_SPLITTER_PATH_MAX);
+ split_fa->ignore_wo_errs = false;
+ strncpy(split_fa->wo_path, MIRROR_FILE_NAME, H5FD_SPLITTER_PATH_MAX);
/* Determine the need to send/wait message file*/
if (UC_opts.launch == UC_READWRITE) {
HDunlink(WRITER_MESSAGE);
- send_wait = TRUE;
+ send_wait = true;
}
/* ==============================================================*/
@@ -259,7 +259,7 @@ main(int argc, char *argv[])
/* ============ */
if (UC_opts.launch == UC_READWRITE) {
if ((childpid = fork()) < 0) {
- HDperror("fork");
+ perror("fork");
Hgoto_error(1);
}
}
@@ -354,7 +354,7 @@ main(int argc, char *argv[])
/* ================================================ */
if (UC_opts.launch == UC_READWRITE) {
if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) {
- HDperror("waitpid");
+ perror("waitpid");
Hgoto_error(1);
}
diff --git a/test/use_append_mchunks.c b/test/use_append_mchunks.c
index 15f2f2a..ab6a5e5 100644
--- a/test/use_append_mchunks.c
+++ b/test/use_append_mchunks.c
@@ -104,15 +104,15 @@ setup_parameters(int argc, char *const argv[], options_t *opts)
int
main(int argc, char *argv[])
{
- pid_t childpid = 0;
- pid_t mypid, tmppid;
- int child_status;
- int child_wait_option = 0;
- int ret_value = 0;
- int child_ret_value;
- hbool_t send_wait = 0;
- hid_t fapl = -1; /* File access property list */
- hid_t fid = -1; /* File ID */
+ pid_t childpid = 0;
+ pid_t mypid, tmppid;
+ int child_status;
+ int child_wait_option = 0;
+ int ret_value = 0;
+ int child_ret_value;
+ bool send_wait = 0;
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
if (setup_parameters(argc, argv, &UC_opts) < 0) {
Hgoto_error(1);
@@ -162,7 +162,7 @@ main(int argc, char *argv[])
/* ============ */
if (UC_opts.launch == UC_READWRITE) {
if ((childpid = fork()) < 0) {
- HDperror("fork");
+ perror("fork");
Hgoto_error(1);
}
}
@@ -236,7 +236,7 @@ main(int argc, char *argv[])
/* ================================================ */
if (UC_opts.launch == UC_READWRITE) {
if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) {
- HDperror("waitpid");
+ perror("waitpid");
Hgoto_error(1);
}
diff --git a/test/use_common.c b/test/use_common.c
index e77ec77..a782eec 100644
--- a/test/use_common.c
+++ b/test/use_common.c
@@ -69,7 +69,7 @@ parse_option(int argc, char *const argv[], options_t *opts)
exit(EXIT_SUCCESS);
break;
case 'f': /* usecase data file name */
- opts->filename = HDstrdup(optarg);
+ opts->filename = strdup(optarg);
break;
case 'i': /* iterations */
if ((opts->iterations = atoi(optarg)) <= 0) {
@@ -107,7 +107,7 @@ parse_option(int argc, char *const argv[], options_t *opts)
usage(opts->progname);
Hgoto_error(-1);
}
- opts->use_swmr = (hbool_t)use_swmr;
+ opts->use_swmr = (bool)use_swmr;
break;
case 'y': /* Number of planes per chunk */
if ((opts->chunkplanes = strtoul(optarg, NULL, 0)) <= 0) {
@@ -137,12 +137,12 @@ parse_option(int argc, char *const argv[], options_t *opts)
/* set test file name if not given */
if (!opts->filename) {
/* default data file name is <progname>.h5 */
- if ((opts->filename = (char *)malloc(HDstrlen(opts->progname) + 4)) == NULL) {
+ if ((opts->filename = (char *)malloc(strlen(opts->progname) + 4)) == NULL) {
fprintf(stderr, "malloc: failed\n");
Hgoto_error(-1);
}
- HDstrcpy(opts->filename, opts->progname);
- HDstrcat(opts->filename, ".h5");
+ strcpy(opts->filename, opts->progname);
+ strcat(opts->filename, ".h5");
}
done:
@@ -258,7 +258,7 @@ create_uc_file(options_t *opts)
* ----------------------------------------------------------------------------
*/
int
-write_uc_file(hbool_t tosend, hid_t file_id, options_t *opts)
+write_uc_file(bool tosend, hid_t file_id, options_t *opts)
{
hid_t dsid; /* dataset ID */
hid_t dcpl; /* Dataset creation property list */
@@ -273,7 +273,7 @@ write_uc_file(hbool_t tosend, hid_t file_id, options_t *opts)
hsize_t start[3] = {0, 0, 0}, count[3]; /* Hyperslab selection values */
hsize_t i, j, k;
- if (TRUE == tosend) {
+ if (true == tosend) {
/* Send a message that H5Fopen is complete--releasing the file lock */
h5_send_message(WRITER_MESSAGE, NULL, NULL);
}
@@ -447,7 +447,7 @@ write_uc_file(hbool_t tosend, hid_t file_id, options_t *opts)
* ----------------------------------------------------------------------------
*/
int
-read_uc_file(hbool_t towait, options_t *opts)
+read_uc_file(bool towait, options_t *opts)
{
hid_t fid; /* File ID for new HDF5 file */
hid_t dsid; /* dataset ID */
diff --git a/test/use_disable_mdc_flushes.c b/test/use_disable_mdc_flushes.c
index 49dfa96..b8b5b7f 100644
--- a/test/use_disable_mdc_flushes.c
+++ b/test/use_disable_mdc_flushes.c
@@ -149,12 +149,12 @@ parse_option(int argc, char *const argv[])
/* set test file name if not given */
if (!filename_g) {
/* default data file name is <progname>.h5 */
- if ((filename_g = (char *)malloc(HDstrlen(progname_g) + 4)) == NULL) {
+ if ((filename_g = (char *)malloc(strlen(progname_g) + 4)) == NULL) {
fprintf(stderr, "malloc: failed\n");
Hgoto_error(-1);
}
- HDstrcpy(filename_g, progname_g);
- HDstrcat(filename_g, ".h5");
+ strcpy(filename_g, progname_g);
+ strcat(filename_g, ".h5");
}
done:
@@ -308,7 +308,7 @@ write_file(void)
hsize_t dims[3]; /* Dataspace dimensions */
hsize_t memdims[3]; /* Memory space dimensions */
hsize_t start[3] = {0, 0, 0}, count[3]; /* Hyperslab selection values */
- hbool_t disabled; /* Object's disabled status */
+ bool disabled; /* Object's disabled status */
hsize_t i, j, k;
name = filename_g;
diff --git a/test/vds.c b/test/vds.c
index 48cd522..c2546e5 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -53,7 +53,7 @@ static const char *FILENAME[] = {"vds_virt_0", "vds_virt_1", "vds_src_0", "vds_
#define PRINT_CONFIG(...) \
do { \
printf("Config: " __VA_ARGS__); \
- HDputs(""); \
+ puts(""); \
} while (0)
#else /* VDS_TEST_VERBOSE */
@@ -65,7 +65,7 @@ char vds_test_str_g[128] = "";
/* Replacement for TESTING_2 for non-verbose-output */
#define TESTING_2_SUPPRESSED(WHAT) \
do { \
- HDsnprintf(vds_test_str_g, sizeof(vds_test_str_g), WHAT); \
+ snprintf(vds_test_str_g, sizeof(vds_test_str_g), WHAT); \
} while (0)
/* Suppress output from PASSED() */
@@ -84,7 +84,7 @@ char vds_test_str_g[128] = "";
/* Replacement for printf for printing configuration for non-verbose output */
#define PRINT_CONFIG(...) \
do { \
- HDsnprintf(vds_config_str_g, sizeof(vds_config_str_g), __VA_ARGS__); \
+ snprintf(vds_config_str_g, sizeof(vds_config_str_g), __VA_ARGS__); \
} while (0)
#endif /* VDS_TEST_VERBOSE */
@@ -121,7 +121,7 @@ vds_select_equal(hid_t space1, hid_t space2)
hsize_t *buf1 = NULL;
hsize_t *buf2 = NULL;
size_t i;
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
/* Get and compare selection types */
if ((type1 = H5Sget_select_type(space1)) < 0)
@@ -129,7 +129,7 @@ vds_select_equal(hid_t space1, hid_t space2)
if ((type2 = H5Sget_select_type(space2)) < 0)
TEST_ERROR;
if (type1 != type2)
- return FALSE;
+ return false;
/* Check selection type */
switch (type1) {
@@ -149,7 +149,7 @@ vds_select_equal(hid_t space1, hid_t space2)
if ((rank2 = H5Sget_simple_extent_ndims(space2)) < 0)
TEST_ERROR;
if (rank1 != rank2)
- return FALSE;
+ return false;
/* Get and compare number of points */
if ((npoints1 = H5Sget_select_elem_npoints(space1)) < 0)
@@ -157,7 +157,7 @@ vds_select_equal(hid_t space1, hid_t space2)
if ((npoints2 = H5Sget_select_elem_npoints(space2)) < 0)
TEST_ERROR;
if (npoints1 != npoints2)
- return FALSE;
+ return false;
/* Allocate point lists. Do not return directly after
* allocating, to make sure buffers are freed. */
@@ -173,7 +173,7 @@ vds_select_equal(hid_t space1, hid_t space2)
TEST_ERROR;
for (i = 0; i < ((size_t)rank1 * (size_t)npoints1); i++)
if (buf1[i] != buf2[i]) {
- ret_value = FALSE;
+ ret_value = false;
break;
}
@@ -198,7 +198,7 @@ vds_select_equal(hid_t space1, hid_t space2)
if ((rank2 = H5Sget_simple_extent_ndims(space2)) < 0)
TEST_ERROR;
if (rank1 != rank2)
- return FALSE;
+ return false;
/* Get and compare number of blocks */
if ((nblocks1 = H5Sget_select_hyper_nblocks(space1)) < 0)
@@ -206,7 +206,7 @@ vds_select_equal(hid_t space1, hid_t space2)
if ((nblocks2 = H5Sget_select_hyper_nblocks(space2)) < 0)
TEST_ERROR;
if (nblocks1 != nblocks2)
- return FALSE;
+ return false;
/* Allocate block lists. Do not return directly after
* allocating, to make sure buffers are freed. */
@@ -224,7 +224,7 @@ vds_select_equal(hid_t space1, hid_t space2)
TEST_ERROR;
for (i = 0; i < ((size_t)2 * (size_t)rank1 * (size_t)nblocks1); i++)
if (buf1[i] != buf2[i]) {
- ret_value = FALSE;
+ ret_value = false;
break;
}
@@ -269,7 +269,7 @@ static int
vds_check_mapping(hid_t dcpl, size_t i, hid_t vspace, hid_t srcspace, const char *filename,
const char *dsetname)
{
- hid_t space_out = -1;
+ hid_t space_out = H5I_INVALID_HID;
char name_out[32];
htri_t tri_ret;
ssize_t str_len;
@@ -309,27 +309,27 @@ vds_check_mapping(hid_t dcpl, size_t i, hid_t vspace, hid_t srcspace, const char
/* Check filename */
if ((str_len = H5Pget_virtual_filename(dcpl, i, NULL, (size_t)0)) < 0)
TEST_ERROR;
- if ((size_t)str_len != HDstrlen(filename))
+ if ((size_t)str_len != strlen(filename))
TEST_ERROR;
assert((size_t)str_len < sizeof(name_out));
if ((str_len = H5Pget_virtual_filename(dcpl, i, name_out, sizeof(name_out))) < 0)
TEST_ERROR;
- if ((size_t)str_len != HDstrlen(filename))
+ if ((size_t)str_len != strlen(filename))
TEST_ERROR;
- if (HDstrncmp(name_out, filename, (size_t)str_len + 1) != 0)
+ if (strncmp(name_out, filename, (size_t)str_len + 1) != 0)
TEST_ERROR;
/* Check dsetname */
if ((str_len = H5Pget_virtual_dsetname(dcpl, i, NULL, (size_t)0)) < 0)
TEST_ERROR;
- if ((size_t)str_len != HDstrlen(dsetname))
+ if ((size_t)str_len != strlen(dsetname))
TEST_ERROR;
assert((size_t)str_len < sizeof(name_out));
if ((str_len = H5Pget_virtual_dsetname(dcpl, i, name_out, sizeof(name_out))) < 0)
TEST_ERROR;
- if ((size_t)str_len != HDstrlen(dsetname))
+ if ((size_t)str_len != strlen(dsetname))
TEST_ERROR;
- if (HDstrncmp(name_out, dsetname, (size_t)str_len + 1) != 0)
+ if (strncmp(name_out, dsetname, (size_t)str_len + 1) != 0)
TEST_ERROR;
return 0;
@@ -358,11 +358,11 @@ static int
test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, hid_t *ex_dcpl, hid_t vspace,
char *filename, hsize_t exp_meta_size)
{
- hid_t file = -1; /* File */
- hid_t dset = -1; /* Virtual dataset */
- H5D_space_status_t space_status; /* Dataset space status */
- void *plist_buf = NULL; /* Serialized property list buffer */
- H5O_native_info_t ninfo; /* Object info struct */
+ hid_t file = H5I_INVALID_HID; /* File */
+ hid_t dset = H5I_INVALID_HID; /* Virtual dataset */
+ H5D_space_status_t space_status; /* Dataset space status */
+ void *plist_buf = NULL; /* Serialized property list buffer */
+ H5O_native_info_t ninfo; /* Object info struct */
htri_t tri_ret;
assert((config >= TEST_API_BASIC) && (config < TEST_API_NTESTS));
@@ -519,10 +519,11 @@ static int
test_api(test_api_config_t config, hid_t fapl, H5F_libver_t low)
{
char filename[FILENAME_BUF_SIZE];
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t ex_dcpl = -1; /* Temporary dcpl for examination */
- hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */
- hid_t vspace[LIST_DOUBLE_SIZE]; /* Virtual dset dataspaces */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t ex_dcpl = H5I_INVALID_HID; /* Temporary dcpl for examination */
+ hid_t srcspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source dataspaces */
+ hid_t vspace[LIST_DOUBLE_SIZE]; /* Virtual dset dataspaces */
const char *src_file[4] = {"src_file1", "src_file2.", "src_file3..",
"src_file4..."}; /* Source file names (different lengths) */
const char *src_dset[4] = {"src_dset1....", "src_dset2.....", "src_dset3......",
@@ -1061,9 +1062,9 @@ test_api(test_api_config_t config, hid_t fapl, H5F_libver_t low)
TEST_ERROR;
/* Create file and dataset names */
- (void)HDsnprintf(tmp_filename, sizeof(tmp_filename), "src_file%u", i);
+ (void)snprintf(tmp_filename, sizeof(tmp_filename), "src_file%u", i);
tmp_filename[sizeof(tmp_filename) - 1] = '\0';
- (void)HDsnprintf(tmp_dsetname, sizeof(tmp_dsetname), "src_dset%u", i);
+ (void)snprintf(tmp_dsetname, sizeof(tmp_dsetname), "src_dset%u", i);
tmp_dsetname[sizeof(tmp_dsetname) - 1] = '\0';
/* Add virtual layout mapping */
@@ -1085,11 +1086,11 @@ test_api(test_api_config_t config, hid_t fapl, H5F_libver_t low)
/* Verify virtual layout */
for (i = 0; i < LIST_DOUBLE_SIZE; i++) {
/* Generate source file name */
- (void)HDsnprintf(tmp_filename, sizeof(tmp_filename), "src_file%u", i);
+ (void)snprintf(tmp_filename, sizeof(tmp_filename), "src_file%u", i);
tmp_filename[sizeof(tmp_filename) - 1] = '\0';
/* Generate source dset name */
- (void)HDsnprintf(tmp_dsetname, sizeof(tmp_dsetname), "src_dset%u", i);
+ (void)snprintf(tmp_dsetname, sizeof(tmp_dsetname), "src_dset%u", i);
tmp_dsetname[sizeof(tmp_dsetname) - 1] = '\0';
/* Check that the mapping in the DCPL is correct */
@@ -1186,19 +1187,23 @@ test_vds_prefix_first(unsigned config, hid_t vds_fapl, hid_t src_fapl)
char *srcfilenamepct = NULL;
char *srcfilenamepct_map = NULL;
const char *srcfilenamepct_map_orig = "vds%%%%_src";
- hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */
- hid_t vfile = -1; /* File with virtual dset */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t dapl = -1; /* Dataset access property list */
- hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */
- hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */
- hid_t memspace = -1; /* Memory dataspace */
- hid_t srcdset[4] = {-1, -1, -1, -1}; /* Source datasets */
- hid_t vdset = -1; /* Virtual dataset */
- hsize_t dims[4] = {10, 26, 0, 0}; /* Data space current size */
- int buf[10][26]; /* Write and expected read buffer */
- int rbuf[10][26]; /* Read buffer */
- int fill = -1; /* Fill value */
+ hid_t srcfile[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Files with source dsets */
+ hid_t vfile = H5I_INVALID_HID; /* File with virtual dset */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t dapl = H5I_INVALID_HID; /* Dataset access property list */
+ hid_t srcspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source dataspaces */
+ hid_t vspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Virtual dset dataspaces */
+ hid_t memspace = H5I_INVALID_HID; /* Memory dataspace */
+ hid_t srcdset[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source datasets */
+ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */
+ hsize_t dims[4] = {10, 26, 0, 0}; /* Data space current size */
+ int buf[10][26]; /* Write and expected read buffer */
+ int rbuf[10][26]; /* Read buffer */
+ int fill = -1; /* Fill value */
int i, j;
char buffer[1024]; /* buffer to read vds_prefix */
@@ -1242,7 +1247,7 @@ test_vds_prefix_first(unsigned config, hid_t vds_fapl, hid_t src_fapl)
if (H5Pget_virtual_prefix(dapl, buffer, sizeof(buffer)) < 0)
TEST_ERROR_SUPPRESSED;
- if (HDstrcmp(buffer, TMPDIR) != 0)
+ if (strcmp(buffer, TMPDIR) != 0)
FAIL_PUTS_ERROR("vds prefix not set correctly");
/* Create source dataspace */
@@ -1465,28 +1470,32 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
char *srcfilenamepct = NULL;
char *srcfilenamepct_map = NULL;
const char *srcfilenamepct_map_orig = "vds%%%%_src";
- hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */
- hid_t vfile = -1; /* File with virtual dset */
- hid_t vfile2 = -1; /* File with copied virtual dset */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */
- hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */
- hid_t memspace = -1; /* Memory dataspace */
- hid_t srcdset[4] = {-1, -1, -1, -1}; /* Source datasets */
- hid_t vdset = -1; /* Virtual dataset */
- hsize_t dims[4] = {10, 26, 0, 0}; /* Data space current size */
- hsize_t start[4]; /* Hyperslab start */
- hsize_t stride[4]; /* Hyperslab stride */
- hsize_t count[4]; /* Hyperslab count */
- hsize_t block[4]; /* Hyperslab block */
- hssize_t offset[2] = {0, 0}; /* Selection offset */
- int buf[10][26]; /* Write and expected read buffer */
- int rbuf[10][26]; /* Read buffer */
- int rbuf99[9][9]; /* 9x9 Read buffer */
- int evbuf[10][26]; /* Expected VDS "buffer" */
- int erbuf[10][26]; /* Expected read buffer */
- int fill = -1; /* Fill value */
- herr_t ret; /* Generic return value */
+ hid_t srcfile[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Files with source dsets */
+ hid_t vfile = H5I_INVALID_HID; /* File with virtual dset */
+ hid_t vfile2 = H5I_INVALID_HID; /* File with copied virtual dset */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t srcspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source dataspaces */
+ hid_t vspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Virtual dset dataspaces */
+ hid_t memspace = H5I_INVALID_HID; /* Memory dataspace */
+ hid_t srcdset[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source datasets */
+ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */
+ hsize_t dims[4] = {10, 26, 0, 0}; /* Data space current size */
+ hsize_t start[4]; /* Hyperslab start */
+ hsize_t stride[4]; /* Hyperslab stride */
+ hsize_t count[4]; /* Hyperslab count */
+ hsize_t block[4]; /* Hyperslab block */
+ hssize_t offset[2] = {0, 0}; /* Selection offset */
+ int buf[10][26]; /* Write and expected read buffer */
+ int rbuf[10][26]; /* Read buffer */
+ int rbuf99[9][9]; /* 9x9 Read buffer */
+ int evbuf[10][26]; /* Expected VDS "buffer" */
+ int erbuf[10][26]; /* Expected read buffer */
+ int fill = -1; /* Fill value */
+ herr_t ret; /* Generic return value */
int i, j, u, v;
TESTING_2_SUPPRESSED("basic virtual dataset I/O");
@@ -4391,30 +4400,34 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
char srcfilename[FILENAME_BUF_SIZE];
char srcfilename_map[FILENAME_BUF_SIZE];
char vfilename[FILENAME_BUF_SIZE];
- hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */
- hid_t vfile = -1; /* File with virtual dset */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t srcdcpl = -1; /* DCPL for source dset */
- hid_t dapl = -1; /* Dataset access property list */
- hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */
- hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */
- hid_t memspace = -1; /* Memory dataspace */
- hid_t filespace = -1; /* File dataspace */
- hid_t srcdset[4] = {-1, -1, -1, -1}; /* Source datasets */
- hid_t vdset = -1; /* Virtual dataset */
- hsize_t dims[2] = {10, 10}; /* Data space current size */
- hsize_t mdims[2] = {10, 20}; /* Data space maximum size */
- hsize_t cdims[2] = {4, 4}; /* Chunk dimensions */
- hsize_t start[4]; /* Hyperslab start */
- hsize_t stride[4]; /* Hyperslab stride */
- hsize_t count[4]; /* Hyperslab count */
- hsize_t block[4]; /* Hyperslab block */
- int buf[10][20]; /* Write and expected read buffer */
- int rbuf[10][20]; /* Read buffer */
- int erbuf[10][20]; /* Expected read buffer */
- int ndims; /* Number of dimensions */
- int fill = -1; /* Fill value */
- H5D_vds_view_t virtual_view; /* Virtual view property */
+ hid_t srcfile[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Files with source dsets */
+ hid_t vfile = H5I_INVALID_HID; /* File with virtual dset */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t srcdcpl = H5I_INVALID_HID; /* DCPL for source dset */
+ hid_t dapl = H5I_INVALID_HID; /* Dataset access property list */
+ hid_t srcspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source dataspaces */
+ hid_t vspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Virtual dset dataspaces */
+ hid_t memspace = H5I_INVALID_HID; /* Memory dataspace */
+ hid_t filespace = H5I_INVALID_HID; /* File dataspace */
+ hid_t srcdset[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source datasets */
+ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */
+ hsize_t dims[2] = {10, 10}; /* Data space current size */
+ hsize_t mdims[2] = {10, 20}; /* Data space maximum size */
+ hsize_t cdims[2] = {4, 4}; /* Chunk dimensions */
+ hsize_t start[4]; /* Hyperslab start */
+ hsize_t stride[4]; /* Hyperslab stride */
+ hsize_t count[4]; /* Hyperslab count */
+ hsize_t block[4]; /* Hyperslab block */
+ int buf[10][20]; /* Write and expected read buffer */
+ int rbuf[10][20]; /* Read buffer */
+ int erbuf[10][20]; /* Expected read buffer */
+ int ndims; /* Number of dimensions */
+ int fill = -1; /* Fill value */
+ H5D_vds_view_t virtual_view; /* Virtual view property */
int i, j;
TESTING_2_SUPPRESSED("virtual dataset I/O with unlimited selections");
@@ -7406,28 +7419,30 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
char *srcfilenamepct_map = NULL;
const char *printf_srcfilename_map_orig = "vds_src_%b";
const char *srcfilenamepct_map_orig = "vds%%%%_src";
- hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */
- hid_t vfile = -1; /* File with virtual dset */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t dapl = -1; /* Dataset access property list */
- hid_t srcspace = -1; /* Source dataspace */
- hid_t vspace[2] = {-1, -1}; /* Virtual dset dataspaces */
- hid_t memspace = -1; /* Memory dataspace */
- hid_t filespace = -1; /* File dataspace */
- hid_t srcdset[6] = {-1, -1, -1, -1, -1, -1}; /* Source datasets */
- hid_t vdset = -1; /* Virtual dataset */
- hsize_t dims[2] = {10, 0}; /* Data space current size */
- hsize_t mdims[2] = {10, 20}; /* Data space maximum size */
- hsize_t start[2] = {0, 0}; /* Hyperslab start */
- hsize_t stride[2]; /* Hyperslab stride */
- hsize_t count[2]; /* Hyperslab count */
- hsize_t block[2]; /* Hyperslab block */
- int buf[10][20]; /* Write and expected read buffer */
- int rbuf[10][20]; /* Read buffer */
- int erbuf[10][20]; /* Expected read buffer */
- int ndims; /* Number of dimensions */
- int fill = -1; /* Fill value */
- hsize_t gap_size; /* Gap size property */
+ hid_t srcfile[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Files with source dsets */
+ hid_t vfile = H5I_INVALID_HID; /* File with virtual dset */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t dapl = H5I_INVALID_HID; /* Dataset access property list */
+ hid_t srcspace = H5I_INVALID_HID; /* Source dataspace */
+ hid_t vspace[2] = {H5I_INVALID_HID, H5I_INVALID_HID}; /* Virtual dset dataspaces */
+ hid_t memspace = H5I_INVALID_HID; /* Memory dataspace */
+ hid_t filespace = H5I_INVALID_HID; /* File dataspace */
+ hid_t srcdset[6] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID}; /* Source datasets */
+ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */
+ hsize_t dims[2] = {10, 0}; /* Data space current size */
+ hsize_t mdims[2] = {10, 20}; /* Data space maximum size */
+ hsize_t start[2] = {0, 0}; /* Hyperslab start */
+ hsize_t stride[2]; /* Hyperslab stride */
+ hsize_t count[2]; /* Hyperslab count */
+ hsize_t block[2]; /* Hyperslab block */
+ int buf[10][20]; /* Write and expected read buffer */
+ int rbuf[10][20]; /* Read buffer */
+ int erbuf[10][20]; /* Expected read buffer */
+ int ndims; /* Number of dimensions */
+ int fill = -1; /* Fill value */
+ hsize_t gap_size; /* Gap size property */
int i, j;
TESTING_2_SUPPRESSED("virtual dataset I/O with printf source");
@@ -11114,28 +11129,29 @@ test_all(unsigned config, hid_t vds_fapl, hid_t src_fapl)
char vfilename[FILENAME_BUF_SIZE];
char srcfilename[FILENAME_BUF_SIZE];
char srcfilename_map[FILENAME_BUF_SIZE];
- hid_t srcfile = -1; /* File with source dsets */
- hid_t vfile = -1; /* File with virtual dset */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t srcdcpl = -1; /* DCPL for source dset */
- hid_t srcspace[3] = {-1, -1, -1}; /* Source dataspaces */
- hid_t vspace[3] = {-1, -1, -1}; /* Virtual dset dataspaces */
- hid_t memspace = -1; /* Memory dataspace */
- hid_t filespace = -1; /* File dataspace */
- hid_t srcdset[5] = {-1, -1, -1, -1, -1}; /* Source datasets */
- hid_t vdset = -1; /* Virtual dataset */
- hsize_t dims[2] = {6, 6}; /* Data space current size */
- hsize_t mdims[2] = {10, 10}; /* Data space maximum size */
- hsize_t cdims[2] = {2, 2}; /* Chunk dimensions */
- hsize_t start[2]; /* Hyperslab start */
- hsize_t stride[2]; /* Hyperslab stride */
- hsize_t count[2]; /* Hyperslab count */
- hsize_t block[2]; /* Hyperslab block */
- int buf[10][10]; /* Write and expected read buffer */
- int rbuf[10][10]; /* Read buffer */
- int erbuf[10][10]; /* Expected read buffer */
- int ndims; /* Number of dimensions */
- int fill = -1; /* Fill value */
+ hid_t srcfile = H5I_INVALID_HID; /* File with source dsets */
+ hid_t vfile = H5I_INVALID_HID; /* File with virtual dset */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t srcdcpl = H5I_INVALID_HID; /* DCPL for source dset */
+ hid_t srcspace[3] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID}; /* Source dataspaces */
+ hid_t vspace[3] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID}; /* Virtual dset dataspaces */
+ hid_t memspace = H5I_INVALID_HID; /* Memory dataspace */
+ hid_t filespace = H5I_INVALID_HID; /* File dataspace */
+ hid_t srcdset[5] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source datasets */
+ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */
+ hsize_t dims[2] = {6, 6}; /* Data space current size */
+ hsize_t mdims[2] = {10, 10}; /* Data space maximum size */
+ hsize_t cdims[2] = {2, 2}; /* Chunk dimensions */
+ hsize_t start[2]; /* Hyperslab start */
+ hsize_t stride[2]; /* Hyperslab stride */
+ hsize_t count[2]; /* Hyperslab count */
+ hsize_t block[2]; /* Hyperslab block */
+ int buf[10][10]; /* Write and expected read buffer */
+ int rbuf[10][10]; /* Read buffer */
+ int erbuf[10][10]; /* Expected read buffer */
+ int ndims; /* Number of dimensions */
+ int fill = -1; /* Fill value */
int i, j;
TESTING_2_SUPPRESSED("virtual dataset I/O with mixed selection types");
@@ -12138,23 +12154,23 @@ error:
static int
test_dapl_values(hid_t fapl_id)
{
- hid_t fid = -1; /* file to write to */
- hid_t dcpl_id = -1; /* dataset creation properties */
- hid_t dapl_id1 = -1; /* dataset access properties */
- hid_t dapl_id2 = -1; /* dataset access properties */
- hid_t vds_sid = -1; /* vds data space */
- hid_t src_sid = -1; /* source data space */
- hid_t did1 = -1; /* dataset */
- hid_t did2 = -1; /* dataset */
- hsize_t start; /* hyperslab start */
- hsize_t stride; /* hyperslab count */
- hsize_t count; /* hyperslab count */
- hsize_t block; /* hyperslab count */
- hsize_t dims; /* dataset size */
- hsize_t max_dims; /* dataset max size */
- H5D_vds_view_t view; /* view from dapl */
- hsize_t gap_size; /* gap size from dapl */
- char filename[1024]; /* file names */
+ hid_t fid = H5I_INVALID_HID; /* file to write to */
+ hid_t dcpl_id = H5I_INVALID_HID; /* dataset creation properties */
+ hid_t dapl_id1 = H5I_INVALID_HID; /* dataset access properties */
+ hid_t dapl_id2 = H5I_INVALID_HID; /* dataset access properties */
+ hid_t vds_sid = H5I_INVALID_HID; /* vds data space */
+ hid_t src_sid = H5I_INVALID_HID; /* source data space */
+ hid_t did1 = H5I_INVALID_HID; /* dataset */
+ hid_t did2 = H5I_INVALID_HID; /* dataset */
+ hsize_t start; /* hyperslab start */
+ hsize_t stride; /* hyperslab count */
+ hsize_t count; /* hyperslab count */
+ hsize_t block; /* hyperslab count */
+ hsize_t dims; /* dataset size */
+ hsize_t max_dims; /* dataset max size */
+ H5D_vds_view_t view; /* view from dapl */
+ hsize_t gap_size; /* gap size from dapl */
+ char filename[1024]; /* file names */
TESTING_2("H5Dget_access_plist() returns dapl w/ correct values");
@@ -12295,16 +12311,16 @@ main(void)
{
char filename[FILENAME_BUF_SIZE];
hid_t fapl;
- hid_t vds_fapl = -1; /* File access property list */
- hid_t src_fapl = -1; /* File access property list */
+ hid_t vds_fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t src_fapl = H5I_INVALID_HID; /* File access property list */
int test_api_config;
unsigned bit_config;
H5F_libver_t low, high; /* Low and high bounds */
const char *env_h5_drvr; /* File Driver value from environment */
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
int nerrors = 0;
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -12320,8 +12336,8 @@ main(void)
* doesn't support parallel reads and the splitter VFD has external
* link-related bugs.
*/
- if (driver_is_parallel || !HDstrcmp(env_h5_drvr, "splitter")) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ if (driver_is_parallel || !strcmp(env_h5_drvr, "splitter")) {
+ puts(" -- SKIPPED for incompatible VFD --");
exit(EXIT_SUCCESS);
}
@@ -12360,10 +12376,10 @@ main(void)
/* Display testing info */
low_string = h5_get_version_string(low);
high_string = h5_get_version_string(high);
- HDsnprintf(msg, sizeof(msg),
- "Testing virtual dataset I/O with file version bounds: (%s, %s):", low_string,
- high_string);
- HDputs(msg);
+ snprintf(msg, sizeof(msg),
+ "Testing virtual dataset I/O with file version bounds: (%s, %s):", low_string,
+ high_string);
+ puts(msg);
for (test_api_config = (int)TEST_API_BASIC; test_api_config < (int)TEST_API_NTESTS;
test_api_config++)
@@ -12371,7 +12387,7 @@ main(void)
TESTING_2("Virtual dataset I/O");
#ifdef VDS_TEST_VERBOSE
- HDputs("");
+ puts("");
#else /* VDS_TEST_VERBOSE */
tmp_nerrors = nerrors;
#endif /* VDS_TEST_VERBOSE */
diff --git a/test/vds_env.c b/test/vds_env.c
index 256455e..e964956 100644
--- a/test/vds_env.c
+++ b/test/vds_env.c
@@ -48,19 +48,23 @@ test_vds_prefix_second(unsigned config, hid_t fapl)
char *vfilename2 = NULL;
char *srcfilenamepct = NULL;
char *srcfilenamepct_map = NULL;
- hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */
- hid_t vfile = -1; /* File with virtual dset */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t dapl = -1; /* Dataset access property list */
- hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */
- hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */
- hid_t memspace = -1; /* Memory dataspace */
- hid_t srcdset[4] = {-1, -1, -1, -1}; /* Source datasets */
- hid_t vdset = -1; /* Virtual dataset */
- hsize_t dims[4] = {10, 26, 0, 0}; /* Data space current size */
- int buf[10][26]; /* Write and expected read buffer */
- int rbuf[10][26]; /* Read buffer */
- int fill = -1; /* Fill value */
+ hid_t srcfile[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Files with source dsets */
+ hid_t vfile = H5I_INVALID_HID; /* File with virtual dset */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t dapl = H5I_INVALID_HID; /* Dataset access property list */
+ hid_t srcspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source dataspaces */
+ hid_t vspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Virtual dset dataspaces */
+ hid_t memspace = H5I_INVALID_HID; /* Memory dataspace */
+ hid_t srcdset[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID,
+ H5I_INVALID_HID}; /* Source datasets */
+ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */
+ hsize_t dims[4] = {10, 26, 0, 0}; /* Data space current size */
+ int buf[10][26]; /* Write and expected read buffer */
+ int rbuf[10][26]; /* Read buffer */
+ int fill = -1; /* Fill value */
int i, j;
char buffer[1024]; /* buffer to read vds_prefix */
@@ -107,7 +111,7 @@ test_vds_prefix_second(unsigned config, hid_t fapl)
if (H5Pget_virtual_prefix(dapl, buffer, sizeof(buffer)) < 0)
TEST_ERROR;
- if (HDstrcmp(buffer, "someprefix") != 0)
+ if (strcmp(buffer, "someprefix") != 0)
FAIL_PUTS_ERROR("vds prefix not set correctly");
/* Create source dataspace */
@@ -324,10 +328,10 @@ main(void)
unsigned bit_config;
H5F_libver_t low, high; /* Low and high bounds */
const char *env_h5_drvr; /* File Driver value from environment */
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
int nerrors = 0;
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -343,8 +347,8 @@ main(void)
* doesn't support parallel reads and the splitter VFD has external
* link-related bugs.
*/
- if (driver_is_parallel || !HDstrcmp(env_h5_drvr, "splitter")) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ if (driver_is_parallel || !strcmp(env_h5_drvr, "splitter")) {
+ puts(" -- SKIPPED for incompatible VFD --");
exit(EXIT_SUCCESS);
}
@@ -374,10 +378,9 @@ main(void)
/* Display testing info */
low_string = h5_get_version_string(low);
high_string = h5_get_version_string(high);
- HDsnprintf(msg, sizeof(msg),
- "Testing virtual dataset with file version bounds: (%s, %s):", low_string,
- high_string);
- HDputs(msg);
+ snprintf(msg, sizeof(msg),
+ "Testing virtual dataset with file version bounds: (%s, %s):", low_string, high_string);
+ puts(msg);
for (bit_config = 0; bit_config < TEST_IO_NTESTS; bit_config++) {
printf("Config: %s%s%s\n", bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "",
diff --git a/test/vds_swmr_gen.c b/test/vds_swmr_gen.c
index bdfa18e..a22b155 100644
--- a/test/vds_swmr_gen.c
+++ b/test/vds_swmr_gen.c
@@ -44,16 +44,16 @@ static int32_t VDS_FILL_VALUE = -9;
int
main(void)
{
- hid_t faplid = -1; /* file access property list ID (all files) */
+ hid_t faplid = H5I_INVALID_HID; /* file access property list ID (all files) */
- hid_t src_sid = -1; /* source dataset's dataspace ID */
- hid_t src_dcplid = -1; /* source dataset property list ID */
+ hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */
+ hid_t src_dcplid = H5I_INVALID_HID; /* source dataset property list ID */
- hid_t vds_sid = -1; /* VDS dataspace ID */
- hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+ hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */
+ hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */
- hid_t fid = -1; /* HDF5 file ID */
- hid_t did = -1; /* dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
hsize_t start[RANK]; /* starting point for hyperslab */
int map_start = -1; /* starting point in the VDS map */
diff --git a/test/vds_swmr_reader.c b/test/vds_swmr_reader.c
index f6e9ddd..76cdb8a 100644
--- a/test/vds_swmr_reader.c
+++ b/test/vds_swmr_reader.c
@@ -18,11 +18,11 @@ static hsize_t VDS_PLANE[RANK] = {1, FULL_HEIGHT, WIDTH};
int
main(void)
{
- hid_t fid = -1; /* HDF5 file ID */
- hid_t faplid = -1; /* file access property list ID */
- hid_t did = -1; /* dataset ID */
- hid_t msid = -1; /* memory dataspace ID */
- hid_t fsid = -1; /* file dataspace ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
+ hid_t faplid = H5I_INVALID_HID; /* file access property list ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ hid_t msid = H5I_INVALID_HID; /* memory dataspace ID */
+ hid_t fsid = H5I_INVALID_HID; /* file dataspace ID */
hsize_t start[RANK]; /* hyperslab start point */
diff --git a/test/vds_swmr_writer.c b/test/vds_swmr_writer.c
index d5fa74b..752cc50 100644
--- a/test/vds_swmr_writer.c
+++ b/test/vds_swmr_writer.c
@@ -18,11 +18,11 @@ main(int argc, char *argv[])
{
int file_number = -1; /* Source file number */
- hid_t fid = -1; /* HDF5 file ID */
- hid_t faplid = -1; /* file access property list ID */
- hid_t did = -1; /* dataset ID */
- hid_t msid = -1; /* memory dataspace ID */
- hid_t fsid = -1; /* file dataspace ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
+ hid_t faplid = H5I_INVALID_HID; /* file access property list ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ hid_t msid = H5I_INVALID_HID; /* memory dataspace ID */
+ hid_t fsid = H5I_INVALID_HID; /* file dataspace ID */
hsize_t extent[RANK]; /* dataset extents */
hsize_t start[RANK]; /* hyperslab start point */
diff --git a/test/vfd.c b/test/vfd.c
index 06a6ed4..5a86920 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -88,7 +88,7 @@ static int __k;
*
* Helper macro to track the sizes of entries in a vector
* I/O call when stepping through the vector incrementally.
- * Assuming that bool_size_fixed is initialized to FALSE
+ * Assuming that bool_size_fixed is initialized to false
* before the scan, this macro will detect the sizes array
* optimization for the case in which all remaining entries
* are of the same size, and set size_value accordingly.
@@ -102,20 +102,20 @@ static int __k;
if ((sizes_array)[idx] == 0) { \
\
assert((idx) > 0); \
- (bool_size_fixed) = TRUE; \
+ (bool_size_fixed) = true; \
} \
else { \
\
(size_value) = (sizes_array)[idx]; \
} \
} \
- } while (FALSE)
+ } while (false)
/* Macro SET_TYPE()
*
* Helper macro to track the types of entries in a vector
* I/O call when stepping through the vector incrementally.
- * Assuming that bool_type_fixed is initialized to FALSE
+ * Assuming that bool_type_fixed is initialized to false
* before the scan, this macro will detect the types array
* optimization for the case in which all remaining entries
* are of the same type, and set type_value accordingly.
@@ -129,14 +129,14 @@ static int __k;
if ((types_array)[idx] == H5FD_MEM_NOLIST) { \
\
assert((idx) > 0); \
- (bool_type_fixed) = TRUE; \
+ (bool_type_fixed) = true; \
} \
else { \
\
(type_value) = (types_array)[idx]; \
} \
} \
- } while (FALSE)
+ } while (false)
/* Helper structure to pass around dataset information.
*/
@@ -159,8 +159,8 @@ static int splitter_prepare_file_paths(H5FD_splitter_vfd_config_t *vfd_config, c
static int splitter_create_single_file_at(const char *filename, hid_t fapl_id,
const struct splitter_dataset_def *data);
static int splitter_compare_expected_data(hid_t file_id, const struct splitter_dataset_def *data);
-static int run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_errors,
- hbool_t provide_logfile_path, const hid_t sub_fapl_ids[2]);
+static int run_splitter_test(const struct splitter_dataset_def *data, bool ignore_wo_errors,
+ bool provide_logfile_path, const hid_t sub_fapl_ids[2]);
static int splitter_RO_test(const struct splitter_dataset_def *data, hid_t child_fapl_id);
static int splitter_tentative_open_test(hid_t child_fapl_id);
static int file_exists(const char *filename, hid_t fapl_id);
@@ -191,14 +191,14 @@ static herr_t H5FD__ctl_test_vfd_ctl(H5FD_t *_file, uint64_t op_code, uint64_t
static herr_t
test_sec2(void)
{
- hid_t fid = -1; /* file ID */
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t fapl_id_out = -1; /* from H5Fget_access_plist */
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
- char filename[1024]; /* filename */
- void *os_file_handle = NULL; /* OS file handle */
- hsize_t file_size; /* file size */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t fapl_id_out = H5I_INVALID_HID; /* from H5Fget_access_plist */
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
+ char filename[1024]; /* filename */
+ void *os_file_handle = NULL; /* OS file handle */
+ hsize_t file_size; /* file size */
TESTING("SEC2 file driver");
@@ -303,28 +303,28 @@ error:
static herr_t
test_core(void)
{
- hid_t fid = -1; /* file ID */
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t fapl_id_out = -1; /* from H5Fget_access_plist */
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
- hid_t did = -1; /* dataset ID */
- hid_t sid = -1; /* dataspace ID */
- char filename[1024]; /* filename */
- void *os_file_handle = NULL; /* OS file handle */
- hsize_t file_size; /* file size */
- size_t increment; /* core VFD increment */
- hbool_t backing_store; /* use backing store? */
- hbool_t use_write_tracking; /* write tracking flag */
- size_t write_tracking_page_size; /* write tracking page size */
- int *data_w = NULL; /* data written to the dataset */
- int *data_r = NULL; /* data read from the dataset */
- int val; /* data value */
- int *pw = NULL, *pr = NULL; /* pointers for iterating over
- data arrays (write & read) */
- hsize_t dims[2]; /* dataspace dimensions */
- int i, j; /* iterators */
- htri_t status; /* return value from H5Lexists */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t fapl_id_out = H5I_INVALID_HID; /* from H5Fget_access_plist */
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ char filename[1024]; /* filename */
+ void *os_file_handle = NULL; /* OS file handle */
+ hsize_t file_size; /* file size */
+ size_t increment; /* core VFD increment */
+ bool backing_store; /* use backing store? */
+ bool use_write_tracking; /* write tracking flag */
+ size_t write_tracking_page_size; /* write tracking page size */
+ int *data_w = NULL; /* data written to the dataset */
+ int *data_r = NULL; /* data read from the dataset */
+ int val; /* data value */
+ int *pw = NULL, *pr = NULL; /* pointers for iterating over
+ data arrays (write & read) */
+ hsize_t dims[2]; /* dataspace dimensions */
+ int i, j; /* iterators */
+ htri_t status; /* return value from H5Lexists */
TESTING("CORE file driver");
@@ -344,7 +344,7 @@ test_core(void)
FAIL_PUTS_ERROR("unable to remove backing store file");
/* Create and close file w/ backing store off */
- if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, FALSE) < 0)
+ if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, false) < 0)
TEST_ERROR;
/* Check that the VFD feature flags are correct.
@@ -379,7 +379,7 @@ test_core(void)
TEST_ERROR;
/* Check for the backing store file */
if (HDaccess(filename, F_OK) != -1)
- FAIL_PUTS_ERROR("file created when backing store set to FALSE");
+ FAIL_PUTS_ERROR("file created when backing store set to false");
/************************************************************************
* Check basic core VFD operation and properties. This is done with the
@@ -387,7 +387,7 @@ test_core(void)
************************************************************************/
/* Turn the backing store on */
- if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, TRUE) < 0)
+ if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, true) < 0)
TEST_ERROR;
/* Check that write tracking is off by default and that the default
@@ -395,13 +395,13 @@ test_core(void)
*/
if (H5Pget_core_write_tracking(fapl_id, &use_write_tracking, &write_tracking_page_size) < 0)
TEST_ERROR;
- if (FALSE != use_write_tracking)
+ if (false != use_write_tracking)
FAIL_PUTS_ERROR("write tracking should be off by default");
if (0 == write_tracking_page_size)
FAIL_PUTS_ERROR("write tracking page size should never be zero");
/* Set core VFD properties */
- if (H5Pset_core_write_tracking(fapl_id, TRUE, CORE_PAGE_SIZE) < 0)
+ if (H5Pset_core_write_tracking(fapl_id, true, CORE_PAGE_SIZE) < 0)
TEST_ERROR;
/* Create the file */
@@ -423,7 +423,7 @@ test_core(void)
TEST_ERROR;
if (increment != (size_t)CORE_INCREMENT)
FAIL_PUTS_ERROR("incorrect increment from file fapl");
- if (backing_store != TRUE)
+ if (backing_store != true)
FAIL_PUTS_ERROR("incorrect backing store flag from file fapl");
/* Check that the backing store write tracking info was saved */
@@ -433,7 +433,7 @@ test_core(void)
*/
if (H5Pget_core_write_tracking(fapl_id, &use_write_tracking, &write_tracking_page_size) < 0)
TEST_ERROR;
- if (TRUE != use_write_tracking)
+ if (true != use_write_tracking)
FAIL_PUTS_ERROR("write tracking flag incorrect in fapl obtained from H5Fget_access_plist");
if (CORE_PAGE_SIZE != write_tracking_page_size)
FAIL_PUTS_ERROR("write tracking page size incorrect in fapl obtained from H5Fget_access_plist");
@@ -472,7 +472,7 @@ test_core(void)
/* Open the file with backing store off for read and write.
* Changes won't be saved in file.
*/
- if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, FALSE) < 0)
+ if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, false) < 0)
TEST_ERROR;
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
TEST_ERROR;
@@ -555,7 +555,7 @@ test_core(void)
/* Open the file with backing store on for read and write.
* Changes will be saved in file.
*/
- if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, TRUE) < 0)
+ if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, true) < 0)
TEST_ERROR;
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
TEST_ERROR;
@@ -626,7 +626,7 @@ test_core(void)
************************************************************************/
/* Create and close a file */
- if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, TRUE) < 0)
+ if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, true) < 0)
TEST_ERROR;
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
TEST_ERROR;
@@ -634,20 +634,20 @@ test_core(void)
TEST_ERROR;
/* Try to delete the file with the backing store off (shouldn't delete anything) */
- if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, FALSE) < 0)
+ if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, false) < 0)
TEST_ERROR;
if (H5Fdelete(filename, fapl_id) < 0)
TEST_ERROR;
if (-1 == HDaccess(filename, F_OK))
- FAIL_PUTS_ERROR("file deleted when backing store set to FALSE");
+ FAIL_PUTS_ERROR("file deleted when backing store set to false");
/* Try to delete the file with the backing store on (should work) */
- if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, TRUE) < 0)
+ if (H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, true) < 0)
TEST_ERROR;
if (H5Fdelete(filename, fapl_id) < 0)
TEST_ERROR;
if (0 == HDaccess(filename, F_OK))
- FAIL_PUTS_ERROR("file not deleted when backing store set to TRUE");
+ FAIL_PUTS_ERROR("file not deleted when backing store set to true");
/************************************************************************
* Clean up
@@ -693,8 +693,9 @@ static herr_t
test_direct(void)
{
#ifdef H5_HAVE_DIRECT
- hid_t file = -1, fapl = -1, access_fapl = -1;
- hid_t dset1 = -1, dset2 = -1, space1 = -1, space2 = -1;
+ hid_t file = H5I_INVALID_HID, fapl = H5I_INVALID_HID, access_fapl = H5I_INVALID_HID;
+ hid_t dset1 = H5I_INVALID_HID, dset2 = H5I_INVALID_HID, space1 = H5I_INVALID_HID,
+ space2 = H5I_INVALID_HID;
char filename[1024];
int *fhandle = NULL;
hsize_t file_size;
@@ -925,13 +926,13 @@ H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
static herr_t
test_family_opens(char *fname, hid_t fa_pl)
{
- hid_t file = -1;
+ hid_t file = H5I_INVALID_HID;
char first_name[1024];
char wrong_name[1024];
int i;
/* Case 1: reopen file with 1st member file name and default property list */
- HDsnprintf(first_name, sizeof(first_name), fname, 0);
+ snprintf(first_name, sizeof(first_name), fname, 0);
H5E_BEGIN_TRY
{
@@ -963,7 +964,7 @@ test_family_opens(char *fname, hid_t fa_pl)
TEST_ERROR;
/* Case 4: reopen file with wrong name template */
- HDstrcpy(wrong_name, fname);
+ strcpy(wrong_name, fname);
for (i = 0; i < 1024; i++)
if (wrong_name[i] == '5') {
wrong_name[i] = '4';
@@ -1000,10 +1001,11 @@ H5_GCC_CLANG_DIAG_ON("format-nonliteral")
static herr_t
test_family(void)
{
- hid_t file = -1, fapl = -1, fapl2 = -1, space = -1, dset = -1;
- hid_t access_fapl = -1;
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
+ hid_t file = H5I_INVALID_HID, fapl = H5I_INVALID_HID, fapl2 = H5I_INVALID_HID, space = H5I_INVALID_HID,
+ dset = H5I_INVALID_HID;
+ hid_t access_fapl = H5I_INVALID_HID;
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
char filename[1024];
char dname[] = "dataset";
unsigned int i, j;
@@ -1210,8 +1212,8 @@ H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
static herr_t
test_family_compat(void)
{
- hid_t file = -1, fapl = -1;
- hid_t dset = -1;
+ hid_t file = H5I_INVALID_HID, fapl = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
char dname[] = "dataset";
char filename[1024];
char pathname[1024], pathname_individual[1024];
@@ -1230,19 +1232,19 @@ test_family_compat(void)
h5_fixname(FILENAME[3], fapl, newname, sizeof(newname));
pathname[0] = '\0';
- HDstrcat(pathname, filename);
+ strcat(pathname, filename);
/* The following code makes the copies of the family files in the source directory.
* Since we're going to open the files with write mode, this protects the original
* files.
*/
- HDsnprintf(newname_individual, sizeof(newname_individual), newname, counter);
- HDsnprintf(pathname_individual, sizeof(pathname_individual), pathname, counter);
+ snprintf(newname_individual, sizeof(newname_individual), newname, counter);
+ snprintf(pathname_individual, sizeof(pathname_individual), pathname, counter);
while (h5_make_local_copy(pathname_individual, newname_individual) >= 0) {
counter++;
- HDsnprintf(newname_individual, sizeof(newname_individual), newname, counter);
- HDsnprintf(pathname_individual, sizeof(pathname_individual), pathname, counter);
+ snprintf(newname_individual, sizeof(newname_individual), newname, counter);
+ snprintf(pathname_individual, sizeof(pathname_individual), pathname, counter);
} /* end while */
/* Make sure we can open the file. Use the read and write mode to flush the
@@ -1435,8 +1437,8 @@ test_multi_opens(char *fname)
char sf_name[1024]; /*name string "multi_file-s.h5"*/
/* Case: reopen with the name of super file and default property list */
- HDsnprintf(super_name, sizeof(super_name), "%%s-%c.h5", 's');
- HDsnprintf(sf_name, sizeof(sf_name), super_name, fname);
+ snprintf(super_name, sizeof(super_name), "%%s-%c.h5", 's');
+ snprintf(sf_name, sizeof(sf_name), super_name, fname);
H5E_BEGIN_TRY
{
@@ -1460,11 +1462,12 @@ H5_GCC_CLANG_DIAG_ON("format-nonliteral")
static herr_t
test_multi(void)
{
- hid_t file = -1, fapl = -1, fapl2 = -1, dset = -1, space = -1;
- hid_t root = -1, attr = -1, aspace = -1, atype = -1;
- hid_t access_fapl = -1;
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
+ hid_t file = H5I_INVALID_HID, fapl = H5I_INVALID_HID, fapl2 = H5I_INVALID_HID, dset = H5I_INVALID_HID,
+ space = H5I_INVALID_HID;
+ hid_t root = H5I_INVALID_HID, attr = H5I_INVALID_HID, aspace = H5I_INVALID_HID, atype = H5I_INVALID_HID;
+ hid_t access_fapl = H5I_INVALID_HID;
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
char filename[1024];
int *fhandle2 = NULL, *fhandle = NULL;
hsize_t file_size;
@@ -1509,23 +1512,23 @@ test_multi(void)
memb_map[H5FD_MEM_BTREE] = H5FD_MEM_BTREE;
memb_map[H5FD_MEM_GHEAP] = H5FD_MEM_GHEAP;
- HDsnprintf(sv[H5FD_MEM_SUPER], 32, "%%s-%c.h5", 's');
+ snprintf(sv[H5FD_MEM_SUPER], 32, "%%s-%c.h5", 's');
memb_name[H5FD_MEM_SUPER] = sv[H5FD_MEM_SUPER];
memb_addr[H5FD_MEM_SUPER] = 0;
- HDsnprintf(sv[H5FD_MEM_BTREE], 32, "%%s-%c.h5", 'b');
+ snprintf(sv[H5FD_MEM_BTREE], 32, "%%s-%c.h5", 'b');
memb_name[H5FD_MEM_BTREE] = sv[H5FD_MEM_BTREE];
memb_addr[H5FD_MEM_BTREE] = HADDR_MAX / 4;
- HDsnprintf(sv[H5FD_MEM_DRAW], 32, "%%s-%c.h5", 'r');
+ snprintf(sv[H5FD_MEM_DRAW], 32, "%%s-%c.h5", 'r');
memb_name[H5FD_MEM_DRAW] = sv[H5FD_MEM_DRAW];
memb_addr[H5FD_MEM_DRAW] = HADDR_MAX / 2;
- HDsnprintf(sv[H5FD_MEM_GHEAP], 32, "%%s-%c.h5", 'g');
+ snprintf(sv[H5FD_MEM_GHEAP], 32, "%%s-%c.h5", 'g');
memb_name[H5FD_MEM_GHEAP] = sv[H5FD_MEM_GHEAP];
memb_addr[H5FD_MEM_GHEAP] = (HADDR_MAX / 4) * 3;
- if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, TRUE) < 0)
+ if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, true) < 0)
TEST_ERROR;
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
@@ -1638,7 +1641,7 @@ test_multi(void)
if ((atype = H5Tcopy(H5T_C_S1)) < 0)
TEST_ERROR;
- if (H5Tset_size(atype, HDstrlen(meta) + 1) < 0)
+ if (H5Tset_size(atype, strlen(meta) + 1) < 0)
TEST_ERROR;
if (H5Tset_strpad(atype, H5T_STR_NULLTERM) < 0)
@@ -1716,10 +1719,10 @@ error:
static herr_t
test_multi_compat(void)
{
- hid_t file = -1, fapl = -1, dset = -1, space = -1;
- char newname[1024];
- char filename_s[1024], newname_s[1024];
- char filename_r[1024], newname_r[1024];
+ hid_t file = H5I_INVALID_HID, fapl = H5I_INVALID_HID, dset = H5I_INVALID_HID, space = H5I_INVALID_HID;
+ char newname[1024];
+ char filename_s[1024], newname_s[1024];
+ char filename_r[1024], newname_r[1024];
H5FD_mem_t mt, memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl[H5FD_MEM_NTYPES];
haddr_t memb_addr[H5FD_MEM_NTYPES];
@@ -1755,16 +1758,16 @@ test_multi_compat(void)
memb_map[H5FD_MEM_DRAW] = H5FD_MEM_DRAW;
memb_fapl[H5FD_MEM_SUPER] = H5P_DEFAULT;
- HDsnprintf(sv[H5FD_MEM_SUPER], 32, "%%s-%c.h5", 's');
+ snprintf(sv[H5FD_MEM_SUPER], 32, "%%s-%c.h5", 's');
memb_name[H5FD_MEM_SUPER] = sv[H5FD_MEM_SUPER];
memb_addr[H5FD_MEM_SUPER] = 0;
memb_fapl[H5FD_MEM_DRAW] = H5P_DEFAULT;
- HDsnprintf(sv[H5FD_MEM_DRAW], 32, "%%s-%c.h5", 'r');
+ snprintf(sv[H5FD_MEM_DRAW], 32, "%%s-%c.h5", 'r');
memb_name[H5FD_MEM_DRAW] = sv[H5FD_MEM_DRAW];
memb_addr[H5FD_MEM_DRAW] = HADDR_MAX / 2;
- if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, TRUE) < 0)
+ if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, true) < 0)
TEST_ERROR;
h5_fixname(FILENAME[9], fapl, newname, sizeof newname);
@@ -1772,12 +1775,12 @@ test_multi_compat(void)
/* Make copy for the data file in the build directory, to protect the
* original file in the source directory
*/
- HDsnprintf(filename_s, sizeof(filename_s), "%s-%c.h5", MULTI_COMPAT_BASENAME, 's');
- HDsnprintf(newname_s, sizeof(newname_s), "%s-%c.h5", FILENAME[9], 's');
+ snprintf(filename_s, sizeof(filename_s), "%s-%c.h5", MULTI_COMPAT_BASENAME, 's');
+ snprintf(newname_s, sizeof(newname_s), "%s-%c.h5", FILENAME[9], 's');
h5_make_local_copy(filename_s, newname_s);
- HDsnprintf(filename_r, sizeof(filename_r), "%s-%c.h5", MULTI_COMPAT_BASENAME, 'r');
- HDsnprintf(newname_r, sizeof(newname_r), "%s-%c.h5", FILENAME[9], 'r');
+ snprintf(filename_r, sizeof(filename_r), "%s-%c.h5", MULTI_COMPAT_BASENAME, 'r');
+ snprintf(newname_r, sizeof(newname_r), "%s-%c.h5", FILENAME[9], 'r');
h5_make_local_copy(filename_r, newname_r);
/* Reopen the file for read only. Verify 1.8 library can open file
@@ -1898,11 +1901,11 @@ error:
static herr_t
test_log(void)
{
- hid_t file = -1;
- hid_t fapl = -1;
- hid_t access_fapl = -1;
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
+ hid_t file = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t access_fapl = H5I_INVALID_HID;
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
char filename[1024];
int *fhandle = NULL;
hsize_t file_size = 0;
@@ -2021,11 +2024,11 @@ error:
static herr_t
test_stdio(void)
{
- hid_t file = -1;
- hid_t fapl = -1;
- hid_t access_fapl = -1;
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
+ hid_t file = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t access_fapl = H5I_INVALID_HID;
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
char filename[1024];
FILE *fhandle = NULL;
hsize_t file_size = 0;
@@ -2127,11 +2130,11 @@ test_windows(void)
{
#ifdef H5_HAVE_WINDOWS
- hid_t file = -1;
- hid_t fapl = -1;
- hid_t access_fapl = -1;
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
+ hid_t file = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t access_fapl = H5I_INVALID_HID;
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
char filename[1024];
int *fhandle = NULL;
hsize_t file_size = 0;
@@ -2255,16 +2258,16 @@ static herr_t
test_ros3(void)
{
#ifdef H5_HAVE_ROS3_VFD
- hid_t fid = -1; /* file ID */
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t fapl_id_out = -1; /* from H5Fget_access_plist */
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
- char filename[1024]; /* filename */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ hid_t fapl_id_out = H5I_INVALID_HID; /* from H5Fget_access_plist */
+ hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
+ char filename[1024]; /* filename */
H5FD_ros3_fapl_t test_ros3_fa;
H5FD_ros3_fapl_t ros3_fa_0 = {
/* version = */ H5FD_CURR_ROS3_FAPL_T_VERSION,
- /* authenticate = */ FALSE,
+ /* authenticate = */ false,
/* aws_region = */ "",
/* secret_id = */ "",
/* secret_key = */ "plugh",
@@ -2292,9 +2295,9 @@ test_ros3(void)
/* need a macro to compare instances of H5FD_ros3_fapl_t */
if ((test_ros3_fa.version != ros3_fa_0.version) ||
(test_ros3_fa.authenticate != ros3_fa_0.authenticate) ||
- (HDstrcmp(test_ros3_fa.aws_region, ros3_fa_0.aws_region) != 0) ||
- (HDstrcmp(test_ros3_fa.secret_id, ros3_fa_0.secret_id) != 0) ||
- (HDstrcmp(test_ros3_fa.secret_key, ros3_fa_0.secret_key) != 0))
+ (strcmp(test_ros3_fa.aws_region, ros3_fa_0.aws_region) != 0) ||
+ (strcmp(test_ros3_fa.secret_id, ros3_fa_0.secret_id) != 0) ||
+ (strcmp(test_ros3_fa.secret_key, ros3_fa_0.secret_key) != 0))
TEST_ERROR;
h5_fixname(FILENAME[10], fapl_id, filename, sizeof(filename));
@@ -2396,8 +2399,8 @@ compare_splitter_config_info(hid_t fapl_id, H5FD_splitter_vfd_config_t *info)
SPLITTER_TEST_FAULT("Write-Only driver mismatch\n");
}
}
- if ((HDstrlen(info->wo_path) != HDstrlen(fetched_info->wo_path)) ||
- HDstrncmp(info->wo_path, fetched_info->wo_path, H5FD_SPLITTER_PATH_MAX) != 0) {
+ if ((strlen(info->wo_path) != strlen(fetched_info->wo_path)) ||
+ strncmp(info->wo_path, fetched_info->wo_path, H5FD_SPLITTER_PATH_MAX) != 0) {
fprintf(stderr, "MISMATCH: '%s' :: '%s'\n", info->wo_path, fetched_info->wo_path);
HEXPRINT(H5FD_SPLITTER_PATH_MAX, info->wo_path);
HEXPRINT(H5FD_SPLITTER_PATH_MAX, fetched_info->wo_path);
@@ -2428,8 +2431,8 @@ done:
*-------------------------------------------------------------------------
*/
static int
-run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_errors,
- hbool_t provide_logfile_path, const hid_t sub_fapl_ids[2])
+run_splitter_test(const struct splitter_dataset_def *data, bool ignore_wo_errors, bool provide_logfile_path,
+ const hid_t sub_fapl_ids[2])
{
hid_t file_id = H5I_INVALID_HID;
hid_t fapl_id = H5I_INVALID_HID;
@@ -2457,7 +2460,7 @@ run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_err
SPLITTER_TEST_FAULT("can't prepare file paths\n");
}
- if (provide_logfile_path == FALSE) {
+ if (provide_logfile_path == false) {
vfd_config->log_file_path[0] = '\0'; /* reset as empty string */
}
@@ -2556,8 +2559,8 @@ run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_err
/* Verify existence of logfile if appropriate */
logfile = fopen(vfd_config->log_file_path, "r");
- if ((TRUE == provide_logfile_path && NULL == logfile) ||
- (FALSE == provide_logfile_path && NULL != logfile)) {
+ if ((true == provide_logfile_path && NULL == logfile) ||
+ (false == provide_logfile_path && NULL != logfile)) {
SPLITTER_TEST_FAULT("no logfile when one was expected\n");
}
@@ -2616,10 +2619,10 @@ driver_is_splitter_compatible(hid_t fapl_id)
}
vfd_config->magic = H5FD_SPLITTER_MAGIC;
vfd_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- vfd_config->ignore_wo_errs = FALSE;
+ vfd_config->ignore_wo_errs = false;
vfd_config->rw_fapl_id = H5P_DEFAULT;
vfd_config->wo_fapl_id = fapl_id;
- HDstrncpy(vfd_config->wo_path, "nonesuch", H5FD_SPLITTER_PATH_MAX);
+ strncpy(vfd_config->wo_path, "nonesuch", H5FD_SPLITTER_PATH_MAX);
vfd_config->log_file_path[0] = '\0';
H5E_BEGIN_TRY
@@ -2681,7 +2684,7 @@ splitter_RO_test(const struct splitter_dataset_def *data, hid_t child_fapl_id)
vfd_config->magic = H5FD_SPLITTER_MAGIC;
vfd_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- vfd_config->ignore_wo_errs = FALSE;
+ vfd_config->ignore_wo_errs = false;
vfd_config->rw_fapl_id = child_fapl_id;
vfd_config->wo_fapl_id = child_fapl_id;
@@ -3044,7 +3047,7 @@ splitter_tentative_open_test(hid_t child_fapl_id)
vfd_config->magic = H5FD_SPLITTER_MAGIC;
vfd_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- vfd_config->ignore_wo_errs = FALSE;
+ vfd_config->ignore_wo_errs = false;
vfd_config->rw_fapl_id = child_fapl_id;
vfd_config->wo_fapl_id = child_fapl_id;
@@ -3393,9 +3396,9 @@ test_splitter(void)
* specified), logfile, and Write Channel error ignoring behavior.
*/
for (i = 0; i < 4; i++) {
- hbool_t ignore_wo_errors = (i & 1) ? TRUE : FALSE;
- hbool_t provide_logfile_path = (i & 2) ? TRUE : FALSE;
- hid_t child_fapl_ids[2] = {H5P_DEFAULT, H5P_DEFAULT};
+ bool ignore_wo_errors = (i & 1) ? true : false;
+ bool provide_logfile_path = (i & 2) ? true : false;
+ hid_t child_fapl_ids[2] = {H5P_DEFAULT, H5P_DEFAULT};
/* Test child driver definition/default combination */
for (j = 0; j < 4; j++) {
@@ -3446,7 +3449,7 @@ error:
static void
setup_rand(void)
{
- hbool_t use_predefined_seed = FALSE;
+ bool use_predefined_seed = false;
unsigned predefined_seed = 18669;
unsigned seed;
struct timeval tv;
@@ -3604,10 +3607,10 @@ static const H5FD_class_t H5FD_ctl_test_vfd_g = {
static herr_t
run_ctl_test(uint64_t op_code, uint64_t flags, ctl_test_opc_type opc_type, hid_t fapl_id)
{
- hbool_t fail_if_unknown = FALSE;
- hbool_t routing_flag_set = FALSE;
- hbool_t is_passthrough_vfd = FALSE;
- hbool_t expect_fail = FALSE;
+ bool fail_if_unknown = false;
+ bool routing_flag_set = false;
+ bool is_passthrough_vfd = false;
+ bool expect_fail = false;
H5FD_t *file_drv_ptr = NULL;
herr_t ctl_result = SUCCEED;
hid_t driver_id = H5I_INVALID_HID;
@@ -3702,7 +3705,7 @@ test_ctl(void)
hid_t sub_fapl_id = H5I_INVALID_HID;
TESTING("VFD ctl callback");
- HDputs("");
+ puts("");
/* Register VFD for test */
if ((driver_id = H5FDregister(&H5FD_ctl_test_vfd_g)) < 0)
@@ -3807,7 +3810,7 @@ test_ctl(void)
splitter_config->magic = H5FD_SPLITTER_MAGIC;
splitter_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- splitter_config->ignore_wo_errs = TRUE;
+ splitter_config->ignore_wo_errs = true;
splitter_config->rw_fapl_id = H5P_DEFAULT;
splitter_config->wo_fapl_id = H5P_DEFAULT;
h5_fixname(FILENAME[15], splitter_config->wo_fapl_id, splitter_config->wo_path, H5FD_SPLITTER_PATH_MAX);
@@ -3992,17 +3995,17 @@ error:
* All arrays parameters are presumed to be of length
* count.
*
- * Return: Return TRUE if successful, and FALSE if any errors
+ * Return: Return true if successful, and false if any errors
* are encountered.
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
test_vector_io__setup_v(uint32_t count, H5FD_mem_t types[], haddr_t addrs[], size_t sizes[],
const void *write_bufs[], void *read_bufs[], char base_fill_char)
{
- hbool_t result = TRUE; /* will set to FALSE on failure */
+ bool result = true; /* will set to false on failure */
char fill_char = base_fill_char;
void *temp_buf = NULL;
uint32_t i;
@@ -4032,7 +4035,7 @@ test_vector_io__setup_v(uint32_t count, H5FD_mem_t types[], haddr_t addrs[], siz
if ((NULL == temp_buf) || (NULL == read_bufs[i])) {
fprintf(stderr, "%s: can't malloc read / write bufs.\n", __func__);
- result = FALSE;
+ result = false;
break;
}
@@ -4091,17 +4094,17 @@ test_vector_io__setup_v(uint32_t count, H5FD_mem_t types[], haddr_t addrs[], siz
* count. Count is presumed to be a power of 2, and at
* least 2.
*
- * Return: Return TRUE if successful, and FALSE if any errors
+ * Return: Return true if successful, and false if any errors
* are encountered.
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
test_vector_io__setup_fixed_size_v(uint32_t count, H5FD_mem_t types[], haddr_t addrs[], size_t sizes[],
const void *write_bufs[], void *read_bufs[], char base_fill_char)
{
- hbool_t result = TRUE; /* will set to FALSE on failure */
+ bool result = true; /* will set to false on failure */
char fill_char = base_fill_char;
void *temp_buf = NULL;
uint32_t fix_point;
@@ -4166,7 +4169,7 @@ test_vector_io__setup_fixed_size_v(uint32_t count, H5FD_mem_t types[], haddr_t a
if ((NULL == temp_buf) || (NULL == read_bufs[i])) {
fprintf(stderr, "%s: can't malloc read / write bufs.\n", __func__);
- result = FALSE;
+ result = false;
break;
}
@@ -4221,20 +4224,20 @@ test_vector_io__setup_fixed_size_v(uint32_t count, H5FD_mem_t types[], haddr_t a
* All arrays parameters are presumed to be of length
* count.
*
- * Return: Return TRUE if successful, and FALSE if any errors
+ * Return: Return true if successful, and false if any errors
* are encountered.
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
test_vector_io__read_v_indiv(H5FD_t *lf, uint32_t count, H5FD_mem_t types[], haddr_t addrs[], size_t sizes[],
void *read_bufs[])
{
- hbool_t size_fixed = FALSE;
- hbool_t type_fixed = FALSE;
- hbool_t result = TRUE; /* will set to FALSE on failure */
- hbool_t verbose = FALSE;
+ bool size_fixed = false;
+ bool type_fixed = false;
+ bool result = true; /* will set to false on failure */
+ bool verbose = false;
uint32_t i;
size_t size = SIZE_MAX;
H5FD_mem_t type = H5FD_MEM_NTYPES;
@@ -4251,7 +4254,7 @@ test_vector_io__read_v_indiv(H5FD_t *lf, uint32_t count, H5FD_mem_t types[], had
fprintf(stdout, "%s: H5FDread() failed on entry %d.\n", __func__, i);
}
- result = FALSE;
+ result = false;
break;
}
}
@@ -4269,20 +4272,20 @@ test_vector_io__read_v_indiv(H5FD_t *lf, uint32_t count, H5FD_mem_t types[], had
* All arrays parameters are presumed to be of length
* count.
*
- * Return: Return TRUE if successful, and FALSE if any errors
+ * Return: Return true if successful, and false if any errors
* are encountered.
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
test_vector_io__write_v_indiv(H5FD_t *lf, uint32_t count, H5FD_mem_t types[], haddr_t addrs[], size_t sizes[],
const void *write_bufs[])
{
- hbool_t size_fixed = FALSE;
- hbool_t type_fixed = FALSE;
- hbool_t result = TRUE; /* will set to FALSE on failure */
- hbool_t verbose = FALSE;
+ bool size_fixed = false;
+ bool type_fixed = false;
+ bool result = true; /* will set to false on failure */
+ bool verbose = false;
uint32_t i;
size_t size = SIZE_MAX;
H5FD_mem_t type = H5FD_MEM_NTYPES;
@@ -4299,7 +4302,7 @@ test_vector_io__write_v_indiv(H5FD_t *lf, uint32_t count, H5FD_mem_t types[], ha
fprintf(stdout, "%s: HDwrite() failed on entry %d.\n", __func__, i);
}
- result = FALSE;
+ result = false;
break;
}
}
@@ -4315,20 +4318,20 @@ test_vector_io__write_v_indiv(H5FD_t *lf, uint32_t count, H5FD_mem_t types[], ha
* Purpose: Verify that the read and write buffers of the supplied
* vectors are identical.
*
- * Return: TRUE if the read and write vectors are identical, and
- * FALSE otherwise.
+ * Return: true if the read and write vectors are identical, and
+ * false otherwise.
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
test_vector_io__verify_v(uint32_t count, H5FD_mem_t types[], size_t sizes[], const void *write_bufs[],
void *read_bufs[], const char *name)
{
- hbool_t size_fixed = FALSE;
- hbool_t type_fixed = FALSE;
- hbool_t identical = TRUE;
- hbool_t verbose = TRUE;
+ bool size_fixed = false;
+ bool type_fixed = false;
+ bool identical = true;
+ bool verbose = true;
uint32_t i;
size_t j;
const char *w_buf;
@@ -4354,7 +4357,7 @@ test_vector_io__verify_v(uint32_t count, H5FD_mem_t types[], size_t sizes[], con
if (w_buf[j] != r_buf[j]) {
- identical = FALSE;
+ identical = false;
if (verbose) {
@@ -4391,8 +4394,8 @@ static void
test_vector_io__dump_test_vectors(uint32_t count, H5FD_mem_t types[], haddr_t addrs[], size_t sizes[],
const void *write_bufs[], void *read_bufs[], const char *name)
{
- hbool_t size_fixed = FALSE;
- hbool_t type_fixed = FALSE;
+ bool size_fixed = false;
+ bool type_fixed = false;
uint32_t i;
const char *mem_type_names[7] = {"H5FD_MEM_DEFAULT", "H5FD_MEM_SUPER", "H5FD_MEM_BTREE", "H5FD_MEM_DRAW",
"H5FD_MEM_GHEAP", "H5FD_MEM_LHEAP", "H5FD_MEM_OHDR"};
@@ -4463,60 +4466,60 @@ static herr_t
test_vector_io(const char *vfd_name)
{
char test_title[80];
- hbool_t size_fixed_0 = FALSE; /* whether remaining entry */
- hbool_t size_fixed_1 = FALSE; /* sizes in vector are fixed. */
- hbool_t size_fixed_2 = FALSE; /* */
- hbool_t type_fixed_0 = FALSE; /* whether remaining entry */
- hbool_t type_fixed_1 = FALSE; /* types in vector are fixed. */
- hbool_t type_fixed_2 = FALSE; /* */
- hbool_t verbose = FALSE;
- hid_t fapl_id = -1; /* file access property list ID */
- haddr_t eoa; /* file eoa */
- char filename[1024]; /* filename */
- char *buf; /* tmp ptr to buf */
- unsigned flags = 0; /* file open flags */
- H5FD_t *lf = NULL; /* VFD struct ptr */
- uint32_t i; /* index */
- uint32_t j; /* index */
- uint32_t count = VECTOR_LEN; /* length of vectors */
- H5FD_mem_t types_0[VECTOR_LEN]; /* types vector */
- H5FD_mem_t types_1[VECTOR_LEN]; /* types vector */
- H5FD_mem_t types_2[VECTOR_LEN]; /* types vector */
- H5FD_mem_t f_types_0[VECTOR_LEN]; /* fixed types vector */
- H5FD_mem_t f_types_1[VECTOR_LEN]; /* fixed types vector */
- H5FD_mem_t f_types_2[VECTOR_LEN]; /* fixed types vector */
- H5FD_mem_t f_type_0 = H5FD_MEM_NTYPES; /* current type for f vector 0 */
- H5FD_mem_t f_type_1 = H5FD_MEM_NTYPES; /* current type for f vector 1 */
- H5FD_mem_t f_type_2 = H5FD_MEM_NTYPES; /* current type for f vector 2 */
- haddr_t addrs_0[VECTOR_LEN]; /* addresses vector */
- haddr_t addrs_1[VECTOR_LEN]; /* addresses vector */
- haddr_t addrs_2[VECTOR_LEN]; /* addresses vector */
- haddr_t f_addrs_0[VECTOR_LEN]; /* fixed addresses vector */
- haddr_t f_addrs_1[VECTOR_LEN]; /* fixed addresses vector */
- haddr_t f_addrs_2[VECTOR_LEN]; /* fixed addresses vector */
- size_t sizes_0[VECTOR_LEN]; /* sizes vector */
- size_t sizes_1[VECTOR_LEN]; /* sizes vector */
- size_t sizes_2[VECTOR_LEN]; /* sizes vector */
- size_t f_sizes_0[VECTOR_LEN]; /* fixed sizes vector */
- size_t f_sizes_1[VECTOR_LEN]; /* fixed sizes vector */
- size_t f_sizes_2[VECTOR_LEN]; /* fixed sizes vector */
- size_t f_size_0 = 0; /* current size for f vector 0 */
- size_t f_size_1 = 0; /* current size for f vector 1 */
- size_t f_size_2 = 0; /* current size for f vector 2 */
- const void *write_bufs_0[VECTOR_LEN]; /* write bufs vector */
- const void *write_bufs_1[VECTOR_LEN]; /* write bufs vector */
- const void *write_bufs_2[VECTOR_LEN]; /* write bufs vector */
- const void *f_write_bufs_0[VECTOR_LEN]; /* fixed write bufs vector */
- const void *f_write_bufs_1[VECTOR_LEN]; /* fixed write bufs vector */
- const void *f_write_bufs_2[VECTOR_LEN]; /* fixed write bufs vector */
- void *read_bufs_0[VECTOR_LEN]; /* read bufs vector */
- void *read_bufs_1[VECTOR_LEN]; /* read bufs vector */
- void *read_bufs_2[VECTOR_LEN]; /* read bufs vector */
- void *f_read_bufs_0[VECTOR_LEN]; /* fixed read bufs vector */
- void *f_read_bufs_1[VECTOR_LEN]; /* fixed read bufs vector */
- void *f_read_bufs_2[VECTOR_LEN]; /* fixed read bufs vector */
-
- HDsnprintf(test_title, sizeof(test_title), "vector I/O with %s VFD", vfd_name);
+ bool size_fixed_0 = false; /* whether remaining entry */
+ bool size_fixed_1 = false; /* sizes in vector are fixed. */
+ bool size_fixed_2 = false; /* */
+ bool type_fixed_0 = false; /* whether remaining entry */
+ bool type_fixed_1 = false; /* types in vector are fixed. */
+ bool type_fixed_2 = false; /* */
+ bool verbose = false;
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
+ haddr_t eoa; /* file eoa */
+ char filename[1024]; /* filename */
+ char *buf; /* tmp ptr to buf */
+ unsigned flags = 0; /* file open flags */
+ H5FD_t *lf = NULL; /* VFD struct ptr */
+ uint32_t i; /* index */
+ uint32_t j; /* index */
+ uint32_t count = VECTOR_LEN; /* length of vectors */
+ H5FD_mem_t types_0[VECTOR_LEN]; /* types vector */
+ H5FD_mem_t types_1[VECTOR_LEN]; /* types vector */
+ H5FD_mem_t types_2[VECTOR_LEN]; /* types vector */
+ H5FD_mem_t f_types_0[VECTOR_LEN]; /* fixed types vector */
+ H5FD_mem_t f_types_1[VECTOR_LEN]; /* fixed types vector */
+ H5FD_mem_t f_types_2[VECTOR_LEN]; /* fixed types vector */
+ H5FD_mem_t f_type_0 = H5FD_MEM_NTYPES; /* current type for f vector 0 */
+ H5FD_mem_t f_type_1 = H5FD_MEM_NTYPES; /* current type for f vector 1 */
+ H5FD_mem_t f_type_2 = H5FD_MEM_NTYPES; /* current type for f vector 2 */
+ haddr_t addrs_0[VECTOR_LEN]; /* addresses vector */
+ haddr_t addrs_1[VECTOR_LEN]; /* addresses vector */
+ haddr_t addrs_2[VECTOR_LEN]; /* addresses vector */
+ haddr_t f_addrs_0[VECTOR_LEN]; /* fixed addresses vector */
+ haddr_t f_addrs_1[VECTOR_LEN]; /* fixed addresses vector */
+ haddr_t f_addrs_2[VECTOR_LEN]; /* fixed addresses vector */
+ size_t sizes_0[VECTOR_LEN]; /* sizes vector */
+ size_t sizes_1[VECTOR_LEN]; /* sizes vector */
+ size_t sizes_2[VECTOR_LEN]; /* sizes vector */
+ size_t f_sizes_0[VECTOR_LEN]; /* fixed sizes vector */
+ size_t f_sizes_1[VECTOR_LEN]; /* fixed sizes vector */
+ size_t f_sizes_2[VECTOR_LEN]; /* fixed sizes vector */
+ size_t f_size_0 = 0; /* current size for f vector 0 */
+ size_t f_size_1 = 0; /* current size for f vector 1 */
+ size_t f_size_2 = 0; /* current size for f vector 2 */
+ const void *write_bufs_0[VECTOR_LEN]; /* write bufs vector */
+ const void *write_bufs_1[VECTOR_LEN]; /* write bufs vector */
+ const void *write_bufs_2[VECTOR_LEN]; /* write bufs vector */
+ const void *f_write_bufs_0[VECTOR_LEN]; /* fixed write bufs vector */
+ const void *f_write_bufs_1[VECTOR_LEN]; /* fixed write bufs vector */
+ const void *f_write_bufs_2[VECTOR_LEN]; /* fixed write bufs vector */
+ void *read_bufs_0[VECTOR_LEN]; /* read bufs vector */
+ void *read_bufs_1[VECTOR_LEN]; /* read bufs vector */
+ void *read_bufs_2[VECTOR_LEN]; /* read bufs vector */
+ void *f_read_bufs_0[VECTOR_LEN]; /* fixed read bufs vector */
+ void *f_read_bufs_1[VECTOR_LEN]; /* fixed read bufs vector */
+ void *f_read_bufs_2[VECTOR_LEN]; /* fixed read bufs vector */
+
+ snprintf(test_title, sizeof(test_title), "vector I/O with %s VFD", vfd_name);
TESTING(test_title);
@@ -4525,14 +4528,14 @@ test_vector_io(const char *vfd_name)
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
- if (HDstrcmp(vfd_name, "sec2") == 0) {
+ if (strcmp(vfd_name, "sec2") == 0) {
if (H5Pset_fapl_sec2(fapl_id) < 0)
TEST_ERROR;
h5_fixname(FILENAME[0], fapl_id, filename, sizeof(filename));
}
- else if (HDstrcmp(vfd_name, "stdio") == 0) {
+ else if (strcmp(vfd_name, "stdio") == 0) {
if (H5Pset_fapl_stdio(fapl_id) < 0)
TEST_ERROR;
@@ -4741,9 +4744,9 @@ test_vector_io(const char *vfd_name)
/* Null the read vectors */
- size_fixed_0 = FALSE;
- size_fixed_1 = FALSE;
- size_fixed_2 = FALSE;
+ size_fixed_0 = false;
+ size_fixed_1 = false;
+ size_fixed_2 = false;
for (i = 0; i < count; i++) {
@@ -4889,8 +4892,8 @@ error:
* Purpose: Updates write buffers to ensure a unique value is written
* to each element and issues a selection write call.
*
- * Return: Success: TRUE
- * Failure: FALSE
+ * Return: Success: true
+ * Failure: false
*-------------------------------------------------------------------------
*/
/* Array dimensions, used for all selection I/O tests. Currently both must be
@@ -4939,15 +4942,15 @@ error:
* count the last element in erbufs will be repeated to make
* up the difference.
*
- * Return: Success: TRUE
- * Failure: FALSE
+ * Return: Success: true
+ * Failure: false
*
*-------------------------------------------------------------------------
*/
static herr_t
test_selection_io_read_verify(H5FD_t *lf, H5FD_mem_t type, uint32_t count, hid_t mem_spaces[],
hid_t file_spaces[], haddr_t offsets[], size_t element_sizes[],
- uint32_t rbufcount, int *erbufs[], hbool_t shorten_rbufs)
+ uint32_t rbufcount, int *erbufs[], bool shorten_rbufs)
{
int rbuf1[SEL_IO_DIM0 * SEL_IO_DIM1];
int rbuf2[SEL_IO_DIM0 * SEL_IO_DIM1];
@@ -5019,7 +5022,7 @@ static herr_t
test_selection_io(const char *vfd_name)
{
char test_title[80];
- hid_t fapl_id = -1; /* file access property list ID */
+ hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */
char filename[1024]; /* filename */
unsigned flags = 0; /* file open flags */
H5FD_t *lf = NULL; /* VFD struct ptr */
@@ -5049,7 +5052,7 @@ test_selection_io(const char *vfd_name)
int *erbufs[2] = {erbuf1, erbuf2[0]}; /* Array of expected read buffers */
int shorten_element_sizes; /* Whether to shorten the element sizes array */
- HDsnprintf(test_title, sizeof(test_title), "selection I/O with %s VFD", vfd_name);
+ snprintf(test_title, sizeof(test_title), "selection I/O with %s VFD", vfd_name);
TESTING(test_title);
@@ -5058,14 +5061,14 @@ test_selection_io(const char *vfd_name)
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
- if (HDstrcmp(vfd_name, "sec2") == 0) {
+ if (strcmp(vfd_name, "sec2") == 0) {
if (H5Pset_fapl_sec2(fapl_id) < 0)
TEST_ERROR;
h5_fixname(FILENAME[0], fapl_id, filename, sizeof(filename));
}
- else if (HDstrcmp(vfd_name, "stdio") == 0) {
+ else if (strcmp(vfd_name, "stdio") == 0) {
if (H5Pset_fapl_stdio(fapl_id) < 0)
TEST_ERROR;
@@ -5121,7 +5124,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[0], &file_spaces[0], &addrs[0],
- element_sizes, 1, (int **)&fbufs[0], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[0], false) < 0)
TEST_ERROR;
/*
@@ -5139,7 +5142,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[1], &file_spaces[1], &addrs[1],
- element_sizes, 1, (int **)&fbufs[1], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[1], false) < 0)
TEST_ERROR;
/*
@@ -5177,7 +5180,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[0], &file_spaces[0], &addrs[0],
- element_sizes, 1, (int **)&erbufs[0], FALSE) < 0)
+ element_sizes, 1, (int **)&erbufs[0], false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5188,7 +5191,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[0], &file_spaces[0], &addrs[0],
- element_sizes, 1, (int **)&fbufs[0], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[0], false) < 0)
TEST_ERROR;
/*
@@ -5226,7 +5229,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[0], &file_spaces[0], &addrs[0],
- element_sizes, 1, (int **)&erbufs[0], FALSE) < 0)
+ element_sizes, 1, (int **)&erbufs[0], false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5237,7 +5240,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[0], &file_spaces[0], &addrs[0],
- element_sizes, 1, (int **)&fbufs[0], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[0], false) < 0)
TEST_ERROR;
/*
@@ -5276,7 +5279,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[0], &file_spaces[0], &addrs[0],
- element_sizes, 1, (int **)&erbufs[0], FALSE) < 0)
+ element_sizes, 1, (int **)&erbufs[0], false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5287,7 +5290,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[0], &file_spaces[0], &addrs[0],
- element_sizes, 1, (int **)&fbufs[0], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[0], false) < 0)
TEST_ERROR;
/*
@@ -5329,7 +5332,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[1], &file_spaces[1], &addrs[1],
- element_sizes, 1, (int **)&erbufs[1], FALSE) < 0)
+ element_sizes, 1, (int **)&erbufs[1], false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5340,7 +5343,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[1], &file_spaces[1], &addrs[1],
- element_sizes, 1, (int **)&fbufs[1], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[1], false) < 0)
TEST_ERROR;
/*
@@ -5382,7 +5385,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[1], &file_spaces[1], &addrs[1],
- element_sizes, 1, (int **)&erbufs[1], FALSE) < 0)
+ element_sizes, 1, (int **)&erbufs[1], false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5393,7 +5396,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[1], &file_spaces[1], &addrs[1],
- element_sizes, 1, (int **)&fbufs[1], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[1], false) < 0)
TEST_ERROR;
/*
@@ -5453,7 +5456,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[1], &file_spaces[1], &addrs[1],
- element_sizes, 1, (int **)&erbufs[1], FALSE) < 0)
+ element_sizes, 1, (int **)&erbufs[1], false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5464,7 +5467,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[1], &file_spaces[1], &addrs[1],
- element_sizes, 1, (int **)&fbufs[1], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[1], false) < 0)
TEST_ERROR;
/*
@@ -5514,7 +5517,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[0], &file_spaces[1], &addrs[1],
- element_sizes, 1, (int **)&erbufs[0], FALSE) < 0)
+ element_sizes, 1, (int **)&erbufs[0], false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5525,7 +5528,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[0], &file_spaces[1], &addrs[1],
- element_sizes, 1, (int **)&fbufs[1], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[1], false) < 0)
TEST_ERROR;
/*
@@ -5574,7 +5577,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[1], &file_spaces[0], &addrs[0],
- element_sizes, 1, (int **)&erbufs[1], FALSE) < 0)
+ element_sizes, 1, (int **)&erbufs[1], false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5585,7 +5588,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 1, &mem_spaces[1], &file_spaces[0], &addrs[0],
- element_sizes, 1, (int **)&fbufs[0], FALSE) < 0)
+ element_sizes, 1, (int **)&fbufs[0], false) < 0)
TEST_ERROR;
/* Run tests with full and partial element sizes array */
@@ -5666,7 +5669,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 2, mem_spaces, file_spaces, addrs, element_sizes, 2,
- (int **)erbufs, FALSE) < 0)
+ (int **)erbufs, false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5681,7 +5684,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 2, mem_spaces, file_spaces, addrs, element_sizes, 2,
- (int **)fbufs, FALSE) < 0)
+ (int **)fbufs, false) < 0)
TEST_ERROR;
/*
@@ -5784,7 +5787,7 @@ test_selection_io(const char *vfd_name)
/* Read and verify */
if (test_selection_io_read_verify(lf, type, 2, mem_spaces, file_spaces, addrs, element_sizes, 1,
- (int **)&erbufs[1], shorten_element_sizes ? TRUE : FALSE) < 0)
+ (int **)&erbufs[1], shorten_element_sizes ? true : false) < 0)
TEST_ERROR;
/* Reset selections */
@@ -5799,7 +5802,7 @@ test_selection_io(const char *vfd_name)
/* Read entire file buffer and verify */
if (test_selection_io_read_verify(lf, type, 2, mem_spaces, file_spaces, addrs, element_sizes, 2,
- (int **)fbufs, FALSE) < 0)
+ (int **)fbufs, false) < 0)
TEST_ERROR;
/* Reset first spaces to 1D */
@@ -5877,7 +5880,7 @@ main(void)
* specific VFD to be set and HDF5_DRIVER being set can interfere
* with that.
*/
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr) {
printf(" -- SKIPPED VFD tests because %s is set -- \n", HDF5_DRIVER);
exit(EXIT_SUCCESS);
diff --git a/test/vfd_plugin.c b/test/vfd_plugin.c
index 28aa769..8bfc09f 100644
--- a/test/vfd_plugin.c
+++ b/test/vfd_plugin.c
@@ -42,7 +42,7 @@ test_set_by_name(void)
/* The null VFD should not be registered at the start of the test */
if ((is_registered = H5FDis_driver_registered_by_name(NULL_VFD_NAME)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VFD is inappropriately registered");
/* Register the null VFD by name */
@@ -54,7 +54,7 @@ test_set_by_name(void)
/* The null VFD should be registered now */
if ((is_registered = H5FDis_driver_registered_by_name(NULL_VFD_NAME)) < 0)
TEST_ERROR;
- if (FALSE == is_registered)
+ if (false == is_registered)
FAIL_PUTS_ERROR("NULL VFD was not registered");
/* Unregister the null VFD */
@@ -70,7 +70,7 @@ test_set_by_name(void)
/* The null VFD should not be registered now */
if ((is_registered = H5FDis_driver_registered_by_name(NULL_VFD_NAME)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VFD is inappropriately registered");
PASSED();
@@ -109,7 +109,7 @@ test_set_by_value(void)
/* The null VFD should not be registered at the start of the test */
if ((is_registered = H5FDis_driver_registered_by_value(NULL_VFD_VALUE)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VFD is inappropriately registered");
/* Register the null VFD by value */
@@ -121,7 +121,7 @@ test_set_by_value(void)
/* The null VFD should be registered now */
if ((is_registered = H5FDis_driver_registered_by_value(NULL_VFD_VALUE)) < 0)
TEST_ERROR;
- if (FALSE == is_registered)
+ if (false == is_registered)
FAIL_PUTS_ERROR("NULL VFD was not registered");
/* Unregister the null VFD */
@@ -137,7 +137,7 @@ test_set_by_value(void)
/* The null VFD should not be registered now */
if ((is_registered = H5FDis_driver_registered_by_value(NULL_VFD_VALUE)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VFD is inappropriately registered");
PASSED();
@@ -177,7 +177,7 @@ test_set_multi(void)
/* The null VFD should not be registered at the start of the test */
if ((is_registered = H5FDis_driver_registered_by_name(NULL_VFD_NAME)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VFD is inappropriately registered");
/* Register the VFD multiple times */
@@ -191,7 +191,7 @@ test_set_multi(void)
/* The null VFD should be registered now */
if ((is_registered = H5FDis_driver_registered_by_name(NULL_VFD_NAME)) < 0)
TEST_ERROR;
- if (FALSE == is_registered)
+ if (false == is_registered)
FAIL_PUTS_ERROR("NULL VFD was not registered");
/* Unregister the null VFD */
@@ -209,7 +209,7 @@ test_set_multi(void)
/* The null VFD should not be registered now */
if ((is_registered = H5FDis_driver_registered_by_name(NULL_VFD_NAME)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VFD is inappropriately registered");
/* Repeat testing with the _by_value routines */
@@ -217,7 +217,7 @@ test_set_multi(void)
/* The null VFD should not be registered at the start of the test */
if ((is_registered = H5FDis_driver_registered_by_value(NULL_VFD_VALUE)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VFD is inappropriately registered");
/* Register the VFD multiple times */
@@ -231,7 +231,7 @@ test_set_multi(void)
/* The null VFD should be registered now */
if ((is_registered = H5FDis_driver_registered_by_value(NULL_VFD_VALUE)) < 0)
TEST_ERROR;
- if (FALSE == is_registered)
+ if (false == is_registered)
FAIL_PUTS_ERROR("NULL VFD was not registered");
/* Unregister the null VFD */
@@ -249,7 +249,7 @@ test_set_multi(void)
/* The null VFD should not be registered now */
if ((is_registered = H5FDis_driver_registered_by_value(NULL_VFD_VALUE)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VFD is inappropriately registered");
PASSED();
@@ -297,7 +297,7 @@ test_get_config_str(void)
TEST_ERROR;
if (0 != config_str_len)
TEST_ERROR;
- if (HDstrlen(config_str_buf) > 0)
+ if (strlen(config_str_buf) > 0)
TEST_ERROR;
/* Set a new configuration string on the FAPL and retrieve it */
@@ -305,9 +305,9 @@ test_get_config_str(void)
TEST_ERROR;
if ((config_str_len = H5Pget_driver_config_str(fapl_id, config_str_buf, 128)) < 0)
TEST_ERROR;
- if (HDstrlen(config_str) != config_str_len)
+ if (strlen(config_str) != config_str_len)
TEST_ERROR;
- if (HDstrncmp(config_str_buf, config_str, 128))
+ if (strncmp(config_str_buf, config_str, 128))
TEST_ERROR;
if (H5Pclose(fapl_id) < 0)
@@ -355,7 +355,7 @@ test_env_var(void)
TEST_ERROR;
if (0 != config_str_len)
TEST_ERROR;
- if (HDstrlen(config_str_buf) > 0)
+ if (strlen(config_str_buf) > 0)
TEST_ERROR;
/* Set default driver and driver configuration using environment variables */
@@ -382,9 +382,9 @@ test_env_var(void)
memset(config_str_buf, 0, 128);
if ((config_str_len = H5Pget_driver_config_str(H5P_FILE_ACCESS_DEFAULT, config_str_buf, 128)) < 0)
TEST_ERROR;
- if (HDstrlen(config_str) != config_str_len)
+ if (strlen(config_str) != config_str_len)
TEST_ERROR;
- if (HDstrncmp(config_str_buf, config_str, 128))
+ if (strncmp(config_str_buf, config_str, 128))
TEST_ERROR;
/* Unset environment variables */
@@ -420,7 +420,7 @@ main(void)
h5_reset();
- HDputs("Testing VFD plugin functionality.");
+ puts("Testing VFD plugin functionality.");
nerrors += (test_set_by_name() < 0) ? 1 : 0;
nerrors += (test_set_by_value() < 0) ? 1 : 0;
@@ -433,7 +433,7 @@ main(void)
exit(EXIT_FAILURE);
}
- HDputs("All VFD plugin tests passed.");
+ puts("All VFD plugin tests passed.");
exit(EXIT_SUCCESS);
}
diff --git a/test/vol.c b/test/vol.c
index ff58fef..43336c6 100644
--- a/test/vol.c
+++ b/test/vol.c
@@ -517,7 +517,7 @@ reg_opt_link_optional(void *obj, const H5VL_loc_params_t *loc_params, H5VL_optio
return -1;
if (loc_params->obj_type != H5I_GROUP)
return -1;
- if (HDstrcmp(loc_params->loc_data.loc_by_name.name, ".") != 0)
+ if (strcmp(loc_params->loc_data.loc_by_name.name, ".") != 0)
return -1;
if (loc_params->loc_data.loc_by_name.lapl_id != H5P_LINK_ACCESS_DEFAULT)
return -1;
@@ -587,7 +587,7 @@ fake_vol_info_to_str(const void *info, char **str)
if (NULL == (*str = (char *)calloc(1, str_size)))
return FAIL;
- HDsnprintf(*str, str_size, "%d", val);
+ snprintf(*str, str_size, "%d", val);
return ret_value;
} /* end fake_vol_info_to_str() */
@@ -913,14 +913,14 @@ test_basic_file_operation(const char *env_h5_drvr)
TEST_ERROR;
/* Can't compare VFD properties for several VFDs */
- if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0 &&
- HDstrcmp(env_h5_drvr, "core") != 0 && HDstrcmp(env_h5_drvr, "core_paged") != 0 &&
- HDstrcmp(env_h5_drvr, "mpio") != 0 && HDstrcmp(env_h5_drvr, "splitter") != 0)) {
+ if ((bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0 && strcmp(env_h5_drvr, "direct") != 0 &&
+ strcmp(env_h5_drvr, "core") != 0 && strcmp(env_h5_drvr, "core_paged") != 0 &&
+ strcmp(env_h5_drvr, "mpio") != 0 && strcmp(env_h5_drvr, "splitter") != 0)) {
/* H5Fget_access_plist */
if ((fapl_id2 = H5Fget_access_plist(fid)) < 0)
TEST_ERROR;
- if (H5Pequal(fapl_id, fapl_id2) != TRUE)
+ if (H5Pequal(fapl_id, fapl_id2) != true)
TEST_ERROR;
if (H5Pclose(fapl_id2) < 0)
TEST_ERROR;
@@ -937,8 +937,8 @@ test_basic_file_operation(const char *env_h5_drvr)
TEST_ERROR;
/* Can't retrieve VFD handle for split / multi / family VFDs */
- if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0)) {
+ if ((bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0)) {
/* H5Fget_vfd_handle */
if (H5Fget_vfd_handle(fid, H5P_DEFAULT, &os_file_handle) < 0)
TEST_ERROR;
@@ -977,14 +977,14 @@ test_basic_file_operation(const char *env_h5_drvr)
TEST_ERROR;
/* Can't compare VFD properties for several VFDs */
- if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0 &&
- HDstrcmp(env_h5_drvr, "core") != 0 && HDstrcmp(env_h5_drvr, "core_paged") != 0 &&
- HDstrcmp(env_h5_drvr, "mpio") != 0 && HDstrcmp(env_h5_drvr, "splitter") != 0)) {
+ if ((bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0 && strcmp(env_h5_drvr, "direct") != 0 &&
+ strcmp(env_h5_drvr, "core") != 0 && strcmp(env_h5_drvr, "core_paged") != 0 &&
+ strcmp(env_h5_drvr, "mpio") != 0 && strcmp(env_h5_drvr, "splitter") != 0)) {
/* H5Fget_access_plist */
if ((fapl_id2 = H5Fget_access_plist(fid)) < 0)
TEST_ERROR;
- if (H5Pequal(fapl_id, fapl_id2) != TRUE)
+ if (H5Pequal(fapl_id, fapl_id2) != true)
TEST_ERROR;
if (H5Pclose(fapl_id2) < 0)
TEST_ERROR;
@@ -994,14 +994,14 @@ test_basic_file_operation(const char *env_h5_drvr)
TEST_ERROR;
/* Can't compare VFD properties for several VFDs */
- if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0 &&
- HDstrcmp(env_h5_drvr, "core") != 0 && HDstrcmp(env_h5_drvr, "core_paged") != 0 &&
- HDstrcmp(env_h5_drvr, "mpio") != 0 && HDstrcmp(env_h5_drvr, "splitter") != 0)) {
+ if ((bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0 && strcmp(env_h5_drvr, "direct") != 0 &&
+ strcmp(env_h5_drvr, "core") != 0 && strcmp(env_h5_drvr, "core_paged") != 0 &&
+ strcmp(env_h5_drvr, "mpio") != 0 && strcmp(env_h5_drvr, "splitter") != 0)) {
/* H5Fget_access_plist */
if ((fapl_id2 = H5Fget_access_plist(fid_reopen)) < 0)
TEST_ERROR;
- if (H5Pequal(fapl_id, fapl_id2) != TRUE)
+ if (H5Pequal(fapl_id, fapl_id2) != true)
TEST_ERROR;
if (H5Pclose(fapl_id2) < 0)
TEST_ERROR;
@@ -1055,7 +1055,7 @@ test_basic_group_operation(void)
hid_t gcpl_id = H5I_INVALID_HID;
char filename[1024];
H5G_info_t info;
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
TESTING("Basic VOL group operations");
@@ -1173,7 +1173,7 @@ test_basic_dataset_operation(void)
haddr_t offset;
H5D_space_status_t status;
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
int in_buf[N_ELEMENTS];
int out_buf[N_ELEMENTS];
@@ -1488,7 +1488,7 @@ test_basic_object_operation(void)
//! [H5Oget_info_by_name3_snip]
/* H5Oexists_by_name */
- if (H5Oexists_by_name(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT) != TRUE)
+ if (H5Oexists_by_name(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT) != true)
TEST_ERROR;
/* H5Oopen/close */
@@ -1615,13 +1615,13 @@ error:
static herr_t
test_basic_datatype_operation(void)
{
- hid_t fid = H5I_INVALID_HID;
- hid_t fapl_id = H5I_INVALID_HID;
- hid_t tid = H5I_INVALID_HID;
- hid_t tid_anon = H5I_INVALID_HID;
- hid_t tcpl_id = H5I_INVALID_HID;
- char filename[1024];
- hbool_t driver_is_parallel;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t tid_anon = H5I_INVALID_HID;
+ hid_t tcpl_id = H5I_INVALID_HID;
+ char filename[1024];
+ bool driver_is_parallel;
TESTING("Basic VOL datatype operations");
@@ -1733,7 +1733,7 @@ exercise_reg_opt_oper(hid_t fake_vol_id, hid_t reg_opt_vol_id, H5VL_subclass_t s
herr_t ret = SUCCEED;
/* Test registering optional operation */
- HDsnprintf(op_name, sizeof(op_name), "%s-op1", subcls_name);
+ snprintf(op_name, sizeof(op_name), "%s-op1", subcls_name);
if (H5VLregister_opt_operation(subcls, op_name, &op_val) < 0)
TEST_ERROR;
@@ -1752,7 +1752,7 @@ exercise_reg_opt_oper(hid_t fake_vol_id, hid_t reg_opt_vol_id, H5VL_subclass_t s
TEST_ERROR;
/* Test registering second optional operation */
- HDsnprintf(op_name, sizeof(op_name), "%s-op2", subcls_name);
+ snprintf(op_name, sizeof(op_name), "%s-op2", subcls_name);
if (H5VLregister_opt_operation(subcls, op_name, &op_val2) < 0)
TEST_ERROR;
@@ -1776,12 +1776,12 @@ exercise_reg_opt_oper(hid_t fake_vol_id, hid_t reg_opt_vol_id, H5VL_subclass_t s
H5CX_push();
/* Create fake object on fake VOL connector */
- if (H5I_INVALID_HID == (obj_id = H5VL_register_using_vol_id(id_type, &fake_obj, fake_vol_id, TRUE)))
+ if (H5I_INVALID_HID == (obj_id = H5VL_register_using_vol_id(id_type, &fake_obj, fake_vol_id, true)))
TEST_ERROR;
/* Pop the API context off the stack */
if (H5VL_SUBCLS_DATATYPE == subcls)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
/* Attempt to issue operation on fake VOL connector */
fake_obj = -1;
@@ -1832,12 +1832,12 @@ exercise_reg_opt_oper(hid_t fake_vol_id, hid_t reg_opt_vol_id, H5VL_subclass_t s
H5CX_push();
/* Create fake object on reg_opt VOL connector */
- if (H5I_INVALID_HID == (obj_id = H5VL_register_using_vol_id(id_type, &fake_obj, reg_opt_vol_id, TRUE)))
+ if (H5I_INVALID_HID == (obj_id = H5VL_register_using_vol_id(id_type, &fake_obj, reg_opt_vol_id, true)))
TEST_ERROR;
/* Pop the API context off the stack */
if (H5VL_SUBCLS_DATATYPE == subcls)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
/* Issue first operation */
fake_obj = -1;
@@ -2093,9 +2093,9 @@ test_async_vol_props(void)
FAIL_STACK_ERROR;
/* Override possible environment variable & re-initialize default VOL connector */
- conn_env_str = HDgetenv(HDF5_VOL_CONNECTOR);
+ conn_env_str = getenv(HDF5_VOL_CONNECTOR);
if (conn_env_str) {
- if (NULL == (conn_env_str = HDstrdup(conn_env_str)))
+ if (NULL == (conn_env_str = strdup(conn_env_str)))
TEST_ERROR;
if (HDunsetenv(HDF5_VOL_CONNECTOR) < 0)
TEST_ERROR;
@@ -2122,7 +2122,7 @@ test_async_vol_props(void)
FAIL_STACK_ERROR;
/* Set environment variable to use 'fake async' connector & re-init default connector */
- if (HDsetenv(HDF5_VOL_CONNECTOR, "fake_async", TRUE) < 0)
+ if (HDsetenv(HDF5_VOL_CONNECTOR, "fake_async", true) < 0)
TEST_ERROR;
if (H5VL__reparse_def_vol_conn_variable_test() < 0)
TEST_ERROR;
@@ -2190,7 +2190,7 @@ test_async_vol_props(void)
/* Restore environment variable, if there was one */
if (conn_env_str) {
- if (HDsetenv(HDF5_VOL_CONNECTOR, conn_env_str, TRUE) < 0)
+ if (HDsetenv(HDF5_VOL_CONNECTOR, conn_env_str, true) < 0)
TEST_ERROR;
free(conn_env_str);
@@ -2256,8 +2256,8 @@ test_vol_cap_flags(void)
TEST_ERROR;
/* If using the native VOL by default, check flags again with H5P_DEFAULT */
- vol_env = HDgetenv(HDF5_VOL_CONNECTOR);
- if (!vol_env || (0 == HDstrcmp(vol_env, "native"))) {
+ vol_env = getenv(HDF5_VOL_CONNECTOR);
+ if (!vol_env || (0 == strcmp(vol_env, "native"))) {
H5VL_class_t *cls;
hid_t connector_id;
@@ -2338,12 +2338,12 @@ test_get_vol_name(void)
TESTING("getting connector name");
- conn_env_str = HDgetenv(HDF5_VOL_CONNECTOR);
- if (NULL == (conn_env_str = HDgetenv("HDF5_VOL_CONNECTOR")))
+ conn_env_str = getenv(HDF5_VOL_CONNECTOR);
+ if (NULL == (conn_env_str = getenv("HDF5_VOL_CONNECTOR")))
conn_env_str = "native";
/* Skip the connectors other than the native and pass_through connector */
- if (HDstrcmp(conn_env_str, "native") && HDstrcmp(conn_env_str, "pass_through")) {
+ if (strcmp(conn_env_str, "native") && strcmp(conn_env_str, "pass_through")) {
SKIPPED();
printf(" only test the native or internal pass_through connector\n");
return SUCCEED;
@@ -2361,8 +2361,8 @@ test_get_vol_name(void)
TEST_ERROR;
/* When comparing the pass_through connector, ignore the rest information (under_vol=0;under_info={}) */
- if ((!HDstrcmp(conn_env_str, "native") && HDstrcmp(vol_name, "native")) ||
- (!HDstrcmp(conn_env_str, "pass_through") && HDstrcmp(vol_name, "pass_through")))
+ if ((!strcmp(conn_env_str, "native") && strcmp(vol_name, "native")) ||
+ (!strcmp(conn_env_str, "pass_through") && strcmp(vol_name, "pass_through")))
TEST_ERROR;
if (H5Fclose(file_id) < 0)
@@ -2629,13 +2629,13 @@ main(void)
int nerrors = 0;
/* Get the VFD to use */
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
h5_reset();
- HDputs("Testing basic Virtual Object Layer (VOL) functionality.");
+ puts("Testing basic Virtual Object Layer (VOL) functionality.");
nerrors += test_vol_registration() < 0 ? 1 : 0;
nerrors += test_register_opt_operation() < 0 ? 1 : 0;
@@ -2659,7 +2659,7 @@ main(void)
exit(EXIT_FAILURE);
}
- HDputs("All Virtual Object Layer (VOL) tests passed.");
+ puts("All Virtual Object Layer (VOL) tests passed.");
exit(EXIT_SUCCESS);
diff --git a/test/vol_plugin.c b/test/vol_plugin.c
index acf4dfc..af46f34 100644
--- a/test/vol_plugin.c
+++ b/test/vol_plugin.c
@@ -44,7 +44,7 @@ test_registration_by_value(void)
/* The null VOL connector should not be registered at the start of the test */
if ((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
/* Register the connector by value */
@@ -54,7 +54,7 @@ test_registration_by_value(void)
/* The connector should be registered now */
if ((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
TEST_ERROR;
- if (FALSE == is_registered)
+ if (false == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector was not registered");
/* Unregister the connector */
@@ -64,7 +64,7 @@ test_registration_by_value(void)
/* The connector should not be registered now */
if ((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
PASSED();
@@ -101,7 +101,7 @@ test_registration_by_name(void)
/* The null VOL connector should not be registered at the start of the test */
if ((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
/* Register the connector by name */
@@ -111,7 +111,7 @@ test_registration_by_name(void)
/* The connector should be registered now */
if ((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
- if (FALSE == is_registered)
+ if (false == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector was not registered");
/* Unregister the connector */
@@ -121,7 +121,7 @@ test_registration_by_name(void)
/* The connector should not be registered now */
if ((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
PASSED();
@@ -159,7 +159,7 @@ test_multiple_registration(void)
/* The null VOL connector should not be registered at the start of the test */
if ((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
/* Register the connector multiple times */
@@ -171,7 +171,7 @@ test_multiple_registration(void)
/* The connector should be registered now */
if ((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
- if (FALSE == is_registered)
+ if (false == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector was not registered");
/* Unregister the connector */
@@ -189,13 +189,13 @@ test_multiple_registration(void)
/* The connector should not be registered now */
if ((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
/* Repeat testing with the _by_value routines */
if ((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
/* Register the connector multiple times */
@@ -207,7 +207,7 @@ test_multiple_registration(void)
/* The connector should be registered now */
if ((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
TEST_ERROR;
- if (FALSE == is_registered)
+ if (false == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector was not registered");
/* Unregister the connector */
@@ -225,7 +225,7 @@ test_multiple_registration(void)
/* The connector should not be registered now */
if ((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
PASSED();
@@ -263,7 +263,7 @@ test_getters(void)
/* The null VOL connector should not be registered at the start of the test */
if ((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
/* Register the connector by name */
@@ -285,7 +285,7 @@ test_getters(void)
/* Repeat testing with the _by_value routines */
if ((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
TEST_ERROR;
- if (TRUE == is_registered)
+ if (true == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
/* Register the connector by value */
@@ -334,7 +334,7 @@ main(void)
h5_reset();
- HDputs("Testing VOL connector plugin functionality.");
+ puts("Testing VOL connector plugin functionality.");
nerrors += test_registration_by_name() < 0 ? 1 : 0;
nerrors += test_registration_by_value() < 0 ? 1 : 0;
@@ -346,7 +346,7 @@ main(void)
exit(EXIT_FAILURE);
}
- HDputs("All VOL connector plugin tests passed.");
+ puts("All VOL connector plugin tests passed.");
exit(EXIT_SUCCESS);