summaryrefslogtreecommitdiffstats
path: root/tools/test/h5ls
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2021-06-28 16:33:37 (GMT)
committerQuincey Koziol <koziol@lbl.gov>2021-06-28 16:33:37 (GMT)
commit851be6f4ec7e7022357a476f30d36757a4579662 (patch)
tree08002680d2057f9ed3dba9bc2528c3b8bea06219 /tools/test/h5ls
parent6dd051101d94b14ff21469b8045c4c26e2a446bd (diff)
downloadhdf5-851be6f4ec7e7022357a476f30d36757a4579662.zip
hdf5-851be6f4ec7e7022357a476f30d36757a4579662.tar.gz
hdf5-851be6f4ec7e7022357a476f30d36757a4579662.tar.bz2
Most changes for fixing post open issues
Diffstat (limited to 'tools/test/h5ls')
-rw-r--r--tools/test/h5ls/testh5ls.sh.in63
-rw-r--r--tools/test/h5ls/testh5lsvds.sh.in45
2 files changed, 90 insertions, 18 deletions
diff --git a/tools/test/h5ls/testh5ls.sh.in b/tools/test/h5ls/testh5ls.sh.in
index ee0dad7..4e86395 100644
--- a/tools/test/h5ls/testh5ls.sh.in
+++ b/tools/test/h5ls/testh5ls.sh.in
@@ -24,6 +24,8 @@ EXIT_FAILURE=1
H5LS=../../src/h5ls/h5ls # The tool name
H5LS_BIN=`pwd`/$H5LS # The path of the tool binary
+VDS_CHECK_COMPAT_VOL=../../../utils/vds_check_compat_vol # The vds_check_compat_vol tool name
+VDS_CHECK_COMPAT_VOL_BIN=`pwd`/$VDS_CHECK_COMPAT_VOL # The path of the vds_check_compat_vol tool binary
RM='rm -rf'
CMP='cmp -s'
@@ -290,6 +292,24 @@ TOOLTEST() {
fi
}
+# Print a "SKIP" message
+SKIP() {
+ TESTING $H5LS $@
+ echo " -SKIP-"
+}
+
+# Check for compatible VOL connector
+# Note: Requires VOL connector that supports external links and virtual datasets
+COMPAT_VOL_TEST() {
+ if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
+ TOOLTEST $@
+ else
+ SKIP $@
+ echo " The VOL connector specified by the HDF5_VOL_CONNECTOR environment"
+ echo " variable does not support external links or virtual datasets."
+ fi
+}
+
##############################################################################
##############################################################################
### T H E T E S T S ###
@@ -298,6 +318,13 @@ TOOLTEST() {
# prepare for test
COPY_TESTFILES_TO_TESTDIR
+# Check to see if the VOL connector specified by the HDF5_VOL_CONNECTOR
+# environment variable supports virtual datasets (and external links)
+#
+# Note: Depends on vds_check_compat_vol tool from $(topdir)/utils
+$VDS_CHECK_COMPAT_VOL_BIN
+COMPAT_VOL=$?
+
# Toss in a bunch of tests. Not sure if they are the right kinds.
# test the help syntax
TOOLTEST help-1.ls 0 -w80 -h
@@ -334,29 +361,41 @@ TOOLTEST tsoftlinks-5.ls 0 --follow-symlinks tsoftlinks.h5/soft_dset1
# test for displaying external and user-defined links with --follow-symlinks
TOOLTEST textlink-1.ls 0 -w80 -r textlink.h5
-TOOLTEST textlinksrc-1.ls 0 -w80 --follow-symlinks -r textlinksrc.h5
-TOOLTEST textlinksrc-2.ls 0 -w80 --follow-symlinks -rv textlinksrc.h5/ext_link5
-TOOLTEST textlinksrc-3.ls 0 -w80 --follow-symlinks -r textlinksrc.h5/ext_link1
+# Note: Requires VOL connector that supports external links
+COMPAT_VOL_TEST textlinksrc-1.ls 0 -w80 --follow-symlinks -r textlinksrc.h5
+# Note: Requires VOL connector that supports external links
+COMPAT_VOL_TEST textlinksrc-2.ls 0 -w80 --follow-symlinks -rv textlinksrc.h5/ext_link5
+# Note: Requires VOL connector that supports external links
+COMPAT_VOL_TEST textlinksrc-3.ls 0 -w80 --follow-symlinks -r textlinksrc.h5/ext_link1
TOOLTEST textlinksrc-4.ls 0 -w80 -r textlinksrc.h5
TOOLTEST textlinksrc-5.ls 0 -w80 -r textlinksrc.h5/ext_link1
-TOOLTEST textlinksrc-6.ls 0 -w80 --follow-symlinks textlinksrc.h5
-TOOLTEST textlinksrc-7.ls 0 -w80 --follow-symlinks textlinksrc.h5/ext_link1
-TOOLTEST tudlink-1.ls 0 -w80 -r tudlink.h5
+# Note: Requires VOL connector that supports external links
+COMPAT_VOL_TEST textlinksrc-6.ls 0 -w80 --follow-symlinks textlinksrc.h5
+# Note: Requires VOL connector that supports external links
+COMPAT_VOL_TEST textlinksrc-7.ls 0 -w80 --follow-symlinks textlinksrc.h5/ext_link1
+# Note: Requires VOL connector that supports external links
+COMPAT_VOL_TEST tudlink-1.ls 0 -w80 -r tudlink.h5
# test for displaying external links with -E
# the option -E will be depriciated but keep it for backward compatibility
-TOOLTEST textlinksrc-1-old.ls 0 -w80 -Er textlinksrc.h5
-TOOLTEST textlinksrc-2-old.ls 0 -w80 -Erv textlinksrc.h5/ext_link5
-TOOLTEST textlinksrc-3-old.ls 0 -w80 -Er textlinksrc.h5/ext_link1
-TOOLTEST textlinksrc-6-old.ls 0 -w80 -E textlinksrc.h5
-TOOLTEST textlinksrc-7-old.ls 0 -w80 -E textlinksrc.h5/ext_link1
+# Note: Requires VOL connector that supports external links
+COMPAT_VOL_TEST textlinksrc-1-old.ls 0 -w80 -Er textlinksrc.h5
+# Note: Requires VOL connector that supports external links
+COMPAT_VOL_TEST textlinksrc-2-old.ls 0 -w80 -Erv textlinksrc.h5/ext_link5
+# Note: Requires VOL connector that supports external links
+COMPAT_VOL_TEST textlinksrc-3-old.ls 0 -w80 -Er textlinksrc.h5/ext_link1
+# Note: Requires VOL connector that supports external links
+COMPAT_VOL_TEST textlinksrc-6-old.ls 0 -w80 -E textlinksrc.h5
+# Note: Requires VOL connector that supports external links
+COMPAT_VOL_TEST textlinksrc-7-old.ls 0 -w80 -E textlinksrc.h5/ext_link1
# tests for no-dangling-links
# if this option is given on dangling link, h5ls should return exit code 1
# when used alone , expect to print out help and return exit code 1
TOOLTEST textlinksrc-nodangle-1.ls 1 -w80 --no-dangling-links textlinksrc.h5
# external dangling link - expected exit code 1
-TOOLTEST textlinksrc-nodangle-2.ls 1 -w80 --follow-symlinks --no-dangling-links textlinksrc.h5
+# Note: Requires VOL connector that supports external links
+COMPAT_VOL_TEST textlinksrc-nodangle-2.ls 1 -w80 --follow-symlinks --no-dangling-links textlinksrc.h5
# soft dangling link - expected exit code 1
TOOLTEST tsoftlinks-nodangle-1.ls 1 -w80 --follow-symlinks --no-dangling-links tsoftlinks.h5
# when used file with no dangling links - expected exit code 0
diff --git a/tools/test/h5ls/testh5lsvds.sh.in b/tools/test/h5ls/testh5lsvds.sh.in
index 4814f85..cfdfa6b 100644
--- a/tools/test/h5ls/testh5lsvds.sh.in
+++ b/tools/test/h5ls/testh5lsvds.sh.in
@@ -21,6 +21,8 @@ EXIT_FAILURE=1
H5LS=../../src/h5ls/h5ls # The tool name
H5LS_BIN=`pwd`/$H5LS # The path of the tool binary
+VDS_CHECK_COMPAT_VOL=../../../utils/vds_check_compat_vol # The vds_check_compat_vol tool name
+VDS_CHECK_COMPAT_VOL_BIN=`pwd`/$VDS_CHECK_COMPAT_VOL # The path of the vds_check_compat_vol tool binary
RM='rm -rf'
CMP='cmp -s'
@@ -229,6 +231,24 @@ TOOLTEST() {
fi
}
+# Print a "SKIP" message
+SKIP() {
+ TESTING $H5LS $@
+ echo " -SKIP-"
+}
+
+# Check for compatible VOL connector
+# Note: Requires VOL connector that supports external links and virtual datasets
+COMPAT_VOL_TEST() {
+ if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
+ TOOLTEST $@
+ else
+ SKIP $@
+ echo " The VOL connector specified by the HDF5_VOL_CONNECTOR environment"
+ echo " variable does not support external links or virtual datasets."
+ fi
+}
+
##############################################################################
##############################################################################
### T H E T E S T S ###
@@ -237,14 +257,27 @@ TOOLTEST() {
# prepare for test
COPY_TESTFILES_TO_TESTDIR
+# Check to see if the VOL connector specified by the HDF5_VOL_CONNECTOR
+# environment variable supports virtual datasets (and external links)
+#
+# Note: Depends on vds_check_compat_vol tool from $(topdir)/utils
+$VDS_CHECK_COMPAT_VOL_BIN
+COMPAT_VOL=$?
+
####### test for dataset vds ######
-TOOLTEST tvds-1.ls 0 -w80 -v -S 1_vds.h5
-TOOLTEST tvds-2.ls 0 -w80 -v -S 2_vds.h5
-TOOLTEST tvds-3_1.ls 0 -w80 -v -S 3_1_vds.h5
-TOOLTEST tvds-3_2.ls 0 -w80 -v -S 3_2_vds.h5
-TOOLTEST tvds-4.ls 0 -w80 -v -S 4_vds.h5
-TOOLTEST tvds-5.ls 0 -w80 -v -S 5_vds.h5
+# Note: Requires VOL connector that supports external links
+COMPAT_VOL_TEST tvds-1.ls 0 -w80 -v -S 1_vds.h5
+# Note: Requires VOL connector that supports external links
+COMPAT_VOL_TEST tvds-2.ls 0 -w80 -v -S 2_vds.h5
+# Note: Requires VOL connector that supports external links
+COMPAT_VOL_TEST tvds-3_1.ls 0 -w80 -v -S 3_1_vds.h5
+# Note: Requires VOL connector that supports external links
+COMPAT_VOL_TEST tvds-3_2.ls 0 -w80 -v -S 3_2_vds.h5
+# Note: Requires VOL connector that supports external links
+COMPAT_VOL_TEST tvds-4.ls 0 -w80 -v -S 4_vds.h5
+# Note: Requires VOL connector that supports external links
+COMPAT_VOL_TEST tvds-5.ls 0 -w80 -v -S 5_vds.h5
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR