summaryrefslogtreecommitdiffstats
path: root/tools/h5ls/CMakeLists.txt
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2012-01-05 15:16:03 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2012-01-05 15:16:03 (GMT)
commitd174933e1953dc11a32a4715beec166a2490487f (patch)
treedf4274a5f10fab9a8375edefae8367aa295ad987 /tools/h5ls/CMakeLists.txt
parent7d0c15b7944577e94d02f7b4fb6a63977901adf0 (diff)
downloadhdf5-d174933e1953dc11a32a4715beec166a2490487f.zip
hdf5-d174933e1953dc11a32a4715beec166a2490487f.tar.gz
hdf5-d174933e1953dc11a32a4715beec166a2490487f.tar.bz2
[svn-r21865] Purpose:
Fix for HDFFV-7838 h5ls: segfault for handling region reference in attribute with -v option Description: Segfault occurred when h5ls access region reference data in an attribute. This didn't occurred when -v option was used. The cause was "h5tool_format_t info;" struct variable members were accessed without proper values were assigned (was NULL), so printf failed later in the code. Tested: jam (linux32-LE), koala (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), cmake-Windows (32-LE)
Diffstat (limited to 'tools/h5ls/CMakeLists.txt')
-rw-r--r--tools/h5ls/CMakeLists.txt21
1 files changed, 18 insertions, 3 deletions
diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt
index 2bbe088..ad37da0 100644
--- a/tools/h5ls/CMakeLists.txt
+++ b/tools/h5ls/CMakeLists.txt
@@ -38,6 +38,8 @@ IF (BUILD_TESTING)
tall-2.ls
tarray1.ls
tattr2.ls
+ tattrreg_le.ls
+ tattrreg_be.ls
tcomp-1.ls
tdataregbe.ls
tdataregle.ls
@@ -88,6 +90,7 @@ IF (BUILD_TESTING)
tall.h5
tarray1.h5
tattr2.h5
+ tattrreg.h5
tcompound.h5
tdatareg.h5
tdset.h5
@@ -395,16 +398,28 @@ IF (BUILD_TESTING)
# enable -S for avoiding printing NATIVE types
ADD_H5_TEST (tattr2 0 -w80 -v -S tattr2.h5)
+ # test for attribute with region references wo verbose mode
+ # ( HDFFV-7838, )
+ IF (H5_WORDS_BIGENDIAN)
+ ADD_H5_TEST (tattrreg_be 0 -w80 -v -d tattrreg.h5)
+ ELSE (H5_WORDS_BIGENDIAN)
+ ADD_H5_TEST (tattrreg_le 0 -w80 -v -d tattrreg.h5)
+ ENDIF (H5_WORDS_BIGENDIAN)
+
# test for non-existing file
ADD_H5_TEST (nosuchfile 1 nosuchfile.h5)
+ # test for variable length data types in verbose mode
IF (H5_WORDS_BIGENDIAN)
- # test for variable length data types in verbose mode
ADD_H5_TEST (tvldtypes2be 0 -v tvldtypes1.h5)
- # test for dataset region references data types in verbose mode
- ADD_H5_TEST (tdataregbe 0 -v tdatareg.h5)
ELSE (H5_WORDS_BIGENDIAN)
ADD_H5_TEST (tvldtypes2le 0 -v tvldtypes1.h5)
+ ENDIF (H5_WORDS_BIGENDIAN)
+
+ # test for dataset region references data types in verbose mode
+ IF (H5_WORDS_BIGENDIAN)
+ ADD_H5_TEST (tdataregbe 0 -v tdatareg.h5)
+ ELSE (H5_WORDS_BIGENDIAN)
ADD_H5_TEST (tdataregle 0 -v tdatareg.h5)
ENDIF (H5_WORDS_BIGENDIAN)