From beb04ae817268a49656b5abe043627dcbba15e5d Mon Sep 17 00:00:00 2001 From: James Laird Date: Mon, 31 Jul 2006 14:46:16 -0500 Subject: [PATCH] [svn-r12519] Fixed "make check-vfd" "make check-vfd" will now run all tests in the test directory with different file drivers (at least, all of those tests that use the testing framework's FAPL). Tests that fail will be skipped. This is not a perfect fix, but is better than nothing. Along with this change, check-vfd should be added to the Daily Tests. --- Makefile.am | 9 + Makefile.in | 9 + bin/snapshot | 19 +- c++/Makefile.in | 5 +- c++/examples/Makefile.in | 5 +- c++/src/Makefile.in | 5 +- c++/test/Makefile.in | 5 +- config/conclude.am | 5 +- examples/Makefile.in | 5 +- fortran/Makefile.in | 5 +- fortran/examples/Makefile.in | 5 +- fortran/src/Makefile.in | 5 +- fortran/test/Makefile.in | 5 +- fortran/testpar/Makefile.in | 5 +- hl/Makefile.in | 5 +- hl/c++/Makefile.in | 5 +- hl/c++/examples/Makefile.in | 5 +- hl/c++/src/Makefile.in | 5 +- hl/c++/test/Makefile.in | 5 +- hl/examples/Makefile.in | 5 +- hl/fortran/Makefile.in | 5 +- hl/fortran/examples/Makefile.in | 5 +- hl/fortran/src/Makefile.in | 5 +- hl/fortran/test/Makefile.in | 5 +- hl/src/Makefile.in | 5 +- hl/test/Makefile.in | 5 +- hl/tools/Makefile.in | 5 +- hl/tools/gif2h5/Makefile.in | 5 +- perform/Makefile.in | 5 +- release_docs/RELEASE.txt | 3 + src/Makefile.in | 5 +- test/Makefile.am | 2 + test/Makefile.in | 6 +- test/btree2.c | 153 +- test/dsets.c | 135 +- test/enum.c | 189 +- test/extend.c | 73 +- test/external.c | 93 +- test/fheap.c | 11 + test/fillval.c | 99 +- test/flush1.c | 85 +- test/flush2.c | 94 +- test/getname.c | 3035 ++++++++++++++++--------------- test/istore.c | 225 +-- test/lheap.c | 99 +- test/links.c | 57 +- test/mount.c | 95 +- test/mtime.c | 109 +- test/ntypes.c | 513 +++--- test/objcopy.c | 146 +- test/ohdr.c | 59 +- test/reserved.c | 30 +- test/stab.c | 90 +- test/unlink.c | 124 +- testpar/Makefile.in | 5 +- tools/Makefile.in | 5 +- tools/h5copy/Makefile.in | 5 +- tools/h5diff/Makefile.in | 5 +- tools/h5dump/Makefile.in | 5 +- tools/h5import/Makefile.in | 5 +- tools/h5jam/Makefile.in | 5 +- tools/h5ls/Makefile.in | 5 +- tools/h5repack/Makefile.in | 5 +- tools/lib/Makefile.in | 5 +- tools/misc/Makefile.in | 5 +- 65 files changed, 3035 insertions(+), 2717 deletions(-) diff --git a/Makefile.am b/Makefile.am index 644c2c695a..b9bc7e33d2 100755 --- a/Makefile.am +++ b/Makefile.am @@ -154,6 +154,15 @@ check-install: installcheck trace: @(cd src && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; +# Run tests with different Virtual File Drivers. +# Currently, only invoke check-vfd in the test directory. +check-vfd: + @@SETX@; for d in src test; do \ + if test $$d != .; then \ + (cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ + fi; \ + done + # Automake wants to make config.status depend on configure. This # makes sense, but config.status can't always be regenerated # properly, which can cause builds to fail. diff --git a/Makefile.in b/Makefile.in index 516528ac34..c71a8ff6f4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -862,6 +862,15 @@ check-install: installcheck trace: @(cd src && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; +# Run tests with different Virtual File Drivers. +# Currently, only invoke check-vfd in the test directory. +check-vfd: + @@SETX@; for d in src test; do \ + if test $$d != .; then \ + (cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ + fi; \ + done + # Automake wants to make config.status depend on configure. This # makes sense, but config.status can't always be regenerated # properly, which can cause builds to fail. diff --git a/bin/snapshot b/bin/snapshot index 2c079dbd07..884f1d5c3d 100755 --- a/bin/snapshot +++ b/bin/snapshot @@ -19,6 +19,9 @@ # checked back into the CVS repository. # + +CHECKVAL=check + # function definitions TIMESTAMP() { @@ -188,6 +191,9 @@ while [ $# -gt 0 ] ; do --*) OP_CONFIGURE="$OP_CONFIGURE $1" ;; + check-vfd) + CHECKVAL=check-vfd + ;; op-configure) shift if [ $# -lt 1 ]; then @@ -314,10 +320,11 @@ if [ "$cmd" = "all" -o -n "$cmdcheckout" ]; then ( cd ${CURRENT}; test -f Makefile && ${MAKE} distclean) # verify proper cvs setting - if [ -z "$CVSROOT" ]; then - echo "CVSROOT not defined!" 1>&2 - exit 1 - fi + # if [ -z "$CVSROOT" ]; then + # echo "CVSROOT not defined!" 1>&2 + # exit 1 + # fi + SVNROOT=http://sleipnir.hdfgroup.uiuc.edu/svn/repos # Check out the current version from CVS # (cd $BASEDIR; cvs -Q co -P -d current ${CVSVERSION} hdf5 ) || exit 1 @@ -392,7 +399,7 @@ if [ "$cmd" = "all" -o -n "$cmdtest" -o -n "$cmddiff" ]; then TIMESTAMP "make" && \ ${MAKE} && \ TIMESTAMP "check" && \ - ${MAKE} check && \ + ${MAKE} ${CHECKVAL} && \ TIMESTAMP "install" && \ ${MAKE} install-all && \ TIMESTAMP "check-install" && \ @@ -442,7 +449,7 @@ if [ "$cmd" = "all" -o -n "$cmdrel" ]; then bin/release -d $ARCHIVES $METHODS perl bin/h5vers -i # cvs -Q commit -m "Snapshot $RELEASE_VERSION" - svn -q commit -m "Snapshot $RELEASE_VERSION" + svn -q commit -m "Snapshot $RELEASE_VERSION" ) errcode=$? fi diff --git a/c++/Makefile.in b/c++/Makefile.in index 4918c82f9a..7e7ef0e477 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -844,13 +844,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index f5e547edf2..c41356be94 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -756,13 +756,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index b1dee1c0f2..471a30939f 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -933,13 +933,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index 94f52c107e..88c5ad832e 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -823,13 +823,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/config/conclude.am b/config/conclude.am index ad33c810ba..ab507ff05f 100644 --- a/config/conclude.am +++ b/config/conclude.am @@ -216,12 +216,13 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done diff --git a/examples/Makefile.in b/examples/Makefile.in index 8e8330b406..8e82d619c9 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -769,13 +769,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 0c024f7f94..66e9baca26 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -853,13 +853,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index 51d72bef80..5e8836c998 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -783,13 +783,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 9988f0b9f2..843e7830d5 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -1063,13 +1063,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 2455b746bb..094dd78cb8 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -995,13 +995,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 98de35e34f..296c12a0dd 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -790,13 +790,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/hl/Makefile.in b/hl/Makefile.in index 7cf4ccf76e..a9db376b60 100755 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -852,13 +852,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index f02a1847bc..2f96b47418 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -844,13 +844,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index 33c4cc9fd7..391c854bb3 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -745,13 +745,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 484d76e9f3..c6017fb086 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -847,13 +847,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index 906cc63e8d..1bec8bfc7a 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -797,13 +797,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index 47d7f99f20..0268812195 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -775,13 +775,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index e865b10f49..e3c267855d 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -848,13 +848,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index dd5baea4c7..e2c2cc7bb7 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -746,13 +746,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 28637f1819..ce71e2a396 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -881,13 +881,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index e22b292f52..041de85791 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -800,13 +800,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 8e5410f0d6..60ad6faac4 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -848,13 +848,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index 1bd8a163b9..2b6b9add7a 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -832,13 +832,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index b018112ac6..508826331a 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -830,13 +830,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index 6cadaca62c..b4d9900686 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -835,13 +835,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/perform/Makefile.in b/perform/Makefile.in index 71cd7e5121..f7a9a82599 100644 --- a/perform/Makefile.in +++ b/perform/Makefile.in @@ -881,13 +881,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 29878528b8..b0a91406d7 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -45,6 +45,9 @@ New Features Configuration: -------------- + - 'make check-vfd' can now be run from the top level directory. Not all + tests that 'make check' invokes work with certain Virtual File Drivers, + so those tests have been skipped. - MAM 2006/7/17 - Added the variable HDF5TestExpress to control how long tests run. Setting it to a value between 0 and 3 controls how thoroughly the library is tested, with 0 being an "exhaustive run" and 3 being a diff --git a/src/Makefile.in b/src/Makefile.in index b04108035f..cb51291576 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1197,13 +1197,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/test/Makefile.am b/test/Makefile.am index 506dde6131..afadd52655 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -79,6 +79,8 @@ LDADD=libh5test.la $(LIBHDF5) ttsafe_SOURCES=ttsafe.c ttsafe_dcreate.c ttsafe_error.c ttsafe_cancel.c \ ttsafe_acreate.c +VFD_LIST = sec2 stdio core split multi family + # Additional target for running timing test timings _timings: testmeta @for timing in $(TIMINGS) dummy; do \ diff --git a/test/Makefile.in b/test/Makefile.in index 70bb3edd21..5339b481d5 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -654,6 +654,7 @@ LDADD = libh5test.la $(LIBHDF5) ttsafe_SOURCES = ttsafe.c ttsafe_dcreate.c ttsafe_error.c ttsafe_cancel.c \ ttsafe_acreate.c +VFD_LIST = sec2 stdio core split multi family # Sources for testhdf5 executable testhdf5_SOURCES = testhdf5.c tarray.c tattr.c tconfig.c tfile.c tgenprop.c \ @@ -1389,13 +1390,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/test/btree2.c b/test/btree2.c index 38720baf6d..7f6c498ddf 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -5576,81 +5576,92 @@ main(void) hid_t fapl = -1; /* File access property list for data files */ unsigned nerrors = 0; /* Cumulative error count */ int ExpressMode; + const char *envval = NULL; + + envval = HDgetenv("HDF5_DRIVER"); + if (envval == NULL) + envval = "nomatch"; + if (HDstrcmp(envval, "split") && HDstrcmp(envval, "family")) { + /* Reset library */ + h5_reset(); + fapl = h5_fileaccess(); + ExpressMode = GetTestExpress(); + if (ExpressMode > 1) + printf("***Express test mode on. Some tests may be skipped\n"); - /* Reset library */ - h5_reset(); - fapl = h5_fileaccess(); - ExpressMode = GetTestExpress(); - if (ExpressMode > 1) - printf("***Express test mode on. Some tests may be skipped\n"); + /* Test B-tree record insertion */ + /* Iteration, find & index routines tested in these routines as well */ + nerrors += test_insert_basic(fapl); + nerrors += test_insert_split_root(fapl); + nerrors += test_insert_level1_2leaf_redistrib(fapl); + nerrors += test_insert_level1_2leaf_split(fapl); + nerrors += test_insert_level1_3leaf_redistrib(fapl); + nerrors += test_insert_level1_3leaf_split(fapl); + nerrors += test_insert_make_level2(fapl); + nerrors += test_insert_level2_leaf_redistrib(fapl); + nerrors += test_insert_level2_leaf_split(fapl); + nerrors += test_insert_level2_2internal_redistrib(fapl); + nerrors += test_insert_level2_2internal_split(fapl); + nerrors += test_insert_level2_3internal_redistrib(fapl); + nerrors += test_insert_level2_3internal_split(fapl); + if (ExpressMode > 1) + printf("***Express test mode on. test_insert_lots skipped\n"); + else + nerrors += test_insert_lots(fapl); - /* Test B-tree record insertion */ - /* Iteration, find & index routines tested in these routines as well */ - nerrors += test_insert_basic(fapl); - nerrors += test_insert_split_root(fapl); - nerrors += test_insert_level1_2leaf_redistrib(fapl); - nerrors += test_insert_level1_2leaf_split(fapl); - nerrors += test_insert_level1_3leaf_redistrib(fapl); - nerrors += test_insert_level1_3leaf_split(fapl); - nerrors += test_insert_make_level2(fapl); - nerrors += test_insert_level2_leaf_redistrib(fapl); - nerrors += test_insert_level2_leaf_split(fapl); - nerrors += test_insert_level2_2internal_redistrib(fapl); - nerrors += test_insert_level2_2internal_split(fapl); - nerrors += test_insert_level2_3internal_redistrib(fapl); - nerrors += test_insert_level2_3internal_split(fapl); - if (ExpressMode > 1) - printf("***Express test mode on. test_insert_lots skipped\n"); + /* Test B-tree record removal */ + /* Querying the number of records routine also tested in these routines as well */ + nerrors += test_remove_basic(fapl); + nerrors += test_remove_level1_noredistrib(fapl); + nerrors += test_remove_level1_redistrib(fapl); + nerrors += test_remove_level1_2leaf_merge(fapl); + nerrors += test_remove_level1_3leaf_merge(fapl); + nerrors += test_remove_level1_promote(fapl); + nerrors += test_remove_level1_promote_2leaf_redistrib(fapl); + nerrors += test_remove_level1_promote_3leaf_redistrib(fapl); + nerrors += test_remove_level1_promote_2leaf_merge(fapl); + nerrors += test_remove_level1_promote_3leaf_merge(fapl); + nerrors += test_remove_level1_collapse(fapl); + nerrors += test_remove_level2_promote(fapl); + nerrors += test_remove_level2_promote_2internal_redistrib(fapl); + nerrors += test_remove_level2_promote_3internal_redistrib(fapl); + nerrors += test_remove_level2_promote_2internal_merge(fapl); + nerrors += test_remove_level2_promote_3internal_merge(fapl); + nerrors += test_remove_level2_2internal_merge_left(fapl); + nerrors += test_remove_level2_2internal_merge_right(fapl); + nerrors += test_remove_level2_3internal_merge(fapl); + nerrors += test_remove_level2_collapse_right(fapl); + if (ExpressMode > 1) + printf("***Express test mode on. test_remove_lots skipped\n"); + else + nerrors += test_remove_lots(fapl); + + /* Test more complex B-tree queries */ + nerrors += test_find_neighbor(fapl); + + /* Test deleting B-trees */ + nerrors += test_delete(fapl); + + /* Test modifying B-tree records */ + nerrors += test_modify(fapl); + + if(nerrors) + goto error; + puts("All v2 B-tree tests passed."); + h5_cleanup(FILENAME, fapl); + } else - nerrors += test_insert_lots(fapl); - - /* Test B-tree record removal */ - /* Querying the number of records routine also tested in these routines as well */ - nerrors += test_remove_basic(fapl); - nerrors += test_remove_level1_noredistrib(fapl); - nerrors += test_remove_level1_redistrib(fapl); - nerrors += test_remove_level1_2leaf_merge(fapl); - nerrors += test_remove_level1_3leaf_merge(fapl); - nerrors += test_remove_level1_promote(fapl); - nerrors += test_remove_level1_promote_2leaf_redistrib(fapl); - nerrors += test_remove_level1_promote_3leaf_redistrib(fapl); - nerrors += test_remove_level1_promote_2leaf_merge(fapl); - nerrors += test_remove_level1_promote_3leaf_merge(fapl); - nerrors += test_remove_level1_collapse(fapl); - nerrors += test_remove_level2_promote(fapl); - nerrors += test_remove_level2_promote_2internal_redistrib(fapl); - nerrors += test_remove_level2_promote_3internal_redistrib(fapl); - nerrors += test_remove_level2_promote_2internal_merge(fapl); - nerrors += test_remove_level2_promote_3internal_merge(fapl); - nerrors += test_remove_level2_2internal_merge_left(fapl); - nerrors += test_remove_level2_2internal_merge_right(fapl); - nerrors += test_remove_level2_3internal_merge(fapl); - nerrors += test_remove_level2_collapse_right(fapl); - if (ExpressMode > 1) - printf("***Express test mode on. test_remove_lots skipped\n"); - else - nerrors += test_remove_lots(fapl); - - /* Test more complex B-tree queries */ - nerrors += test_find_neighbor(fapl); - - /* Test deleting B-trees */ - nerrors += test_delete(fapl); - - /* Test modifying B-tree records */ - nerrors += test_modify(fapl); - - if(nerrors) - goto error; - puts("All v2 B-tree tests passed."); - h5_cleanup(FILENAME, fapl); + { + puts("All v2 B-tree tests skipped - Incompatible with current Virtual File Driver"); + } return 0; -error: - puts("*** TESTS FAILED ***"); - H5E_BEGIN_TRY { - H5Pclose(fapl); - } H5E_END_TRY; - return 1; + error: + puts("*** TESTS FAILED ***"); + H5E_BEGIN_TRY { + H5Pclose(fapl); + } H5E_END_TRY; + return 1; + } /* end main() */ diff --git a/test/dsets.c b/test/dsets.c index 8555168548..66e9e909b1 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -5989,74 +5989,85 @@ main(void) double rdcc_w0; int nerrors=0; char filename[1024]; + const char *envval = NULL; - h5_reset(); - fapl = h5_fileaccess(); + /* Don't run this test using certain file drivers */ + envval = HDgetenv("HDF5_DRIVER"); + if (envval == NULL) + envval = "nomatch"; + if (HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) { + h5_reset(); + fapl = h5_fileaccess(); - /* Set the random # seed */ - HDsrandom((unsigned long)HDtime(NULL)); + /* Set the random # seed */ + HDsrandom((unsigned long)HDtime(NULL)); - h5_fixname(FILENAME[0], fapl, filename, sizeof filename); + h5_fixname(FILENAME[0], fapl, filename, sizeof filename); - /* Turn off the chunk cache, so all the chunks are immediately written to disk */ - if(H5Pget_cache(fapl, &mdc_nelmts, &rdcc_nelmts, &rdcc_nbytes, &rdcc_w0)<0) goto error; - rdcc_nbytes=0; - if(H5Pset_cache(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0)<0) goto error; + /* Turn off the chunk cache, so all the chunks are immediately written to disk */ + if(H5Pget_cache(fapl, &mdc_nelmts, &rdcc_nelmts, &rdcc_nbytes, &rdcc_w0)<0) goto error; + rdcc_nbytes=0; + if(H5Pset_cache(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0)<0) goto error; - if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) { - goto error; + if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) { + goto error; + } + + /* Cause the library to emit initial messages */ + if ((grp = H5Gcreate (file, "emit diagnostics", 0))<0) goto error; + if (H5Gset_comment(grp, ".", "Causes diagnostic messages to be emitted")<0) + goto error; + if (H5Gclose (grp)<0) goto error; + + nerrors += test_create(file)<0 ?1:0; + nerrors += test_simple_io(fapl)<0 ?1:0; + nerrors += test_compact_io(fapl)<0 ?1:0; + nerrors += test_max_compact(fapl)<0 ?1:0; + nerrors += test_conv_buffer(file)<0 ?1:0; + nerrors += test_tconv(file)<0 ?1:0; + nerrors += test_filters(file)<0 ?1:0; + nerrors += test_onebyte_shuffle(file)<0 ?1:0; + nerrors += test_nbit_int(file)<0 ?1:0; + nerrors += test_nbit_float(file)<0 ?1:0; + nerrors += test_nbit_double(file)<0 ?1:0; + nerrors += test_nbit_array(file)<0 ?1:0; + nerrors += test_nbit_compound(file)<0 ?1:0; + nerrors += test_nbit_compound_2(file)<0 ?1:0; + nerrors += test_nbit_compound_3(file)<0 ?1:0; + nerrors += test_scaleoffset_int(file)<0 ?1:0; + nerrors += test_scaleoffset_int_2(file)<0 ?1:0; + nerrors += test_scaleoffset_float(file)<0 ?1:0; + nerrors += test_scaleoffset_float_2(file)<0 ?1:0; + nerrors += test_scaleoffset_double(file)<0 ?1:0; + nerrors += test_scaleoffset_double_2(file)<0 ?1:0; + nerrors += test_multiopen (file)<0 ?1:0; + nerrors += test_types(file)<0 ?1:0; + nerrors += test_userblock_offset(fapl)<0 ?1:0; + nerrors += test_missing_filter(file)<0 ?1:0; + nerrors += test_can_apply(file)<0 ?1:0; + nerrors += test_set_local(fapl)<0 ?1:0; + nerrors += test_can_apply_szip(file)<0 ?1:0; + nerrors += test_compare_dcpl(file)<0 ?1:0; + nerrors += test_filter_delete(file)<0 ?1:0; + nerrors += test_filters_endianess()<0 ?1:0; + nerrors += test_zero_dims(file)<0 ?1:0; + nerrors += test_missing_chunk(file)<0 ?1:0; + + if (H5Fclose(file)<0) goto error; + + if (nerrors) goto error; + printf("All dataset tests passed.\n"); + h5_cleanup(FILENAME, fapl); + } + else + { + puts("All dataset tests skipped - Incompatible with current Virtual File Driver"); } - - /* Cause the library to emit initial messages */ - if ((grp = H5Gcreate (file, "emit diagnostics", 0))<0) goto error; - if (H5Gset_comment(grp, ".", "Causes diagnostic messages to be emitted")<0) - goto error; - if (H5Gclose (grp)<0) goto error; - - nerrors += test_create(file)<0 ?1:0; - nerrors += test_simple_io(fapl)<0 ?1:0; - nerrors += test_compact_io(fapl)<0 ?1:0; - nerrors += test_max_compact(fapl)<0 ?1:0; - nerrors += test_conv_buffer(file)<0 ?1:0; - nerrors += test_tconv(file)<0 ?1:0; - nerrors += test_filters(file)<0 ?1:0; - nerrors += test_onebyte_shuffle(file)<0 ?1:0; - nerrors += test_nbit_int(file)<0 ?1:0; - nerrors += test_nbit_float(file)<0 ?1:0; - nerrors += test_nbit_double(file)<0 ?1:0; - nerrors += test_nbit_array(file)<0 ?1:0; - nerrors += test_nbit_compound(file)<0 ?1:0; - nerrors += test_nbit_compound_2(file)<0 ?1:0; - nerrors += test_nbit_compound_3(file)<0 ?1:0; - nerrors += test_scaleoffset_int(file)<0 ?1:0; - nerrors += test_scaleoffset_int_2(file)<0 ?1:0; - nerrors += test_scaleoffset_float(file)<0 ?1:0; - nerrors += test_scaleoffset_float_2(file)<0 ?1:0; - nerrors += test_scaleoffset_double(file)<0 ?1:0; - nerrors += test_scaleoffset_double_2(file)<0 ?1:0; - nerrors += test_multiopen (file)<0 ?1:0; - nerrors += test_types(file)<0 ?1:0; - nerrors += test_userblock_offset(fapl)<0 ?1:0; - nerrors += test_missing_filter(file)<0 ?1:0; - nerrors += test_can_apply(file)<0 ?1:0; - nerrors += test_set_local(fapl)<0 ?1:0; - nerrors += test_can_apply_szip(file)<0 ?1:0; - nerrors += test_compare_dcpl(file)<0 ?1:0; - nerrors += test_filter_delete(file)<0 ?1:0; - nerrors += test_filters_endianess()<0 ?1:0; - nerrors += test_zero_dims(file)<0 ?1:0; - nerrors += test_missing_chunk(file)<0 ?1:0; - - if (H5Fclose(file)<0) goto error; - - if (nerrors) goto error; - printf("All dataset tests passed.\n"); - h5_cleanup(FILENAME, fapl); return 0; - error: - nerrors = MAX(1, nerrors); - printf("***** %d DATASET TEST%s FAILED! *****\n", - nerrors, 1 == nerrors ? "" : "S"); - return 1; + error: + nerrors = MAX(1, nerrors); + printf("***** %d DATASET TEST%s FAILED! *****\n", + nerrors, 1 == nerrors ? "" : "S"); + return 1; } diff --git a/test/enum.c b/test/enum.c index 02cad81ad5..f852ecc554 100644 --- a/test/enum.c +++ b/test/enum.c @@ -207,58 +207,68 @@ test_tr1(hid_t file) static c_e1 data1[10]={E1_RED, E1_GREEN, E1_BLUE, E1_GREEN, E1_WHITE, E1_WHITE, E1_BLACK, E1_GREEN, E1_BLUE, E1_RED}; c_e1 data2[10]; + const char *envval = NULL; TESTING("O(1) conversions"); - if ((cwg=H5Gcreate(file, "test_tr1", 0))<0) goto error; + envval = HDgetenv("HDF5_DRIVER"); + if (envval == NULL) + envval = "nomatch"; + if (HDstrcmp(envval, "split")) { + if ((cwg=H5Gcreate(file, "test_tr1", 0))<0) goto error; - if ((m_type = H5Tcreate(H5T_ENUM, sizeof(c_e1)))<0) goto error; - if (H5Tenum_insert(m_type, "RED", CPTR(eval, E1_RED ))<0) goto error; - if (H5Tenum_insert(m_type, "GREEN", CPTR(eval, E1_GREEN))<0) goto error; - if (H5Tenum_insert(m_type, "BLUE", CPTR(eval, E1_BLUE ))<0) goto error; - if (H5Tenum_insert(m_type, "WHITE", CPTR(eval, E1_WHITE))<0) goto error; - if (H5Tenum_insert(m_type, "BLACK", CPTR(eval, E1_BLACK))<0) goto error; + if ((m_type = H5Tcreate(H5T_ENUM, sizeof(c_e1)))<0) goto error; + if (H5Tenum_insert(m_type, "RED", CPTR(eval, E1_RED ))<0) goto error; + if (H5Tenum_insert(m_type, "GREEN", CPTR(eval, E1_GREEN))<0) goto error; + if (H5Tenum_insert(m_type, "BLUE", CPTR(eval, E1_BLUE ))<0) goto error; + if (H5Tenum_insert(m_type, "WHITE", CPTR(eval, E1_WHITE))<0) goto error; + if (H5Tenum_insert(m_type, "BLACK", CPTR(eval, E1_BLACK))<0) goto error; - if ((f_type = H5Tcreate(H5T_ENUM, sizeof(c_e1)))<0) goto error; - if (H5Tenum_insert(f_type, "RED", CPTR(ival, 105))<0) goto error; - if (H5Tenum_insert(f_type, "GREEN", CPTR(ival, 104))<0) goto error; - if (H5Tenum_insert(f_type, "BLUE", CPTR(ival, 103))<0) goto error; - if (H5Tenum_insert(f_type, "WHITE", CPTR(ival, 102))<0) goto error; - if (H5Tenum_insert(f_type, "BLACK", CPTR(ival, 101))<0) goto error; + if ((f_type = H5Tcreate(H5T_ENUM, sizeof(c_e1)))<0) goto error; + if (H5Tenum_insert(f_type, "RED", CPTR(ival, 105))<0) goto error; + if (H5Tenum_insert(f_type, "GREEN", CPTR(ival, 104))<0) goto error; + if (H5Tenum_insert(f_type, "BLUE", CPTR(ival, 103))<0) goto error; + if (H5Tenum_insert(f_type, "WHITE", CPTR(ival, 102))<0) goto error; + if (H5Tenum_insert(f_type, "BLACK", CPTR(ival, 101))<0) goto error; - if ((space=H5Screate_simple(1, ds_size, NULL))<0) goto error; - if ((dset=H5Dcreate(cwg, "color_table", f_type, space, H5P_DEFAULT))<0) - goto error; - if (H5Dwrite(dset, m_type, space, space, H5P_DEFAULT, data1)<0) goto error; - if (H5Dread(dset, m_type, space, space, H5P_DEFAULT, data2)<0) goto error; - - for (i=0; i0) goto error; + + if (H5Fclose(file)<0) goto error; + puts("All external storage tests passed."); + if (h5_cleanup(FILENAME, fapl)) { + remove("extern_1a.raw"); + remove("extern_1b.raw"); + remove("extern_2a.raw"); + remove("extern_2b.raw"); + remove("extern_3a.raw"); + remove("extern_3b.raw"); + remove("extern_4a.raw"); + remove("extern_4b.raw"); + } } - if ((grp=H5Gcreate(file, "emit-diagnostics", 8))<0) goto error; - if (H5Gclose (grp)<0) goto error; - - nerrors += test_1a(file); - nerrors += test_1b(file); - nerrors += test_1c(file); - nerrors += test_1d(file); - nerrors += test_1e(file); - nerrors += test_1f(file); - nerrors += test_1g(); - nerrors += test_1h(); - nerrors += test_2(fapl); - nerrors += test_3(fapl); - if (nerrors>0) goto error; - - if (H5Fclose(file)<0) goto error; - puts("All external storage tests passed."); - if (h5_cleanup(FILENAME, fapl)) { - remove("extern_1a.raw"); - remove("extern_1b.raw"); - remove("extern_2a.raw"); - remove("extern_2b.raw"); - remove("extern_3a.raw"); - remove("extern_3b.raw"); - remove("extern_4a.raw"); - remove("extern_4b.raw"); + else + { + puts("All external storage tests skipped - Incompatible with current Virtual File Driver"); } return 0; - error: - H5E_BEGIN_TRY { - H5Fclose(file); - H5Pclose(fapl); - } H5E_END_TRY; - nerrors = MAX(1, nerrors); - printf ("%d TEST%s FAILED.\n", nerrors, 1==nerrors?"":"s"); - return 1; + error: + H5E_BEGIN_TRY { + H5Fclose(file); + H5Pclose(fapl); + } H5E_END_TRY; + nerrors = MAX(1, nerrors); + printf ("%d TEST%s FAILED.\n", nerrors, 1==nerrors?"":"s"); + return 1; } diff --git a/test/fheap.c b/test/fheap.c index c7ae68e44a..af3d9ca07f 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -16428,6 +16428,7 @@ main(void) unsigned u; /* Local index variable */ unsigned nerrors = 0; /* Cumulative error count */ int ExpressMode; + const char *envval = NULL; /* File Driver value from environment */ /* Reset library */ h5_reset(); @@ -16436,6 +16437,12 @@ main(void) if (ExpressMode > 1) printf("***Express test mode on. Some tests may be skipped\n"); + envval = HDgetenv("HDF5_DRIVER"); + if(envval == NULL) + envval = "nomatch"; + if(HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) + { + /* Initialize heap's creation parameters */ init_small_cparam(&cparam); @@ -16711,6 +16718,10 @@ HDfprintf(stderr, "Uncomment tests!\n"); #else /* QAK */ HDfprintf(stderr, "Uncomment cleanup!\n"); #endif /* QAK */ + } /* end if(HDstrcmp(envval=="...")) */ + else { + printf("All fractal heap tests skipped - Incompatible with current Virtual File Driver"); + } return 0; diff --git a/test/fillval.c b/test/fillval.c index 07da951eca..b2045230fc 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -1410,56 +1410,67 @@ int main(int argc, char *argv[]) { int nerrors=0, argno, test_contig=1, test_chunk=1, test_compact=1; + const char *envval = NULL; hid_t fapl=-1; - if (argc>=2) { - test_contig = test_chunk = test_compact = 0; - for (argno=1; argno=2) { + test_contig = test_chunk = test_compact = 0; + for (argno=1; argno0.0001) { - H5_FAILED(); - printf(" dset[%lu][%lu] = %g\n", - (unsigned long)i, (unsigned long)j, the_data[i][j]); - printf(" should be %g\n", - (double)(hssize_t)i/(hssize_t)(j+1)); - goto error; + /* Read some data */ + if (H5Dread(dset, H5T_NATIVE_DOUBLE, space, space, H5P_DEFAULT, + the_data)<0) goto error; + for (i=0; i0.0001) { + H5_FAILED(); + printf(" dset[%lu][%lu] = %g\n", + (unsigned long)i, (unsigned long)j, the_data[i][j]); + printf(" should be %g\n", + (double)(hssize_t)i/(hssize_t)(j+1)); + goto error; + } } } - } - /* Open some groups */ - if ((groups=H5Gopen(file, "some_groups"))<0) goto error; - for (i=0; i<100; i++) { - sprintf(name, "grp%02u", (unsigned)i); - if ((grp=H5Gopen(groups, name))<0) goto error; - if (H5Gclose(grp)<0) goto error; - } + /* Open some groups */ + if ((groups=H5Gopen(file, "some_groups"))<0) goto error; + for (i=0; i<100; i++) { + sprintf(name, "grp%02u", (unsigned)i); + if ((grp=H5Gopen(groups, name))<0) goto error; + if (H5Gclose(grp)<0) goto error; + } - if (H5Gclose(groups)<0) goto error; - if (H5Dclose(dset)<0) goto error; - if (H5Fclose(file)<0) goto error; - PASSED(); - h5_cleanup(FILENAME, fapl); + if (H5Gclose(groups)<0) goto error; + if (H5Dclose(dset)<0) goto error; + if (H5Fclose(file)<0) goto error; + PASSED(); + h5_cleanup(FILENAME, fapl); + } + else + { + SKIPPED(); + puts(" Test not compatible with current Virtual File Driver"); + } return 0; - error: - return 1; + error: + return 1; } diff --git a/test/getname.c b/test/getname.c index d5404cc29c..e52a6540c3 100644 --- a/test/getname.c +++ b/test/getname.c @@ -96,947 +96,951 @@ int main( void ) hid_t space_id; hid_t type_id, type2_id; hsize_t dims[1] = { 5 }; + const char *envval = NULL; - /* Name length */ - size_t name_len; + envval = HDgetenv("HDF5_DRIVER"); + if (envval == NULL) + envval = "nomatch"; + if (HDstrcmp(envval, "split")) { + /* Name length */ + size_t name_len; - /* Reset the library and get the file access property list */ - h5_reset(); - fapl = h5_fileaccess(); + /* Reset the library and get the file access property list */ + h5_reset(); + fapl = h5_fileaccess(); - /* Initialize the file names */ - h5_fixname(FILENAME[0], fapl, filename0, sizeof filename0); - h5_fixname(FILENAME[1], fapl, filename1, sizeof filename1); - h5_fixname(FILENAME[2], fapl, filename2, sizeof filename2); - h5_fixname(FILENAME[3], fapl, filename3, sizeof filename3); + /* Initialize the file names */ + h5_fixname(FILENAME[0], fapl, filename0, sizeof filename0); + h5_fixname(FILENAME[1], fapl, filename1, sizeof filename1); + h5_fixname(FILENAME[2], fapl, filename2, sizeof filename2); + h5_fixname(FILENAME[3], fapl, filename3, sizeof filename3); - /* Create a new file_id using default properties. */ - if ((file_id = H5Fcreate( filename0, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR; + /* Create a new file_id using default properties. */ + if ((file_id = H5Fcreate( filename0, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR; /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Gcreate, one group - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Gcreate, one group + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Gcreate, one group"); + TESTING("H5Iget_name with H5Gcreate, one group"); - /* Create group "g0" in the root group using absolute name */ - if ((group_id = H5Gcreate( file_id, "/g0", 0 ))<0) TEST_ERROR; + /* Create group "g0" in the root group using absolute name */ + if ((group_id = H5Gcreate( file_id, "/g0", 0 ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "/g0", "/g0") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "/g0", "/g0") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); + /* Close */ + H5Gclose( group_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Gcreate, more than one group - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Gcreate, more than one group + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Gcreate, more than one group"); + TESTING("H5Iget_name with H5Gcreate, more than one group"); + /* Create group "g1" in the root group using absolute name */ + if ((group_id = H5Gcreate( file_id, "/g1", 0 ))<0) TEST_ERROR; - /* Create group "g1" in the root group using absolute name */ - if ((group_id = H5Gcreate( file_id, "/g1", 0 ))<0) TEST_ERROR; + /* Create group "g2" in group "g1" using absolute name */ + if ((group2_id = H5Gcreate( file_id, "/g1/g2", 0 ))<0) TEST_ERROR; - /* Create group "g2" in group "g1" using absolute name */ - if ((group2_id = H5Gcreate( file_id, "/g1/g2", 0 ))<0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR; + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Gopen - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Gopen + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Gopen"); + TESTING("H5Iget_name with H5Gopen"); - /* Reopen the group */ - if ((group_id = H5Gopen( file_id, "/g1" ))<0) TEST_ERROR; + /* Reopen the group */ + if ((group_id = H5Gopen( file_id, "/g1" ))<0) TEST_ERROR; - /* Reopen the group */ - if ((group2_id = H5Gopen( file_id, "/g1/g2" ))<0) TEST_ERROR; + /* Reopen the group */ + if ((group2_id = H5Gopen( file_id, "/g1/g2" ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Dcreate - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Dcreate + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Dcreate"); + TESTING("H5Iget_name with H5Dcreate"); - /* Create the dataspace */ - if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR; + /* Create the dataspace */ + if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR; - /* Create a new dataset */ - if ((dataset_id = H5Dcreate( file_id , "d1", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR; + /* Create a new dataset */ + if ((dataset_id = H5Dcreate( file_id , "d1", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR; - /* Verify */ - if(check_name(dataset_id, "/d1", "/d1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(dataset_id, "/d1", "/d1") < 0) TEST_ERROR; - /* Close */ - H5Dclose( dataset_id ); + /* Close */ + H5Dclose( dataset_id ); - /* Reopen the group */ - if ((group_id = H5Gopen( file_id, "g1" ))<0) TEST_ERROR; + /* Reopen the group */ + if ((group_id = H5Gopen( file_id, "g1" ))<0) TEST_ERROR; - /* Create a new dataset inside "g1" */ - if ((dataset_id = H5Dcreate( group_id , "d1", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR; + /* Create a new dataset inside "g1" */ + if ((dataset_id = H5Dcreate( group_id , "d1", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR; - /* Verify */ - if(check_name(dataset_id, "/g1/d1", "/g1/d1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(dataset_id, "/g1/d1", "/g1/d1") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Dclose( dataset_id ); - H5Sclose( space_id ); + /* Close */ + H5Gclose( group_id ); + H5Dclose( dataset_id ); + H5Sclose( space_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Dopen - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Dopen + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Dopen"); + TESTING("H5Iget_name with H5Dopen"); - /* Reopen the dataset */ - if ((dataset_id = H5Dopen( file_id, "d1"))<0) TEST_ERROR; + /* Reopen the dataset */ + if ((dataset_id = H5Dopen( file_id, "d1"))<0) TEST_ERROR; - /* Verify */ - if(check_name(dataset_id, "/d1", "/d1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(dataset_id, "/d1", "/d1") < 0) TEST_ERROR; - /* Close */ - H5Dclose( dataset_id ); + /* Close */ + H5Dclose( dataset_id ); - /* Reopen the group */ - if ((group_id = H5Gopen( file_id, "g1" ))<0) TEST_ERROR; + /* Reopen the group */ + if ((group_id = H5Gopen( file_id, "g1" ))<0) TEST_ERROR; - /* Reopen the dataset */ - if ((dataset_id = H5Dopen( group_id, "d1"))<0) TEST_ERROR; + /* Reopen the dataset */ + if ((dataset_id = H5Dopen( group_id, "d1"))<0) TEST_ERROR; - /* Verify */ - if(check_name(dataset_id, "/g1/d1", "/g1/d1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(dataset_id, "/g1/d1", "/g1/d1") < 0) TEST_ERROR; - /* Close */ - H5Dclose( dataset_id ); - H5Gclose( group_id ); + /* Close */ + H5Dclose( dataset_id ); + H5Gclose( group_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with a long path - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with a long path + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with a long path"); + TESTING("H5Iget_name with a long path"); - /* Create group "g2/bar/baz" */ - if ((group_id = H5Gcreate( file_id, "g2", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "g2/bar", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file_id, "g2/bar/baz", 0 ))<0) TEST_ERROR; + /* Create group "g2/bar/baz" */ + if ((group_id = H5Gcreate( file_id, "g2", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "g2/bar", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file_id, "g2/bar/baz", 0 ))<0) TEST_ERROR; - /* Create a dataset */ - if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR; - if ((dataset_id = H5Dcreate( group3_id , "d1", H5T_NATIVE_INT, space_id, - H5P_DEFAULT ))<0) TEST_ERROR; + /* Create a dataset */ + if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR; + if ((dataset_id = H5Dcreate( group3_id , "d1", H5T_NATIVE_INT, space_id, + H5P_DEFAULT ))<0) TEST_ERROR; - /* Close */ - H5Dclose( dataset_id ); - H5Sclose( space_id ); - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Dclose( dataset_id ); + H5Sclose( space_id ); + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Reopen the dataset */ - if ((dataset_id = H5Dopen( file_id, "/g2/bar/baz/d1"))<0) TEST_ERROR; + /* Reopen the dataset */ + if ((dataset_id = H5Dopen( file_id, "/g2/bar/baz/d1"))<0) TEST_ERROR; - /* Verify */ - if(check_name(dataset_id, "/g2/bar/baz/d1", "/g2/bar/baz/d1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(dataset_id, "/g2/bar/baz/d1", "/g2/bar/baz/d1") < 0) TEST_ERROR; - /* Close */ - H5Dclose( dataset_id ); + /* Close */ + H5Dclose( dataset_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Tcommit - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Tcommit + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Tcommit"); + TESTING("H5Iget_name with H5Tcommit"); - /* Create a datatype */ - if ((type_id = H5Tcreate (H5T_COMPOUND, sizeof(s1_t)))<0) TEST_ERROR; + /* Create a datatype */ + if ((type_id = H5Tcreate (H5T_COMPOUND, sizeof(s1_t)))<0) TEST_ERROR; - /* Insert fields */ - if (H5Tinsert (type_id, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT)<0) TEST_ERROR; - if (H5Tinsert (type_id, "b", HOFFSET(s1_t,b), H5T_NATIVE_INT)<0) TEST_ERROR; - if (H5Tinsert (type_id, "c", HOFFSET(s1_t,c), H5T_NATIVE_FLOAT)<0) TEST_ERROR; + /* Insert fields */ + if (H5Tinsert (type_id, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT)<0) TEST_ERROR; + if (H5Tinsert (type_id, "b", HOFFSET(s1_t,b), H5T_NATIVE_INT)<0) TEST_ERROR; + if (H5Tinsert (type_id, "c", HOFFSET(s1_t,c), H5T_NATIVE_FLOAT)<0) TEST_ERROR; - /* Save datatype for later */ - if (H5Tcommit (file_id, "t1", type_id)<0) TEST_ERROR; + /* Save datatype for later */ + if (H5Tcommit (file_id, "t1", type_id)<0) TEST_ERROR; - /* Verify */ - if(check_name(type_id, "/t1", "/t1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(type_id, "/t1", "/t1") < 0) TEST_ERROR; - /* Close datatype */ - H5Tclose(type_id); + /* Close datatype */ + H5Tclose(type_id); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Topen - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Topen + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Topen"); + TESTING("H5Iget_name with H5Topen"); - /* Open the named datatype */ - if((type_id=H5Topen(file_id, "t1"))<0) TEST_ERROR; + /* Open the named datatype */ + if((type_id=H5Topen(file_id, "t1"))<0) TEST_ERROR; - /* Verify */ - if(check_name(type_id, "/t1", "/t1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(type_id, "/t1", "/t1") < 0) TEST_ERROR; - /* Close datatype */ - H5Tclose(type_id); + /* Close datatype */ + H5Tclose(type_id); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Gmove and H5Gopen - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Gmove and H5Gopen + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Gmove and H5Gopen"); + TESTING("H5Iget_name with H5Gmove and H5Gopen"); - /* Reopen the group */ - if ((group_id = H5Gopen( file_id, "/g1" ))<0) TEST_ERROR; + /* Reopen the group */ + if ((group_id = H5Gopen( file_id, "/g1" ))<0) TEST_ERROR; - /* Rename group */ - if (H5Gmove( file_id, "/g1", "/g1a" )<0) TEST_ERROR; + /* Rename group */ + if (H5Gmove( file_id, "/g1", "/g1a" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "/g1a", "/g1a") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "/g1a", "/g1a") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); + /* Close */ + H5Gclose( group_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Gmove and H5Dopen - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Gmove and H5Dopen + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Gmove and H5Dopen"); + TESTING("H5Iget_name with H5Gmove and H5Dopen"); - /* Reopen the dataset */ - if ((dataset_id = H5Dopen( file_id, "/d1"))<0) TEST_ERROR; + /* Reopen the dataset */ + if ((dataset_id = H5Dopen( file_id, "/d1"))<0) TEST_ERROR; - /* Rename dataset */ - if (H5Gmove( file_id, "/d1", "/d1a" )<0) TEST_ERROR; + /* Rename dataset */ + if (H5Gmove( file_id, "/d1", "/d1a" )<0) TEST_ERROR; - /* Verify */ - if(check_name(dataset_id, "/d1a", "/d1a") < 0) TEST_ERROR; + /* Verify */ + if(check_name(dataset_id, "/d1a", "/d1a") < 0) TEST_ERROR; - /* Close */ - H5Dclose( dataset_id ); + /* Close */ + H5Dclose( dataset_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Gmove and H5Topen - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Gmove and H5Topen + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Gmove and H5Topen"); + TESTING("H5Iget_name with H5Gmove and H5Topen"); - /* Open the named datatype */ - if((type_id=H5Topen(file_id, "/t1"))<0) TEST_ERROR; + /* Open the named datatype */ + if((type_id=H5Topen(file_id, "/t1"))<0) TEST_ERROR; - /* Rename datatype */ - if (H5Gmove( file_id, "/t1", "/t1a" )<0) TEST_ERROR; + /* Rename datatype */ + if (H5Gmove( file_id, "/t1", "/t1a" )<0) TEST_ERROR; - /* Verify */ - if(check_name(type_id, "/t1a", "/t1a") < 0) TEST_ERROR; + /* Verify */ + if(check_name(type_id, "/t1a", "/t1a") < 0) TEST_ERROR; - /* Close datatype */ - H5Tclose(type_id); + /* Close datatype */ + H5Tclose(type_id); - PASSED(); + PASSED(); - /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Gmove and relative names - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * Test H5Iget_name with H5Gmove and relative names + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Gmove and relative names"); + TESTING("H5Iget_name with H5Gmove and relative names"); - /* Create group "/g3" */ - if ((group_id = H5Gcreate( file_id, "/g3", 0 ))<0) TEST_ERROR; + /* Create group "/g3" */ + if ((group_id = H5Gcreate( file_id, "/g3", 0 ))<0) TEST_ERROR; - /* Create group "/g3/foo" using absolute name */ - if ((group2_id = H5Gcreate( file_id, "/g3/foo1", 0 ))<0) TEST_ERROR; + /* Create group "/g3/foo" using absolute name */ + if ((group2_id = H5Gcreate( file_id, "/g3/foo1", 0 ))<0) TEST_ERROR; - /* Open group "/g3/foo" again */ - if ((group3_id = H5Gopen( file_id, "/g3/foo1"))<0) TEST_ERROR; + /* Open group "/g3/foo" again */ + if ((group3_id = H5Gopen( file_id, "/g3/foo1"))<0) TEST_ERROR; - /* Rename group */ - if (H5Gmove( group_id, "foo1", "foo2" )<0) TEST_ERROR; + /* Rename group */ + if (H5Gmove( group_id, "foo1", "foo2" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "/g3", "/g3") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "/g3", "/g3") < 0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g3/foo2", "/g3/foo2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g3/foo2", "/g3/foo2") < 0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "/g3/foo2", "/g3/foo2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "/g3/foo2", "/g3/foo2") < 0) TEST_ERROR; - /* Rename group again */ - if (H5Gmove( file_id, "g3/foo2", "g3/foo1" )<0) TEST_ERROR; + /* Rename group again */ + if (H5Gmove( file_id, "g3/foo2", "g3/foo1" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "/g3", "/g3") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "/g3", "/g3") < 0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g3/foo1", "/g3/foo1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g3/foo1", "/g3/foo1") < 0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "/g3/foo1", "/g3/foo1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "/g3/foo1", "/g3/foo1") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Gmove and a long path - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Gmove and a long path + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Gmove and a long path"); + TESTING("H5Iget_name with H5Gmove and a long path"); - /* Create group "g4/A/B" */ - if ((group_id = H5Gcreate( file_id, "g4", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "g4/A", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file_id, "g4/A/B", 0 ))<0) TEST_ERROR; + /* Create group "g4/A/B" */ + if ((group_id = H5Gcreate( file_id, "g4", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "g4/A", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file_id, "g4/A/B", 0 ))<0) TEST_ERROR; - /* Create group "g5/C" */ - if ((group4_id = H5Gcreate( file_id, "g5", 0 ))<0) TEST_ERROR; - if ((group5_id = H5Gcreate( file_id, "g5/C", 0 ))<0) TEST_ERROR; + /* Create group "g5/C" */ + if ((group4_id = H5Gcreate( file_id, "g5", 0 ))<0) TEST_ERROR; + if ((group5_id = H5Gcreate( file_id, "g5/C", 0 ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "/g4/A/B", "/g4/A/B") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "/g4/A/B", "/g4/A/B") < 0) TEST_ERROR; - /* Move group "B" to "D"*/ - if (H5Gmove( file_id, "/g4/A/B", "/g5/C/D" )<0) TEST_ERROR; + /* Move group "B" to "D"*/ + if (H5Gmove( file_id, "/g4/A/B", "/g5/C/D" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "/g5/C/D", "/g5/C/D") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "/g5/C/D", "/g5/C/D") < 0) TEST_ERROR; - /* Move group "/g5/C/D" back to "/g4/A/B" using relative name */ - if (H5Gmove2( group5_id, "D", group2_id, "B" )<0) TEST_ERROR; + /* Move group "/g5/C/D" back to "/g4/A/B" using relative name */ + if (H5Gmove2( group5_id, "D", group2_id, "B" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "/g4/A/B", "/g4/A/B") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "/g4/A/B", "/g4/A/B") < 0) TEST_ERROR; - /* Move group "/g4/A/B" to "/g4/F/B" using relative name */ - if (H5Gmove2( group_id, "A", group_id, "F")<0) TEST_ERROR; + /* Move group "/g4/A/B" to "/g4/F/B" using relative name */ + if (H5Gmove2( group_id, "A", group_id, "F")<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "/g4/F/B", "/g4/F/B") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "/g4/F/B", "/g4/F/B") < 0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g4/F", "/g4/F") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g4/F", "/g4/F") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); - H5Gclose( group4_id ); - H5Gclose( group5_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); + H5Gclose( group4_id ); + H5Gclose( group5_id ); - PASSED(); + PASSED(); - /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Gmove and a long path #2 - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * Test H5Iget_name with H5Gmove and a long path #2 + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Gmove and a long path #2"); + TESTING("H5Iget_name with H5Gmove and a long path #2"); - /* Create group "g6/A/B" and "g7" */ - if ((group_id = H5Gcreate( file_id, "g6", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "g6/A", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file_id, "g6/A/B", 0 ))<0) TEST_ERROR; - if ((group4_id = H5Gcreate( file_id, "g7", 0 ))<0) TEST_ERROR; + /* Create group "g6/A/B" and "g7" */ + if ((group_id = H5Gcreate( file_id, "g6", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "g6/A", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file_id, "g6/A/B", 0 ))<0) TEST_ERROR; + if ((group4_id = H5Gcreate( file_id, "g7", 0 ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "/g6/A/B", "/g6/A/B") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "/g6/A/B", "/g6/A/B") < 0) TEST_ERROR; - /* Move group "A" to "C"*/ - if (H5Gmove( file_id, "/g6/A", "/g7/C" )<0) TEST_ERROR; + /* Move group "A" to "C"*/ + if (H5Gmove( file_id, "/g6/A", "/g7/C" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g7/C", "/g7/C") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g7/C", "/g7/C") < 0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "/g7/C/B", "/g7/C/B") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "/g7/C/B", "/g7/C/B") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); - H5Gclose( group4_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); + H5Gclose( group4_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Gunlink - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Gunlink + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Gunlink"); + TESTING("H5Iget_name with H5Gunlink"); - /* Create a new group. */ - if ((group_id = H5Gcreate( file_id, "/g8", 0 ))<0) TEST_ERROR; + /* Create a new group. */ + if ((group_id = H5Gcreate( file_id, "/g8", 0 ))<0) TEST_ERROR; - /* Delete */ - if (H5Gunlink( file_id, "/g8")<0) TEST_ERROR; + /* Delete */ + if (H5Gunlink( file_id, "/g8")<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "", "") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); + /* Close */ + H5Gclose( group_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Gunlink and a long path - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Gunlink and a long path + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Gunlink and a long path"); + TESTING("H5Iget_name with H5Gunlink and a long path"); - /* Create group "g9/a/b" */ - if ((group_id = H5Gcreate( file_id, "g9", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "g9/a", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file_id, "g9/a/b", 0 ))<0) TEST_ERROR; + /* Create group "g9/a/b" */ + if ((group_id = H5Gcreate( file_id, "g9", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "g9/a", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file_id, "g9/a/b", 0 ))<0) TEST_ERROR; - /* Delete */ - if (H5Gunlink( file_id, "/g9/a")<0) TEST_ERROR; + /* Delete */ + if (H5Gunlink( file_id, "/g9/a")<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "", "") < 0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "", "") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Recreate groups */ - if ((group2_id = H5Gcreate( group_id, "a", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( group_id, "a/b", 0 ))<0) TEST_ERROR; + /* Recreate groups */ + if ((group2_id = H5Gcreate( group_id, "a", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( group_id, "a/b", 0 ))<0) TEST_ERROR; - /* Delete, using relative path */ - if (H5Gunlink( group_id, "a")<0) TEST_ERROR; + /* Delete, using relative path */ + if (H5Gunlink( group_id, "a")<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "", "") < 0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "", "") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Close */ - H5Gclose( group_id ); + /* Close */ + H5Gclose( group_id ); - /* Create group "g10/a/b" */ - if ((group_id = H5Gcreate( file_id, "g10", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "g10/a", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file_id, "g10/a/b", 0 ))<0) TEST_ERROR; + /* Create group "g10/a/b" */ + if ((group_id = H5Gcreate( file_id, "g10", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "g10/a", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file_id, "g10/a/b", 0 ))<0) TEST_ERROR; - /* Delete */ - if (H5Gunlink( file_id, "/g10/a/b")<0) TEST_ERROR; + /* Delete */ + if (H5Gunlink( file_id, "/g10/a/b")<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "", "") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group3_id ); - /* Recreate group */ - if ((group3_id = H5Gcreate( group_id, "a/b", 0 ))<0) TEST_ERROR; + /* Recreate group */ + if ((group3_id = H5Gcreate( group_id, "a/b", 0 ))<0) TEST_ERROR; - /* Delete, using relative path */ - if (H5Gunlink( group_id, "a/b")<0) TEST_ERROR; + /* Delete, using relative path */ + if (H5Gunlink( group_id, "a/b")<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "", "") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group3_id ); - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Gunlink, same names - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Gunlink, same names + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Gunlink, same names"); + TESTING("H5Iget_name with H5Gunlink, same names"); - /* Create group "g11/g" */ - if ((group_id = H5Gcreate( file_id, "g11", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "g11/g", 0 ))<0) TEST_ERROR; + /* Create group "g11/g" */ + if ((group_id = H5Gcreate( file_id, "g11", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "g11/g", 0 ))<0) TEST_ERROR; - /* Create two datasets "g11/d" and "g11/g/d"*/ - if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR; - if ((dataset_id = H5Dcreate( group_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR; - if ((dataset2_id = H5Dcreate( group2_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR; + /* Create two datasets "g11/d" and "g11/g/d"*/ + if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR; + if ((dataset_id = H5Dcreate( group_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR; + if ((dataset2_id = H5Dcreate( group2_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR; - /* Delete */ - if (H5Gunlink( file_id, "/g11/d")<0) TEST_ERROR; + /* Delete */ + if (H5Gunlink( file_id, "/g11/d")<0) TEST_ERROR; - /* Verify */ - if(check_name(dataset_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(dataset_id, "", "") < 0) TEST_ERROR; - /* Verify */ - if(check_name(dataset2_id, "/g11/g/d", "/g11/g/d") < 0) TEST_ERROR; + /* Verify */ + if(check_name(dataset2_id, "/g11/g/d", "/g11/g/d") < 0) TEST_ERROR; - /* Close */ - H5Dclose( dataset_id ); - H5Dclose( dataset2_id ); - H5Sclose( space_id ); - H5Gclose( group_id ); - H5Gclose( group2_id ); + /* Close */ + H5Dclose( dataset_id ); + H5Dclose( dataset2_id ); + H5Sclose( space_id ); + H5Gclose( group_id ); + H5Gclose( group2_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Fmount; with IDs on the list - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Fmount; with IDs on the list + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Fmount; with IDs on the list"); + TESTING("H5Iget_name with H5Fmount; with IDs on the list"); - /* Create a group "g12" in the first file */ - if ((group_id = H5Gcreate( file_id, "/g12", 0 ))<0) TEST_ERROR; + /* Create a group "g12" in the first file */ + if ((group_id = H5Gcreate( file_id, "/g12", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); + /* Close */ + H5Gclose( group_id ); - /* Create second file and dataset "d" in it */ - file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + /* Create second file and dataset "d" in it */ + file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - /* Create a dataspace */ - if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR; + /* Create a dataspace */ + if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR; - /* Create the dataset */ - if ((dataset_id = H5Dcreate( file1_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR; + /* Create the dataset */ + if ((dataset_id = H5Dcreate( file1_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR; - /* Close */ - H5Dclose( dataset_id ); + /* Close */ + H5Dclose( dataset_id ); - /* Mount second file under "g12" in the first file */ - if (H5Fmount(file_id, "/g12", file1_id, H5P_DEFAULT)<0) TEST_ERROR; + /* Mount second file under "g12" in the first file */ + if (H5Fmount(file_id, "/g12", file1_id, H5P_DEFAULT)<0) TEST_ERROR; - /* Access dataset D in the first file under "/G/D" name */ - if ((dataset_id = H5Dopen( file_id, "/g12/d"))<0) TEST_ERROR; + /* Access dataset D in the first file under "/G/D" name */ + if ((dataset_id = H5Dopen( file_id, "/g12/d"))<0) TEST_ERROR; - /* Verify */ - if(check_name(dataset_id, "/g12/d", "/g12/d") < 0) TEST_ERROR; + /* Verify */ + if(check_name(dataset_id, "/g12/d", "/g12/d") < 0) TEST_ERROR; - if (H5Funmount(file_id, "/g12")<0) TEST_ERROR; + if (H5Funmount(file_id, "/g12")<0) TEST_ERROR; - /* Close */ - H5Dclose( dataset_id ); - H5Fclose( file1_id ); - H5Sclose( space_id ); + /* Close */ + H5Dclose( dataset_id ); + H5Fclose( file1_id ); + H5Sclose( space_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Fmount; long name - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Fmount; long name + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Fmount; long name"); + TESTING("H5Iget_name with H5Fmount; long name"); - /* Create a group "g13/g1/g2" in the first file */ - if ((group_id = H5Gcreate( file_id, "/g13", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "/g13/g1", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file_id, "/g13/g1/g2", 0 ))<0) TEST_ERROR; + /* Create a group "g13/g1/g2" in the first file */ + if ((group_id = H5Gcreate( file_id, "/g13", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "/g13/g1", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file_id, "/g13/g1/g2", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Create second file and group "g" in it */ - file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + /* Create second file and group "g" in it */ + file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - if ((group_id = H5Gcreate( file1_id, "/g14", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file1_id, "/g14/g3", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file1_id, "/g14/g3/g4", 0 ))<0) TEST_ERROR; + if ((group_id = H5Gcreate( file1_id, "/g14", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file1_id, "/g14/g3", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file1_id, "/g14/g3/g4", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Mount second file under "/g13/g1" in the first file */ - if (H5Fmount(file_id, "/g13/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR; + /* Mount second file under "/g13/g1" in the first file */ + if (H5Fmount(file_id, "/g13/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR; - /* Access group in the first file */ - if ((group_id = H5Gopen( file_id, "/g13/g1/g14/g3/g4"))<0) TEST_ERROR; + /* Access group in the first file */ + if ((group_id = H5Gopen( file_id, "/g13/g1/g14/g3/g4"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR; - if (H5Funmount(file_id, "/g13/g1")<0) TEST_ERROR; + if (H5Funmount(file_id, "/g13/g1")<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "", "") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); + /* Close */ + H5Gclose( group_id ); - /* Access group in the file to mount */ - if ((group3_id = H5Gopen( file1_id, "/g14/g3/g4"))<0) TEST_ERROR; + /* Access group in the file to mount */ + if ((group3_id = H5Gopen( file1_id, "/g14/g3/g4"))<0) TEST_ERROR; - /* Mount second file under "/g13/g1" in the first file (again) */ - if (H5Fmount(file_id, "/g13/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR; + /* Mount second file under "/g13/g1" in the first file (again) */ + if (H5Fmount(file_id, "/g13/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR; - /* Get a group ID for the parent of the newly mounted group */ - if ((group2_id = H5Gopen( file_id, "/g13"))<0) TEST_ERROR; + /* Get a group ID for the parent of the newly mounted group */ + if ((group2_id = H5Gopen( file_id, "/g13"))<0) TEST_ERROR; - /* Access group in the first file */ - if ((group_id = H5Gopen( file_id, "/g13/g1/g14/g3/g4"))<0) TEST_ERROR; + /* Access group in the first file */ + if ((group_id = H5Gopen( file_id, "/g13/g1/g14/g3/g4"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR; - if(check_name(group3_id, "/g14/g3/g4", "/g14/g3/g4") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR; + if(check_name(group3_id, "/g14/g3/g4", "/g14/g3/g4") < 0) TEST_ERROR; - if (H5Funmount(group2_id, "g1")<0) TEST_ERROR; + if (H5Funmount(group2_id, "g1")<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "", "") < 0) TEST_ERROR; - if(check_name(group3_id, "/g14/g3/g4", "/g14/g3/g4") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "", "") < 0) TEST_ERROR; + if(check_name(group3_id, "/g14/g3/g4", "/g14/g3/g4") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Mount second file under "/g13/g1" in the first file (again) */ - if (H5Fmount(file_id, "/g13/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR; + /* Mount second file under "/g13/g1" in the first file (again) */ + if (H5Fmount(file_id, "/g13/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR; - /* Get a group ID for the newly mounted group */ - if ((group2_id = H5Gopen( file_id, "/g13/g1"))<0) TEST_ERROR; + /* Get a group ID for the newly mounted group */ + if ((group2_id = H5Gopen( file_id, "/g13/g1"))<0) TEST_ERROR; - /* Access group in the first file */ - if ((group_id = H5Gopen( file_id, "/g13/g1/g14/g3/g4"))<0) TEST_ERROR; + /* Access group in the first file */ + if ((group_id = H5Gopen( file_id, "/g13/g1/g14/g3/g4"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR; - if(check_name(group2_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR; + if(check_name(group2_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR; - if (H5Funmount(group2_id, ".")<0) TEST_ERROR; + if (H5Funmount(group2_id, ".")<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "", "") < 0) TEST_ERROR; - if(check_name(group2_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "", "") < 0) TEST_ERROR; + if(check_name(group2_id, "", "") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); - /* Mount second file under "/g13/g1" in the first file, using relative path */ + /* Mount second file under "/g13/g1" in the first file, using relative path */ - if ((group3_id = H5Gopen( file_id, "/g13"))<0) TEST_ERROR; + if ((group3_id = H5Gopen( file_id, "/g13"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "/g13", "/g13") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "/g13", "/g13") < 0) TEST_ERROR; - if (H5Fmount(group3_id, "g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR; + if (H5Fmount(group3_id, "g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR; - /* Get a group ID for the newly mounted group */ - if ((group2_id = H5Gopen( file_id, "/g13/g1"))<0) TEST_ERROR; + /* Get a group ID for the newly mounted group */ + if ((group2_id = H5Gopen( file_id, "/g13/g1"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR; - /* Access group in the first file */ - if ((group_id = H5Gopen( file_id, "/g13/g1/g14/g3/g4"))<0) TEST_ERROR; + /* Access group in the first file */ + if ((group_id = H5Gopen( file_id, "/g13/g1/g14/g3/g4"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); + /* Close */ + H5Gclose( group_id ); - /* Access group in the first file, with relative path */ - if ((group_id = H5Gopen( group2_id, "g14/g3/g4"))<0) TEST_ERROR; + /* Access group in the first file, with relative path */ + if ((group_id = H5Gopen( group2_id, "g14/g3/g4"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); + /* Close */ + H5Gclose( group_id ); - if (H5Funmount(group2_id, ".")<0) TEST_ERROR; + if (H5Funmount(group2_id, ".")<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "", "") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Mount second file under "/g13/g1" in the first file, using relative path */ + /* Mount second file under "/g13/g1" in the first file, using relative path */ - if ((group3_id = H5Gopen( file_id, "/g13/g1"))<0) TEST_ERROR; + if ((group3_id = H5Gopen( file_id, "/g13/g1"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR; - if (H5Fmount(group3_id, ".", file1_id, H5P_DEFAULT)<0) TEST_ERROR; + if (H5Fmount(group3_id, ".", file1_id, H5P_DEFAULT)<0) TEST_ERROR; - /* Get a group ID for the newly mounted group */ - if ((group2_id = H5Gopen( file_id, "/g13/g1"))<0) TEST_ERROR; + /* Get a group ID for the newly mounted group */ + if ((group2_id = H5Gopen( file_id, "/g13/g1"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR; - /* Access group in the first file */ - if ((group_id = H5Gopen( file_id, "/g13/g1/g14/g3/g4"))<0) TEST_ERROR; + /* Access group in the first file */ + if ((group_id = H5Gopen( file_id, "/g13/g1/g14/g3/g4"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); + /* Close */ + H5Gclose( group_id ); - /* Access group in the first file, with relative path */ - if ((group_id = H5Gopen( group2_id, "g14/g3/g4"))<0) TEST_ERROR; + /* Access group in the first file, with relative path */ + if ((group_id = H5Gopen( group2_id, "g14/g3/g4"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); + /* Close */ + H5Gclose( group_id ); - if (H5Funmount(group2_id, ".")<0) TEST_ERROR; + if (H5Funmount(group2_id, ".")<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "", "") < 0) TEST_ERROR; - if(check_name(group3_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "", "") < 0) TEST_ERROR; + if(check_name(group3_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group2_id ); + H5Gclose( group3_id ); - H5Fclose( file1_id ); + H5Fclose( file1_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Funmount - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Funmount + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Funmount"); + TESTING("H5Iget_name with H5Funmount"); - /* Create a group "g15/g1/g2" in the first file */ - if ((group_id = H5Gcreate( file_id, "/g15", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "/g15/g1", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file_id, "/g15/g1/g2", 0 ))<0) TEST_ERROR; - if ((group4_id = H5Gcreate( file_id, "/g15/g1/g2/g3", 0 ))<0) TEST_ERROR; + /* Create a group "g15/g1/g2" in the first file */ + if ((group_id = H5Gcreate( file_id, "/g15", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "/g15/g1", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file_id, "/g15/g1/g2", 0 ))<0) TEST_ERROR; + if ((group4_id = H5Gcreate( file_id, "/g15/g1/g2/g3", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); - H5Gclose( group4_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); + H5Gclose( group4_id ); - /* Create second file and group "g" in it */ - file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + /* Create second file and group "g" in it */ + file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - if ((group_id = H5Gcreate( file1_id, "/g16", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file1_id, "/g16/g4", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file1_id, "/g16/g4/g5", 0 ))<0) TEST_ERROR; + if ((group_id = H5Gcreate( file1_id, "/g16", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file1_id, "/g16/g4", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file1_id, "/g16/g4/g5", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Access group in the first file */ - if ((group_id = H5Gopen( file_id, "/g15/g1/g2/g3"))<0) TEST_ERROR; + /* Access group in the first file */ + if ((group_id = H5Gopen( file_id, "/g15/g1/g2/g3"))<0) TEST_ERROR; - /* Mount second file under "/g13/g1" in the first file */ - if (H5Fmount(file_id, "/g15/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR; + /* Mount second file under "/g13/g1" in the first file */ + if (H5Fmount(file_id, "/g15/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR; - /* Access group in the second file */ - if ((group2_id = H5Gopen( file_id, "/g15/g1/g16/g4/g5"))<0) TEST_ERROR; + /* Access group in the second file */ + if ((group2_id = H5Gopen( file_id, "/g15/g1/g16/g4/g5"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "", "/g15/g1/g2/g3") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "", "/g15/g1/g2/g3") < 0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g15/g1/g16/g4/g5", "/g15/g1/g16/g4/g5") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g15/g1/g16/g4/g5", "/g15/g1/g16/g4/g5") < 0) TEST_ERROR; - if (H5Funmount(file_id, "/g15/g1")<0) TEST_ERROR; + if (H5Funmount(file_id, "/g15/g1")<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "/g15/g1/g2/g3", "/g15/g1/g2/g3") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "/g15/g1/g2/g3", "/g15/g1/g2/g3") < 0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "", "") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Fclose( file1_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Fclose( file1_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with a defined type dataset - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with a defined type dataset + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with a defined type dataset"); + TESTING("H5Iget_name with a defined type dataset"); - /* Create a datatype */ - if ((type_id = H5Tcreate (H5T_COMPOUND, sizeof(s1_t)))<0) TEST_ERROR; + /* Create a datatype */ + if ((type_id = H5Tcreate (H5T_COMPOUND, sizeof(s1_t)))<0) TEST_ERROR; - /* Insert fields */ - if (H5Tinsert (type_id, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT)<0) TEST_ERROR; - if (H5Tinsert (type_id, "b", HOFFSET(s1_t,b), H5T_NATIVE_INT)<0) TEST_ERROR; - if (H5Tinsert (type_id, "c", HOFFSET(s1_t,c), H5T_NATIVE_FLOAT)<0) TEST_ERROR; + /* Insert fields */ + if (H5Tinsert (type_id, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT)<0) TEST_ERROR; + if (H5Tinsert (type_id, "b", HOFFSET(s1_t,b), H5T_NATIVE_INT)<0) TEST_ERROR; + if (H5Tinsert (type_id, "c", HOFFSET(s1_t,c), H5T_NATIVE_FLOAT)<0) TEST_ERROR; - /* Create group "g17" */ - if ((group_id = H5Gcreate( file_id, "g17", 0 ))<0) TEST_ERROR; + /* Create group "g17" */ + if ((group_id = H5Gcreate( file_id, "g17", 0 ))<0) TEST_ERROR; - /* Save datatype for later */ - if (H5Tcommit (group_id, "t", type_id)<0) TEST_ERROR; + /* Save datatype for later */ + if (H5Tcommit (group_id, "t", type_id)<0) TEST_ERROR; - /* Create a dataspace */ - if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR; + /* Create a dataspace */ + if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR; - /* Create a new dataset */ - if ((dataset_id = H5Dcreate( group_id , "d", type_id, space_id, - H5P_DEFAULT ))<0) TEST_ERROR; + /* Create a new dataset */ + if ((dataset_id = H5Dcreate( group_id , "d", type_id, space_id, + H5P_DEFAULT ))<0) TEST_ERROR; - /* Close */ - H5Dclose( dataset_id ); - H5Tclose( type_id ); - H5Sclose( space_id ); - H5Gclose( group_id ); + /* Close */ + H5Dclose( dataset_id ); + H5Tclose( type_id ); + H5Sclose( space_id ); + H5Gclose( group_id ); - /* Open the named datatype */ - if((type_id=H5Topen(file_id, "/g17/t"))<0) TEST_ERROR; + /* Open the named datatype */ + if((type_id=H5Topen(file_id, "/g17/t"))<0) TEST_ERROR; - /* Verify */ - if(check_name(type_id, "/g17/t", "/g17/t") < 0) TEST_ERROR; + /* Verify */ + if(check_name(type_id, "/g17/t", "/g17/t") < 0) TEST_ERROR; - /* Close datatype */ - H5Tclose(type_id); + /* Close datatype */ + H5Tclose(type_id); - /* Reopen the dataset */ - if ((dataset_id = H5Dopen( file_id, "/g17/d"))<0) TEST_ERROR; + /* Reopen the dataset */ + if ((dataset_id = H5Dopen( file_id, "/g17/d"))<0) TEST_ERROR; - /* Get datatype*/ - if((type_id=H5Dget_type(dataset_id))<0) TEST_ERROR; + /* Get datatype*/ + if((type_id=H5Dget_type(dataset_id))<0) TEST_ERROR; - /* Verify */ - if(check_name(type_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(type_id, "", "") < 0) TEST_ERROR; - /* Close */ - H5Dclose( dataset_id ); - H5Tclose( type_id ); + /* Close */ + H5Dclose( dataset_id ); + H5Tclose( type_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with objects that have two names - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with objects that have two names + *------------------------------------------------------------------------- + */ TESTING("H5Iget_name with datasets that have two names"); @@ -1048,8 +1052,8 @@ if (H5Glink2(dataset_id,".",H5G_LINK_HARD,file_id,"/g17/link")<0) TEST_ERROR; if ((dataset2_id = H5Dopen( file_id, "/g17/link"))<0) TEST_ERROR; /* Make sure that the two IDs use two different names */ - if(check_name(dataset_id, "/g17/d", "/g17/d") < 0) TEST_ERROR; - if(check_name(dataset2_id, "/g17/link", "/g17/link") < 0) TEST_ERROR; + if(check_name(dataset_id, "/g17/d", "/g17/d") < 0) TEST_ERROR; + if(check_name(dataset2_id, "/g17/link", "/g17/link") < 0) TEST_ERROR; if(H5Dclose(dataset_id)<0) TEST_ERROR; if(H5Dclose(dataset2_id)<0) TEST_ERROR; @@ -1057,1328 +1061,1333 @@ if(H5Dclose(dataset2_id)<0) TEST_ERROR; PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with different files, test1 - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with different files, test1 + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with different files"); + TESTING("H5Iget_name with different files"); - /* Create a new file using default properties. */ - if ((file2_id = H5Fcreate( filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR; + /* Create a new file using default properties. */ + if ((file2_id = H5Fcreate( filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR; /* Create a new file using default properties. */ - if ((file3_id = H5Fcreate( filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR; + if ((file3_id = H5Fcreate( filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR; - /* Create the dataspace */ - if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR; + /* Create the dataspace */ + if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR; - /* Create a new dataset */ - if ((dataset_id = H5Dcreate( file2_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR; + /* Create a new dataset */ + if ((dataset_id = H5Dcreate( file2_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR; - /* Create a new dataset */ - if ((dataset2_id = H5Dcreate( file3_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR; + /* Create a new dataset */ + if ((dataset2_id = H5Dcreate( file3_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR; - /* Delete */ - if (H5Gunlink( file2_id, "/d")<0) TEST_ERROR; + /* Delete */ + if (H5Gunlink( file2_id, "/d")<0) TEST_ERROR; - /* Verify */ - if(check_name(dataset_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(dataset_id, "", "") < 0) TEST_ERROR; - /* Verify */ - if(check_name(dataset2_id, "/d", "/d") < 0) TEST_ERROR; + /* Verify */ + if(check_name(dataset2_id, "/d", "/d") < 0) TEST_ERROR; - /* Close */ - H5Dclose( dataset_id ); - H5Dclose( dataset2_id ); - H5Sclose( space_id ); - H5Fclose( file2_id ); - H5Fclose( file3_id ); + /* Close */ + H5Dclose( dataset_id ); + H5Dclose( dataset2_id ); + H5Sclose( space_id ); + H5Fclose( file2_id ); + H5Fclose( file3_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with different files, test2 - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with different files, test2 + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with different files #2"); + TESTING("H5Iget_name with different files #2"); - /* Create a new file using default properties. */ - if ((file2_id = H5Fcreate( filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR; + /* Create a new file using default properties. */ + if ((file2_id = H5Fcreate( filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR; /* Create a new file using default properties. */ - if ((file3_id = H5Fcreate( filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR; + if ((file3_id = H5Fcreate( filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR; - /* Create the dataspace */ - if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR; + /* Create the dataspace */ + if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR; - /* Create a new dataset */ - if ((dataset_id = H5Dcreate( file2_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR; + /* Create a new dataset */ + if ((dataset_id = H5Dcreate( file2_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR; - /* Create a new dataset */ - if ((dataset2_id = H5Dcreate( file3_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR; + /* Create a new dataset */ + if ((dataset2_id = H5Dcreate( file3_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR; - /* Delete */ - if (H5Gunlink( file3_id, "/d")<0) TEST_ERROR; + /* Delete */ + if (H5Gunlink( file3_id, "/d")<0) TEST_ERROR; - /* Verify */ - if(check_name(dataset_id, "/d", "/d") < 0) TEST_ERROR; + /* Verify */ + if(check_name(dataset_id, "/d", "/d") < 0) TEST_ERROR; - /* Verify */ - if(check_name(dataset2_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(dataset2_id, "", "") < 0) TEST_ERROR; - /* Close */ - H5Dclose( dataset_id ); - H5Dclose( dataset2_id ); - H5Sclose( space_id ); - H5Fclose( file2_id ); - H5Fclose( file3_id ); + /* Close */ + H5Dclose( dataset_id ); + H5Dclose( dataset2_id ); + H5Sclose( space_id ); + H5Fclose( file2_id ); + H5Fclose( file3_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with a small buffer for name - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with a small buffer for name + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with a small buffer for name"); + TESTING("H5Iget_name with a small buffer for name"); - /* Reopen the group */ - if ((group_id = H5Gopen( file_id, "/g17" ))<0) TEST_ERROR; + /* Reopen the group */ + if ((group_id = H5Gopen( file_id, "/g17" ))<0) TEST_ERROR; { - /*small buffer to hold name and its size */ - char name2[SMALL_NAME_BUF_SIZE]; + /*small buffer to hold name and its size */ + char name2[SMALL_NAME_BUF_SIZE]; - /* Get name */ - name_len=H5Iget_name( group_id, name2, SMALL_NAME_BUF_SIZE ); + /* Get name */ + name_len=H5Iget_name( group_id, name2, SMALL_NAME_BUF_SIZE ); - /* Check that name is longer */ - if(name_len <= SMALL_NAME_BUF_SIZE) TEST_ERROR; - if(HDstrcmp(name2, "/")) TEST_ERROR; + /* Check that name is longer */ + if(name_len <= SMALL_NAME_BUF_SIZE) TEST_ERROR; + if(HDstrcmp(name2, "/")) TEST_ERROR; } - /* Verify */ - if(check_name(group_id, "/g17", "/g17") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "/g17", "/g17") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); + /* Close */ + H5Gclose( group_id ); - PASSED(); + PASSED(); - /*------------------------------------------------------------------------- - * Test H5Iget_name with a dynamic buffer for name - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * Test H5Iget_name with a dynamic buffer for name + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with a dynamic buffer for name"); + TESTING("H5Iget_name with a dynamic buffer for name"); - /* Reopen the group */ - if ((group_id = H5Gopen( file_id, "/g17" ))<0) TEST_ERROR; + /* Reopen the group */ + if ((group_id = H5Gopen( file_id, "/g17" ))<0) TEST_ERROR; - /* Get name */ - name_len = H5Iget_name(group_id, NULL, NAME_BUF_SIZE); + /* Get name */ + name_len = H5Iget_name(group_id, NULL, NAME_BUF_SIZE); { - /* dynamic buffer to hold name */ - char *name3; + /* dynamic buffer to hold name */ + char *name3; - /* Include the extra null character */ - name3 = HDmalloc(name_len + 1); - if(!name3) TEST_ERROR; + /* Include the extra null character */ + name3 = HDmalloc(name_len + 1); + if(!name3) TEST_ERROR; - /* Get name with dynamic buffer */ - if(H5Iget_name(group_id, name3, name_len + 1) < 0) TEST_ERROR; + /* Get name with dynamic buffer */ + if(H5Iget_name(group_id, name3, name_len + 1) < 0) TEST_ERROR; - /* Verify */ - if(HDstrcmp(name3, "/g17")) TEST_ERROR; - *name3 = '\0'; + /* Verify */ + if(HDstrcmp(name3, "/g17")) TEST_ERROR; + *name3 = '\0'; - /* Get name with smaller buffer */ - if(H5Iget_name(group_id, name3, 3) < 0) TEST_ERROR; + /* Get name with smaller buffer */ + if(H5Iget_name(group_id, name3, 3) < 0) TEST_ERROR; - /* Verify */ - if(HDstrcmp(name3, "/g")) TEST_ERROR; + /* Verify */ + if(HDstrcmp(name3, "/g")) TEST_ERROR; - HDfree(name3); + HDfree(name3); } - /* Close */ - H5Gclose( group_id ); + /* Close */ + H5Gclose( group_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with invalid IDs - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with invalid IDs + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with invalid IDs"); + TESTING("H5Iget_name with invalid IDs"); - /* Create a dataspace */ - if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR; + /* Create a dataspace */ + if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR; - /* Define a datatype */ - if ((type_id = H5Tcopy(H5T_NATIVE_INT))<0) TEST_ERROR; + /* Define a datatype */ + if ((type_id = H5Tcopy(H5T_NATIVE_INT))<0) TEST_ERROR; - /* Create a new dataset */ - if ((dataset_id = H5Dcreate( file_id , "d2", type_id, space_id, H5P_DEFAULT ))<0) TEST_ERROR; + /* Create a new dataset */ + if ((dataset_id = H5Dcreate( file_id , "d2", type_id, space_id, H5P_DEFAULT ))<0) TEST_ERROR; { char name[NAME_BUF_SIZE]; /* Buffer to hold name and its size */ /* Get name for non commited datatype, it should fail */ H5E_BEGIN_TRY { - if(H5Iget_name( type_id, name, NAME_BUF_SIZE) > 0) TEST_ERROR; + if(H5Iget_name( type_id, name, NAME_BUF_SIZE) > 0) TEST_ERROR; } H5E_END_TRY; /* Get name for dataspace, it should fail */ H5E_BEGIN_TRY { - if(H5Iget_name( space_id, name, NAME_BUF_SIZE) > 0) TEST_ERROR; + if(H5Iget_name( space_id, name, NAME_BUF_SIZE) > 0) TEST_ERROR; } H5E_END_TRY; } - /* Close */ - H5Dclose( dataset_id ); - H5Sclose( space_id ); - H5Tclose( type_id ); + /* Close */ + H5Dclose( dataset_id ); + H5Sclose( space_id ); + H5Tclose( type_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with added names with mounting - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with added names with mounting + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with added names with mounting"); + TESTING("H5Iget_name with added names with mounting"); - /* Create a group "g18/g2" in the first file */ - if ((group_id = H5Gcreate( file_id, "/g18", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "/g18/g2", 0 ))<0) TEST_ERROR; + /* Create a group "g18/g2" in the first file */ + if ((group_id = H5Gcreate( file_id, "/g18", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "/g18/g2", 0 ))<0) TEST_ERROR; - /* Also create a dataset and a datatype */ - if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR; - if ((type_id = H5Tcopy(H5T_NATIVE_INT))<0) TEST_ERROR; - if ((dataset_id = H5Dcreate( file_id, "g18/d2", type_id, space_id, - H5P_DEFAULT ))<0) TEST_ERROR; + /* Also create a dataset and a datatype */ + if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR; + if ((type_id = H5Tcopy(H5T_NATIVE_INT))<0) TEST_ERROR; + if ((dataset_id = H5Dcreate( file_id, "g18/d2", type_id, space_id, + H5P_DEFAULT ))<0) TEST_ERROR; - if (H5Tcommit(file_id, "g18/t2", type_id) <0) TEST_ERROR; + if (H5Tcommit(file_id, "g18/t2", type_id) <0) TEST_ERROR; - /* Create second file and group "/g3/g4/g5" in it */ - file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - if ((group3_id = H5Gcreate( file1_id, "/g3", 0 ))<0) TEST_ERROR; - if ((group4_id = H5Gcreate( file1_id, "/g3/g4", 0 ))<0) TEST_ERROR; - if ((group5_id = H5Gcreate( file1_id, "/g3/g4/g5", 0 ))<0) TEST_ERROR; + /* Create second file and group "/g3/g4/g5" in it */ + file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + if ((group3_id = H5Gcreate( file1_id, "/g3", 0 ))<0) TEST_ERROR; + if ((group4_id = H5Gcreate( file1_id, "/g3/g4", 0 ))<0) TEST_ERROR; + if ((group5_id = H5Gcreate( file1_id, "/g3/g4/g5", 0 ))<0) TEST_ERROR; - /* Mount first file at "g3/g4" in the second file */ - if (H5Fmount(file1_id, "/g3/g4", file_id, H5P_DEFAULT)<0) TEST_ERROR; + /* Mount first file at "g3/g4" in the second file */ + if (H5Fmount(file1_id, "/g3/g4", file_id, H5P_DEFAULT)<0) TEST_ERROR; - /* Get name for the group ID in the first file, should be "/g18/g2" still */ - if(check_name(group2_id, "/g18/g2", "/g18/g2") < 0) TEST_ERROR; + /* Get name for the group ID in the first file, should be "/g18/g2" still */ + if(check_name(group2_id, "/g18/g2", "/g18/g2") < 0) TEST_ERROR; - /* Get name for the dataset ID in the first file, should be "/g18/g2/d2" still */ - if(check_name(dataset_id, "/g18/d2", "/g18/d2") < 0) TEST_ERROR; + /* Get name for the dataset ID in the first file, should be "/g18/g2/d2" still */ + if(check_name(dataset_id, "/g18/d2", "/g18/d2") < 0) TEST_ERROR; - /* Get name for the datatype ID in the first file, should be "/g18/g2/t2" still */ - if(check_name(type_id, "/g18/t2", "/g18/t2") < 0) TEST_ERROR; + /* Get name for the datatype ID in the first file, should be "/g18/g2/t2" still */ + if(check_name(type_id, "/g18/t2", "/g18/t2") < 0) TEST_ERROR; - /* Open the mounted group, dataset, and datatype through their new names */ - if ((group6_id = H5Gopen( file1_id, "/g3/g4/g18/g2" ))<0) TEST_ERROR; - if ((dataset2_id = H5Dopen( file1_id, "/g3/g4/g18/d2" ))<0) TEST_ERROR; - if ((type2_id = H5Topen( file1_id, "/g3/g4/g18/t2" ))<0) TEST_ERROR; + /* Open the mounted group, dataset, and datatype through their new names */ + if ((group6_id = H5Gopen( file1_id, "/g3/g4/g18/g2" ))<0) TEST_ERROR; + if ((dataset2_id = H5Dopen( file1_id, "/g3/g4/g18/d2" ))<0) TEST_ERROR; + if ((type2_id = H5Topen( file1_id, "/g3/g4/g18/t2" ))<0) TEST_ERROR; - /* Verify names */ - if(check_name(group6_id, "/g3/g4/g18/g2", "/g3/g4/g18/g2") < 0) TEST_ERROR; - if(check_name(dataset2_id, "/g3/g4/g18/d2", "/g3/g4/g18/d2") < 0) TEST_ERROR; - if(check_name(type2_id, "/g3/g4/g18/t2", "/g3/g4/g18/t2") < 0) TEST_ERROR; + /* Verify names */ + if(check_name(group6_id, "/g3/g4/g18/g2", "/g3/g4/g18/g2") < 0) TEST_ERROR; + if(check_name(dataset2_id, "/g3/g4/g18/d2", "/g3/g4/g18/d2") < 0) TEST_ERROR; + if(check_name(type2_id, "/g3/g4/g18/t2", "/g3/g4/g18/t2") < 0) TEST_ERROR; - /* Verify that old IDs still refer to objects by their old names */ - if(check_name(group2_id, "/g18/g2", "/g18/g2") < 0) TEST_ERROR; - if(check_name(dataset_id, "/g18/d2", "/g18/d2") < 0) TEST_ERROR; - if(check_name(type_id, "/g18/t2", "/g18/t2") < 0) TEST_ERROR; + /* Verify that old IDs still refer to objects by their old names */ + if(check_name(group2_id, "/g18/g2", "/g18/g2") < 0) TEST_ERROR; + if(check_name(dataset_id, "/g18/d2", "/g18/d2") < 0) TEST_ERROR; + if(check_name(type_id, "/g18/t2", "/g18/t2") < 0) TEST_ERROR; - /* Unmount */ - if (H5Funmount(file1_id, "/g3/g4")<0) TEST_ERROR; + /* Unmount */ + if (H5Funmount(file1_id, "/g3/g4")<0) TEST_ERROR; - /* Get name for the IDs of the first file, should be unchanged */ - if(check_name(group2_id, "/g18/g2", "/g18/g2") < 0) TEST_ERROR; - if(check_name(dataset_id, "/g18/d2", "/g18/d2") < 0) TEST_ERROR; - if(check_name(type_id, "/g18/t2", "/g18/t2") < 0) TEST_ERROR; + /* Get name for the IDs of the first file, should be unchanged */ + if(check_name(group2_id, "/g18/g2", "/g18/g2") < 0) TEST_ERROR; + if(check_name(dataset_id, "/g18/d2", "/g18/d2") < 0) TEST_ERROR; + if(check_name(type_id, "/g18/t2", "/g18/t2") < 0) TEST_ERROR; - /* Get name for the IDs of the second file, should be "" */ - if(check_name(group6_id, "", "") < 0) TEST_ERROR; - if(check_name(dataset2_id, "", "") < 0) TEST_ERROR; - if(check_name(type2_id, "", "") < 0) TEST_ERROR; + /* Get name for the IDs of the second file, should be "" */ + if(check_name(group6_id, "", "") < 0) TEST_ERROR; + if(check_name(dataset2_id, "", "") < 0) TEST_ERROR; + if(check_name(type2_id, "", "") < 0) TEST_ERROR; - H5Tclose( type_id ); - H5Tclose( type2_id ); - H5Dclose( dataset_id ); - H5Dclose( dataset2_id ); - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); - H5Gclose( group4_id ); - H5Gclose( group5_id ); - H5Gclose( group6_id ); - H5Fclose( file1_id ); + H5Tclose( type_id ); + H5Tclose( type2_id ); + H5Dclose( dataset_id ); + H5Dclose( dataset2_id ); + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); + H5Gclose( group4_id ); + H5Gclose( group5_id ); + H5Gclose( group6_id ); + H5Fclose( file1_id ); PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Fclose - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Fclose + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Fclose"); + TESTING("H5Iget_name with H5Fclose"); - /* Create a file and group "/g1/g2" in it */ - file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - if ((group_id = H5Gcreate( file1_id, "/g1", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file1_id, "/g1/g2", 0 ))<0) TEST_ERROR; + /* Create a file and group "/g1/g2" in it */ + file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + if ((group_id = H5Gcreate( file1_id, "/g1", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file1_id, "/g1/g2", 0 ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR; - /* Close file */ - H5Fclose( file1_id ); + /* Close file */ + H5Fclose( file1_id ); - /* Verify */ - if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Fmount and H5Gunlink - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Fmount and H5Gunlink + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Fmount and H5Gunlink"); + TESTING("H5Iget_name with H5Fmount and H5Gunlink"); - /* Create a file and group "/g1/g2" in it */ - file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - if ((group_id = H5Gcreate( file1_id, "/g1", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file1_id, "/g1/g2", 0 ))<0) TEST_ERROR; + /* Create a file and group "/g1/g2" in it */ + file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + if ((group_id = H5Gcreate( file1_id, "/g1", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file1_id, "/g1/g2", 0 ))<0) TEST_ERROR; - /* Create a new file and group "/g3/g4" in it */ - if ((file2_id = H5Fcreate( filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file2_id, "/g3", 0 ))<0) TEST_ERROR; - if ((group4_id = H5Gcreate( file2_id, "/g3/g4", 0 ))<0) TEST_ERROR; + /* Create a new file and group "/g3/g4" in it */ + if ((file2_id = H5Fcreate( filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file2_id, "/g3", 0 ))<0) TEST_ERROR; + if ((group4_id = H5Gcreate( file2_id, "/g3/g4", 0 ))<0) TEST_ERROR; - /* Mount first file at "/g3/g4" in the second file */ - if(H5Fmount(file2_id, "/g3/g4", file1_id, H5P_DEFAULT)<0) TEST_ERROR; + /* Mount first file at "/g3/g4" in the second file */ + if(H5Fmount(file2_id, "/g3/g4", file1_id, H5P_DEFAULT)<0) TEST_ERROR; - /* Open the mounted group */ - if ((group5_id = H5Gopen( file2_id, "/g3/g4/g1/g2" ))<0) TEST_ERROR; + /* Open the mounted group */ + if ((group5_id = H5Gopen( file2_id, "/g3/g4/g1/g2" ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR; - /* Delete */ - if (H5Gunlink( file1_id, "/g3/g4/g1/g2")<0) TEST_ERROR; + /* Delete */ + if (H5Gunlink( file1_id, "/g3/g4/g1/g2")<0) TEST_ERROR; - /* Verify */ - if(check_name(group5_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group5_id, "", "") < 0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "", "") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); - H5Gclose( group4_id ); - H5Gclose( group5_id ); - H5Fclose( file1_id ); - H5Fclose( file2_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); + H5Gclose( group4_id ); + H5Gclose( group5_id ); + H5Fclose( file1_id ); + H5Fclose( file2_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Fmount and H5Gmove - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Fmount and H5Gmove + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Fmount and H5Gmove"); + TESTING("H5Iget_name with H5Fmount and H5Gmove"); - /* Create a file and group "/g1/g2" in it */ - file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - if ((group_id = H5Gcreate( file1_id, "/g1", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file1_id, "/g1/g2", 0 ))<0) TEST_ERROR; + /* Create a file and group "/g1/g2" in it */ + file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + if ((group_id = H5Gcreate( file1_id, "/g1", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file1_id, "/g1/g2", 0 ))<0) TEST_ERROR; - /* Create a new file and group "/g3/g4" in it */ - if ((file2_id = H5Fcreate( filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file2_id, "/g3", 0 ))<0) TEST_ERROR; - if ((group4_id = H5Gcreate( file2_id, "/g3/g4", 0 ))<0) TEST_ERROR; + /* Create a new file and group "/g3/g4" in it */ + if ((file2_id = H5Fcreate( filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file2_id, "/g3", 0 ))<0) TEST_ERROR; + if ((group4_id = H5Gcreate( file2_id, "/g3/g4", 0 ))<0) TEST_ERROR; - /* Mount first file at "g3/g4" in the second file */ - if(H5Fmount(file2_id, "/g3/g4", file1_id, H5P_DEFAULT)<0) TEST_ERROR; + /* Mount first file at "g3/g4" in the second file */ + if(H5Fmount(file2_id, "/g3/g4", file1_id, H5P_DEFAULT)<0) TEST_ERROR; - /* Verify */ - if(check_name(group4_id, "/g3/g4", "/g3/g4") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group4_id, "/g3/g4", "/g3/g4") < 0) TEST_ERROR; - /* Open the mounted group */ - if ((group5_id = H5Gopen( file2_id, "/g3/g4/g1/g2" ))<0) TEST_ERROR; + /* Open the mounted group */ + if ((group5_id = H5Gopen( file2_id, "/g3/g4/g1/g2" ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR; - /* Open another mounted group, in the middle of the path */ - if ((group6_id = H5Gopen( file2_id, "/g3/g4/g1" ))<0) TEST_ERROR; + /* Open another mounted group, in the middle of the path */ + if ((group6_id = H5Gopen( file2_id, "/g3/g4/g1" ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR; - /* Rename group */ - if (H5Gmove( file2_id, "/g3/g4/g1/g2", "/g3/g4/g1/g5" )<0) TEST_ERROR; + /* Rename group */ + if (H5Gmove( file2_id, "/g3/g4/g1/g2", "/g3/g4/g1/g5" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group5_id, "/g3/g4/g1/g5", "/g3/g4/g1/g5") < 0) TEST_ERROR; - if(check_name(group2_id, "/g1/g5", "/g1/g5") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group5_id, "/g3/g4/g1/g5", "/g3/g4/g1/g5") < 0) TEST_ERROR; + if(check_name(group2_id, "/g1/g5", "/g1/g5") < 0) TEST_ERROR; - /* Rename group */ - if (H5Gmove( file2_id, "/g3/g4/g1", "/g3/g4/g1a" )<0) TEST_ERROR; + /* Rename group */ + if (H5Gmove( file2_id, "/g3/g4/g1", "/g3/g4/g1a" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group5_id, "/g3/g4/g1a/g5", "/g3/g4/g1a/g5") < 0) TEST_ERROR; - if(check_name(group2_id, "/g1a/g5", "/g1a/g5") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group5_id, "/g3/g4/g1a/g5", "/g3/g4/g1a/g5") < 0) TEST_ERROR; + if(check_name(group2_id, "/g1a/g5", "/g1a/g5") < 0) TEST_ERROR; - /* Verify */ - if(check_name(group6_id, "/g3/g4/g1a", "/g3/g4/g1a") < 0) TEST_ERROR; - if(check_name(group_id, "/g1a", "/g1a") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group6_id, "/g3/g4/g1a", "/g3/g4/g1a") < 0) TEST_ERROR; + if(check_name(group_id, "/g1a", "/g1a") < 0) TEST_ERROR; - /* Rename middle group back, using relative path */ - if (H5Gmove( group3_id, "g4/g1a", "g4/g1" )<0) TEST_ERROR; + /* Rename middle group back, using relative path */ + if (H5Gmove( group3_id, "g4/g1a", "g4/g1" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group5_id, "/g3/g4/g1/g5", "/g3/g4/g1/g5") < 0) TEST_ERROR; - if(check_name(group2_id, "/g1/g5", "/g1/g5") < 0) TEST_ERROR; - if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR; - if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group5_id, "/g3/g4/g1/g5", "/g3/g4/g1/g5") < 0) TEST_ERROR; + if(check_name(group2_id, "/g1/g5", "/g1/g5") < 0) TEST_ERROR; + if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR; + if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR; - /* Rename end group back, using relative path */ - if (H5Gmove( group3_id, "g4/g1/g5", "g4/g1/g2" )<0) TEST_ERROR; + /* Rename end group back, using relative path */ + if (H5Gmove( group3_id, "g4/g1/g5", "g4/g1/g2" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR; - if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR; - if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR; - if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR; + if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR; + if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR; + if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR; - /* Rename mount point */ - if (H5Gmove( file2_id, "/g3/g4", "/g3/g4a" )<0) TEST_ERROR; + /* Rename mount point */ + if (H5Gmove( file2_id, "/g3/g4", "/g3/g4a" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group4_id, "/g3/g4a", "/g3/g4a") < 0) TEST_ERROR; - if(check_name(group5_id, "/g3/g4a/g1/g2", "/g3/g4a/g1/g2") < 0) TEST_ERROR; - if(check_name(group6_id, "/g3/g4a/g1", "/g3/g4a/g1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group4_id, "/g3/g4a", "/g3/g4a") < 0) TEST_ERROR; + if(check_name(group5_id, "/g3/g4a/g1/g2", "/g3/g4a/g1/g2") < 0) TEST_ERROR; + if(check_name(group6_id, "/g3/g4a/g1", "/g3/g4a/g1") < 0) TEST_ERROR; - /* Rename mount point back, using relative path*/ - if (H5Gmove( group3_id, "g4a", "g4" )<0) TEST_ERROR; + /* Rename mount point back, using relative path*/ + if (H5Gmove( group3_id, "g4a", "g4" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group4_id, "/g3/g4", "/g3/g4") < 0) TEST_ERROR; - if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR; - if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group4_id, "/g3/g4", "/g3/g4") < 0) TEST_ERROR; + if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR; + if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); - H5Gclose( group4_id ); - H5Gclose( group5_id ); - H5Gclose( group6_id ); - H5Fclose( file1_id ); - H5Fclose( file2_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); + H5Gclose( group4_id ); + H5Gclose( group5_id ); + H5Gclose( group6_id ); + H5Fclose( file1_id ); + H5Fclose( file2_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Glink hard - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Glink hard + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Glink hard"); + TESTING("H5Iget_name with H5Glink hard"); - /* Create group "g19/g1" */ - if ((group_id = H5Gcreate( file_id, "/g19", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "/g19/g1", 0 ))<0) TEST_ERROR; + /* Create group "g19/g1" */ + if ((group_id = H5Gcreate( file_id, "/g19", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "/g19/g1", 0 ))<0) TEST_ERROR; - /* Create hard link to "g19/g1/ group */ - if (H5Glink(file_id, H5G_LINK_HARD, "/g19/g1", "/g19/g2")<0) TEST_ERROR; + /* Create hard link to "g19/g1/ group */ + if (H5Glink(file_id, H5G_LINK_HARD, "/g19/g1", "/g19/g2")<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR; - /* Open the group */ - if ((group3_id = H5Gopen( file_id, "/g19/g2" ))<0) TEST_ERROR; + /* Open the group */ + if ((group3_id = H5Gopen( file_id, "/g19/g2" ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR; - /* Rename original group */ - if (H5Gmove( file_id, "/g19/g1", "/g19/g3" )<0) TEST_ERROR; + /* Rename original group */ + if (H5Gmove( file_id, "/g19/g1", "/g19/g3" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g19/g3", "/g19/g3") < 0) TEST_ERROR; - if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g19/g3", "/g19/g3") < 0) TEST_ERROR; + if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR; - /* Rename original group back, using relative path */ - if (H5Gmove( group_id, "g3", "g1" )<0) TEST_ERROR; + /* Rename original group back, using relative path */ + if (H5Gmove( group_id, "g3", "g1" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR; - if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR; + if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR; - /* Create another hard link to "/g19/g1" group */ - if (H5Glink(file_id, H5G_LINK_HARD, "/g19/g1", "/g19/g3")<0) TEST_ERROR; + /* Create another hard link to "/g19/g1" group */ + if (H5Glink(file_id, H5G_LINK_HARD, "/g19/g1", "/g19/g3")<0) TEST_ERROR; - /* Open the group */ - if ((group4_id = H5Gopen( file_id, "/g19/g3" ))<0) TEST_ERROR; + /* Open the group */ + if ((group4_id = H5Gopen( file_id, "/g19/g3" ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group4_id, "/g19/g3", "/g19/g3") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group4_id, "/g19/g3", "/g19/g3") < 0) TEST_ERROR; - /* Delete group */ - if (H5Gunlink( file_id, "/g19/g3")<0) TEST_ERROR; + /* Delete group */ + if (H5Gunlink( file_id, "/g19/g3")<0) TEST_ERROR; - /* Verify */ - if(check_name(group4_id, "", "") < 0) TEST_ERROR; - if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR; - if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group4_id, "", "") < 0) TEST_ERROR; + if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR; + if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR; - /* Close the unlinked group */ - H5Gclose( group4_id ); + /* Close the unlinked group */ + H5Gclose( group4_id ); - /* Create another hard link to "/g19/g1" group */ - if (H5Glink(file_id, H5G_LINK_HARD, "/g19/g1", "/g19/g3")<0) TEST_ERROR; + /* Create another hard link to "/g19/g1" group */ + if (H5Glink(file_id, H5G_LINK_HARD, "/g19/g1", "/g19/g3")<0) TEST_ERROR; - /* Open the group */ - if ((group4_id = H5Gopen( file_id, "/g19/g3" ))<0) TEST_ERROR; + /* Open the group */ + if ((group4_id = H5Gopen( file_id, "/g19/g3" ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group4_id, "/g19/g3", "/g19/g3") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group4_id, "/g19/g3", "/g19/g3") < 0) TEST_ERROR; - /* Delete group, using relative path */ - if (H5Gunlink( group_id, "g3")<0) TEST_ERROR; + /* Delete group, using relative path */ + if (H5Gunlink( group_id, "g3")<0) TEST_ERROR; - /* Verify */ - if(check_name(group4_id, "", "") < 0) TEST_ERROR; - if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR; - if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group4_id, "", "") < 0) TEST_ERROR; + if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR; + if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR; - /* Close the unlinked group */ - H5Gclose( group4_id ); + /* Close the unlinked group */ + H5Gclose( group4_id ); - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Glink symbolic - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Glink symbolic + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Glink symbolic"); + TESTING("H5Iget_name with H5Glink symbolic"); - /* Create group "g20/g1" */ - if ((group_id = H5Gcreate( file_id, "/g20", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "/g20/g1", 0 ))<0) TEST_ERROR; + /* Create group "g20/g1" */ + if ((group_id = H5Gcreate( file_id, "/g20", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "/g20/g1", 0 ))<0) TEST_ERROR; - /* Create symbolic link to "g20/g1/ group */ - if (H5Glink(file_id, H5G_LINK_SOFT, "/g20/g1", "/g20/g2")<0) TEST_ERROR; + /* Create symbolic link to "g20/g1/ group */ + if (H5Glink(file_id, H5G_LINK_SOFT, "/g20/g1", "/g20/g2")<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g20/g1", "/g20/g1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g20/g1", "/g20/g1") < 0) TEST_ERROR; - /* Open the group */ - if ((group3_id = H5Gopen( file_id, "/g20/g2" ))<0) TEST_ERROR; + /* Open the group */ + if ((group3_id = H5Gopen( file_id, "/g20/g2" ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "/g20/g2", "/g20/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "/g20/g2", "/g20/g2") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Glink symbolic and move target - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Glink symbolic and move target + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Glink symbolic and move target"); + TESTING("H5Iget_name with H5Glink symbolic and move target"); - /* Create group "g21/g1" */ - if ((group_id = H5Gcreate( file_id, "/g21", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "/g21/g1", 0 ))<0) TEST_ERROR; + /* Create group "g21/g1" */ + if ((group_id = H5Gcreate( file_id, "/g21", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "/g21/g1", 0 ))<0) TEST_ERROR; - /* Create symbolic link to "g21/g1/ group */ - if (H5Glink(file_id, H5G_LINK_SOFT, "/g21/g1", "/g21/g2")<0) TEST_ERROR; + /* Create symbolic link to "g21/g1/ group */ + if (H5Glink(file_id, H5G_LINK_SOFT, "/g21/g1", "/g21/g2")<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g21/g1", "/g21/g1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g21/g1", "/g21/g1") < 0) TEST_ERROR; - /* Open the group */ - if ((group3_id = H5Gopen( file_id, "/g21/g2" ))<0) TEST_ERROR; + /* Open the group */ + if ((group3_id = H5Gopen( file_id, "/g21/g2" ))<0) TEST_ERROR; - /* Rename group */ - if (H5Gmove( file_id, "/g21/g1", "/g21/g3" )<0) TEST_ERROR; + /* Rename group */ + if (H5Gmove( file_id, "/g21/g1", "/g21/g3" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g21/g3", "/g21/g3") < 0) TEST_ERROR; - if(check_name(group3_id, "/g21/g2", "/g21/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g21/g3", "/g21/g3") < 0) TEST_ERROR; + if(check_name(group3_id, "/g21/g2", "/g21/g2") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Glink symbolic and move source - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Glink symbolic and move source + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Glink symbolic and move source"); + TESTING("H5Iget_name with H5Glink symbolic and move source"); - /* Create group "g22/g1" */ - if ((group_id = H5Gcreate( file_id, "/g22", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "/g22/g1", 0 ))<0) TEST_ERROR; + /* Create group "g22/g1" */ + if ((group_id = H5Gcreate( file_id, "/g22", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "/g22/g1", 0 ))<0) TEST_ERROR; - /* Create symbolic link to "g22/g1/ group */ - if (H5Glink(file_id, H5G_LINK_SOFT, "/g22/g1", "/g22/g2")<0) TEST_ERROR; + /* Create symbolic link to "g22/g1/ group */ + if (H5Glink(file_id, H5G_LINK_SOFT, "/g22/g1", "/g22/g2")<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g22/g1", "/g22/g1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g22/g1", "/g22/g1") < 0) TEST_ERROR; - /* Open the group */ - if ((group3_id = H5Gopen( file_id, "/g22/g2" ))<0) TEST_ERROR; + /* Open the group */ + if ((group3_id = H5Gopen( file_id, "/g22/g2" ))<0) TEST_ERROR; - /* Rename soft link */ - if (H5Gmove( file_id, "/g22/g2", "/g22/g3" )<0) TEST_ERROR; + /* Rename soft link */ + if (H5Gmove( file_id, "/g22/g2", "/g22/g3" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g22/g1", "/g22/g1") < 0) TEST_ERROR; - if(check_name(group3_id, "/g22/g3", "/g22/g3") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g22/g1", "/g22/g1") < 0) TEST_ERROR; + if(check_name(group3_id, "/g22/g3", "/g22/g3") < 0) TEST_ERROR; - /* Rename soft link, using relative paths */ - if (H5Gmove( group_id, "g3", "g2" )<0) TEST_ERROR; + /* Rename soft link, using relative paths */ + if (H5Gmove( group_id, "g3", "g2" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g22/g1", "/g22/g1") < 0) TEST_ERROR; - if(check_name(group3_id, "/g22/g2", "/g22/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g22/g1", "/g22/g1") < 0) TEST_ERROR; + if(check_name(group3_id, "/g22/g2", "/g22/g2") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Glink symbolic and unlink target - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Glink symbolic and unlink target + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Glink symbolic and unlink target"); + TESTING("H5Iget_name with H5Glink symbolic and unlink target"); - /* Create group "g23/g1" */ - if ((group_id = H5Gcreate( file_id, "/g23", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "/g23/g1", 0 ))<0) TEST_ERROR; + /* Create group "g23/g1" */ + if ((group_id = H5Gcreate( file_id, "/g23", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "/g23/g1", 0 ))<0) TEST_ERROR; - /* Create symbolic link to "g23/g1/ group */ - if (H5Glink(file_id, H5G_LINK_SOFT, "/g23/g1", "/g23/g2")<0) TEST_ERROR; + /* Create symbolic link to "g23/g1/ group */ + if (H5Glink(file_id, H5G_LINK_SOFT, "/g23/g1", "/g23/g2")<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g23/g1", "/g23/g1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g23/g1", "/g23/g1") < 0) TEST_ERROR; - /* Open the group */ - if ((group3_id = H5Gopen( file_id, "/g23/g2" ))<0) TEST_ERROR; + /* Open the group */ + if ((group3_id = H5Gopen( file_id, "/g23/g2" ))<0) TEST_ERROR; - /* Delete group */ - if (H5Gunlink( file_id, "/g23/g1")<0) TEST_ERROR; + /* Delete group */ + if (H5Gunlink( file_id, "/g23/g1")<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "/g23/g2", "/g23/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "/g23/g2", "/g23/g2") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Glink symbolic and unlink source - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with H5Glink symbolic and unlink source + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Glink symbolic and unlink source"); + TESTING("H5Iget_name with H5Glink symbolic and unlink source"); - /* Create group "g24/g1" */ - if ((group_id = H5Gcreate( file_id, "/g24", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "/g24/g1", 0 ))<0) TEST_ERROR; + /* Create group "g24/g1" */ + if ((group_id = H5Gcreate( file_id, "/g24", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "/g24/g1", 0 ))<0) TEST_ERROR; - /* Create symbolic link to "g24/g1/ group */ - if (H5Glink(file_id, H5G_LINK_SOFT, "/g24/g1", "/g24/g2")<0) TEST_ERROR; + /* Create symbolic link to "g24/g1/ group */ + if (H5Glink(file_id, H5G_LINK_SOFT, "/g24/g1", "/g24/g2")<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g24/g1", "/g24/g1") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g24/g1", "/g24/g1") < 0) TEST_ERROR; - /* Open the group */ - if ((group3_id = H5Gopen( file_id, "/g24/g2" ))<0) TEST_ERROR; + /* Open the group */ + if ((group3_id = H5Gopen( file_id, "/g24/g2" ))<0) TEST_ERROR; - /* Delete group */ - if (H5Gunlink( file_id, "/g24/g2")<0) TEST_ERROR; + /* Delete group */ + if (H5Gunlink( file_id, "/g24/g2")<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "", "") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with several nested mounted files - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with several nested mounted files + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with several nested mounted files"); + TESTING("H5Iget_name with several nested mounted files"); - /* Create a group "g25/g1/g2" in the first file */ - if ((group_id = H5Gcreate( file_id, "/g25", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "/g25/g1", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file_id, "/g25/g1/g2", 0 ))<0) TEST_ERROR; + /* Create a group "g25/g1/g2" in the first file */ + if ((group_id = H5Gcreate( file_id, "/g25", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "/g25/g1", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file_id, "/g25/g1/g2", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Create second file and group "/g26/g3/g4" in it */ - file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + /* Create second file and group "/g26/g3/g4" in it */ + file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - if ((group_id = H5Gcreate( file1_id, "/g26", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file1_id, "/g26/g3", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file1_id, "/g26/g3/g4", 0 ))<0) TEST_ERROR; + if ((group_id = H5Gcreate( file1_id, "/g26", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file1_id, "/g26/g3", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file1_id, "/g26/g3/g4", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Create third file and group "/g27/g5/g6" in it */ - file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + /* Create third file and group "/g27/g5/g6" in it */ + file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - if ((group_id = H5Gcreate( file2_id, "/g27", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file2_id, "/g27/g5", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file2_id, "/g27/g5/g6", 0 ))<0) TEST_ERROR; + if ((group_id = H5Gcreate( file2_id, "/g27", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file2_id, "/g27/g5", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file2_id, "/g27/g5/g6", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Create fourth file and group "/g28/g5/g6" in it */ - file3_id = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + /* Create fourth file and group "/g28/g5/g6" in it */ + file3_id = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - if ((group_id = H5Gcreate( file3_id, "/g28", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file3_id, "/g28/g7", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file3_id, "/g28/g7/g8", 0 ))<0) TEST_ERROR; + if ((group_id = H5Gcreate( file3_id, "/g28", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file3_id, "/g28/g7", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file3_id, "/g28/g7/g8", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Access group which will be hidden in the first file */ - if ((group_id = H5Gopen( file_id, "/g25/g1/g2"))<0) TEST_ERROR; + /* Access group which will be hidden in the first file */ + if ((group_id = H5Gopen( file_id, "/g25/g1/g2"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "/g25/g1/g2", "/g25/g1/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "/g25/g1/g2", "/g25/g1/g2") < 0) TEST_ERROR; - /* Mount second file under "/g25/g1" in the first file */ - if (H5Fmount(file_id, "/g25/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR; + /* Mount second file under "/g25/g1" in the first file */ + if (H5Fmount(file_id, "/g25/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "", "/g25/g1/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "", "/g25/g1/g2") < 0) TEST_ERROR; - /* Access group which will be hidden in the second file */ - if ((group2_id = H5Gopen( file_id, "/g25/g1/g26/g3/g4"))<0) TEST_ERROR; + /* Access group which will be hidden in the second file */ + if ((group2_id = H5Gopen( file_id, "/g25/g1/g26/g3/g4"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g25/g1/g26/g3/g4", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g25/g1/g26/g3/g4", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR; - /* Mount third file under "/g25/g1/g26/g3" in the first file */ - if (H5Fmount(file_id, "/g25/g1/g26/g3", file2_id, H5P_DEFAULT)<0) TEST_ERROR; + /* Mount third file under "/g25/g1/g26/g3" in the first file */ + if (H5Fmount(file_id, "/g25/g1/g26/g3", file2_id, H5P_DEFAULT)<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR; - /* Access group in the third file */ - if ((group3_id = H5Gopen( file_id, "/g25/g1/g26/g3/g27/g5/g6"))<0) TEST_ERROR; + /* Access group in the third file */ + if ((group3_id = H5Gopen( file_id, "/g25/g1/g26/g3/g27/g5/g6"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "/g25/g1/g26/g3/g27/g5/g6", "/g25/g1/g26/g3/g27/g5/g6") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "/g25/g1/g26/g3/g27/g5/g6", "/g25/g1/g26/g3/g27/g5/g6") < 0) TEST_ERROR; - /* Mount fourth file under "/g25/g1/g26/g3/g27/g5" in the first file */ - if (H5Fmount(file_id, "/g25/g1/g26/g3/g27/g5", file3_id, H5P_DEFAULT)<0) TEST_ERROR; + /* Mount fourth file under "/g25/g1/g26/g3/g27/g5" in the first file */ + if (H5Fmount(file_id, "/g25/g1/g26/g3/g27/g5", file3_id, H5P_DEFAULT)<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "", "/g25/g1/g26/g3/g27/g5/g6") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "", "/g25/g1/g26/g3/g27/g5/g6") < 0) TEST_ERROR; - /* Access group in the fourth file */ - if ((group4_id = H5Gopen( file_id, "/g25/g1/g26/g3/g27/g5/g28/g7/g8"))<0) TEST_ERROR; + /* Access group in the fourth file */ + if ((group4_id = H5Gopen( file_id, "/g25/g1/g26/g3/g27/g5/g28/g7/g8"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group4_id, "/g25/g1/g26/g3/g27/g5/g28/g7/g8", "/g25/g1/g26/g3/g27/g5/g28/g7/g8") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group4_id, "/g25/g1/g26/g3/g27/g5/g28/g7/g8", "/g25/g1/g26/g3/g27/g5/g28/g7/g8") < 0) TEST_ERROR; - if (H5Funmount(file_id, "/g25/g1/g26/g3/g27/g5")<0) TEST_ERROR; + if (H5Funmount(file_id, "/g25/g1/g26/g3/g27/g5")<0) TEST_ERROR; - /* Verify */ - if(check_name(group4_id, "", "") < 0) TEST_ERROR; - if(check_name(group3_id, "/g25/g1/g26/g3/g27/g5/g6", "/g25/g1/g26/g3/g27/g5/g6") < 0) TEST_ERROR; - if(check_name(group2_id, "", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR; - if(check_name(group_id, "", "/g25/g1/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group4_id, "", "") < 0) TEST_ERROR; + if(check_name(group3_id, "/g25/g1/g26/g3/g27/g5/g6", "/g25/g1/g26/g3/g27/g5/g6") < 0) TEST_ERROR; + if(check_name(group2_id, "", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR; + if(check_name(group_id, "", "/g25/g1/g2") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group4_id ); - H5Fclose( file3_id ); + /* Close */ + H5Gclose( group4_id ); + H5Fclose( file3_id ); - if (H5Funmount(file_id, "/g25/g1/g26/g3")<0) TEST_ERROR; + if (H5Funmount(file_id, "/g25/g1/g26/g3")<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "", "") < 0) TEST_ERROR; - if(check_name(group2_id, "/g25/g1/g26/g3/g4", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR; - if(check_name(group_id, "", "/g25/g1/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "", "") < 0) TEST_ERROR; + if(check_name(group2_id, "/g25/g1/g26/g3/g4", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR; + if(check_name(group_id, "", "/g25/g1/g2") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group3_id ); - H5Fclose( file2_id ); + /* Close */ + H5Gclose( group3_id ); + H5Fclose( file2_id ); - if (H5Funmount(file_id, "/g25/g1")<0) TEST_ERROR; + if (H5Funmount(file_id, "/g25/g1")<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "", "") < 0) TEST_ERROR; - if(check_name(group_id, "/g25/g1/g2", "/g25/g1/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "", "") < 0) TEST_ERROR; + if(check_name(group_id, "/g25/g1/g2", "/g25/g1/g2") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Fclose( file1_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Fclose( file1_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name and H5Gmove with repeated path components - *------------------------------------------------------------------------- - */ + * Test H5Iget_name and H5Gmove with repeated path components + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name and H5Gmove with repeated path components"); + TESTING("H5Iget_name and H5Gmove with repeated path components"); - /* Create a group "g29/g1/g2/g1/g2" in a file */ - if ((group_id = H5Gcreate( file_id, "/g29", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "/g29/g1", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file_id, "/g29/g1/g2", 0 ))<0) TEST_ERROR; - if ((group4_id = H5Gcreate( file_id, "/g29/g1/g2/g1", 0 ))<0) TEST_ERROR; - if ((group5_id = H5Gcreate( file_id, "/g29/g1/g2/g1/g2", 0 ))<0) TEST_ERROR; + /* Create a group "g29/g1/g2/g1/g2" in a file */ + if ((group_id = H5Gcreate( file_id, "/g29", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "/g29/g1", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file_id, "/g29/g1/g2", 0 ))<0) TEST_ERROR; + if ((group4_id = H5Gcreate( file_id, "/g29/g1/g2/g1", 0 ))<0) TEST_ERROR; + if ((group5_id = H5Gcreate( file_id, "/g29/g1/g2/g1/g2", 0 ))<0) TEST_ERROR; - /* Rename group */ - if (H5Gmove( file_id, "/g29/g1/g2/g1/g2", "/g29/g1/g2/g1/g3" )<0) TEST_ERROR; + /* Rename group */ + if (H5Gmove( file_id, "/g29/g1/g2/g1/g2", "/g29/g1/g2/g1/g3" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group5_id, "/g29/g1/g2/g1/g3", "/g29/g1/g2/g1/g3") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group5_id, "/g29/g1/g2/g1/g3", "/g29/g1/g2/g1/g3") < 0) TEST_ERROR; - /* Rename group in middle of path, keeping within the same group */ - if (H5Gmove( file_id, "/g29/g1/g2/g1", "/g29/g1/g2/g3" )<0) TEST_ERROR; + /* Rename group in middle of path, keeping within the same group */ + if (H5Gmove( file_id, "/g29/g1/g2/g1", "/g29/g1/g2/g3" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group4_id, "/g29/g1/g2/g3", "/g29/g1/g2/g3") < 0) TEST_ERROR; - if(check_name(group5_id, "/g29/g1/g2/g3/g3", "/g29/g1/g2/g3/g3") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group4_id, "/g29/g1/g2/g3", "/g29/g1/g2/g3") < 0) TEST_ERROR; + if(check_name(group5_id, "/g29/g1/g2/g3/g3", "/g29/g1/g2/g3/g3") < 0) TEST_ERROR; - /* Rename group in middle of path, moving to another group in file */ - if (H5Gmove( file_id, "/g29/g1/g2/g3", "/g29/g3" )<0) TEST_ERROR; + /* Rename group in middle of path, moving to another group in file */ + if (H5Gmove( file_id, "/g29/g1/g2/g3", "/g29/g3" )<0) TEST_ERROR; - /* Verify */ - if(check_name(group4_id, "/g29/g3", "/g29/g3") < 0) TEST_ERROR; - if(check_name(group5_id, "/g29/g3/g3", "/g29/g3/g3") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group4_id, "/g29/g3", "/g29/g3") < 0) TEST_ERROR; + if(check_name(group5_id, "/g29/g3/g3", "/g29/g3/g3") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); - H5Gclose( group4_id ); - H5Gclose( group5_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); + H5Gclose( group4_id ); + H5Gclose( group5_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with higher mounted file - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with higher mounted file + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with higher mounted file"); + TESTING("H5Iget_name with higher mounted file"); - /* Create a group "/g30/g1/g2" in the first file */ - if ((group_id = H5Gcreate( file_id, "/g30", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "/g30/g1", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file_id, "/g30/g1/g2", 0 ))<0) TEST_ERROR; + /* Create a group "/g30/g1/g2" in the first file */ + if ((group_id = H5Gcreate( file_id, "/g30", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "/g30/g1", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file_id, "/g30/g1/g2", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Create second file and group "/g31/g3/g4" in it */ - file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + /* Create second file and group "/g31/g3/g4" in it */ + file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - if ((group_id = H5Gcreate( file1_id, "/g31", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file1_id, "/g31/g3", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file1_id, "/g31/g3/g4", 0 ))<0) TEST_ERROR; + if ((group_id = H5Gcreate( file1_id, "/g31", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file1_id, "/g31/g3", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file1_id, "/g31/g3/g4", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Create third file and group "/g32/g5/g6" in it */ - file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + /* Create third file and group "/g32/g5/g6" in it */ + file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - if ((group_id = H5Gcreate( file2_id, "/g32", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file2_id, "/g32/g5", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file2_id, "/g32/g5/g6", 0 ))<0) TEST_ERROR; + if ((group_id = H5Gcreate( file2_id, "/g32", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file2_id, "/g32/g5", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file2_id, "/g32/g5/g6", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Create fourth file and group "/g33/g5/g6" in it */ - file3_id = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + /* Create fourth file and group "/g33/g5/g6" in it */ + file3_id = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - if ((group_id = H5Gcreate( file3_id, "/g33", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file3_id, "/g33/g7", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file3_id, "/g33/g7/g8", 0 ))<0) TEST_ERROR; + if ((group_id = H5Gcreate( file3_id, "/g33", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file3_id, "/g33/g7", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file3_id, "/g33/g7/g8", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Access group which will be hidden in the first file */ - if ((group_id = H5Gopen( file_id, "/g30/g1/g2"))<0) TEST_ERROR; + /* Access group which will be hidden in the first file */ + if ((group_id = H5Gopen( file_id, "/g30/g1/g2"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "/g30/g1/g2", "/g30/g1/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "/g30/g1/g2", "/g30/g1/g2") < 0) TEST_ERROR; - /* Mount second file under "/g30/g1" in the first file */ - if (H5Fmount(file_id, "/g30/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR; + /* Mount second file under "/g30/g1" in the first file */ + if (H5Fmount(file_id, "/g30/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "", "/g30/g1/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "", "/g30/g1/g2") < 0) TEST_ERROR; - /* Access group which will be hidden in the second file */ - if ((group2_id = H5Gopen( file_id, "/g30/g1/g31/g3/g4"))<0) TEST_ERROR; + /* Access group which will be hidden in the second file */ + if ((group2_id = H5Gopen( file_id, "/g30/g1/g31/g3/g4"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g30/g1/g31/g3/g4", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g30/g1/g31/g3/g4", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR; - /* Mount third file under "/g30/g1/g31/g3" in the first file */ - if (H5Fmount(file_id, "/g30/g1/g31/g3", file2_id, H5P_DEFAULT)<0) TEST_ERROR; + /* Mount third file under "/g30/g1/g31/g3" in the first file */ + if (H5Fmount(file_id, "/g30/g1/g31/g3", file2_id, H5P_DEFAULT)<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR; - /* Access group which will be hidden in the third file */ - if ((group3_id = H5Gopen( file_id, "/g30/g1/g31/g3/g32/g5/g6"))<0) TEST_ERROR; + /* Access group which will be hidden in the third file */ + if ((group3_id = H5Gopen( file_id, "/g30/g1/g31/g3/g32/g5/g6"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "/g30/g1/g31/g3/g32/g5/g6", "/g30/g1/g31/g3/g32/g5/g6") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "/g30/g1/g31/g3/g32/g5/g6", "/g30/g1/g31/g3/g32/g5/g6") < 0) TEST_ERROR; - /* Mount fourth file under "/g30" in the first file, hiding the files below it */ - if (H5Fmount(file_id, "/g30", file3_id, H5P_DEFAULT)<0) TEST_ERROR; + /* Mount fourth file under "/g30" in the first file, hiding the files below it */ + if (H5Fmount(file_id, "/g30", file3_id, H5P_DEFAULT)<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "", "/g30/g1/g31/g3/g32/g5/g6") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "", "/g30/g1/g31/g3/g32/g5/g6") < 0) TEST_ERROR; - /* Access group which will be in the fourth file */ - if ((group4_id = H5Gopen( file_id, "/g30/g33/g7/g8"))<0) TEST_ERROR; + /* Access group which will be in the fourth file */ + if ((group4_id = H5Gopen( file_id, "/g30/g33/g7/g8"))<0) TEST_ERROR; - /* Verify */ - if(check_name(group4_id, "/g30/g33/g7/g8", "/g30/g33/g7/g8") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group4_id, "/g30/g33/g7/g8", "/g30/g33/g7/g8") < 0) TEST_ERROR; - /* Unmount fourth file */ - if (H5Funmount(file_id, "/g30")<0) TEST_ERROR; + /* Unmount fourth file */ + if (H5Funmount(file_id, "/g30")<0) TEST_ERROR; - /* Verify */ - if(check_name(group4_id, "", "") < 0) TEST_ERROR; - if(check_name(group3_id, "/g30/g1/g31/g3/g32/g5/g6", "/g30/g1/g31/g3/g32/g5/g6") < 0) TEST_ERROR; - if(check_name(group2_id, "", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR; - if(check_name(group_id, "", "/g30/g1/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group4_id, "", "") < 0) TEST_ERROR; + if(check_name(group3_id, "/g30/g1/g31/g3/g32/g5/g6", "/g30/g1/g31/g3/g32/g5/g6") < 0) TEST_ERROR; + if(check_name(group2_id, "", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR; + if(check_name(group_id, "", "/g30/g1/g2") < 0) TEST_ERROR; - /* Unmount third file */ - if (H5Funmount(file_id, "/g30/g1/g31/g3")<0) TEST_ERROR; + /* Unmount third file */ + if (H5Funmount(file_id, "/g30/g1/g31/g3")<0) TEST_ERROR; - /* Verify */ - if(check_name(group4_id, "", "") < 0) TEST_ERROR; - if(check_name(group3_id, "", "") < 0) TEST_ERROR; - if(check_name(group2_id, "/g30/g1/g31/g3/g4", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR; - if(check_name(group_id, "", "/g30/g1/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group4_id, "", "") < 0) TEST_ERROR; + if(check_name(group3_id, "", "") < 0) TEST_ERROR; + if(check_name(group2_id, "/g30/g1/g31/g3/g4", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR; + if(check_name(group_id, "", "/g30/g1/g2") < 0) TEST_ERROR; - /* Unmount second file */ - if (H5Funmount(file_id, "/g30/g1")<0) TEST_ERROR; + /* Unmount second file */ + if (H5Funmount(file_id, "/g30/g1")<0) TEST_ERROR; - /* Verify */ - if(check_name(group4_id, "", "") < 0) TEST_ERROR; - if(check_name(group3_id, "", "") < 0) TEST_ERROR; - if(check_name(group2_id, "", "") < 0) TEST_ERROR; - if(check_name(group_id, "/g30/g1/g2", "/g30/g1/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group4_id, "", "") < 0) TEST_ERROR; + if(check_name(group3_id, "", "") < 0) TEST_ERROR; + if(check_name(group2_id, "", "") < 0) TEST_ERROR; + if(check_name(group_id, "/g30/g1/g2", "/g30/g1/g2") < 0) TEST_ERROR; - /* Close groups */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); - H5Gclose( group4_id ); + /* Close groups */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); + H5Gclose( group4_id ); - /* Close files */ - H5Fclose( file1_id ); - H5Fclose( file2_id ); - H5Fclose( file3_id ); + /* Close files */ + H5Fclose( file1_id ); + H5Fclose( file2_id ); + H5Fclose( file3_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with multiple hard links and mounted files - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with multiple hard links and mounted files + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with multiple hard links and mounted files"); + TESTING("H5Iget_name with multiple hard links and mounted files"); - /* Create second file and group "/g35/g3/g4" in it */ - file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + /* Create second file and group "/g35/g3/g4" in it */ + file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - if ((group_id = H5Gcreate( file1_id, "/g35", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file1_id, "/g35/g3", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file1_id, "/g35/g3/g4", 0 ))<0) TEST_ERROR; + if ((group_id = H5Gcreate( file1_id, "/g35", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file1_id, "/g35/g3", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file1_id, "/g35/g3/g4", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Create group "/g34/g1/g2" in first file */ - if ((group_id = H5Gcreate( file_id, "/g34", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "/g34/g1", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file_id, "/g34/g1/g2", 0 ))<0) TEST_ERROR; + /* Create group "/g34/g1/g2" in first file */ + if ((group_id = H5Gcreate( file_id, "/g34", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "/g34/g1", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file_id, "/g34/g1/g2", 0 ))<0) TEST_ERROR; - /* Create hard link to "/g34/g1/g2 group */ - if (H5Glink(file_id, H5G_LINK_HARD, "/g34/g1/g2", "/g34/g2a")<0) TEST_ERROR; + /* Create hard link to "/g34/g1/g2 group */ + if (H5Glink(file_id, H5G_LINK_HARD, "/g34/g1/g2", "/g34/g2a")<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "/g34/g1/g2", "/g34/g1/g2") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "/g34/g1/g2", "/g34/g1/g2") < 0) TEST_ERROR; - /* Open the link to the group */ - if ((group4_id = H5Gopen( file_id, "/g34/g2a" ))<0) TEST_ERROR; + /* Open the link to the group */ + if ((group4_id = H5Gopen( file_id, "/g34/g2a" ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group4_id, "/g34/g2a", "/g34/g2a") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group4_id, "/g34/g2a", "/g34/g2a") < 0) TEST_ERROR; - /* Mount second file under "/g34/g1" in the first file */ - if (H5Fmount(file_id, "/g34/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR; + /* Mount second file under "/g34/g1" in the first file */ + if (H5Fmount(file_id, "/g34/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "", "/g34/g1/g2") < 0) TEST_ERROR; - if(check_name(group4_id, "/g34/g2a", "/g34/g2a") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "", "/g34/g1/g2") < 0) TEST_ERROR; + if(check_name(group4_id, "/g34/g2a", "/g34/g2a") < 0) TEST_ERROR; - /* Unmount second file */ - if (H5Funmount(file_id, "/g34/g1")<0) TEST_ERROR; + /* Unmount second file */ + if (H5Funmount(file_id, "/g34/g1")<0) TEST_ERROR; - /* Verify */ - if(check_name(group3_id, "/g34/g1/g2", "/g34/g1/g2") < 0) TEST_ERROR; - if(check_name(group4_id, "/g34/g2a", "/g34/g2a") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group3_id, "/g34/g1/g2", "/g34/g1/g2") < 0) TEST_ERROR; + if(check_name(group4_id, "/g34/g2a", "/g34/g2a") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); - H5Gclose( group4_id ); - H5Fclose( file1_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); + H5Gclose( group4_id ); + H5Fclose( file1_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with mounted files and unlinking - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with mounted files and unlinking + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with mounted files and unlinking"); + TESTING("H5Iget_name with mounted files and unlinking"); - /* Create group "/g36/g1/g2" in first file */ - if ((group_id = H5Gcreate( file_id, "/g36", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file_id, "/g36/g1", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file_id, "/g36/g1/g2", 0 ))<0) TEST_ERROR; + /* Create group "/g36/g1/g2" in first file */ + if ((group_id = H5Gcreate( file_id, "/g36", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file_id, "/g36/g1", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file_id, "/g36/g1/g2", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Create second file and group "/g37/g4" in it */ - file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + /* Create second file and group "/g37/g4" in it */ + file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - if ((group_id = H5Gcreate( file1_id, "/g37", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file1_id, "/g37/g4", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file1_id, "/g37/g4/g5a", 0 ))<0) TEST_ERROR; - if ((group4_id = H5Gcreate( file1_id, "/g37/g4/g5b", 0 ))<0) TEST_ERROR; + if ((group_id = H5Gcreate( file1_id, "/g37", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file1_id, "/g37/g4", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file1_id, "/g37/g4/g5a", 0 ))<0) TEST_ERROR; + if ((group4_id = H5Gcreate( file1_id, "/g37/g4/g5b", 0 ))<0) TEST_ERROR; - /* Mount second file under "/g36/g1" in the first file */ - if (H5Fmount(file_id, "/g36/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR; + /* Mount second file under "/g36/g1" in the first file */ + if (H5Fmount(file_id, "/g36/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR; - /* Open group in mounted file */ - if ((group5_id = H5Gopen( file_id, "/g36/g1/g37/" ))<0) TEST_ERROR; + /* Open group in mounted file */ + if ((group5_id = H5Gopen( file_id, "/g36/g1/g37/" ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group5_id, "/g36/g1/g37", "/g36/g1/g37") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group5_id, "/g36/g1/g37", "/g36/g1/g37") < 0) TEST_ERROR; - /* Open group to delete in mounted file */ - if ((group6_id = H5Gopen( file_id, "/g36/g1/g37/g4/g5a" ))<0) TEST_ERROR; + /* Open group to delete in mounted file */ + if ((group6_id = H5Gopen( file_id, "/g36/g1/g37/g4/g5a" ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group6_id, "/g36/g1/g37/g4/g5a", "/g36/g1/g37/g4/g5a") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group6_id, "/g36/g1/g37/g4/g5a", "/g36/g1/g37/g4/g5a") < 0) TEST_ERROR; - /* Delete end group in mounted file, using relative paths */ - if (H5Gunlink( group5_id, "g4/g5a")<0) TEST_ERROR; + /* Delete end group in mounted file, using relative paths */ + if (H5Gunlink( group5_id, "g4/g5a")<0) TEST_ERROR; - /* Verify */ - if(check_name(group6_id, "", "") < 0) TEST_ERROR; - if(check_name(group3_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group6_id, "", "") < 0) TEST_ERROR; + if(check_name(group3_id, "", "") < 0) TEST_ERROR; - /* Close deleted group */ - H5Gclose( group6_id ); + /* Close deleted group */ + H5Gclose( group6_id ); - /* Open groups to delete in mounted file */ - if ((group6_id = H5Gopen( file_id, "/g36/g1/g37/g4" ))<0) TEST_ERROR; - if ((group7_id = H5Gopen( file_id, "/g36/g1/g37/g4/g5b" ))<0) TEST_ERROR; + /* Open groups to delete in mounted file */ + if ((group6_id = H5Gopen( file_id, "/g36/g1/g37/g4" ))<0) TEST_ERROR; + if ((group7_id = H5Gopen( file_id, "/g36/g1/g37/g4/g5b" ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group6_id, "/g36/g1/g37/g4", "/g36/g1/g37/g4") < 0) TEST_ERROR; - if(check_name(group7_id, "/g36/g1/g37/g4/g5b", "/g36/g1/g37/g4/g5b") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group6_id, "/g36/g1/g37/g4", "/g36/g1/g37/g4") < 0) TEST_ERROR; + if(check_name(group7_id, "/g36/g1/g37/g4/g5b", "/g36/g1/g37/g4/g5b") < 0) TEST_ERROR; - /* Delete middle group in mounted file, using relative paths */ - if (H5Gunlink( group5_id, "g4")<0) TEST_ERROR; + /* Delete middle group in mounted file, using relative paths */ + if (H5Gunlink( group5_id, "g4")<0) TEST_ERROR; - /* Verify */ - if(check_name(group6_id, "", "") < 0) TEST_ERROR; - if(check_name(group2_id, "", "") < 0) TEST_ERROR; - if(check_name(group7_id, "", "") < 0) TEST_ERROR; - if(check_name(group4_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group6_id, "", "") < 0) TEST_ERROR; + if(check_name(group2_id, "", "") < 0) TEST_ERROR; + if(check_name(group7_id, "", "") < 0) TEST_ERROR; + if(check_name(group4_id, "", "") < 0) TEST_ERROR; - /* Close deleted groups */ - H5Gclose( group6_id ); - H5Gclose( group7_id ); + /* Close deleted groups */ + H5Gclose( group6_id ); + H5Gclose( group7_id ); - /* Close group in mounted file */ - H5Gclose( group5_id ); + /* Close group in mounted file */ + H5Gclose( group5_id ); - if (H5Funmount(file_id, "/g36/g1")<0) TEST_ERROR; + if (H5Funmount(file_id, "/g36/g1")<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); - H5Gclose( group4_id ); - H5Fclose( file1_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); + H5Gclose( group4_id ); + H5Fclose( file1_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with mounting already mounted files - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with mounting already mounted files + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with mounting already mounted files"); + TESTING("H5Iget_name with mounting already mounted files"); - /* Create file and group "/g38/g1/g2" in it */ - file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + /* Create file and group "/g38/g1/g2" in it */ + file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - if ((group_id = H5Gcreate( file1_id, "/g38", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file1_id, "/g38/g1", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file1_id, "/g38/g1/g2", 0 ))<0) TEST_ERROR; + if ((group_id = H5Gcreate( file1_id, "/g38", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file1_id, "/g38/g1", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file1_id, "/g38/g1/g2", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Create second file and group "/g39/g1/g2" in it */ - file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + /* Create second file and group "/g39/g1/g2" in it */ + file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - if ((group_id = H5Gcreate( file2_id, "/g39", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file2_id, "/g39/g3", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file2_id, "/g39/g3/g4", 0 ))<0) TEST_ERROR; + if ((group_id = H5Gcreate( file2_id, "/g39", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file2_id, "/g39/g3", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file2_id, "/g39/g3/g4", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Create third file and group "/g40/g5/g6" in it */ - file3_id = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + /* Create third file and group "/g40/g5/g6" in it */ + file3_id = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - if ((group_id = H5Gcreate( file3_id, "/g40", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file3_id, "/g40/g5", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file3_id, "/g40/g5/g6", 0 ))<0) TEST_ERROR; + if ((group_id = H5Gcreate( file3_id, "/g40", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file3_id, "/g40/g5", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file3_id, "/g40/g5/g6", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Mount second file under "/g38/g1" in the first file */ - if (H5Fmount(file1_id, "/g38/g1", file2_id, H5P_DEFAULT)<0) TEST_ERROR; + /* Mount second file under "/g38/g1" in the first file */ + if (H5Fmount(file1_id, "/g38/g1", file2_id, H5P_DEFAULT)<0) TEST_ERROR; - if ((group_id = H5Gopen( file1_id, "/g38/g1/g39/g3/g4" ))<0) TEST_ERROR; + if ((group_id = H5Gopen( file1_id, "/g38/g1/g39/g3/g4" ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "/g38/g1/g39/g3/g4", "/g38/g1/g39/g3/g4") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "/g38/g1/g39/g3/g4", "/g38/g1/g39/g3/g4") < 0) TEST_ERROR; - /* Mount first file under "/g40/g5" in the third file */ - if (H5Fmount(file3_id, "/g40/g5", file1_id, H5P_DEFAULT)<0) TEST_ERROR; + /* Mount first file under "/g40/g5" in the third file */ + if (H5Fmount(file3_id, "/g40/g5", file1_id, H5P_DEFAULT)<0) TEST_ERROR; - if ((group2_id = H5Gopen( file3_id, "/g40/g5/g38/g1/g39/g3/g4" ))<0) TEST_ERROR; + if ((group2_id = H5Gopen( file3_id, "/g40/g5/g38/g1/g39/g3/g4" ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "/g40/g5/g38/g1/g39/g3/g4", "/g40/g5/g38/g1/g39/g3/g4") < 0) TEST_ERROR; - if(check_name(group_id, "/g38/g1/g39/g3/g4", "/g38/g1/g39/g3/g4") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "/g40/g5/g38/g1/g39/g3/g4", "/g40/g5/g38/g1/g39/g3/g4") < 0) TEST_ERROR; + if(check_name(group_id, "/g38/g1/g39/g3/g4", "/g38/g1/g39/g3/g4") < 0) TEST_ERROR; - /* Unmount first file */ - if (H5Funmount(file3_id, "/g40/g5")<0) TEST_ERROR; + /* Unmount first file */ + if (H5Funmount(file3_id, "/g40/g5")<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "", "") < 0) TEST_ERROR; - if(check_name(group_id, "/g38/g1/g39/g3/g4", "/g38/g1/g39/g3/g4") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "", "") < 0) TEST_ERROR; + if(check_name(group_id, "/g38/g1/g39/g3/g4", "/g38/g1/g39/g3/g4") < 0) TEST_ERROR; - /* Unmount second file */ - if (H5Funmount(file1_id, "/g38/g1")<0) TEST_ERROR; + /* Unmount second file */ + if (H5Funmount(file1_id, "/g38/g1")<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "", "") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Fclose( file1_id ); - H5Fclose( file2_id ); - H5Fclose( file3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Fclose( file1_id ); + H5Fclose( file2_id ); + H5Fclose( file3_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * Test H5Iget_name with opening object in unmounted file - *------------------------------------------------------------------------- - */ + * Test H5Iget_name with opening object in unmounted file + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with opening object in unmounted file"); + TESTING("H5Iget_name with opening object in unmounted file"); - /* Create file and group "/g39/g1/g2" in it */ - file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + /* Create file and group "/g39/g1/g2" in it */ + file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - if ((group_id = H5Gcreate( file1_id, "/g41", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file1_id, "/g41/g1", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file1_id, "/g41/g1/g2", 0 ))<0) TEST_ERROR; + if ((group_id = H5Gcreate( file1_id, "/g41", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file1_id, "/g41/g1", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file1_id, "/g41/g1/g2", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Create second file and group "/g42/g1/g2" in it */ - file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + /* Create second file and group "/g42/g1/g2" in it */ + file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - if ((group_id = H5Gcreate( file2_id, "/g42", 0 ))<0) TEST_ERROR; - if ((group2_id = H5Gcreate( file2_id, "/g42/g3", 0 ))<0) TEST_ERROR; - if ((group3_id = H5Gcreate( file2_id, "/g42/g3/g4", 0 ))<0) TEST_ERROR; + if ((group_id = H5Gcreate( file2_id, "/g42", 0 ))<0) TEST_ERROR; + if ((group2_id = H5Gcreate( file2_id, "/g42/g3", 0 ))<0) TEST_ERROR; + if ((group3_id = H5Gcreate( file2_id, "/g42/g3/g4", 0 ))<0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Gclose( group3_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Gclose( group3_id ); - /* Mount second file under "/g41/g1" in the first file */ - if (H5Fmount(file1_id, "/g41/g1", file2_id, H5P_DEFAULT)<0) TEST_ERROR; + /* Mount second file under "/g41/g1" in the first file */ + if (H5Fmount(file1_id, "/g41/g1", file2_id, H5P_DEFAULT)<0) TEST_ERROR; - if ((group_id = H5Gopen( file1_id, "/g41/g1/g42/g3" ))<0) TEST_ERROR; + if ((group_id = H5Gopen( file1_id, "/g41/g1/g42/g3" ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group_id, "/g41/g1/g42/g3", "/g41/g1/g42/g3") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group_id, "/g41/g1/g42/g3", "/g41/g1/g42/g3") < 0) TEST_ERROR; - /* Unmount file */ - if (H5Funmount(file1_id, "/g41/g1")<0) TEST_ERROR; + /* Unmount file */ + if (H5Funmount(file1_id, "/g41/g1")<0) TEST_ERROR; - if ((group2_id = H5Gopen( group_id, "g4" ))<0) TEST_ERROR; + if ((group2_id = H5Gopen( group_id, "g4" ))<0) TEST_ERROR; - /* Verify */ - if(check_name(group2_id, "", "") < 0) TEST_ERROR; + /* Verify */ + if(check_name(group2_id, "", "") < 0) TEST_ERROR; - /* Close */ - H5Gclose( group_id ); - H5Gclose( group2_id ); - H5Fclose( file1_id ); - H5Fclose( file2_id ); + /* Close */ + H5Gclose( group_id ); + H5Gclose( group2_id ); + H5Fclose( file1_id ); + H5Fclose( file2_id ); - PASSED(); + PASSED(); /*------------------------------------------------------------------------- - * end tests - *------------------------------------------------------------------------- - */ + * end tests + *------------------------------------------------------------------------- + */ - /* Close file */ - H5Fclose( file_id ); - puts("All getname tests passed."); - h5_cleanup(FILENAME, fapl); + /* Close file */ + H5Fclose( file_id ); + puts("All getname tests passed."); + h5_cleanup(FILENAME, fapl); + } + else + { + puts("All getname tests skipped - Incompatible with current Virtual File Driver"); + } return 0; -error: - H5Fclose( file_id ); - H5_FAILED(); - return 1; + error: + H5Fclose( file_id ); + H5_FAILED(); + return 1; } diff --git a/test/istore.c b/test/istore.c index f9e19d0dab..2663eeb4cd 100644 --- a/test/istore.c +++ b/test/istore.c @@ -567,129 +567,140 @@ main(int argc, char *argv[]) unsigned size_of_test; unsigned u; /* Local index variable */ char filename[1024]; + const char *envval = NULL; - /* Parse arguments or assume these tests (`small', `medium' ) */ - if (1 == argc) { - size_of_test = TEST_SMALL; - } else { - int i; - for (i = 1, size_of_test = 0; i < argc; i++) { - if (!strcmp(argv[i], "small")) { - size_of_test |= TEST_SMALL; - } else if (!strcmp(argv[i], "medium")) { - size_of_test |= TEST_MEDIUM; - } else if (!strcmp(argv[i], "large")) { - size_of_test |= TEST_LARGE; - } else { - printf("unrecognized argument: %s\n", argv[i]); + /* Don't run this test using the split file driver */ + envval = HDgetenv("HDF5_DRIVER"); + if (envval == NULL) + envval = "nomatch"; + if (HDstrcmp(envval, "split")) { + /* Parse arguments or assume these tests (`small', `medium' ) */ + if (1 == argc) { + size_of_test = TEST_SMALL; + } else { + int i; + for (i = 1, size_of_test = 0; i < argc; i++) { + if (!strcmp(argv[i], "small")) { + size_of_test |= TEST_SMALL; + } else if (!strcmp(argv[i], "medium")) { + size_of_test |= TEST_MEDIUM; + } else if (!strcmp(argv[i], "large")) { + size_of_test |= TEST_LARGE; + } else { + printf("unrecognized argument: %s\n", argv[i]); #if 0 - exit(1); + exit(1); #endif + } } } - } - printf("Test sizes: "); - if (size_of_test & TEST_SMALL) - printf(" SMALL"); - if (size_of_test & TEST_MEDIUM) - printf(" MEDIUM"); - if (size_of_test & TEST_LARGE) - printf(" LARGE"); - printf("\n"); + printf("Test sizes: "); + if (size_of_test & TEST_SMALL) + printf(" SMALL"); + if (size_of_test & TEST_MEDIUM) + printf(" MEDIUM"); + if (size_of_test & TEST_LARGE) + printf(" LARGE"); + printf("\n"); - /* Set the random # seed */ - HDsrandom((unsigned long)HDtime(NULL)); + /* Set the random # seed */ + HDsrandom((unsigned long)HDtime(NULL)); - /* Reset library */ - h5_reset(); - fapl = h5_fileaccess(); + /* Reset library */ + h5_reset(); + fapl = h5_fileaccess(); - /* Use larger file addresses... */ - fcpl = H5Pcreate(H5P_FILE_CREATE); - H5Pset_sizes(fcpl, 8, 0); + /* Use larger file addresses... */ + fcpl = H5Pcreate(H5P_FILE_CREATE); + H5Pset_sizes(fcpl, 8, 0); - /* Create the test file */ - h5_fixname(FILENAME[0], fapl, filename, sizeof filename); - if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl))<0) { - printf("Cannot create file %s; test aborted\n", filename); - exit(1); - } - - /* - * For testing file families, fool the library into thinking it already - * allocated a whole bunch of data. - */ - if (H5FD_FAMILY==H5Pget_driver(fapl)) { - haddr_t addr; - H5F_t *f; - - addr = 8 * ((uint64_t)1<<30); /*8 GB */ - f=H5I_object(file); - if (H5FDset_eoa(f->shared->lf, addr)<0) { - printf("Cannot create large file family\n"); + /* Create the test file */ + h5_fixname(FILENAME[0], fapl, filename, sizeof filename); + if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl))<0) { + printf("Cannot create file %s; test aborted\n", filename); exit(1); } - } - /* Initialize chunk dimensions */ - for (u = 0; u < H5O_LAYOUT_NDIMS; u++) - chunk_dims[u]=TEST_CHUNK_SIZE; + /* + * For testing file families, fool the library into thinking it already + * allocated a whole bunch of data. + */ + if (H5FD_FAMILY==H5Pget_driver(fapl)) { + haddr_t addr; + H5F_t *f; - /* - * Creation test: Creates empty objects with various raw data sizes - * and alignments. - */ - status = test_create(file, "create"); - nerrors += status < 0 ? 1 : 0; + addr = 8 * ((uint64_t)1<<30); /*8 GB */ + f=H5I_object(file); + if (H5FDset_eoa(f->shared->lf, addr)<0) { + printf("Cannot create large file family\n"); + exit(1); + } + } - if (size_of_test & TEST_SMALL) { - status = test_extend(file, "extend", 10, 0, 0); - nerrors += status < 0 ? 1 : 0; - status = test_extend(file, "extend", 10, 10, 0); - nerrors += status < 0 ? 1 : 0; - status = test_extend(file, "extend", 10, 10, 10); - nerrors += status < 0 ? 1 : 0; - } - if (size_of_test & TEST_MEDIUM) { - status = test_extend(file, "extend", 10000, 0, 0); - nerrors += status < 0 ? 1 : 0; - status = test_extend(file, "extend", 2500, 10, 0); - nerrors += status < 0 ? 1 : 0; - status = test_extend(file, "extend", 10, 400, 10); - nerrors += status < 0 ? 1 : 0; - } - if (size_of_test & TEST_SMALL) { - status = test_sparse(file, "sparse", 100, 5, 0, 0); - nerrors += status < 0 ? 1 : 0; - status = test_sparse(file, "sparse", 100, 3, 4, 0); - nerrors += status < 0 ? 1 : 0; - status = test_sparse(file, "sparse", 100, 2, 3, 4); - nerrors += status < 0 ? 1 : 0; - } - if (size_of_test & TEST_MEDIUM) { - status = test_sparse(file, "sparse", 1000, 30, 0, 0); - nerrors += status < 0 ? 1 : 0; - status = test_sparse(file, "sparse", 2000, 7, 3, 0); - nerrors += status < 0 ? 1 : 0; - status = test_sparse(file, "sparse", 2000, 4, 2, 3); - nerrors += status < 0 ? 1 : 0; - } - if (size_of_test & TEST_LARGE) { - status = test_sparse(file, "sparse", 800, 50, 50, 50); - nerrors += status < 0 ? 1 : 0; - } + /* Initialize chunk dimensions */ + for (u = 0; u < H5O_LAYOUT_NDIMS; u++) + chunk_dims[u]=TEST_CHUNK_SIZE; - /* Close the test file and exit */ - H5Pclose(fcpl); - H5Fclose(file); + /* + * Creation test: Creates empty objects with various raw data sizes + * and alignments. + */ + status = test_create(file, "create"); + nerrors += status < 0 ? 1 : 0; - if (nerrors) { - printf("***** %d I-STORE TEST%s FAILED! *****\n", - nerrors, 1 == nerrors ? "" : "S"); - exit(1); + if (size_of_test & TEST_SMALL) { + status = test_extend(file, "extend", 10, 0, 0); + nerrors += status < 0 ? 1 : 0; + status = test_extend(file, "extend", 10, 10, 0); + nerrors += status < 0 ? 1 : 0; + status = test_extend(file, "extend", 10, 10, 10); + nerrors += status < 0 ? 1 : 0; + } + if (size_of_test & TEST_MEDIUM) { + status = test_extend(file, "extend", 10000, 0, 0); + nerrors += status < 0 ? 1 : 0; + status = test_extend(file, "extend", 2500, 10, 0); + nerrors += status < 0 ? 1 : 0; + status = test_extend(file, "extend", 10, 400, 10); + nerrors += status < 0 ? 1 : 0; + } + if (size_of_test & TEST_SMALL) { + status = test_sparse(file, "sparse", 100, 5, 0, 0); + nerrors += status < 0 ? 1 : 0; + status = test_sparse(file, "sparse", 100, 3, 4, 0); + nerrors += status < 0 ? 1 : 0; + status = test_sparse(file, "sparse", 100, 2, 3, 4); + nerrors += status < 0 ? 1 : 0; + } + if (size_of_test & TEST_MEDIUM) { + status = test_sparse(file, "sparse", 1000, 30, 0, 0); + nerrors += status < 0 ? 1 : 0; + status = test_sparse(file, "sparse", 2000, 7, 3, 0); + nerrors += status < 0 ? 1 : 0; + status = test_sparse(file, "sparse", 2000, 4, 2, 3); + nerrors += status < 0 ? 1 : 0; + } + if (size_of_test & TEST_LARGE) { + status = test_sparse(file, "sparse", 800, 50, 50, 50); + nerrors += status < 0 ? 1 : 0; + } + + /* Close the test file and exit */ + H5Pclose(fcpl); + H5Fclose(file); + + if (nerrors) { + printf("***** %d I-STORE TEST%s FAILED! *****\n", + nerrors, 1 == nerrors ? "" : "S"); + exit(1); + } + + printf("All i-store tests passed.\n"); + h5_cleanup(FILENAME, fapl); + } + else + { + puts("All i-store tests skipped - Incompatible with current Virtual File Driver"); } - - printf("All i-store tests passed.\n"); - h5_cleanup(FILENAME, fapl); return 0; } diff --git a/test/lheap.c b/test/lheap.c index 33b52103b7..42d6bcee89 100644 --- a/test/lheap.c +++ b/test/lheap.c @@ -61,6 +61,7 @@ main(void) int i, j; /*miscellaneous counters */ char buf[1024]; /*the value to store */ const char *s; /*value to read */ + const char *envval = NULL; /*value from environment */ /* Reset library */ h5_reset(); @@ -103,52 +104,64 @@ main(void) * Test reading from the heap... */ - TESTING("local heap read"); - h5_fixname(FILENAME[0], fapl, filename, sizeof filename); - if ((file=H5Fopen(filename, H5F_ACC_RDONLY, fapl))<0) goto error; - if (NULL==(f=H5I_object(file))) { - H5_FAILED(); - H5Eprint_stack(H5E_DEFAULT, stdout); - goto error; + /* Don't run this test using the core file driver */ + envval = HDgetenv("HDF5_DRIVER"); + if (envval == NULL) + envval = "nomatch"; + if (HDstrcmp(envval, "core")) { + TESTING("local heap read"); + h5_fixname(FILENAME[0], fapl, filename, sizeof filename); + if ((file=H5Fopen(filename, H5F_ACC_RDONLY, fapl))<0) goto error; + if (NULL==(f=H5I_object(file))) { + H5_FAILED(); + H5Eprint_stack(H5E_DEFAULT, stdout); + goto error; + } + for (i=0; i4) buf[j] = '\0'; + + if (NULL == (heap = H5HL_protect(f, H5P_DATASET_XFER_DEFAULT, heap_addr))) { + H5_FAILED(); + H5Eprint_stack(H5E_DEFAULT, stdout); + goto error; + } + + if (NULL == (s = H5HL_offset_into(f, heap, obj[i]))) { + H5_FAILED(); + H5Eprint_stack(H5E_DEFAULT, stdout); + goto error; + } + + if (strcmp(s, buf)) { + H5_FAILED(); + printf(" i=%d, heap offset=%lu\n", i, (unsigned long)(obj[i])); + printf(" got: \"%s\"\n", s); + printf(" ans: \"%s\"\n", buf); + goto error; + } + + if (H5HL_unprotect(f, H5P_DATASET_XFER_DEFAULT, heap, heap_addr, H5AC__NO_FLAGS_SET) < 0) { + H5_FAILED(); + H5Eprint_stack(H5E_DEFAULT, stdout); + goto error; + } + } + + if (H5Fclose(file)<0) goto error; + PASSED(); + puts("All local heap tests passed."); + h5_cleanup(FILENAME, fapl); } - for (i=0; i4) buf[j] = '\0'; - - if (NULL == (heap = H5HL_protect(f, H5P_DATASET_XFER_DEFAULT, heap_addr))) { - H5_FAILED(); - H5Eprint_stack(H5E_DEFAULT, stdout); - goto error; - } - - if (NULL == (s = H5HL_offset_into(f, heap, obj[i]))) { - H5_FAILED(); - H5Eprint_stack(H5E_DEFAULT, stdout); - goto error; - } - - if (strcmp(s, buf)) { - H5_FAILED(); - printf(" i=%d, heap offset=%lu\n", i, (unsigned long)(obj[i])); - printf(" got: \"%s\"\n", s); - printf(" ans: \"%s\"\n", buf); - goto error; - } - - if (H5HL_unprotect(f, H5P_DATASET_XFER_DEFAULT, heap, heap_addr, H5AC__NO_FLAGS_SET) < 0) { - H5_FAILED(); - H5Eprint_stack(H5E_DEFAULT, stdout); - goto error; - } + else + { + SKIPPED(); + puts(" Test not compatible with current Virtual File Driver"); } - if (H5Fclose(file)<0) goto error; - PASSED(); - puts("All local heap tests passed."); - h5_cleanup(FILENAME, fapl); return 0; error: diff --git a/test/links.c b/test/links.c index a2da2e69f3..0e4f68067e 100644 --- a/test/links.c +++ b/test/links.c @@ -1459,38 +1459,49 @@ main(void) { int nerrors = 0; hid_t fapl; + const char *envval = NULL; - h5_reset(); - fapl = h5_fileaccess(); + envval = HDgetenv("HDF5_DRIVER"); + if (envval == NULL) + envval = "nomatch"; + if (HDstrcmp(envval, "core") && HDstrcmp(envval, "split")) { + h5_reset(); + fapl = h5_fileaccess(); - /* The tests... */ - nerrors += mklinks(fapl) < 0 ? 1 : 0; - nerrors += cklinks(fapl) < 0 ? 1 : 0; - nerrors += new_links(fapl) < 0 ? 1 : 0; - nerrors += ck_new_links(fapl) < 0 ? 1 : 0; - nerrors += long_links(fapl) < 0 ? 1 : 0; - nerrors += toomany(fapl) < 0 ? 1 : 0; + /* The tests... */ + nerrors += mklinks(fapl) < 0 ? 1 : 0; + nerrors += cklinks(fapl) < 0 ? 1 : 0; + nerrors += new_links(fapl) < 0 ? 1 : 0; + nerrors += ck_new_links(fapl) < 0 ? 1 : 0; + nerrors += long_links(fapl) < 0 ? 1 : 0; + nerrors += toomany(fapl) < 0 ? 1 : 0; - /* Test new H5L link creation routine */ + /* Test new H5L link creation routine */ #ifdef H5_GROUP_REVISION - nerrors += test_h5l_create(fapl); - nerrors += test_lcpl(fapl); + nerrors += test_h5l_create(fapl); + nerrors += test_lcpl(fapl); #endif - nerrors += test_move(fapl); - nerrors += test_copy(fapl); + nerrors += test_move(fapl); + nerrors += test_copy(fapl); #ifdef H5_GROUP_REVISION - nerrors += test_move_preserves(fapl); + nerrors += test_move_preserves(fapl); #endif - nerrors += test_compat(fapl); + nerrors += test_compat(fapl); - /* Results */ - if (nerrors) { - printf("***** %d LINK TEST%s FAILED! *****\n", - nerrors, 1 == nerrors ? "" : "S"); - exit(1); + /* Results */ + if (nerrors) { + printf("***** %d LINK TEST%s FAILED! *****\n", + nerrors, 1 == nerrors ? "" : "S"); + exit(1); + } + printf("All link tests passed.\n"); + h5_cleanup(FILENAME, fapl); + } + else + { + puts("All link tests skipped - Incompatible with current Virtual File Driver"); } - printf("All link tests passed.\n"); - h5_cleanup(FILENAME, fapl); return 0; + } diff --git a/test/mount.c b/test/mount.c index a456c7c818..8e5a903975 100644 --- a/test/mount.c +++ b/test/mount.c @@ -453,7 +453,7 @@ test_mntlnk(hid_t fapl) /*------------------------------------------------------------------------- * Function: test_move * - * Purpose: An object cannot be moved or renamed with in such a + * Purpose: An object cannot be moved or renamed with H5Gmove() in such a * way that the new location would be in a different file than * the original location. * @@ -486,9 +486,9 @@ test_move(hid_t fapl) if (H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT)<0) goto error; /* First rename an object in the mounted file, then try it across files */ - if (H5Lmove(file1, "/mnt1/rename_a/x", H5L_SAME_LOC, "/mnt1/rename_b/y", H5P_DEFAULT)<0) goto error; + if (H5Gmove(file1, "/mnt1/rename_a/x", "/mnt1/rename_b/y")<0) goto error; H5E_BEGIN_TRY { - status = H5Lmove(file1, "/mnt1/rename_b/y", H5L_SAME_LOC, "/y", H5P_DEFAULT); + status = H5Gmove(file1, "/mnt1/rename_b/y", "/y"); } H5E_END_TRY; if (status>=0) { H5_FAILED(); @@ -796,7 +796,7 @@ test_mvmpt(hid_t fapl) if (H5Fmount(file1, "/mnt_move_a", file2, H5P_DEFAULT)<0) TEST_ERROR /* Rename the mount point */ - if (H5Lmove(file1, "/mnt_move_a", H5L_SAME_LOC, "/mnt_move_b", H5P_DEFAULT)<0) TEST_ERROR + if (H5Gmove(file1, "/mnt_move_a", "/mnt_move_b")<0) TEST_ERROR /* Access something under the new name */ if (H5Gget_objinfo(file1, "/mnt_move_b/file2", TRUE, NULL)<0) TEST_ERROR @@ -864,7 +864,7 @@ test_interlink(hid_t fapl) /* Try an interfile hard link by renaming something */ H5E_BEGIN_TRY { - status = H5Lmove(file1, "/mnt1/file2", H5L_SAME_LOC, "/file2", H5P_DEFAULT); + status = H5Gmove(file1, "/mnt1/file2", "/file2"); } H5E_END_TRY; if (status>=0) { H5_FAILED(); @@ -1450,7 +1450,7 @@ test_mount_after_unmount(hid_t fapl) /* Rename object in file #3 that is "disconnected" from name hiearchy */ /* (It is "disconnected" because it's parent file has been unmounted) */ - if(H5Lmove(gidAMX,"M/Y",gidAMX,"M/Z", H5P_DEFAULT) < 0) + if(H5Gmove2(gidAMX,"M/Y",gidAMX,"M/Z") < 0) TEST_ERROR /* Close group in file #3 */ @@ -3823,45 +3823,56 @@ main(void) { int nerrors = 0; hid_t fapl = -1; + const char *envval = NULL; - h5_reset(); - fapl = h5_fileaccess(); - if (setup(fapl)<0) goto error; + envval = HDgetenv("HDF5_DRIVER"); + if (envval == NULL) + envval = "nomatch"; + if (HDstrcmp(envval, "core") && HDstrcmp(envval, "split")) { + h5_reset(); + fapl = h5_fileaccess(); + if (setup(fapl)<0) goto error; - nerrors += test_basic(fapl); - nerrors += test_illegal(fapl); - nerrors += test_hide(fapl); - nerrors += test_assoc(fapl); - nerrors += test_mntlnk(fapl); - nerrors += test_unlink(fapl); - nerrors += test_move(fapl); - nerrors += test_mvmpt(fapl); - nerrors += test_preopen(fapl); - nerrors += test_postopen(fapl); - nerrors += test_interlink(fapl); - nerrors += test_uniformity(fapl); - nerrors += test_close(fapl); - nerrors += test_mount_after_close(fapl); - nerrors += test_mount_after_unmount(fapl); - nerrors += test_missing_unmount(fapl); - nerrors += test_hold_open_file(fapl); - nerrors += test_hold_open_group(fapl); - nerrors += test_fcdegree_same(fapl); - nerrors += test_fcdegree_semi(fapl); - nerrors += test_fcdegree_strong(fapl); - nerrors += test_acc_perm(fapl); - nerrors += test_mult_mount(fapl); - nerrors += test_nested_survive(fapl); - nerrors += test_close_parent(fapl); - nerrors += test_cut_graph(fapl); - nerrors += test_symlink(fapl); + nerrors += test_basic(fapl); + nerrors += test_illegal(fapl); + nerrors += test_hide(fapl); + nerrors += test_assoc(fapl); + nerrors += test_mntlnk(fapl); + nerrors += test_unlink(fapl); + nerrors += test_move(fapl); + nerrors += test_mvmpt(fapl); + nerrors += test_preopen(fapl); + nerrors += test_postopen(fapl); + nerrors += test_interlink(fapl); + nerrors += test_uniformity(fapl); + nerrors += test_close(fapl); + nerrors += test_mount_after_close(fapl); + nerrors += test_mount_after_unmount(fapl); + nerrors += test_missing_unmount(fapl); + nerrors += test_hold_open_file(fapl); + nerrors += test_hold_open_group(fapl); + nerrors += test_fcdegree_same(fapl); + nerrors += test_fcdegree_semi(fapl); + nerrors += test_fcdegree_strong(fapl); + nerrors += test_acc_perm(fapl); + nerrors += test_mult_mount(fapl); + nerrors += test_nested_survive(fapl); + nerrors += test_close_parent(fapl); + nerrors += test_cut_graph(fapl); + nerrors += test_symlink(fapl); - if (nerrors) goto error; - puts("All mount tests passed."); - h5_cleanup(FILENAME, fapl); + if (nerrors) goto error; + puts("All mount tests passed."); + h5_cleanup(FILENAME, fapl); + } + else + { + puts("All mount tests skipped - Incompatible with current Virtual File Driver"); + } return 0; - error: - puts("***** MOUNT ERRORS *****"); - return 1; + error: + puts("***** MOUNT ERRORS *****"); + return 1; } + diff --git a/test/mtime.c b/test/mtime.c index da2fe63e1f..52a5a99363 100644 --- a/test/mtime.c +++ b/test/mtime.c @@ -65,63 +65,76 @@ main(void) H5G_stat_t sb1, sb2; signed char buf1[32], buf2[32]; char filename[1024]; - + const char *envval = NULL; h5_reset(); fapl = h5_fileaccess(); TESTING("modification time messages"); + envval = HDgetenv("HDF5_DRIVER"); + if (envval == NULL) + envval = "nomatch"; + if (HDstrcmp(envval, "core")) { + /* Create the file, create a dataset, then close the file */ + h5_fixname(FILENAME[0], fapl, filename, sizeof filename); + if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) + TEST_ERROR; + if ((space=H5Screate_simple(1, size, NULL))<0) TEST_ERROR; + if ((dset=H5Dcreate(file, "dset", H5T_NATIVE_SCHAR, space, H5P_DEFAULT))<0) + TEST_ERROR; + now = time(NULL); + if (H5Dclose(dset)<0) TEST_ERROR; + if (H5Sclose(space)<0) TEST_ERROR; + if (H5Fclose(file)<0) TEST_ERROR; - /* Create the file, create a dataset, then close the file */ - h5_fixname(FILENAME[0], fapl, filename, sizeof filename); - if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) - TEST_ERROR; - if ((space=H5Screate_simple(1, size, NULL))<0) TEST_ERROR; - if ((dset=H5Dcreate(file, "dset", H5T_NATIVE_SCHAR, space, H5P_DEFAULT))<0) - TEST_ERROR; - now = time(NULL); - if (H5Dclose(dset)<0) TEST_ERROR; - if (H5Sclose(space)<0) TEST_ERROR; - if (H5Fclose(file)<0) TEST_ERROR; + /* + * Open the file and get the modification time. We'll test the new + * H5Gget_objinfo() arguments too: being able to stat something without + * knowing its name. + */ + h5_fixname(FILENAME[0], fapl, filename, sizeof filename); + if ((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl))<0) TEST_ERROR; + if (H5Gget_objinfo(file, "dset", TRUE, &sb1)<0) TEST_ERROR; + if ((dset=H5Dopen(file, "dset"))<0) TEST_ERROR; + if (H5Gget_objinfo(dset, ".", TRUE, &sb2)<0) TEST_ERROR; + if (H5Dclose(dset)<0) TEST_ERROR; + if (H5Fclose(file)<0) TEST_ERROR; - /* - * Open the file and get the modification time. We'll test the new - * H5Gget_objinfo() arguments too: being able to stat something without - * knowing its name. - */ - h5_fixname(FILENAME[0], fapl, filename, sizeof filename); - if ((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl))<0) TEST_ERROR; - if (H5Gget_objinfo(file, "dset", TRUE, &sb1)<0) TEST_ERROR; - if ((dset=H5Dopen(file, "dset"))<0) TEST_ERROR; - if (H5Gget_objinfo(dset, ".", TRUE, &sb2)<0) TEST_ERROR; - if (H5Dclose(dset)<0) TEST_ERROR; - if (H5Fclose(file)<0) TEST_ERROR; + /* Compare times from the two ways of calling H5Gget_objinfo() */ + if (HDmemcmp(&sb1.objno, &sb2.objno, sizeof(sb1.objno)) || sb1.mtime!=sb2.mtime) { + H5_FAILED(); + puts(" Calling H5Gget_objinfo() with the dataset ID returned"); + puts(" different values than calling it with a file and dataset"); + puts(" name."); + goto error; + } - /* Compare times from the two ways of calling H5Gget_objinfo() */ - if (HDmemcmp(&sb1.objno, &sb2.objno, sizeof(sb1.objno)) || sb1.mtime!=sb2.mtime) { - H5_FAILED(); - puts(" Calling H5Gget_objinfo() 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==sb1.mtime) { + SKIPPED(); + puts(" The modification time could not be decoded on this OS."); + puts(" Modification times will be mantained in the file but"); + puts(" cannot be queried on this system. See H5O_mtime_decode()."); + return 0; + } else if (fabs(HDdifftime(now, sb1.mtime))>60.0) { + H5_FAILED(); + tm = localtime(&(sb1.mtime)); + strftime((char*)buf1, sizeof buf1, "%Y-%m-%d %H:%M:%S", tm); + tm = localtime(&now); + strftime((char*)buf2, sizeof buf2, "%Y-%m-%d %H:%M:%S", tm); + printf(" got: %s\n ans: %s\n", buf1, buf2); + goto error; + } + PASSED(); + } + else + { + SKIPPED(); + puts(" Test not compatible with current Virtual File Driver"); } - /* Compare times -- they must be within 60 seconds of one another */ - if (0==sb1.mtime) { - SKIPPED(); - puts(" The modification time could not be decoded on this OS."); - puts(" Modification times will be mantained in the file but"); - puts(" cannot be queried on this system. See H5O_mtime_decode()."); - return 0; - } else if (fabs(HDdifftime(now, sb1.mtime))>60.0) { - H5_FAILED(); - tm = localtime(&(sb1.mtime)); - strftime((char*)buf1, sizeof buf1, "%Y-%m-%d %H:%M:%S", tm); - tm = localtime(&now); - strftime((char*)buf2, sizeof buf2, "%Y-%m-%d %H:%M:%S", tm); - printf(" got: %s\n ans: %s\n", buf1, buf2); - goto error; - } - PASSED(); + + + /* Check opening existing file with old-style modification time information * and make certain that the time is correct diff --git a/test/ntypes.c b/test/ntypes.c index ef2c2b234e..881d34b50e 100644 --- a/test/ntypes.c +++ b/test/ntypes.c @@ -84,178 +84,188 @@ test_atomic_dtype(hid_t file) int i, j, n; hsize_t dims[2]; void *tmp; + const char *envval = NULL; TESTING("atomic datatype"); - - /* Initialize the dataset */ - for (i = n = 0; i < DIM0; i++) { - for (j = 0; j < DIM1; j++) { - ipoints2[i][j] = n++; - } - } - - /* Create the data space */ - dims[0] = DIM0; - dims[1] = DIM1; - if ((space = H5Screate_simple(2, dims, NULL))<0) TEST_ERROR; - - /*------------------- Test data values ------------------------*/ - /* Create the dataset */ - if ((dataset = H5Dcreate(file, DSET_ATOMIC_NAME_1, H5T_STD_I32BE, space, - H5P_DEFAULT))<0) TEST_ERROR; - - /* Write the data to the dataset */ - if (H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ipoints2)<0) - TEST_ERROR; - - /* Close dataset */ - if(H5Dclose(dataset)<0) TEST_ERROR; - - /* Open dataset again to check H5Tget_native_type */ - if((dataset=H5Dopen(file, DSET_ATOMIC_NAME_1))<0) TEST_ERROR; - - if((dtype=H5Dget_type(dataset))<0) TEST_ERROR; - - if((native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT))<0) - TEST_ERROR; - - /* Verify the datatype retrieved and converted */ - if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_INT)) - TEST_ERROR; - if(H5Tget_size(native_type) < H5Tget_size(H5T_STD_I32BE)) - TEST_ERROR; - if(H5T_INTEGER!=H5Tget_class(native_type)) - TEST_ERROR; - - /* Read the dataset back. The temporary buffer is for special platforms - * like Cray. */ - tmp = malloc((size_t)(DIM0*DIM1*H5Tget_size(native_type))); - - if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp)<0) - TEST_ERROR; - - /* Copy data from temporary buffer to destination buffer */ - memcpy(icheck2, tmp, (size_t)(DIM0*DIM1*H5Tget_size(native_type))); - free(tmp); - - /* Convert to the integer type */ - if(H5Tconvert(native_type, H5T_NATIVE_INT, (DIM0*DIM1), icheck2, NULL, H5P_DEFAULT)<0) - TEST_ERROR; - - /* Check that the values read are the same as the values written */ - for (i = 0; i < DIM0; i++) { - for (j = 0; j < DIM1; j++) { - if (ipoints2[i][j] != icheck2[i][j]) { - H5_FAILED(); - printf(" Read different values than written.\n"); - printf(" At index %d,%d\n", i, j); - goto error; + envval = HDgetenv("HDF5_DRIVER"); + if (envval == NULL) + envval = "nomatch"; + if (HDstrcmp(envval, "split") && HDstrcmp(envval, "multi")) { + /* Initialize the dataset */ + for (i = n = 0; i < DIM0; i++) { + for (j = 0; j < DIM1; j++) { + ipoints2[i][j] = n++; } } + + /* Create the data space */ + dims[0] = DIM0; + dims[1] = DIM1; + if ((space = H5Screate_simple(2, dims, NULL))<0) TEST_ERROR; + + /*------------------- Test data values ------------------------*/ + /* Create the dataset */ + if ((dataset = H5Dcreate(file, DSET_ATOMIC_NAME_1, H5T_STD_I32BE, space, + H5P_DEFAULT))<0) TEST_ERROR; + + /* Write the data to the dataset */ + if (H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ipoints2)<0) + TEST_ERROR; + + /* Close dataset */ + if(H5Dclose(dataset)<0) TEST_ERROR; + + /* Open dataset again to check H5Tget_native_type */ + if((dataset=H5Dopen(file, DSET_ATOMIC_NAME_1))<0) TEST_ERROR; + + if((dtype=H5Dget_type(dataset))<0) TEST_ERROR; + + if((native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT))<0) + TEST_ERROR; + + /* Verify the datatype retrieved and converted */ + if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_INT)) + TEST_ERROR; + if(H5Tget_size(native_type) < H5Tget_size(H5T_STD_I32BE)) + TEST_ERROR; + if(H5T_INTEGER!=H5Tget_class(native_type)) + TEST_ERROR; + + /* Read the dataset back. The temporary buffer is for special platforms + * like Cray. */ + tmp = malloc((size_t)(DIM0*DIM1*H5Tget_size(native_type))); + + if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp)<0) + TEST_ERROR; + + /* Copy data from temporary buffer to destination buffer */ + memcpy(icheck2, tmp, (size_t)(DIM0*DIM1*H5Tget_size(native_type))); + free(tmp); + + /* Convert to the integer type */ + if(H5Tconvert(native_type, H5T_NATIVE_INT, (DIM0*DIM1), icheck2, NULL, H5P_DEFAULT)<0) + TEST_ERROR; + + /* Check that the values read are the same as the values written */ + for (i = 0; i < DIM0; i++) { + for (j = 0; j < DIM1; j++) { + if (ipoints2[i][j] != icheck2[i][j]) { + H5_FAILED(); + printf(" Read different values than written.\n"); + printf(" At index %d,%d\n", i, j); + goto error; + } + } + } + + if(H5Dclose(dataset)<0) TEST_ERROR; + if(H5Tclose(native_type)<0) TEST_ERROR; + if(H5Tclose(dtype)<0) TEST_ERROR; + + /*------------------ Test different data types ----------------*/ + + /* Create the dataset of H5T_STD_I64LE */ + if ((dataset = H5Dcreate(file, DSET_ATOMIC_NAME_2, H5T_STD_I64LE, space, + H5P_DEFAULT))<0) TEST_ERROR; + + if((dtype=H5Dget_type(dataset))<0) TEST_ERROR; + + if((native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT))<0) + TEST_ERROR; + + /* Verify the datatype retrieved and converted */ + if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_LLONG)) + TEST_ERROR; + if(H5Tget_size(native_type) < H5Tget_size(H5T_STD_I64LE)) + TEST_ERROR; + if(H5T_INTEGER!=H5Tget_class(native_type)) + TEST_ERROR; + + if(H5Dclose(dataset)<0) TEST_ERROR; + if(H5Tclose(native_type)<0) TEST_ERROR; + if(H5Tclose(dtype)<0) TEST_ERROR; + + + /* Create the dataset of H5T_STD_I8LE */ + if ((dataset = H5Dcreate(file, DSET_ATOMIC_NAME_3, H5T_STD_I8LE, space, + H5P_DEFAULT))<0) TEST_ERROR; + + if((dtype=H5Dget_type(dataset))<0) TEST_ERROR; + + if((native_type=H5Tget_native_type(dtype, H5T_DIR_ASCEND))<0) + TEST_ERROR; + + /* Verify the datatype retrieved and converted */ + if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_CHAR)) + TEST_ERROR; + if(H5Tget_size(native_type) < H5Tget_size(H5T_STD_I8LE)) + TEST_ERROR; + if(H5T_INTEGER!=H5Tget_class(native_type)) + TEST_ERROR; + + if(H5Dclose(dataset)<0) TEST_ERROR; + if(H5Tclose(native_type)<0) TEST_ERROR; + if(H5Tclose(dtype)<0) TEST_ERROR; + + + /* Create the dataset of H5T_IEEE_F32BE */ + if ((dataset = H5Dcreate(file, DSET_ATOMIC_NAME_4, H5T_IEEE_F32BE, space, + H5P_DEFAULT))<0) TEST_ERROR; + + if((dtype=H5Dget_type(dataset))<0) TEST_ERROR; + + if((native_type=H5Tget_native_type(dtype, H5T_DIR_DESCEND))<0) + TEST_ERROR; + + /* Verify the datatype retrieved and converted */ + if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_FLOAT)) + TEST_ERROR; + if(H5Tget_size(native_type) < H5Tget_size(H5T_IEEE_F32BE)) + TEST_ERROR; + if(H5T_FLOAT!=H5Tget_class(native_type)) + TEST_ERROR; + + if(H5Dclose(dataset)<0) TEST_ERROR; + if(H5Tclose(native_type)<0) TEST_ERROR; + if(H5Tclose(dtype)<0) TEST_ERROR; + + + /* Create the dataset of H5T_IEEE_F64BE */ + if ((dataset = H5Dcreate(file, DSET_ATOMIC_NAME_5, H5T_IEEE_F64BE, space, + H5P_DEFAULT))<0) TEST_ERROR; + + if((dtype=H5Dget_type(dataset))<0) TEST_ERROR; + + if((native_type=H5Tget_native_type(dtype, H5T_DIR_DESCEND))<0) + TEST_ERROR; + + /* Verify the datatype retrieved and converted */ + if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_DOUBLE)) + TEST_ERROR; + if(H5Tget_size(native_type) < H5Tget_size(H5T_IEEE_F64BE)) + TEST_ERROR; + if(H5T_FLOAT!=H5Tget_class(native_type)) + TEST_ERROR; + + if(H5Dclose(dataset)<0) TEST_ERROR; + if(H5Tclose(native_type)<0) TEST_ERROR; + if(H5Tclose(dtype)<0) TEST_ERROR; + + + /* Close dataspace */ + if(H5Sclose(space)<0) TEST_ERROR; + + PASSED(); + } + else + { + SKIPPED(); + puts(" Test not compatible with current Virtual File Driver"); } - - if(H5Dclose(dataset)<0) TEST_ERROR; - if(H5Tclose(native_type)<0) TEST_ERROR; - if(H5Tclose(dtype)<0) TEST_ERROR; - - /*------------------ Test different data types ----------------*/ - - /* Create the dataset of H5T_STD_I64LE */ - if ((dataset = H5Dcreate(file, DSET_ATOMIC_NAME_2, H5T_STD_I64LE, space, - H5P_DEFAULT))<0) TEST_ERROR; - - if((dtype=H5Dget_type(dataset))<0) TEST_ERROR; - - if((native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT))<0) - TEST_ERROR; - - /* Verify the datatype retrieved and converted */ - if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_LLONG)) - TEST_ERROR; - if(H5Tget_size(native_type) < H5Tget_size(H5T_STD_I64LE)) - TEST_ERROR; - if(H5T_INTEGER!=H5Tget_class(native_type)) - TEST_ERROR; - - if(H5Dclose(dataset)<0) TEST_ERROR; - if(H5Tclose(native_type)<0) TEST_ERROR; - if(H5Tclose(dtype)<0) TEST_ERROR; - - - /* Create the dataset of H5T_STD_I8LE */ - if ((dataset = H5Dcreate(file, DSET_ATOMIC_NAME_3, H5T_STD_I8LE, space, - H5P_DEFAULT))<0) TEST_ERROR; - - if((dtype=H5Dget_type(dataset))<0) TEST_ERROR; - - if((native_type=H5Tget_native_type(dtype, H5T_DIR_ASCEND))<0) - TEST_ERROR; - - /* Verify the datatype retrieved and converted */ - if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_CHAR)) - TEST_ERROR; - if(H5Tget_size(native_type) < H5Tget_size(H5T_STD_I8LE)) - TEST_ERROR; - if(H5T_INTEGER!=H5Tget_class(native_type)) - TEST_ERROR; - - if(H5Dclose(dataset)<0) TEST_ERROR; - if(H5Tclose(native_type)<0) TEST_ERROR; - if(H5Tclose(dtype)<0) TEST_ERROR; - - - /* Create the dataset of H5T_IEEE_F32BE */ - if ((dataset = H5Dcreate(file, DSET_ATOMIC_NAME_4, H5T_IEEE_F32BE, space, - H5P_DEFAULT))<0) TEST_ERROR; - - if((dtype=H5Dget_type(dataset))<0) TEST_ERROR; - - if((native_type=H5Tget_native_type(dtype, H5T_DIR_DESCEND))<0) - TEST_ERROR; - - /* Verify the datatype retrieved and converted */ - if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_FLOAT)) - TEST_ERROR; - if(H5Tget_size(native_type) < H5Tget_size(H5T_IEEE_F32BE)) - TEST_ERROR; - if(H5T_FLOAT!=H5Tget_class(native_type)) - TEST_ERROR; - - if(H5Dclose(dataset)<0) TEST_ERROR; - if(H5Tclose(native_type)<0) TEST_ERROR; - if(H5Tclose(dtype)<0) TEST_ERROR; - - - /* Create the dataset of H5T_IEEE_F64BE */ - if ((dataset = H5Dcreate(file, DSET_ATOMIC_NAME_5, H5T_IEEE_F64BE, space, - H5P_DEFAULT))<0) TEST_ERROR; - - if((dtype=H5Dget_type(dataset))<0) TEST_ERROR; - - if((native_type=H5Tget_native_type(dtype, H5T_DIR_DESCEND))<0) - TEST_ERROR; - - /* Verify the datatype retrieved and converted */ - if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_DOUBLE)) - TEST_ERROR; - if(H5Tget_size(native_type) < H5Tget_size(H5T_IEEE_F64BE)) - TEST_ERROR; - if(H5T_FLOAT!=H5Tget_class(native_type)) - TEST_ERROR; - - if(H5Dclose(dataset)<0) TEST_ERROR; - if(H5Tclose(native_type)<0) TEST_ERROR; - if(H5Tclose(dtype)<0) TEST_ERROR; - - - /* Close dataspace */ - if(H5Sclose(space)<0) TEST_ERROR; - - PASSED(); return 0; - error: - return -1; + error: + return -1; } @@ -1878,119 +1888,130 @@ test_refer_dtype(hid_t file) hsize_t dims1[] = {1}; hobj_ref_t *wbuf, /* buffer to write to disk */ *rbuf; /* buffer read from disk */ + const char *envval = NULL; /* Output message about test being performed */ TESTING("reference datatype"); + envval = HDgetenv("HDF5_DRIVER"); + if (envval == NULL) + envval = "nomatch"; + if (HDstrcmp(envval, "multi")) { + /* Allocate write & read buffers */ + wbuf=HDmalloc(MAX(sizeof(unsigned),sizeof(hobj_ref_t))); + rbuf=HDmalloc(MAX(sizeof(unsigned),sizeof(hobj_ref_t))); - /* Allocate write & read buffers */ - wbuf=HDmalloc(MAX(sizeof(unsigned),sizeof(hobj_ref_t))); - rbuf=HDmalloc(MAX(sizeof(unsigned),sizeof(hobj_ref_t))); + /* Create dataspace for datasets */ + if((sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL))<0) + TEST_ERROR; - /* Create dataspace for datasets */ - if((sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL))<0) - TEST_ERROR; + /* Create a group */ + if((group=H5Gcreate(file,"Group1",(size_t)-1))<0) + TEST_ERROR; - /* Create a group */ - if((group=H5Gcreate(file,"Group1",(size_t)-1))<0) - TEST_ERROR; + /* Create a datatype to refer to */ + if((tid1 = H5Tcreate (H5T_COMPOUND, sizeof(s1_t)))<0) + TEST_ERROR; - /* Create a datatype to refer to */ - if((tid1 = H5Tcreate (H5T_COMPOUND, sizeof(s1_t)))<0) - TEST_ERROR; + /* Insert fields */ + if(H5Tinsert (tid1, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT)<0) + TEST_ERROR; - /* Insert fields */ - if(H5Tinsert (tid1, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT)<0) - TEST_ERROR; + if(H5Tinsert (tid1, "b", HOFFSET(s1_t,b), H5T_NATIVE_INT)<0) + TEST_ERROR; - if(H5Tinsert (tid1, "b", HOFFSET(s1_t,b), H5T_NATIVE_INT)<0) - TEST_ERROR; + if(H5Tinsert (tid1, "c", HOFFSET(s1_t,c), H5T_NATIVE_FLOAT)<0) + TEST_ERROR; - if(H5Tinsert (tid1, "c", HOFFSET(s1_t,c), H5T_NATIVE_FLOAT)<0) - TEST_ERROR; + /* Save datatype for later */ + if(H5Tcommit (group, "Datatype1", tid1)<0) + TEST_ERROR; - /* Save datatype for later */ - if(H5Tcommit (group, "Datatype1", tid1)<0) - TEST_ERROR; + /* Close datatype */ + if(H5Tclose(tid1)<0) + TEST_ERROR; - /* Close datatype */ - if(H5Tclose(tid1)<0) - TEST_ERROR; + /* Close group */ + if(H5Gclose(group)<0) + TEST_ERROR; - /* Close group */ - if(H5Gclose(group)<0) - TEST_ERROR; + /* Create a dataset */ + if((dataset=H5Dcreate(file,"Dataset3",H5T_STD_REF_OBJ,sid1,H5P_DEFAULT))<0) + TEST_ERROR; - /* Create a dataset */ - if((dataset=H5Dcreate(file,"Dataset3",H5T_STD_REF_OBJ,sid1,H5P_DEFAULT))<0) - TEST_ERROR; + /* Create reference to named datatype */ + if(H5Rcreate(wbuf,file,"/Group1/Datatype1",H5R_OBJECT,-1)<0) + TEST_ERROR; + if(H5Rget_obj_type(dataset,H5R_OBJECT,wbuf)!=H5G_TYPE) + TEST_ERROR; - /* Create reference to named datatype */ - if(H5Rcreate(wbuf,file,"/Group1/Datatype1",H5R_OBJECT,-1)<0) - TEST_ERROR; - if(H5Rget_obj_type(dataset,H5R_OBJECT,wbuf)!=H5G_TYPE) - TEST_ERROR; + /* Write selection to disk */ + if(H5Dwrite(dataset,H5T_STD_REF_OBJ,H5S_ALL,H5S_ALL,H5P_DEFAULT,wbuf)<0) + TEST_ERROR; - /* Write selection to disk */ - if(H5Dwrite(dataset,H5T_STD_REF_OBJ,H5S_ALL,H5S_ALL,H5P_DEFAULT,wbuf)<0) - TEST_ERROR; + /* Close disk dataspace */ + if(H5Sclose(sid1)<0) + TEST_ERROR; - /* Close disk dataspace */ - if(H5Sclose(sid1)<0) - TEST_ERROR; - - /* Close Dataset */ - if(H5Dclose(dataset)<0) - TEST_ERROR; + /* Close Dataset */ + if(H5Dclose(dataset)<0) + TEST_ERROR; - /* Open the dataset */ - if((dataset=H5Dopen(file,"/Dataset3"))<0) - TEST_ERROR; + /* Open the dataset */ + if((dataset=H5Dopen(file,"/Dataset3"))<0) + TEST_ERROR; - /* Get datatype for dataset */ - if((dtype = H5Dget_type(dataset))<0) - TEST_ERROR; + /* Get datatype for dataset */ + if((dtype = H5Dget_type(dataset))<0) + TEST_ERROR; - /* Construct native type */ - if((native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT))<0) - TEST_ERROR; + /* Construct native type */ + if((native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT))<0) + TEST_ERROR; - /* Check if the data type is equal */ - if(!H5Tequal(native_type, H5T_STD_REF_OBJ)) - TEST_ERROR; + /* Check if the data type is equal */ + if(!H5Tequal(native_type, H5T_STD_REF_OBJ)) + TEST_ERROR; - /* Read selection from disk */ - if(H5Dread(dataset,native_type,H5S_ALL,H5S_ALL,H5P_DEFAULT,rbuf)<0) - TEST_ERROR; + /* Read selection from disk */ + if(H5Dread(dataset,native_type,H5S_ALL,H5S_ALL,H5P_DEFAULT,rbuf)<0) + TEST_ERROR; - /* Open datatype object */ - if((tid1 = H5Rdereference(dataset,H5R_OBJECT,rbuf))<0) - TEST_ERROR; + /* Open datatype object */ + if((tid1 = H5Rdereference(dataset,H5R_OBJECT,rbuf))<0) + TEST_ERROR; - /* Verify correct datatype */ - if(H5Tget_class(tid1)!=H5T_COMPOUND) - TEST_ERROR; + /* Verify correct datatype */ + if(H5Tget_class(tid1)!=H5T_COMPOUND) + TEST_ERROR; - if(H5Tget_nmembers(tid1)!=3) - TEST_ERROR; + if(H5Tget_nmembers(tid1)!=3) + TEST_ERROR; - /* Close datatype */ - if(H5Tclose(tid1)<0) - TEST_ERROR; + /* Close datatype */ + if(H5Tclose(tid1)<0) + TEST_ERROR; - /* Close Dataset */ - if(H5Dclose(dataset)<0) - TEST_ERROR; + /* Close Dataset */ + if(H5Dclose(dataset)<0) + TEST_ERROR; - /* Free memory buffers */ - free(wbuf); - free(rbuf); + /* Free memory buffers */ + free(wbuf); + free(rbuf); - PASSED(); + PASSED(); + } + else + { + SKIPPED(); + puts(" Test not compatible with current Virtual File Driver"); + } return 0; -error: - return -1; + error: + return -1; + } /* test_refer_dtype() */ diff --git a/test/objcopy.c b/test/objcopy.c index 9b2c5bf72f..a96d5b050f 100755 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -6347,84 +6347,94 @@ main(void) { int nerrors = 0; hid_t fapl; + const char *envval = NULL; + + /* Don't run this test using the core, split, or multi file drivers */ + envval = HDgetenv("HDF5_DRIVER"); + if (envval == NULL) + envval = "nomatch"; + if (HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi")) { + /* Setup */ + h5_reset(); + fapl = h5_fileaccess(); - /* Setup */ - h5_reset(); - fapl = h5_fileaccess(); - - /* The tests... */ - nerrors += test_copy_named_datatype(fapl); - nerrors += test_copy_named_datatype_vl(fapl); - nerrors += test_copy_named_datatype_vl_vl(fapl); - nerrors += test_copy_dataset_simple(fapl); - nerrors += test_copy_dataset_simple_empty(fapl); - nerrors += test_copy_dataset_compound(fapl); - nerrors += test_copy_dataset_chunked(fapl); - nerrors += test_copy_dataset_chunked_empty(fapl); - nerrors += test_copy_dataset_chunked_sparse(fapl); - nerrors += test_copy_dataset_compressed(fapl); - nerrors += test_copy_dataset_compact(fapl); - nerrors += test_copy_dataset_external(fapl); - nerrors += test_copy_dataset_named_dtype(fapl); - nerrors += test_copy_dataset_named_dtype_hier(fapl); - nerrors += test_copy_dataset_named_dtype_hier_outside(fapl); - nerrors += test_copy_dataset_multi_ohdr_chunks(fapl); - nerrors += test_copy_dataset_attr_named_dtype(fapl); - nerrors += test_copy_dataset_contig_vl(fapl); - nerrors += test_copy_dataset_chunked_vl(fapl); - nerrors += test_copy_dataset_compact_vl(fapl); - nerrors += test_copy_dataset_compressed_vl(fapl); - nerrors += test_copy_attribute_vl(fapl); - nerrors += test_copy_dataset_compact_named_vl(fapl); - nerrors += test_copy_dataset_contig_named_vl(fapl); - nerrors += test_copy_dataset_chunked_named_vl(fapl); - nerrors += test_copy_dataset_compressed_named_vl(fapl); - nerrors += test_copy_dataset_compact_vl_vl(fapl); - nerrors += test_copy_dataset_contig_vl_vl(fapl); - nerrors += test_copy_dataset_chunked_vl_vl(fapl); - nerrors += test_copy_dataset_compressed_vl_vl(fapl); - nerrors += test_copy_group_empty(fapl); - nerrors += test_copy_group(fapl); - nerrors += test_copy_group_deep(fapl); - nerrors += test_copy_group_loop(fapl); - nerrors += test_copy_group_wide_loop(fapl); - nerrors += test_copy_group_links(fapl); - nerrors += test_copy_soft_link(fapl); - nerrors += test_copy_exist(fapl); - nerrors += test_copy_path(fapl); - nerrors += test_copy_same_file_named_datatype(fapl); - nerrors += test_copy_option(fapl, H5G_COPY_WITHOUT_ATTR_FLAG, FALSE, "H5Gcopy(): without attributes"); + /* The tests... */ + nerrors += test_copy_named_datatype(fapl); + nerrors += test_copy_named_datatype_vl(fapl); + nerrors += test_copy_named_datatype_vl_vl(fapl); + nerrors += test_copy_dataset_simple(fapl); + nerrors += test_copy_dataset_simple_empty(fapl); + nerrors += test_copy_dataset_compound(fapl); + nerrors += test_copy_dataset_chunked(fapl); + nerrors += test_copy_dataset_chunked_empty(fapl); + nerrors += test_copy_dataset_chunked_sparse(fapl); + nerrors += test_copy_dataset_compressed(fapl); + nerrors += test_copy_dataset_compact(fapl); + nerrors += test_copy_dataset_external(fapl); + nerrors += test_copy_dataset_named_dtype(fapl); + nerrors += test_copy_dataset_named_dtype_hier(fapl); + nerrors += test_copy_dataset_named_dtype_hier_outside(fapl); + nerrors += test_copy_dataset_multi_ohdr_chunks(fapl); + nerrors += test_copy_dataset_attr_named_dtype(fapl); + nerrors += test_copy_dataset_contig_vl(fapl); + nerrors += test_copy_dataset_chunked_vl(fapl); + nerrors += test_copy_dataset_compact_vl(fapl); + nerrors += test_copy_dataset_compressed_vl(fapl); + nerrors += test_copy_attribute_vl(fapl); + nerrors += test_copy_dataset_compact_named_vl(fapl); + nerrors += test_copy_dataset_contig_named_vl(fapl); + nerrors += test_copy_dataset_chunked_named_vl(fapl); + nerrors += test_copy_dataset_compressed_named_vl(fapl); + nerrors += test_copy_dataset_compact_vl_vl(fapl); + nerrors += test_copy_dataset_contig_vl_vl(fapl); + nerrors += test_copy_dataset_chunked_vl_vl(fapl); + nerrors += test_copy_dataset_compressed_vl_vl(fapl); + nerrors += test_copy_group_empty(fapl); + nerrors += test_copy_group(fapl); + nerrors += test_copy_group_deep(fapl); + nerrors += test_copy_group_loop(fapl); + nerrors += test_copy_group_wide_loop(fapl); + nerrors += test_copy_group_links(fapl); + nerrors += test_copy_soft_link(fapl); + nerrors += test_copy_exist(fapl); + nerrors += test_copy_path(fapl); + nerrors += test_copy_same_file_named_datatype(fapl); + nerrors += test_copy_option(fapl, H5G_COPY_WITHOUT_ATTR_FLAG, FALSE, "H5Gcopy(): without attributes"); #ifdef H5_GROUP_REVISION - nerrors += test_copy_option(fapl, 0, TRUE, "H5Gcopy(): with missing groups"); + nerrors += test_copy_option(fapl, 0, TRUE, "H5Gcopy(): with missing groups"); #endif /* H5_GROUP_REVISION */ - nerrors += test_copy_option(fapl, H5G_COPY_EXPAND_SOFT_LINK_FLAG, FALSE, "H5Gcopy(): expand soft link"); - nerrors += test_copy_option(fapl, H5G_COPY_SHALLOW_HIERARCHY_FLAG, FALSE, "H5Gcopy(): shallow group copy"); + nerrors += test_copy_option(fapl, H5G_COPY_EXPAND_SOFT_LINK_FLAG, FALSE, "H5Gcopy(): expand soft link"); + nerrors += test_copy_option(fapl, H5G_COPY_SHALLOW_HIERARCHY_FLAG, FALSE, "H5Gcopy(): shallow group copy"); -/* TODO: not implemented - nerrors += test_copy_option(fapl, H5G_COPY_EXPAND_EXT_LINK_FLAG, FALSE, "H5Gcopy: expand external link"); - nerrors += test_copy_option(fapl, H5G_COPY_EXPAND_EXPAND_OBJ_REFERENCE_FLAG, FALSE, "H5Gcopy: expand object reference"); -*/ + /* TODO: not implemented + nerrors += test_copy_option(fapl, H5G_COPY_EXPAND_EXT_LINK_FLAG, FALSE, "H5Gcopy: expand external link"); + nerrors += test_copy_option(fapl, H5G_COPY_EXPAND_EXPAND_OBJ_REFERENCE_FLAG, FALSE, "H5Gcopy: expand object reference"); + */ -/* TODO: Add more tests for copying objects in same file */ + /* TODO: Add more tests for copying objects in same file */ -/* TODO: Add more tests for copying objects in mounted files - nerrors += test_copy_mount(fapl); -*/ + /* TODO: Add more tests for copying objects in mounted files + nerrors += test_copy_mount(fapl); + */ - /* Reset file address checking info */ - addr_reset(); + /* Reset file address checking info */ + addr_reset(); - /* Results */ - if (nerrors) { - printf("***** %d OBJECT COPY TEST%s FAILED! *****\n", - nerrors, (1 == nerrors ? "" : "S")); - exit(1); + /* Results */ + if (nerrors) { + printf("***** %d OBJECT COPY TEST%s FAILED! *****\n", + nerrors, (1 == nerrors ? "" : "S")); + exit(1); + } + + puts ("All object copying tests passed."); + h5_cleanup(FILENAME, fapl); + } + else + { + puts("All object copying tests skipped - Incompatible with current Virtual File Driver"); } - - puts ("All object copying tests passed."); - h5_cleanup(FILENAME, fapl); - return 0; } /* main */ diff --git a/test/ohdr.c b/test/ohdr.c index 44b6361424..6dd2b79c59 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -66,7 +66,8 @@ main(void) H5O_loc_t oh_loc; time_t time_new, ro; int i; - + const char *envval = NULL; + /* Reset library */ h5_reset(); fapl = h5_fileaccess(); @@ -286,37 +287,47 @@ main(void) /* Test reading dataset with undefined object header message */ TESTING("reading object with unknown header message"); - { - char testfile[512]=""; - char *srcdir = getenv("srcdir"); + envval = HDgetenv("HDF5_DRIVER"); + if (envval == NULL) + envval = "nomatch"; + if (HDstrcmp(envval, "core") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "split") && HDstrcmp(envval, "family")) { + { + char testfile[512]=""; + char *srcdir = getenv("srcdir"); - /* Build path to test file */ - if (srcdir && ((HDstrlen(srcdir) + HDstrlen(FILE_BOGUS) + 1) < sizeof(testfile))){ - HDstrcpy(testfile, srcdir); - HDstrcat(testfile, "/"); - } - HDstrcat(testfile, FILE_BOGUS); + /* Build path to test file */ + if (srcdir && ((HDstrlen(srcdir) + HDstrlen(FILE_BOGUS) + 1) < sizeof(testfile))){ + HDstrcpy(testfile, srcdir); + HDstrcat(testfile, "/"); + } + HDstrcat(testfile, FILE_BOGUS); - if ((file=H5Fopen(testfile, H5F_ACC_RDONLY, fapl))<0) - goto error; + if ((file=H5Fopen(testfile, H5F_ACC_RDONLY, fapl))<0) + goto error; - /* Open the dataset with the unknown header message (generated with gen_bogus.c) */ - if((dset=H5Dopen(file,"/Dataset1"))<0) - goto error; - if (H5Dclose(dset)<0) goto error; + /* Open the dataset with the unknown header message (generated with gen_bogus.c) */ + if((dset=H5Dopen(file,"/Dataset1"))<0) + goto error; + if (H5Dclose(dset)<0) goto error; - if (H5Fclose(file)<0) goto error; + if (H5Fclose(file)<0) goto error; + } + PASSED(); + } + else + { + SKIPPED(); + puts(" Test not compatible with current Virtual File Driver"); } - PASSED(); puts("All object header tests passed."); h5_cleanup(FILENAME, fapl); return 0; - error: - puts("*** TESTS FAILED ***"); - H5E_BEGIN_TRY { - H5Fclose(file); - } H5E_END_TRY; - return 1; + error: + puts("*** TESTS FAILED ***"); + H5E_BEGIN_TRY { + H5Fclose(file); + } H5E_END_TRY; + return 1; } diff --git a/test/reserved.c b/test/reserved.c index d664a36351..a0c0f9b484 100755 --- a/test/reserved.c +++ b/test/reserved.c @@ -424,18 +424,30 @@ main(void) { int num_errs=0; hid_t fapl; + const char *envval = NULL; - num_errs+=rsrv_ohdr(); - num_errs+=rsrv_heap(); - num_errs+=rsrv_vlen(); + envval = HDgetenv("HDF5_DRIVER"); + if (envval == NULL) + envval = "nomatch"; + if (HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) { + num_errs+=rsrv_ohdr(); + num_errs+=rsrv_heap(); + num_errs+=rsrv_vlen(); - if(num_errs > 0) - printf("**** %d FAILURE%s! ****\n", num_errs, num_errs==1?"":"S"); + if(num_errs > 0) + printf("**** %d FAILURE%s! ****\n", num_errs, num_errs==1?"":"S"); + else + puts("All address space reservation tests passed."); + + fapl = h5_fileaccess(); + h5_cleanup(FILENAME, fapl); + return num_errs; + } else - puts("All address space reservation tests passed."); + { + puts("All address space reservation tests skippped - Incompatible with current Virtual File Driver"); + } + return 0; - fapl = h5_fileaccess(); - h5_cleanup(FILENAME, fapl); - return num_errs; } diff --git a/test/stab.c b/test/stab.c index 7c2f719e7d..164c8f8fc9 100644 --- a/test/stab.c +++ b/test/stab.c @@ -329,8 +329,7 @@ lifecycle(hid_t fapl) if(H5Pset_est_link_info(gcpl, LIFECYCLE_EST_NUM_ENTRIES, LIFECYCLE_EST_NAME_LEN) < 0) TEST_ERROR; /* Create group for testing lifecycle */ - if((gid = H5Gcreate_expand(fid, gcpl, H5P_DEFAULT)) < 0) TEST_ERROR - if((H5Llink(fid, LIFECYCLE_TOP_GROUP, gid, H5P_DEFAULT)) < 0) TEST_ERROR + if((gid = H5Gcreate_expand(fid, LIFECYCLE_TOP_GROUP, gcpl, H5P_DEFAULT)) < 0) TEST_ERROR /* Query group creation property settings */ if(H5Pget_local_heap_size_hint(gcpl, &lheap_size_hint) < 0) TEST_ERROR; @@ -788,8 +787,7 @@ no_compact(hid_t fapl) if(est_name_len != H5G_CRT_GINFO_EST_NAME_LEN) TEST_ERROR; /* Create group for testing lifecycle */ - if((gid = H5Gcreate_expand(fid, gcpl, H5P_DEFAULT)) < 0) TEST_ERROR - if((H5Llink(fid, NO_COMPACT_TOP_GROUP, gid, H5P_DEFAULT)) < 0) TEST_ERROR + if((gid = H5Gcreate_expand(fid, NO_COMPACT_TOP_GROUP, gcpl, H5P_DEFAULT)) < 0) TEST_ERROR /* Close GCPL */ if(H5Pclose(gcpl) < 0) TEST_ERROR; @@ -875,7 +873,6 @@ gcpl_on_root(hid_t fapl) 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" */ char filename[NAME_BUF_SIZE]; @@ -915,15 +912,14 @@ gcpl_on_root(hid_t fapl) if(H5Pclose(gcpl) < 0) TEST_ERROR; /* Create a group 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) TEST_ERROR + if((gcpl = H5Pcreate(H5P_GROUP_CREATE)) < 0) TEST_ERROR; + if(H5Pset_create_intermediate_group(gcpl, TRUE) < 0) TEST_ERROR /* Create a group and intermediate groups, to check if root group settings are inherited */ - if((gid2 = H5Gcreate_expand(gid, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - if((H5Llink(gid, GCPL_ON_ROOT_BOTTOM_GROUP, gid2, lcpl)) < 0) TEST_ERROR + if((gid2 = H5Gcreate_expand(gid, GCPL_ON_ROOT_BOTTOM_GROUP, gcpl, H5P_DEFAULT)) < 0) TEST_ERROR - /* Close LCPL */ - if(H5Pclose(lcpl) < 0) TEST_ERROR; + /* Close GCPL */ + if(H5Pclose(gcpl) < 0) TEST_ERROR; /* Query the group creation properties */ if((gcpl = H5Gget_create_plist(gid2)) < 0) TEST_ERROR; @@ -997,47 +993,57 @@ main(void) hid_t fapl, fcpl, file; int nerrors=0; char filename[1024]; + const char *envval = NULL; - /* Reset library */ - h5_reset(); - fapl = h5_fileaccess(); + /* Don't run this test using the split file driver */ + envval = HDgetenv("HDF5_DRIVER"); + if (envval == NULL) + envval = "nomatch"; + if (HDstrcmp(envval, "split")) { + /* Reset library */ + h5_reset(); + fapl = h5_fileaccess(); - /* - * Use larger symbol table data structures to be more efficient, use - * defaults to bang harder on the library for testing. - */ - fcpl = H5Pcreate(H5P_FILE_CREATE); + /* + * Use larger symbol table data structures to be more efficient, use + * defaults to bang harder on the library for testing. + */ + fcpl = H5Pcreate(H5P_FILE_CREATE); #if 0 - H5Pset_sym_k(fcpl, 16, 16); + H5Pset_sym_k(fcpl, 16, 16); #endif - /* Open the file */ - h5_fixname(FILENAME[0], fapl, filename, sizeof filename); - if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl))<0) - goto error; + /* Open the file */ + h5_fixname(FILENAME[0], fapl, filename, sizeof filename); + if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl))<0) + goto error; - /* Perform tests */ - nerrors += test_misc(file); - nerrors += test_long(file); - nerrors += test_large(file); + /* Perform tests */ + nerrors += test_misc(file); + nerrors += test_long(file); + nerrors += test_large(file); #ifdef H5_GROUP_REVISION - nerrors += lifecycle(fapl); - nerrors += long_compact(fapl); - nerrors += read_old(fapl); - nerrors += no_compact(fapl); - nerrors += gcpl_on_root(fapl); - + nerrors += lifecycle(fapl); + nerrors += long_compact(fapl); + nerrors += read_old(fapl); + nerrors += no_compact(fapl); + nerrors += gcpl_on_root(fapl); #endif /* H5_GROUP_REVISION */ - if (nerrors) goto error; + if (nerrors) goto error; - /* Cleanup */ - H5Fclose(file); - puts("All symbol table tests passed."); - h5_cleanup(FILENAME, fapl); + /* Cleanup */ + H5Fclose(file); + puts("All symbol table tests passed."); + h5_cleanup(FILENAME, fapl); + } + else + { + puts("All symbol table tests skipped - Incompatible with current Virtual File Driver"); + } return 0; - error: - puts("*** TESTS FAILED ***"); - return 1; + error: + puts("*** TESTS FAILED ***"); + return 1; } diff --git a/test/unlink.c b/test/unlink.c index ee938d9495..d86e4eb7c4 100644 --- a/test/unlink.c +++ b/test/unlink.c @@ -2144,75 +2144,87 @@ main(void) hid_t fapl, fapl2, file; int nerrors = 0; char filename[1024]; + const char *envval = NULL; - /* Metadata cache parameters */ - int mdc_nelmts; - size_t rdcc_nelmts; - size_t rdcc_nbytes; - double rdcc_w0; + /* Don't run this test using the wrong file drivers */ + envval = HDgetenv("HDF5_DRIVER"); + if (envval == NULL) + envval = "nomatch"; + if (HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) { + /* Metadata cache parameters */ + int mdc_nelmts; + size_t rdcc_nelmts; + size_t rdcc_nbytes; + double rdcc_w0; - /* Set the random # seed */ - HDsrandom((unsigned long)HDtime(NULL)); + /* Set the random # seed */ + HDsrandom((unsigned long)HDtime(NULL)); - /* Open */ - h5_reset(); - fapl = h5_fileaccess(); - h5_fixname(FILENAME[0], fapl, filename, sizeof filename); - if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR; + /* Open */ + h5_reset(); + fapl = h5_fileaccess(); + h5_fixname(FILENAME[0], fapl, filename, sizeof filename); + if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR; - /* Make copy of regular fapl, to turn down the elements in the metadata cache */ - if((fapl2=H5Pcopy(fapl))<0) - goto error; + /* Make copy of regular fapl, to turn down the elements in the metadata cache */ + if((fapl2=H5Pcopy(fapl))<0) + goto error; - /* Get FAPL cache settings */ - if(H5Pget_cache(fapl2,&mdc_nelmts,&rdcc_nelmts,&rdcc_nbytes,&rdcc_w0)<0) - printf("H5Pget_cache failed\n"); + /* Get FAPL cache settings */ + if(H5Pget_cache(fapl2,&mdc_nelmts,&rdcc_nelmts,&rdcc_nbytes,&rdcc_w0)<0) + printf("H5Pget_cache failed\n"); - /* Change FAPL cache settings */ - mdc_nelmts=1; - if(H5Pset_cache(fapl2,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0)<0) - printf("H5Pset_cache failed\n"); + /* Change FAPL cache settings */ + mdc_nelmts=1; + if(H5Pset_cache(fapl2,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0)<0) + printf("H5Pset_cache failed\n"); - /* Tests */ - nerrors += test_one(file); - nerrors += test_many(file); - nerrors += test_symlink(file); - nerrors += test_rename(file); - nerrors += test_new_move(); - nerrors += check_new_move(); - nerrors += test_filespace(); + /* Tests */ + nerrors += test_one(file); + nerrors += test_many(file); + nerrors += test_symlink(file); + nerrors += test_rename(file); + nerrors += test_new_move(); + nerrors += check_new_move(); + nerrors += test_filespace(); - /* Test creating & unlinking lots of objects with default FAPL */ - nerrors += test_create_unlink("create and unlink large number of objects",fapl); - /* Test creating & unlinking lots of objects with a 1-element metadata cache FAPL */ - nerrors += test_create_unlink("create and unlink large number of objects with small cache",fapl2); + /* Test creating & unlinking lots of objects with default FAPL */ + nerrors += test_create_unlink("create and unlink large number of objects",fapl); + /* Test creating & unlinking lots of objects with a 1-element metadata cache FAPL */ + nerrors += test_create_unlink("create and unlink large number of objects with small cache",fapl2); - nerrors += test_link_slashes(); - nerrors += test_unlink_slashes(); + nerrors += test_link_slashes(); + nerrors += test_unlink_slashes(); - /* Test specific B-tree removal issues */ - nerrors += test_unlink_rightleaf(file); - nerrors += test_unlink_rightnode(file); - nerrors += test_unlink_middlenode(file); + /* Test specific B-tree removal issues */ + nerrors += test_unlink_rightleaf(file); + nerrors += test_unlink_rightnode(file); + nerrors += test_unlink_middlenode(file); - /* Test "resurrecting" objects */ - nerrors += test_resurrect_dataset(); - nerrors += test_resurrect_datatype(); - nerrors += test_resurrect_group(); + /* Test "resurrecting" objects */ + nerrors += test_resurrect_dataset(); + nerrors += test_resurrect_datatype(); + nerrors += test_resurrect_group(); - /* Test unlinking chunked datasets */ - nerrors += test_unlink_chunked_dataset(); + /* Test unlinking chunked datasets */ + nerrors += test_unlink_chunked_dataset(); - /* Close */ - if (H5Pclose(fapl2)<0) TEST_ERROR; - if (H5Fclose(file)<0) TEST_ERROR; - if (nerrors) { - printf("***** %d FAILURE%s! *****\n", nerrors, 1==nerrors?"":"S"); - exit(1); + /* Close */ + if (H5Pclose(fapl2)<0) TEST_ERROR; + if (H5Fclose(file)<0) TEST_ERROR; + if (nerrors) { + printf("***** %d FAILURE%s! *****\n", nerrors, 1==nerrors?"":"S"); + exit(1); + } + puts("All unlink tests passed."); + h5_cleanup(FILENAME, fapl); + } + else + { + puts("All unlink tests skipped - Incompatible with current Virtual File Driver"); } - puts("All unlink tests passed."); - h5_cleanup(FILENAME, fapl); return 0; - error: - return 1; + + error: + return 1; } diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 1f3709774e..c1541de73f 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -839,13 +839,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tools/Makefile.in b/tools/Makefile.in index 94ec5e3019..ae571248d5 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -830,13 +830,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index 8860b86543..3d803accc1 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -819,13 +819,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index 5d31b6aec9..6beb802bf5 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -866,13 +866,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 658b023120..bcb492e6ff 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -857,13 +857,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index 9c4e36d961..bd821c6ece 100755 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -839,13 +839,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 23fedcb23c..b08bb71b8c 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -866,13 +866,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index 53bcb661d6..0c46d1ff69 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -819,13 +819,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index 0ff36a1c74..414d0dfa53 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -896,13 +896,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 427c2e14aa..3500064893 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -829,13 +829,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 92f75da7bd..6cf41e58da 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -926,13 +926,14 @@ build-check-p: $(LIB) $(PROGS) $(TESTS) fi # Run test with different Virtual File Driver -check-vfd: +check-vfd: $(LIB) $(PROGS) $(TESTS) @for vfd in $(VFD_LIST) dummy; do \ if test $$vfd != dummy; then \ echo "============================"; \ echo "Testing Virtual File Driver $$vfd"; \ echo "============================"; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables.