summaryrefslogtreecommitdiffstats
path: root/test/ohdr.c
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2021-02-08 16:56:16 (GMT)
committerGitHub <noreply@github.com>2021-02-08 16:56:16 (GMT)
commit22c67ff6570f16050f0a5654cf1c84df917bb598 (patch)
tree38fb63aa498b250c2543fe7e22a511706de96a42 /test/ohdr.c
parent551f15f8ae02ca9c995619b216121081eb07633e (diff)
downloadhdf5-hdf5-1_8_22.zip
hdf5-hdf5-1_8_22.tar.gz
hdf5-hdf5-1_8_22.tar.bz2
1.8/master (#317)hdf5-1_8_22
* Revert incorrect bool type * Correct grep text for filter test * Check sizeof type to use correct ref_type * h5dump reg ref chnages has no error file * Fix comment * Remove unneeded files * Verify the decoded version for "all" and "none" selection. * Remove double entry * Add missing include * Snapshot version 1.8 release 22 (snap4) Update version to 1.8-snap5 * Fixes for test failures with --disable-tests --disable-tools options. Don't test ph5diff if tests are disabled. * Correct conditions for parallel builds with and without tests. * Snapshot version 1.8 release 22 (snap5) Update version to 1.8.22-snap6 * TRILAB-192 merging warnings changes from develop * Autotools reconfigure update * Restore page ejects. * Restore page eject chars * Fix orphaned token * Update LT files * Correct extra flags and merge TRILAB-24 * Update release note for CMake warnings * H5repack bug fixes from develop * TRILAB-192 - merge changes from develop Single source, config files, for warnings for both autotools and CMake. Update CMake libraries, tools, tests to use correct flags. * Add missing m4 file * Remove 128bit config check fo 1.8 * TRILAB-192 update LTparse files * A fix in the cleaning up code for datatype when datatype initialization via H5D__init_type() fails. The code to fix the problem is the same as what is done in H5D__open_oid(). * Add missing " and update function calls incorrectly named load_gcc_arguments. Commit changes to gnu-cxxflags to remove unmatched " and to gnu-fflags to not add C warnings flags to H5_FCFLAGS. * TRILAB-192 - cleanup edits and match CMake CXX to autotools * Fix shadowed type * TRILAB-192 correct fortran commands * TRILAB-192 version of std=f2008 special check * Fix shadow variable * Add prefix_relto_examplesdir function to set relative path to h5c++. * TRILAB-192 - parser files cannot handle this warning * Parallel Fortran tests now use the MPI module instead of including mpif.h. * Don't add general warnings flags for unsupported old versions of gcc and g++ (older than gcc/g++ 4.2). Correct gnu-cxxflags to determine warnings flags to be added based on C++ compiler version instead of C compiler version. * Snapshot version 1.8 release 22 (snap6) Update version to 1.8.22-snap7 * TRILAB-244 separate CXX warnings and errors from C * Fix NoFilter build * Move ADD_H5_FLAGS macro from *CompilerFlags.cmake files to config/cmake_ext_mod/HDFMacros.cmake for common use. * Restrict errors to gcc 4.8 and above. * OESS-65 replace szip with aec szip * Correct CMake version * Correct -Werror=unused-variable * Add -Werror= flags to lists displayed in libhdf5.settings. * Fix -Werror=unused-variable * More fixes for unused variable * Resolve warning errors from -Werror= flags: -Werror=bad-function-cast -Werror=bad-function-cast -Werror=implicit-function-declaration -Werror=nested-externs * Remove verbose assignments in smoke_check 3 and 5 functions. * Update to use optimization flags, C++ error flags, and correct libhdf5.settings.in to remove unworkable changes. * Update config/gnu-cxxflags. * Add missing headers * Fix ifort warning flag. Restore AC_DEFUN([PAC_PROG_FC_DEFAULT_REALisDBLE] in m4/aclocal_fc.m4. Add --enable-symbols, --enable-profiling, and --enable-optimization options to autotools configure; all configure flags for --enable-production and --disable-production should match HDF5 1.10 and 1.12 production and debug default flags. * Add github actions file * Correct path * OESS-65 Fix packaging * Update reference name * Correct filename * disable pr action and enable fail fast * Snapshot 1.8.22-snap7 Update version to 1.8.22-snap8. * Correct mingw path * Correct mingw paths * Revise gnu-*flags and cmake/HDF*CompilerFlags.cmake files to add warning flags for GCC compilers version 4.8 and above. Removed files from gnu-warnings that only apply to versions < 4.8. Consolidated warnings from versions < 4.8 that apply to versions >= 4.8 into the 4.8 warnings files. * Update MANIFEST for removal of older warnings files. * Yanked all MPI-1 calls Added batch scripts in bin/batch. * Snapshot 1.8.22-snap8. Update version to 1.8.22-snap9. * Squashed commit of the following: commit 45b0cbc71929930a874e1c09e0770aa64d0ae697 Author: Larry Knox <lrknox@hdfgroup.org> Date: Thu Apr 23 13:14:56 2020 -0500 Add C++ warnings treated as error for autotools builds. commit 6debcddcc766601799d5bd661bd60946f951a07e Author: Larry Knox <lrknox@hdfgroup.org> Date: Fri Jun 19 16:50:03 2020 -0500 Remove tests for develop branch from testh5cc.sh.in. Add @H5_ECXXFLAGS@ to AM_CXXFLAGS. commit fed497e7f207313b2a133d3b68c942b7d7104b90 Author: Larry Knox <lrknox@hdfgroup.org> Date: Fri Jun 12 15:06:39 2020 -0500 Merge pull request #2646 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop * commit '998c6470d78e14228695419c3b514c35ecf3d69e': Remove unnecessary version conditions for Clang compilers. commit 92e52ce5c211bd1d3991a3b8bb67287ac7b652aa Author: Larry Knox <lrknox@hdfgroup.org> Date: Wed Jun 10 18:53:45 2020 -0500 Merge pull request #2639 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop * commit 'a33667faf226f5d8c9633bf537893e8fce1bf1f6': Add c++ to --enable-sanitize-checks option. commit 2e802534fb997b81fa98fdd1c7d97d4310898e0d Author: Larry Knox <lrknox@hdfgroup.org> Date: Wed Jun 10 15:18:36 2020 -0500 Merge pull request #2633 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop * commit '20eab963899841c9a003baebead8e3bc07d9e127': Remove duplicate entries in MANIFEST. Make changes to CMake CompilerFlags.cmake files so extra flags are loaded for non-GNU compilers. Update new clang files to not pick up clang as vendor for pgCC. Add new files to MANIFEST Temporary demotion of 2 -Werror warning flags that fail on macos 10.12 Remove Production flag unknown to Apple clang. commit 96ef60a58a23847a7da89a891f2415055ec2ab60 Author: Larry Knox <lrknox@hdfgroup.org> Date: Mon Jun 8 16:24:49 2020 -0500 Merge pull request #2631 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop * commit 'b942a4d8a3e27317cac50ce37ff5302d477664d8': Clean up code to get clang version in config/linux-gnulibc1 commit 8a7c687da568e8b50b38fa53da1ca63759be6ec4 Author: Larry Knox <lrknox@hdfgroup.org> Date: Mon Jun 8 11:42:37 2020 -0500 Merge pull request #2623 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop * commit 'c7626f79fdee4eee13925e240ef41e61f3367eab': Add flags from config/clang-warnings/*general files to H5 C and CXX flags for all versions of Clang and Clang++ compilers. Switched from cut to awk in testcheck_version.sh.in to avoid dependence on tab vs. " " in version definitions in H5public.h. Add files for adding warning flags for clang compilers in autotools configure. commit db3ef7ff3c1ed79167cecef831501411cff8291f Merge: 5a0f8d7 f9f1310 Author: Larry Knox <lrknox@hdfgroup.org> Date: Fri Jun 19 14:46:22 2020 -0500 Merge branch 'hdf5_1_12' of https://bitbucket.hdfgroup.org/scm/~lrknox/hdf5_lrk into hdf5_1_12 commit 5a0f8d7940ae57b445f545a0abd7e303ce6924ee Author: Larry Knox <lrknox@hdfgroup.org> Date: Wed Jun 10 20:15:41 2020 -0500 Merge pull request #2636 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:HDFFV-11000-update-testh5cc.sh.in-for-version to develop * commit '5c0bd670d6e9919c463fbc05de99e2ba55b0761e': Add tests for all version to H5_NO_DEPRECATED_SYMBOLS section and to section for current version, with and without default API version flags. HDFFV-11000: update-testh5cc.sh.in to test sample versioned functions in HDF5 1.10, 1.12 and develop. * Update configure and Makefile.ins after bin/reconfigure. * Fix MANIFEST * Fix HDFFV-10591 Description: h52gif produced a segfault when a buffer overflow occurred because the data size was corrupted and became very large. This commit added a check on the data size against the buffer size to prevent the segfault. It also added error reporting to h52gif to display an error message instead of silently exiting when the failure occurred. Platforms tested: Linux/64 (jelly) * Snapshot 1.8.22-snap9. Update version to 1.8.22-snap10. * Merge pull request #2686 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop * commit '800f93f7c994f88dfa716746153ded4b1e690e3a': Remove path to szip header file from AM_CPPFLAGS when configure check of libsz fails. Fix for HDFFV-10830. * Regenerate configure. * Merge from 1.10-1.12-dev - LT parse needs update * Incorporate pull request #2693 from develop for the fix to HDFFV-11080: (1) Patch up the file pointer when reading attribute of variable length datatype (2) Test to verify the fix when doing multiple threads (3) Update MANIFEST (4) Add new test to Cmake * Switch bison and flex update of LT files from bin/genltanalyse to bin/genparser, and from automatically updating the LT files whenever reconfigure is run to running only on man<F12>ual command. * Update hl/sr/H5LT files. Add bin/genparser to MANIFEST; remove bin/genltanalyze. * Fix to the merge of PR #2708 for HDFFV-11080 to the 1.8 branch. Need to checkin test/Makefile.in for the new file added. * Fix HDFFV-11120 and HDFFV-11121 (CVE-2018-13870 and CVE-2018-13869) Description: When a buffer overflow occurred because a name length was corrupted and became very large, h5dump produced a segfault on one file and a memcpy parameter overlap on another file. This commit added checks that detect a read pass the end of the buffer to prevent these error conditions. Platforms tested: Linux/64 (jelly) * Fixed typo * Check for header szlib.h only when libsz passes AC_CHECK_LIB, so that H5_HAVE_SALIB_H is not defined when szip is not enabled, to prevent compile failures for incompatible szlib. * HDFFV-11127 - force RTLD_LOCAL in dlopen * spelling * Remove extra parens * Remove unnecessary assignment freom configure.ac. * Add hypen to subrelease regex * Add special case when H5_VERS_SUBRELEASE is 0 * Revert H5_VERS_SUBRELEASE check * The version string has a second use for packaging * MinGW uses "MinGW Makefiles" * Snapshot 1.8.22-snap10. Update version to 1.8.22-snap11. * Merge clang-format changes from develop * remove stray file * Source formatted * Add options to github actions. * Add back file, remove py file * HDFFV-11096 Correct h5dump usage text * Update formating * remove autogen for 1.8 branch * Fix comment whitespace * Change '==' to 'eq' in test script * Merge from develop github updates bin scripts parser updates * Snapshot 1.8.22-snap11. Update version to 1.8.22-snap12. * Merge from 1.10 Comments, whitespace Simple init and if block brackets. Minimal code changes limited to return value and spelling * Update autotools files * Update FD source * More merges from 1.10 comments and inits * Comment fixes * Fix macro argument * Remove autogen file and cache dir * Revert autotools files to previous version * Correct boolean value and missing define * URL and options corrections * revert autoconf files * Fix compile issues with vfd drivers. * Fix HDFS test * Remove extra #endif * Move init above execution * Multiple changes to bring branch up-to-date (#87) Correct TARGET variable and CMake config file location. Add option to allow filter plugins to be built inline. Update CMake tools macros. * hdf5 1 8 release text (#113) * Multiple changes to bring branch up-to-date Correct TARGET variable and CMake config file location. Add option to allow filter plugins to be built inline. Update CMake tools macros. * release text updates - mostly whitespace * Fixed HDFFV-10480 and HDFFV-11159 (#145) * Fixed HDFFV-10480 and HDFFV-11159 Description Checked against buffer size to prevent segfault, in case of data corruption. + HDFFV-11159 CVE-2018-14033 Buffer over-read in H5O_layout_decode + HDFFV-10480 CVE-2018-11206 Buffer over-read in H5O_fill_new[/old]_decode and A user's patch was applied to this previously, but it is redone for a more correct fix, that is the check now accounted for the previous advance of the buffer pointer. Platforms tested: Linux/64 (jelly) * Fixed typo * Update HDF5 1.8 copyright headers with updated copyright URL (#148) * Update URL for COPYING file in copyright headers. * Make fortran copyright headers uniformly spaced. * Update url for Copyright file in c++/src/footer.html. * OESS-98 Update plugin build option (#171) * 1.8 has extra fortran CMake option (#176) * 1.8 has extra fortran CMake option * Update license URL * OESS-98 fix tools test for plugins (#180) * Hdf5 1 8 (#169) * Fixed HDFFV-10480 and HDFFV-11159 Description Checked against buffer size to prevent segfault, in case of data corruption. + HDFFV-11159 CVE-2018-14033 Buffer over-read in H5O_layout_decode + HDFFV-10480 CVE-2018-11206 Buffer over-read in H5O_fill_new[/old]_decode and A user's patch was applied to this previously, but it is redone for a more correct fix, that is the check now accounted for the previous advance of the buffer pointer. Platforms tested: Linux/64 (jelly) * Fixed typo * Fixed HDFFV-11150 Description Replaced an HDassert with a check for null pointer in H5O_dec_rc() to catch null pointer in corrupted data situation. Reversed the fix in svn-r24463 in which a check for null pointer prior to calling H5O_dec_rc() Platforms tested: Linux/64 (jelly) * HDF5 1 8 fix fortran build on macs (#186) * Correct fortran and shared libs option * Fix for no shared fortran build * OESS-98 fix hdf5 link target (#191) * Partial changes to RELEASE.txt for release. (#185) * Partial changes to RELEASE.txt for release. * Update supported and tested platforms. * Update version to 1.8.22-12. * close #195. (#196) * Update HDF5PluginMacros.cmake * Update HDF5PluginMacros.cmake * Update directory for SZ filter in HDF5PluginMacros.cmake. Updates for release: Switch configure default to production mode. Set HDF5_GENERATE_HEADERS to OFF. * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Restores maintainer mode in the autotools (#200) (#203) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> * Hdf5 1 8 22 (#212) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Brings ttsafe_attr_vlen.c changes from develop (#214) Fixes exposed pthread problem on Windows. * Update SO numbers for Hdf5 1 8 22 (#215) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Hdf5 1 8 22 (#224) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> * Update CMake/HDF5Examples version in bin/release * Update CMake/HDF5Examples version number in bin/release (#225) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> * Fixed typo in an error message. (#228) * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) * Bring 3 small changes from Hdf5 1.8 to 1.8.22 (#241) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * Stat st blocks fix 1822 (#251) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) * Fixes Autotools detection of the st_blocks field in stat (#246) * Fixes Autotools detection of the st_blocks field in stat The Autotools and CMake will now both correctly determine if the stat struct has the st_blocks field and set H5_HAVE_STAT_ST_BLOCKS appropriately. * Fixes a typo in configure.ac * Restore lines in RELEASE.txt. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * Stat st blocks fix 1822 (#256) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) * Fixes Autotools detection of the st_blocks field in stat (#246) * Fixes Autotools detection of the st_blocks field in stat The Autotools and CMake will now both correctly determine if the stat struct has the st_blocks field and set H5_HAVE_STAT_ST_BLOCKS appropriately. * Fixes a typo in configure.ac * Restore lines in RELEASE.txt. * Updated configure with reconfigure. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * RELEASE.txt cleanup. * Hdf5 1 8 22 (#261) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) * RELEASE.txt cleanup. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * Add macOS Big Sur to tested machines, also missing entries for macOS 10.13 and 10.14. * )Update version. * Hdf5 1 8 22 (#266) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) * RELEASE.txt cleanup. * Add macOS Big Sur to tested machines, also missing entries for macOS 10.13 and 10.14. * )Update version. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * Reverts lock/unlock callback signature to 1.8.21 version (#254) * Reverts lock/unlock callback signature to 1.8.21 version This callback is unused in 1.8. The ros3 and hdfs VFDs are the only VFDs that have the lock callback implemented and that is just as no-op stubs. These stubs were removed so the callbacks are now NULL pointers, like the other VFDs in 1.8. * Trivial whitespace fix * Update version to 1.8.22-14. * Hdf5 1 8 22 - Reverts lock/unlock callback signature to 1.8.21 version (#267) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) * RELEASE.txt cleanup. * Add macOS Big Sur to tested machines, also missing entries for macOS 10.13 and 10.14. * )Update version. * Reverts lock/unlock callback signature to 1.8.21 version (#254) * Reverts lock/unlock callback signature to 1.8.21 version This callback is unused in 1.8. The ros3 and hdfs VFDs are the only VFDs that have the lock callback implemented and that is just as no-op stubs. These stubs were removed so the callbacks are now NULL pointers, like the other VFDs in 1.8. * Trivial whitespace fix * Update version to 1.8.22-14. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * Update version in H5public.h * Hdf5 1 8 22 (#269) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) * RELEASE.txt cleanup. * Add macOS Big Sur to tested machines, also missing entries for macOS 10.13 and 10.14. * )Update version. * Reverts lock/unlock callback signature to 1.8.21 version (#254) * Reverts lock/unlock callback signature to 1.8.21 version This callback is unused in 1.8. The ros3 and hdfs VFDs are the only VFDs that have the lock callback implemented and that is just as no-op stubs. These stubs were removed so the callbacks are now NULL pointers, like the other VFDs in 1.8. * Trivial whitespace fix * Update version to 1.8.22-14. * Update version in H5public.h Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * Set version 1.8.22 for release. * dd RELEASE.txt entry for HDFFV-10741. * Hdf5 1 8 22 (#279) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) * RELEASE.txt cleanup. * Add macOS Big Sur to tested machines, also missing entries for macOS 10.13 and 10.14. * )Update version. * Reverts lock/unlock callback signature to 1.8.21 version (#254) * Reverts lock/unlock callback signature to 1.8.21 version This callback is unused in 1.8. The ros3 and hdfs VFDs are the only VFDs that have the lock callback implemented and that is just as no-op stubs. These stubs were removed so the callbacks are now NULL pointers, like the other VFDs in 1.8. * Trivial whitespace fix * Update version to 1.8.22-14. * Update version in H5public.h * Set version 1.8.22 for release. * dd RELEASE.txt entry for HDFFV-10741. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * Improve performance of multiple calls to H5Sget_select_elem_pointlist (#270) (#277) * Cache the pointer to the next point to process after the last call to H5S__get_select_elem_pointlist. This allows the normal process of iterating over the points in batches to be much more efficient, as the library does not need to traverse the entirety of the preceding points every time the funciton is re-entered. * Update RELEASE.txt for point selection iteration performance fix. * Hdf5 1 8 22 (#281) * Restores maintainer mode in the autotools (#200) Maintainer mode should be enabled in development branches. Also adds helpful commenting. Add bin/switch_maint_mode Disable maintainer mode for release. Fix incomplete merge for stub functions in H5Fdhdfs.c * Update configure for Restores maintainer mode in the autotools (#200). * Update MANIFEST for switch_maint_mode script. * Update so numbers for 1.8.22 release. * Add so numbers changes in Makefile.ins for 1.8.22 release. * Update pkgconfig settings with version - #218 (#223) * Add notice of final HDFF5 1.8 release. Add solaris 64bit alignment issue to "Known Problems". * Update 1.8 final release notice. * Update CMake/HDF5Examples version in bin/release * Fixed typo in an error message. (#227) * Remove duplicate setting (#239) * RELEASE.txt cleanup. * Add macOS Big Sur to tested machines, also missing entries for macOS 10.13 and 10.14. * )Update version. * Reverts lock/unlock callback signature to 1.8.21 version (#254) * Reverts lock/unlock callback signature to 1.8.21 version This callback is unused in 1.8. The ros3 and hdfs VFDs are the only VFDs that have the lock callback implemented and that is just as no-op stubs. These stubs were removed so the callbacks are now NULL pointers, like the other VFDs in 1.8. * Trivial whitespace fix * Update version to 1.8.22-14. * Update version in H5public.h * Set version 1.8.22 for release. * dd RELEASE.txt entry for HDFFV-10741. * Improve performance of multiple calls to H5Sget_select_elem_pointlist (#270) (#277) * Cache the pointer to the next point to process after the last call to H5S__get_select_elem_pointlist. This allows the normal process of iterating over the points in batches to be much more efficient, as the library does not need to traverse the entirety of the preceding points every time the funciton is re-entered. * Update RELEASE.txt for point selection iteration performance fix. Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org> * Hdf5 1 8 22 (#284) * Fixed typo in an error message. * Updated for HDFFV-11150, HDFFV-10480, and HDFFV-11159 * Update "Support for New Platforms and Compilers" section in RELEASE.txt; add check_version workaround for binary compatibility to "Known Problems". * Add SUSE Linux to tested platforms. * Update numbers in config/lt_vers.am and run bin/reconfigure for so numbers. * Update version in 3 files missed by merge. Co-authored-by: Allen Byrne <byrn@hdfgroup.org> Co-authored-by: Vailin Choi <vchoi@hdfgroup.org> Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org> Co-authored-by: hdftest <hdftest@hdfgroup.org> Co-authored-by: Jordan Henderson <jhenderson@hdfgroup.org> Co-authored-by: Dana Robinson <derobins@hdfgroup.org> Co-authored-by: Binh-Minh Ribler <bmribler@hdfgroup.org> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> Co-authored-by: H. Joe Lee <hyoklee@hdfgroup.org> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Diffstat (limited to 'test/ohdr.c')
-rw-r--r--test/ohdr.c667
1 files changed, 342 insertions, 325 deletions
diff --git a/test/ohdr.c b/test/ohdr.c
index 5b000f2..07d7bd9 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -32,10 +32,7 @@
#define H5G_PACKAGE
#include "H5Gpkg.h"
-const char *FILENAME[] = {
- "ohdr",
- NULL
-};
+const char *FILENAME[] = {"ohdr", NULL};
/* The tbogus.h5 is generated from gen_bogus.c in HDF5 'test' directory.
* To get this data file, define H5O_ENABLE_BOGUS in src/H5Oprivate, rebuild
@@ -45,24 +42,24 @@ const char *FILENAME[] = {
/*
* Verify that messages are moved forward into a "continuation message":
- * Create an object header with several continuation chunks
- * Remove a message in the last chunk
- * The remaining message(s) in the last chunk should be moved forward into the continuation message
- * The process will repeat when the continuation message is big enough to hold all the
- * messages in the last chunk.
- * Result: the number of chunks should be reduced
+ * Create an object header with several continuation chunks
+ * Remove a message in the last chunk
+ * The remaining message(s) in the last chunk should be moved forward into the continuation message
+ * The process will repeat when the continuation message is big enough to hold all the
+ * messages in the last chunk.
+ * Result: the number of chunks should be reduced
*/
static herr_t
test_cont(char *filename, hid_t fapl)
{
- hid_t file=-1;
- H5F_t *f = NULL;
+ hid_t file = -1;
+ H5F_t * f = NULL;
H5O_hdr_info_t hdr_info;
- H5O_loc_t oh_locA, oh_locB;
- time_t time_new;
- const char *short_name = "T";
- const char *long_name = "This is the message";
- size_t nchunks;
+ H5O_loc_t oh_locA, oh_locB;
+ time_t time_new;
+ const char * short_name = "T";
+ const char * long_name = "This is the message";
+ size_t nchunks;
TESTING("object header continuation block");
@@ -70,80 +67,85 @@ test_cont(char *filename, hid_t fapl)
HDmemset(&oh_locB, 0, sizeof(oh_locB));
/* Create the file to operate on */
- if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
- if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR
+ if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ TEST_ERROR
+ if (NULL == (f = (H5F_t *)H5I_object(file)))
+ FAIL_STACK_ERROR
- if(H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)H5O_MIN_SIZE, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_locA/*out*/) < 0)
- FAIL_STACK_ERROR
+ if (H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)H5O_MIN_SIZE, (size_t)0, H5P_GROUP_CREATE_DEFAULT,
+ &oh_locA /*out*/) < 0)
+ FAIL_STACK_ERROR
- if(H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)H5O_MIN_SIZE, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_locB/*out*/) < 0)
- FAIL_STACK_ERROR
+ if (H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)H5O_MIN_SIZE, (size_t)0, H5P_GROUP_CREATE_DEFAULT,
+ &oh_locB /*out*/) < 0)
+ FAIL_STACK_ERROR
time_new = 11111111;
- if(H5O_msg_create(&oh_locA, H5O_NAME_ID, 0, 0, &long_name, H5P_DATASET_XFER_DEFAULT) < 0)
- FAIL_STACK_ERROR
+ if (H5O_msg_create(&oh_locA, H5O_NAME_ID, 0, 0, &long_name, H5P_DATASET_XFER_DEFAULT) < 0)
+ FAIL_STACK_ERROR
- if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
- FAIL_STACK_ERROR
- if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
- FAIL_STACK_ERROR
- if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
- FAIL_STACK_ERROR
+ if (H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ FAIL_STACK_ERROR
+ if (H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ FAIL_STACK_ERROR
+ if (H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ FAIL_STACK_ERROR
- if(H5O_msg_create(&oh_locA, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
- FAIL_STACK_ERROR
+ if (H5O_msg_create(&oh_locA, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ FAIL_STACK_ERROR
- if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(H5O_msg_create(&oh_locA, H5O_NAME_ID, 0, 0, &short_name, H5P_DATASET_XFER_DEFAULT) < 0)
- FAIL_STACK_ERROR
+ if (H5O_msg_create(&oh_locA, H5O_NAME_ID, 0, 0, &short_name, H5P_DATASET_XFER_DEFAULT) < 0)
+ FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_locA, 1, H5P_DATASET_XFER_DEFAULT))
+ if (1 != H5O_link(&oh_locA, 1, H5P_DATASET_XFER_DEFAULT))
+ FAIL_STACK_ERROR
+ if (1 != H5O_link(&oh_locB, 1, H5P_DATASET_XFER_DEFAULT))
+ FAIL_STACK_ERROR
+ if (H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_locB, 1, H5P_DATASET_XFER_DEFAULT))
+ if (H5O_expunge_chunks_test(&oh_locA, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
- FAIL_STACK_ERROR
- if(H5O_expunge_chunks_test(&oh_locA, H5P_DATASET_XFER_DEFAULT) < 0)
- FAIL_STACK_ERROR
- if(H5O_get_hdr_info(&oh_locA, H5P_DATASET_XFER_DEFAULT, &hdr_info) < 0)
- FAIL_STACK_ERROR
+ if (H5O_get_hdr_info(&oh_locA, H5P_DATASET_XFER_DEFAULT, &hdr_info) < 0)
+ FAIL_STACK_ERROR
nchunks = hdr_info.nchunks;
/* remove the 1st H5O_NAME_ID message */
- if(H5O_msg_remove(&oh_locA, H5O_NAME_ID, 0, FALSE, H5P_DATASET_XFER_DEFAULT) < 0)
- FAIL_STACK_ERROR
+ if (H5O_msg_remove(&oh_locA, H5O_NAME_ID, 0, FALSE, H5P_DATASET_XFER_DEFAULT) < 0)
+ FAIL_STACK_ERROR
- if(H5O_get_hdr_info(&oh_locA, H5P_DATASET_XFER_DEFAULT, &hdr_info) < 0)
- FAIL_STACK_ERROR
+ if (H5O_get_hdr_info(&oh_locA, H5P_DATASET_XFER_DEFAULT, &hdr_info) < 0)
+ FAIL_STACK_ERROR
- if(hdr_info.nchunks >= nchunks)
- TEST_ERROR
+ if (hdr_info.nchunks >= nchunks)
+ TEST_ERROR
- if(H5O_close(&oh_locA) < 0)
- FAIL_STACK_ERROR
- if(H5O_close(&oh_locB) < 0)
- FAIL_STACK_ERROR
- if(H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ if (H5O_close(&oh_locA) < 0)
+ FAIL_STACK_ERROR
+ if (H5O_close(&oh_locB) < 0)
+ FAIL_STACK_ERROR
+ if (H5Fclose(file) < 0)
+ FAIL_STACK_ERROR
PASSED();
-
- return 0;
+ return SUCCEED;
error:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5O_close(&oh_locA);
H5O_close(&oh_locB);
H5Fclose(file);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
- return -1;
-} /* test_cont() */
+ return FAIL;
+} /* end test_cont() */
/*
* Verify that object headers are held in the cache until they are linked
@@ -156,93 +158,93 @@ error:
static herr_t
test_ohdr_cache(char *filename, hid_t fapl)
{
- hid_t file = -1; /* File ID */
- hid_t my_fapl; /* FAPL ID */
- hid_t my_dxpl; /* DXPL ID */
- H5AC_cache_config_t mdc_config; /* Metadata cache configuration info */
- H5F_t *f = NULL; /* File handle */
- H5HL_t *lheap, *lheap2, *lheap3; /* Pointer to local heaps */
- haddr_t lheap_addr, lheap_addr2, lheap_addr3; /* Local heap addresses */
- H5O_loc_t oh_loc; /* Object header location */
- time_t time_new; /* Time value for modification time message */
- unsigned rc; /* Refcount for object */
+ hid_t file = -1; /* File ID */
+ hid_t my_fapl; /* FAPL ID */
+ hid_t my_dxpl; /* DXPL ID */
+ H5AC_cache_config_t mdc_config; /* Metadata cache configuration info */
+ H5F_t * f = NULL; /* File handle */
+ H5HL_t * lheap, *lheap2, *lheap3; /* Pointer to local heaps */
+ haddr_t lheap_addr, lheap_addr2, lheap_addr3; /* Local heap addresses */
+ H5O_loc_t oh_loc; /* Object header location */
+ time_t time_new; /* Time value for modification time message */
+ unsigned rc; /* Refcount for object */
TESTING("object header creation in cache");
/* Make a copy of the FAPL */
- if((my_fapl = H5Pcopy(fapl)) < 0)
+ if ((my_fapl = H5Pcopy(fapl)) < 0)
FAIL_STACK_ERROR
/* Tweak down the size of the metadata cache to only 64K */
mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
- if(H5Pget_mdc_config(my_fapl, &mdc_config) < 0)
+ if (H5Pget_mdc_config(my_fapl, &mdc_config) < 0)
FAIL_STACK_ERROR
mdc_config.set_initial_size = TRUE;
- mdc_config.initial_size = 32 * 1024;
- mdc_config.max_size = 64 * 1024;
- mdc_config.min_size = 8 * 1024;
- if(H5Pset_mdc_config(my_fapl, &mdc_config) < 0)
+ mdc_config.initial_size = 32 * 1024;
+ mdc_config.max_size = 64 * 1024;
+ mdc_config.min_size = 8 * 1024;
+ if (H5Pset_mdc_config(my_fapl, &mdc_config) < 0)
FAIL_STACK_ERROR
/* Make a copy of the default DXPL */
- if((my_dxpl = H5Pcopy(H5P_DATASET_XFER_DEFAULT)) < 0)
+ if ((my_dxpl = H5Pcopy(H5P_DATASET_XFER_DEFAULT)) < 0)
FAIL_STACK_ERROR
/* Create the file to operate on */
- if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, my_fapl)) < 0)
+ if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, my_fapl)) < 0)
+ FAIL_STACK_ERROR
+ if (H5Pclose(my_fapl) < 0)
FAIL_STACK_ERROR
- if(H5Pclose(my_fapl) < 0)
- FAIL_STACK_ERROR
- if(NULL == (f = (H5F_t *)H5I_object(file)))
+ if (NULL == (f = (H5F_t *)H5I_object(file)))
FAIL_STACK_ERROR
/* Create object (local heap) that occupies most of cache */
- if(H5HL_create(f, my_dxpl, (31 * 1024), &lheap_addr) < 0)
+ if (H5HL_create(f, my_dxpl, (31 * 1024), &lheap_addr) < 0)
FAIL_STACK_ERROR
/* Protect local heap (which actually pins it in the cache) */
- if(NULL == (lheap = H5HL_protect(f, my_dxpl, lheap_addr, H5AC_READ)))
+ if (NULL == (lheap = H5HL_protect(f, my_dxpl, lheap_addr, H5AC_READ)))
FAIL_STACK_ERROR
/* Create an object header */
HDmemset(&oh_loc, 0, sizeof(oh_loc));
- if(H5O_create(f, my_dxpl, (size_t)2048, (size_t)1, H5P_GROUP_CREATE_DEFAULT, &oh_loc/*out*/) < 0)
+ if (H5O_create(f, my_dxpl, (size_t)2048, (size_t)1, H5P_GROUP_CREATE_DEFAULT, &oh_loc /*out*/) < 0)
FAIL_STACK_ERROR
/* Query object header information */
rc = 0;
- if(H5O_get_rc(&oh_loc, my_dxpl, &rc) < 0)
+ if (H5O_get_rc(&oh_loc, my_dxpl, &rc) < 0)
FAIL_STACK_ERROR
- if(0 != rc)
+ if (0 != rc)
TEST_ERROR
/* Create object (local heap) that occupies most of cache */
- if(H5HL_create(f, my_dxpl, (31 * 1024), &lheap_addr2) < 0)
+ if (H5HL_create(f, my_dxpl, (31 * 1024), &lheap_addr2) < 0)
FAIL_STACK_ERROR
/* Protect local heap (which actually pins it in the cache) */
- if(NULL == (lheap2 = H5HL_protect(f, my_dxpl, lheap_addr2, H5AC_READ)))
+ if (NULL == (lheap2 = H5HL_protect(f, my_dxpl, lheap_addr2, H5AC_READ)))
FAIL_STACK_ERROR
/* Unprotect local heap (which actually unpins it from the cache) */
- if(H5HL_unprotect(lheap2) < 0)
+ if (H5HL_unprotect(lheap2) < 0)
FAIL_STACK_ERROR
/* Create object header message in new object header */
time_new = 11111111;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, my_dxpl) < 0)
+ if (H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, my_dxpl) < 0)
FAIL_STACK_ERROR
/* Create object (local heap) that occupies most of cache */
- if(H5HL_create(f, my_dxpl, (31 * 1024), &lheap_addr3) < 0)
+ if (H5HL_create(f, my_dxpl, (31 * 1024), &lheap_addr3) < 0)
FAIL_STACK_ERROR
/* Protect local heap (which actually pins it in the cache) */
- if(NULL == (lheap3 = H5HL_protect(f, my_dxpl, lheap_addr3, H5AC_READ)))
+ if (NULL == (lheap3 = H5HL_protect(f, my_dxpl, lheap_addr3, H5AC_READ)))
FAIL_STACK_ERROR
/* Unprotect local heap (which actually unpins it from the cache) */
- if(H5HL_unprotect(lheap3) < 0)
+ if (H5HL_unprotect(lheap3) < 0)
FAIL_STACK_ERROR
/* Query object header information */
@@ -252,46 +254,45 @@ test_ohdr_cache(char *filename, hid_t fapl)
* a non-invasive way -QAK)
*/
rc = 0;
- if(H5O_get_rc(&oh_loc, my_dxpl, &rc) < 0)
+ if (H5O_get_rc(&oh_loc, my_dxpl, &rc) < 0)
FAIL_STACK_ERROR
- if(0 != rc)
+ if (0 != rc)
TEST_ERROR
/* Decrement reference count o object header */
- if(H5O_dec_rc_by_loc(&oh_loc, my_dxpl) < 0)
+ if (H5O_dec_rc_by_loc(&oh_loc, my_dxpl) < 0)
FAIL_STACK_ERROR
/* Close object header created */
- if(H5O_close(&oh_loc) < 0)
+ if (H5O_close(&oh_loc) < 0)
FAIL_STACK_ERROR
/* Unprotect local heap (which actually unpins it from the cache) */
- if(H5HL_unprotect(lheap) < 0)
+ if (H5HL_unprotect(lheap) < 0)
FAIL_STACK_ERROR
- if(H5Pclose(my_dxpl) < 0)
- FAIL_STACK_ERROR
- if(H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ if (H5Pclose(my_dxpl) < 0)
+ FAIL_STACK_ERROR
+ if (H5Fclose(file) < 0)
+ FAIL_STACK_ERROR
PASSED();
- return 0;
+ return SUCCEED;
error:
- H5E_BEGIN_TRY {
- H5Fclose(file);
- } H5E_END_TRY;
+ H5E_BEGIN_TRY { H5Fclose(file); }
+ H5E_END_TRY;
- return -1;
+ return FAIL;
} /* test_ohdr_cache() */
/*
* To test objects with unknown messages in a file with:
- * a) H5O_BOGUS_VALID_ID:
- * --the bogus_id is within the range of H5O_msg_class_g[]
- * b) H5O_BOGUS_INVALID_ID:
- * --the bogus_id is outside the range of H5O_msg_class_g[]
+ * a) H5O_BOGUS_VALID_ID:
+ * --the bogus_id is within the range of H5O_msg_class_g[]
+ * b) H5O_BOGUS_INVALID_ID:
+ * --the bogus_id is outside the range of H5O_msg_class_g[]
*
* The test file is FILE_BOGUS: "tbogus.h5" generated with gen_bogus.c
* --objects that have unknown header messages with H5O_BOGUS_VALID_ID in "/"
@@ -302,59 +303,69 @@ 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 */
- char testfile[256];
+ 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 */
+ char testfile[256];
/* 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, strlen(FILE_BOGUS));
- testfile[strlen(FILE_BOGUS)]='\0';
+ HDstrncpy(testfile, FILE_BOGUS, HDstrlen(FILE_BOGUS));
+ testfile[HDstrlen(FILE_BOGUS)] = '\0';
HDstrncat(testfile, ".copy", 5);
/* Make a copy of the data file from svn. */
- if(h5_make_local_copy(FILE_BOGUS, testfile) < 0)
- FAIL_STACK_ERROR
+ if (h5_make_local_copy(FILE_BOGUS, testfile) < 0)
+ FAIL_STACK_ERROR
TESTING("object with unknown header message and no flags set");
/* Open filename */
- if((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
+ if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
FAIL_STACK_ERROR
/* Open FILE_BOGUS */
- if((fid_bogus = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if ((fid_bogus = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
/* Set up location ID depending on bogus_id */
- if(bogus_id == H5O_BOGUS_INVALID_ID) {
+ if (bogus_id == H5O_BOGUS_INVALID_ID) {
/* Open "group" in FILE_BOGUS */
- if((gid_bogus = H5Gopen2(fid_bogus, "group", H5P_DEFAULT)) < 0)
+ if ((gid_bogus = H5Gopen2(fid_bogus, "group", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
loc_bogus = gid_bogus;
/* Create "group" in filename */
- if((gid = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((gid = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
loc = gid;
-
- } else { /* H5O_BOGUS_VALID_ID */
+ }
+ else { /* H5O_BOGUS_VALID_ID */
loc_bogus = fid_bogus;
- loc = fid;
+ loc = fid;
} /* end else */
- /* Open the dataset with the unknown header message, but no extra flags */
- if((did = H5Dopen2(loc_bogus, "Dataset1", H5P_DEFAULT)) < 0)
+ /* Open the dataset with the unknown header message, but no extra flags */
+ if ((did = H5Dopen2(loc_bogus, "Dataset1", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ if (H5Dclose(did) < 0)
+ FAIL_STACK_ERROR
+
+ PASSED();
+
+ TESTING("object with unknown header message & 'shareable' flag set");
+
+ /* Open the dataset with the unknown header message, adn "shareable" flag */
+ if ((did = H5Dopen2(loc_bogus, "Dataset5", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
FAIL_STACK_ERROR
PASSED();
@@ -362,9 +373,9 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
TESTING("object in r/o file with unknown header message & 'fail if unknown and open for write' flag set");
/* Open the dataset with the unknown header message, and "fail if unknown and open for write" flag */
- if((did = H5Dopen2(loc_bogus, "Dataset2", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc_bogus, "Dataset2", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
FAIL_STACK_ERROR
PASSED();
@@ -375,157 +386,161 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
TESTING("object with unknown header message & 'mark if unknown' flag set");
/* Copy object with "mark if unknown" flag on message into file (FILENAME[0]) that can be modified */
- if(H5Ocopy(loc_bogus, "Dataset4", loc, "Dataset4", H5P_DEFAULT, H5P_DEFAULT) < 0)
+ if (H5Ocopy(loc_bogus, "Dataset4", loc, "Dataset4", H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
/* Closing: filename */
- if(bogus_id == H5O_BOGUS_INVALID_ID)
- if(H5Gclose(gid) < 0)
+ if (bogus_id == H5O_BOGUS_INVALID_ID)
+ if (H5Gclose(gid) < 0)
FAIL_STACK_ERROR
- if(H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ if (H5Fclose(fid) < 0)
+ FAIL_STACK_ERROR
/* Re-open filename, with read-only permissions */
- if((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
+ if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
FAIL_STACK_ERROR
/* Set up location ID depending on bogus_id */
- if(bogus_id == H5O_BOGUS_INVALID_ID) {
+ if (bogus_id == H5O_BOGUS_INVALID_ID) {
/* Open "group" in filename */
- if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0)
+ if ((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
loc = gid;
- } else
+ }
+ else
loc = fid;
/* Open the dataset with the "mark if unknown" message */
- if((did = H5Dopen2(loc, "Dataset4", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc, "Dataset4", H5P_DEFAULT)) < 0)
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 */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
FAIL_STACK_ERROR
/* Close "group" in filename depending on bogus_id */
- if(bogus_id == H5O_BOGUS_INVALID_ID)
- if(H5Gclose(gid) < 0)
+ if (bogus_id == H5O_BOGUS_INVALID_ID)
+ if (H5Gclose(gid) < 0)
FAIL_STACK_ERROR
/* Close filename (to flush change to object header) */
- if(H5Fclose(fid) < 0)
+ if (H5Fclose(fid) < 0)
FAIL_STACK_ERROR
/* Re-open filename */
- if((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
+ if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
FAIL_STACK_ERROR
/* Set up location ID depending on bogus_id */
- if(bogus_id == H5O_BOGUS_INVALID_ID) {
+ if (bogus_id == H5O_BOGUS_INVALID_ID) {
/* Open "group" in filename */
- if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0)
+ if ((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
loc = gid;
- } else
+ }
+ else
loc = fid;
/* Open the dataset with the "mark if unknown" message */
- if((did = H5Dopen2(loc, "Dataset4", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc, "Dataset4", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
/* Create data space */
- if((sid = H5Screate(H5S_SCALAR)) < 0)
+ if ((sid = H5Screate(H5S_SCALAR)) < 0)
FAIL_STACK_ERROR
/* Create an attribute, to get the object header into write access */
- if((aid = H5Acreate2(did, "Attr", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((aid = H5Acreate2(did, "Attr", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
/* Close dataspace */
- if(H5Sclose(sid) < 0)
+ if (H5Sclose(sid) < 0)
FAIL_STACK_ERROR
/* Close attribute */
- if(H5Aclose(aid) < 0)
+ if (H5Aclose(aid) < 0)
FAIL_STACK_ERROR
/* Close the dataset */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
FAIL_STACK_ERROR
/* Close "group" in filename depending on bogus_id */
- if(bogus_id == H5O_BOGUS_INVALID_ID)
- if(H5Gclose(gid) < 0)
+ if (bogus_id == H5O_BOGUS_INVALID_ID)
+ if (H5Gclose(gid) < 0)
FAIL_STACK_ERROR
/* Close filename (to flush change to object header) */
- if(H5Fclose(fid) < 0)
+ if (H5Fclose(fid) < 0)
FAIL_STACK_ERROR
/* Re-open filename */
- if((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
+ if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
FAIL_STACK_ERROR
/* Set up location ID depending on bogus_id */
- if(bogus_id == H5O_BOGUS_INVALID_ID) {
+ if (bogus_id == H5O_BOGUS_INVALID_ID) {
/* Open "group" in filename */
- if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0)
+ if ((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
loc = gid;
- } else
+ }
+ else
loc = fid;
/* Re-open the dataset with the "mark if unknown" message */
- if((did = H5Dopen2(loc, "Dataset4", H5P_DEFAULT)) < 0)
+ if ((did = H5Dopen2(loc, "Dataset4", H5P_DEFAULT)) < 0)
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 */
- if(H5Dclose(did) < 0)
+ if (H5Dclose(did) < 0)
FAIL_STACK_ERROR
- /* Closing: filename */
- if(bogus_id == H5O_BOGUS_INVALID_ID)
- if(H5Gclose(gid) < 0)
+ /* Closing: filename */
+ if (bogus_id == H5O_BOGUS_INVALID_ID)
+ if (H5Gclose(gid) < 0)
FAIL_STACK_ERROR
- if(H5Fclose(fid) < 0)
+ if (H5Fclose(fid) < 0)
FAIL_STACK_ERROR
PASSED();
/* Closing: FILE_BOGUS */
- if(bogus_id == H5O_BOGUS_INVALID_ID)
- if(H5Gclose(gid_bogus) < 0)
+ if (bogus_id == H5O_BOGUS_INVALID_ID)
+ if (H5Gclose(gid_bogus) < 0)
FAIL_STACK_ERROR
- if(H5Fclose(fid_bogus) < 0)
+ if (H5Fclose(fid_bogus) < 0)
FAIL_STACK_ERROR
TESTING("object in r/w file with unknown header message & 'fail if unknown and open for write' flag set");
/* Open FILE_BOGUS with RW intent this time */
- if((fid_bogus = H5Fopen(testfile, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if ((fid_bogus = H5Fopen(testfile, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
/* Set up location ID */
- if(bogus_id == H5O_BOGUS_INVALID_ID) {
+ if (bogus_id == H5O_BOGUS_INVALID_ID) {
/* Open "group" in FILE_BOGUS */
- if((gid_bogus = H5Gopen2(fid_bogus, "group", H5P_DEFAULT)) < 0)
+ if ((gid_bogus = H5Gopen2(fid_bogus, "group", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
loc_bogus = gid_bogus;
- } else
+ }
+ else
loc_bogus = fid_bogus;
- /* Attempt to open the dataset with the unknown header message, and "fail if unknown and open for write" flag */
- H5E_BEGIN_TRY {
- did = H5Dopen2(loc_bogus, "Dataset2", H5P_DEFAULT);
- } H5E_END_TRY;
- if(did >= 0) {
+ /* Attempt to open the dataset with the unknown header message, and "fail if unknown and open for write"
+ * flag */
+ H5E_BEGIN_TRY { did = H5Dopen2(loc_bogus, "Dataset2", H5P_DEFAULT); }
+ H5E_END_TRY;
+ if (did >= 0) {
H5Dclose(did);
TEST_ERROR
} /* end if */
@@ -536,10 +551,10 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
/* There is no H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS */
/* Closing: FILE_BOGUS */
- if(bogus_id == H5O_BOGUS_INVALID_ID)
- if(H5Gclose(gid_bogus) < 0)
- FAIL_STACK_ERROR
- if(H5Fclose(fid_bogus) < 0)
+ if (bogus_id == H5O_BOGUS_INVALID_ID)
+ if (H5Gclose(gid_bogus) < 0)
+ FAIL_STACK_ERROR
+ if (H5Fclose(fid_bogus) < 0)
FAIL_STACK_ERROR
PASSED();
@@ -547,7 +562,8 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
return SUCCEED;
error:
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Fclose(fid);
H5Gclose(gid);
H5Fclose(fid_bogus);
@@ -555,21 +571,21 @@ error:
H5Dclose(did);
H5Sclose(sid);
H5Aclose(aid);
- } H5E_END_TRY;
+ }
+ H5E_END_TRY;
return FAIL;
} /* test_unknown() */
-
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
* Purpose: Exercise private object header behavior and routines
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, November 24, 1998
*
*-------------------------------------------------------------------------
@@ -577,17 +593,17 @@ error:
int
main(void)
{
- hid_t fapl = -1, file = -1;
- hid_t dset = -1;
- H5F_t *f = NULL;
- char filename[1024];
- H5O_hdr_info_t hdr_info; /* Object info */
- H5O_loc_t oh_loc, oh_loc2; /* Object header locations */
- time_t time_new, ro;
- int chunkno; /* Chunk index for message */
- int i; /* Local index variable */
- hbool_t b; /* Index for "new format" loop */
- herr_t ret; /* Generic return value */
+ hid_t fapl = -1, file = -1;
+ hid_t dset = -1;
+ H5F_t * f = NULL;
+ char filename[1024];
+ H5O_hdr_info_t hdr_info; /* Object info */
+ H5O_loc_t oh_loc, oh_loc2; /* Object header locations */
+ time_t time_new, ro;
+ int chunkno; /* Chunk index for message */
+ int i; /* Local index variable */
+ hbool_t b; /* Index for "new format" loop */
+ herr_t ret; /* Generic return value */
/* Reset library */
h5_reset();
@@ -595,77 +611,75 @@ main(void)
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
/* Loop over old & new formats */
- for(b = FALSE; b <= TRUE; b++) {
+ for (b = FALSE; b <= TRUE; b++) {
/* Display info about testing */
- if(b)
+ if (b)
HDputs("Using new file format:");
else
HDputs("Using default file format:");
/* Set the format to use for the file */
- if(H5Pset_libver_bounds(fapl, (b ? H5F_LIBVER_LATEST : H5F_LIBVER_EARLIEST), H5F_LIBVER_LATEST) < 0)
+ if (H5Pset_libver_bounds(fapl, (b ? H5F_LIBVER_LATEST : H5F_LIBVER_EARLIEST), H5F_LIBVER_LATEST) < 0)
FAIL_STACK_ERROR
/* test on object continuation block */
- if(test_cont(filename, fapl) < 0)
+ if (test_cont(filename, fapl) < 0)
FAIL_STACK_ERROR
/* Create the file to operate on */
- if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- if(NULL == (f = (H5F_t *)H5I_object(file)))
+ if (NULL == (f = (H5F_t *)H5I_object(file)))
FAIL_STACK_ERROR
-
/*
* Test object header creation
* (using default group creation property list only because it's convenient)
*/
TESTING("object header creation");
HDmemset(&oh_loc, 0, sizeof(oh_loc));
- if(H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc/*out*/) < 0)
+ if (H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT,
+ &oh_loc /*out*/) < 0)
FAIL_STACK_ERROR
PASSED();
-
/* create a new message */
TESTING("message creation");
time_new = 11111111;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_loc, 1, H5P_DATASET_XFER_DEFAULT))
+ if (1 != H5O_link(&oh_loc, 1, H5P_DATASET_XFER_DEFAULT))
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
FAIL_STACK_ERROR
- if(NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5P_DATASET_XFER_DEFAULT))
+ if (NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5P_DATASET_XFER_DEFAULT))
FAIL_STACK_ERROR
- if(ro != time_new)
+ if (ro != time_new)
TEST_ERROR
PASSED();
-
/*
* Test modification of an existing message.
*/
TESTING("message modification");
time_new = 33333333;
- if(H5O_msg_write(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5O_msg_write(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
FAIL_STACK_ERROR
- if(NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5P_DATASET_XFER_DEFAULT))
+ if (NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5P_DATASET_XFER_DEFAULT))
FAIL_STACK_ERROR
- if(ro != time_new)
+ if (ro != time_new)
TEST_ERROR
/* Make certain that chunk #0 in the object header can be encoded with a 1-byte size */
- if(H5O_get_hdr_info(&oh_loc, H5P_DATASET_XFER_DEFAULT, &hdr_info) < 0)
+ if (H5O_get_hdr_info(&oh_loc, H5P_DATASET_XFER_DEFAULT, &hdr_info) < 0)
FAIL_STACK_ERROR
- if(hdr_info.space.total >=256)
+ if (hdr_info.space.total >= 256)
TEST_ERROR
PASSED();
@@ -679,20 +693,20 @@ main(void)
* message from an object header currently - QAK - 10/8/03)
*/
TESTING("object header overflow in memory");
- for(i = 0; i < 40; i++) {
+ for (i = 0; i < 40; i++) {
time_new = (i + 1) * 1000 + 1000000;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5O_msg_create(&oh_loc, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
} /* end for */
- if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
FAIL_STACK_ERROR
/* Make certain that chunk #0 in the object header will be encoded with a 2-byte size */
- if(H5O_get_hdr_info(&oh_loc, H5P_DATASET_XFER_DEFAULT, &hdr_info) < 0)
+ if (H5O_get_hdr_info(&oh_loc, H5P_DATASET_XFER_DEFAULT, &hdr_info) < 0)
FAIL_STACK_ERROR
- if(hdr_info.space.total < 256)
+ if (hdr_info.space.total < 256)
TEST_ERROR
PASSED();
@@ -703,16 +717,16 @@ main(void)
* works correctly - QAK)
*/
TESTING("close & re-open object header");
- if(H5O_close(&oh_loc) < 0)
+ if (H5O_close(&oh_loc) < 0)
FAIL_STACK_ERROR
- if(H5Fclose(file) < 0)
+ if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
+ if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
FAIL_STACK_ERROR
- if(NULL == (f = (H5F_t *)H5I_object(file)))
+ if (NULL == (f = (H5F_t *)H5I_object(file)))
FAIL_STACK_ERROR
oh_loc.file = f;
- if(H5O_open(&oh_loc) < 0)
+ if (H5O_open(&oh_loc) < 0)
FAIL_STACK_ERROR
PASSED();
@@ -721,13 +735,14 @@ main(void)
* what happens when the object header overflows on disk.
*/
TESTING("object header overflow on disk");
- for(i = 0; i < 10; i++) {
+ for (i = 0; i < 10; i++) {
time_new = (i + 1) * 1000 + 10;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) <
+ 0)
FAIL_STACK_ERROR
} /* end for */
PASSED();
@@ -736,47 +751,48 @@ main(void)
* Delete all time messages.
*/
TESTING("message deletion");
- if(H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(H5O_msg_remove(&oh_loc, H5O_MTIME_ID, H5O_ALL, TRUE, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5O_msg_remove(&oh_loc, H5O_MTIME_ID, H5O_ALL, TRUE, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5P_DATASET_XFER_DEFAULT))
+ if (H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5P_DATASET_XFER_DEFAULT))
FAIL_STACK_ERROR
- if(H5O_msg_read(&oh_loc, H5O_MTIME_ID, &ro, H5P_DATASET_XFER_DEFAULT))
+ if (H5O_msg_read(&oh_loc, H5O_MTIME_ID, &ro, H5P_DATASET_XFER_DEFAULT))
FAIL_STACK_ERROR
PASSED();
-
/*
* Constant message handling.
* (can't write to them, but should be able to remove them)
*/
TESTING("constant message handling");
time_new = 22222222;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, H5O_MSG_FLAG_CONSTANT, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, H5O_MSG_FLAG_CONSTANT, 0, &time_new,
+ H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
FAIL_STACK_ERROR
- if(NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5P_DATASET_XFER_DEFAULT))
+ if (NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5P_DATASET_XFER_DEFAULT))
FAIL_STACK_ERROR
- if(ro != time_new)
+ if (ro != time_new)
TEST_ERROR
time_new = 33333333;
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
ret = H5O_msg_write(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT);
- } H5E_END_TRY;
- if(ret >= 0)
+ }
+ H5E_END_TRY;
+ if (ret >= 0)
TEST_ERROR
- if(H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
PASSED();
-
/* release resources */
TESTING("object header closing");
- if(H5O_close(&oh_loc) < 0)
+ if (H5O_close(&oh_loc) < 0)
FAIL_STACK_ERROR
PASSED();
@@ -785,175 +801,176 @@ main(void)
*/
TESTING("locking messages");
HDmemset(&oh_loc, 0, sizeof(oh_loc));
- if(H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc/*out*/) < 0)
+ if (H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT,
+ &oh_loc /*out*/) < 0)
FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_loc, 1, H5P_DATASET_XFER_DEFAULT))
+ if (1 != H5O_link(&oh_loc, 1, H5P_DATASET_XFER_DEFAULT))
FAIL_STACK_ERROR
/* Create second object header, to guarantee that first object header uses multiple chunks */
HDmemset(&oh_loc2, 0, sizeof(oh_loc2));
- if(H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc2/*out*/) < 0)
+ if (H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT,
+ &oh_loc2 /*out*/) < 0)
FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_loc2, 1, H5P_DATASET_XFER_DEFAULT))
+ if (1 != H5O_link(&oh_loc2, 1, H5P_DATASET_XFER_DEFAULT))
FAIL_STACK_ERROR
/* Fill object header with messages, creating multiple chunks */
- for(i = 0; i < 10; i++) {
+ for (i = 0; i < 10; i++) {
time_new = (i + 1) * 1000 + 10;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Get # of object header chunks */
- if(H5O_get_hdr_info(&oh_loc, H5P_DATASET_XFER_DEFAULT, &hdr_info) < 0)
+ if (H5O_get_hdr_info(&oh_loc, H5P_DATASET_XFER_DEFAULT, &hdr_info) < 0)
FAIL_STACK_ERROR
- if(hdr_info.nchunks != 2)
+ if (hdr_info.nchunks != 2)
TEST_ERROR
/* Add message to lock to object header */
time_new = 11111111;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5O_msg_create(&oh_loc, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
/* Verify chunk index for message */
- if((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT)) < 0)
+ if ((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT)) < 0)
FAIL_STACK_ERROR
- if(chunkno != 1)
+ if (chunkno != 1)
TEST_ERROR
/* Lock the message into the chunk */
- if(H5O_msg_lock(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5O_msg_lock(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
/* Attempt to lock the message twice */
- H5E_BEGIN_TRY {
- ret = H5O_msg_lock(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT);
- } H5E_END_TRY;
- if(ret >= 0)
+ H5E_BEGIN_TRY { ret = H5O_msg_lock(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT); }
+ H5E_END_TRY;
+ if (ret >= 0)
TEST_ERROR
/* Delete all the other messages, which would move the message into
* chunk #0, if it wasn't locked
*/
- if(H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
/* Verify chunk index for message */
- if((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT)) < 0)
+ if ((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT)) < 0)
FAIL_STACK_ERROR
- if(chunkno != 1)
+ if (chunkno != 1)
TEST_ERROR
/* Unlock the message */
- if(H5O_msg_unlock(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5O_msg_unlock(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
/* Attempt to unlock the message twice */
- H5E_BEGIN_TRY {
- ret = H5O_msg_unlock(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT);
- } H5E_END_TRY;
- if(ret >= 0)
+ H5E_BEGIN_TRY { ret = H5O_msg_unlock(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT); }
+ H5E_END_TRY;
+ if (ret >= 0)
TEST_ERROR
/* Close object headers */
- if(H5O_close(&oh_loc2) < 0)
+ if (H5O_close(&oh_loc2) < 0)
FAIL_STACK_ERROR
- if(H5O_close(&oh_loc) < 0)
+ if (H5O_close(&oh_loc) < 0)
FAIL_STACK_ERROR
/* Open first object header */
HDmemset(&oh_loc, 0, sizeof(oh_loc));
- if(H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc/*out*/) < 0)
+ if (H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT,
+ &oh_loc /*out*/) < 0)
FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_loc, 1, H5P_DATASET_XFER_DEFAULT))
+ if (1 != H5O_link(&oh_loc, 1, H5P_DATASET_XFER_DEFAULT))
FAIL_STACK_ERROR
/* Create second object header, to guarantee that first object header uses multiple chunks */
HDmemset(&oh_loc2, 0, sizeof(oh_loc2));
- if(H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc2/*out*/) < 0)
+ if (H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT,
+ &oh_loc2 /*out*/) < 0)
FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_loc2, 1, H5P_DATASET_XFER_DEFAULT))
+ if (1 != H5O_link(&oh_loc2, 1, H5P_DATASET_XFER_DEFAULT))
FAIL_STACK_ERROR
/* Add message to move to object header */
time_new = 11111111;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5O_msg_create(&oh_loc, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
/* Verify chunk index for message */
- if((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT)) < 0)
+ if ((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT)) < 0)
FAIL_STACK_ERROR
- if(chunkno != 0)
+ if (chunkno != 0)
TEST_ERROR
/* Lock the message into the chunk */
- if(H5O_msg_lock(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5O_msg_lock(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
/* Fill object header with messages, creating multiple chunks */
/* (would normally move locked message to new chunk) */
- for(i = 0; i < 10; i++) {
+ for (i = 0; i < 10; i++) {
time_new = (i + 1) * 1000 + 10;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Get # of object header chunks */
- if(H5O_get_hdr_info(&oh_loc, H5P_DATASET_XFER_DEFAULT, &hdr_info) < 0)
+ if (H5O_get_hdr_info(&oh_loc, H5P_DATASET_XFER_DEFAULT, &hdr_info) < 0)
FAIL_STACK_ERROR
- if(hdr_info.nchunks != 2)
+ if (hdr_info.nchunks != 2)
TEST_ERROR
/* Verify chunk index for message */
- if((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT)) < 0)
+ if ((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT)) < 0)
FAIL_STACK_ERROR
- if(chunkno != 0)
+ if (chunkno != 0)
TEST_ERROR
/* Unlock the message */
- if(H5O_msg_unlock(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT) < 0)
+ if (H5O_msg_unlock(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
/* Close object headers */
- if(H5O_close(&oh_loc2) < 0)
+ if (H5O_close(&oh_loc2) < 0)
FAIL_STACK_ERROR
- if(H5O_close(&oh_loc) < 0)
+ if (H5O_close(&oh_loc) < 0)
FAIL_STACK_ERROR
PASSED();
- /* Close the file we created */
- if(H5Fclose(file) < 0)
+ /* Close the file we created */
+ if (H5Fclose(file) < 0)
TEST_ERROR
/* 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");
- if(test_unknown(H5O_BOGUS_VALID_ID, filename, fapl) < 0)
+ if (test_unknown(H5O_BOGUS_VALID_ID, filename, fapl) < 0)
TEST_ERROR
HDputs("Accessing objects with unknown header messages: H5O_BOGUS_INVALID_ID");
- if(test_unknown(H5O_BOGUS_INVALID_ID, filename, fapl) < 0)
+ if (test_unknown(H5O_BOGUS_INVALID_ID, filename, fapl) < 0)
TEST_ERROR
/* Test object header creation metadata cache issues */
- if(test_ohdr_cache(filename, fapl) < 0)
+ if (test_ohdr_cache(filename, fapl) < 0)
TEST_ERROR
} /* end for */
/* Verify symbol table messages are cached */
- if(h5_verify_cached_stabs(FILENAME, fapl) < 0) TEST_ERROR
+ if (h5_verify_cached_stabs(FILENAME, fapl) < 0)
+ TEST_ERROR
- puts("All object header tests passed.");
+ HDputs("All object header tests passed.");
h5_cleanup(FILENAME, fapl);
- return(0);
+ return 0;
error:
- puts("*** TESTS FAILED ***");
- H5E_BEGIN_TRY {
- H5Fclose(file);
- } H5E_END_TRY;
+ HDputs("*** TESTS FAILED ***");
+ H5E_BEGIN_TRY { H5Fclose(file); }
+ H5E_END_TRY;
- return(1);
+ return 1;
} /* end main() */
-