summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2013-03-29 23:13:05 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2013-03-29 23:13:05 (GMT)
commit6c974c824db0c4b97a5ec5e03726ebe4a2198ad9 (patch)
treea89f756228cc72486ff1e71fbc68fd29baa01ba3 /tools
parented621aae38837e90c7273087de22f1752eee7cc7 (diff)
downloadhdf5-6c974c824db0c4b97a5ec5e03726ebe4a2198ad9.zip
hdf5-6c974c824db0c4b97a5ec5e03726ebe4a2198ad9.tar.gz
hdf5-6c974c824db0c4b97a5ec5e03726ebe4a2198ad9.tar.bz2
[svn-r23495] ported revisions 23433:23494 from the trunk
Diffstat (limited to 'tools')
-rw-r--r--tools/h5copy/testh5copy.sh.in10
-rw-r--r--tools/h5diff/ph5diff_main.c5
-rw-r--r--tools/h5repack/h5repack.sh.in22
-rw-r--r--tools/lib/h5tools_dump.c16
-rw-r--r--tools/testfiles/tfletcher32.ddl2
-rw-r--r--tools/testfiles/tshuffle.ddl2
-rw-r--r--tools/testfiles/tuserfilter.ddl4
7 files changed, 45 insertions, 16 deletions
diff --git a/tools/h5copy/testh5copy.sh.in b/tools/h5copy/testh5copy.sh.in
index d30d8d8..bec3bfc 100644
--- a/tools/h5copy/testh5copy.sh.in
+++ b/tools/h5copy/testh5copy.sh.in
@@ -513,7 +513,7 @@ COPY_REFERENCES()
TESTFILE="$TESTDIR/h5copy_ref.h5"
echo "Test copying object and region references"
- TOOLTEST_F -f ref -i $TESTFILE -o $TESTDIR/region_ref.out.h5 -v -s / -d /COPY
+ TOOLTEST -f ref -i $TESTFILE -o $TESTDIR/region_ref.out.h5 -v -s / -d /COPY
}
# Copy external links.
@@ -529,25 +529,25 @@ COPY_EXT_LINKS()
TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_link.out.h5 -s /group_ext/extlink_dset -d /copy1_dset
echo "Test copying external link directly with -f ext"
- TOOLTEST_F -f ext -i $TESTFILE -o $TESTDIR/ext_link_f.out.h5 -v -s /group_ext/extlink_dset -d /copy2_dset
+ TOOLTEST -f ext -i $TESTFILE -o $TESTDIR/ext_link_f.out.h5 -v -s /group_ext/extlink_dset -d /copy2_dset
echo "Test copying dangling external link (no obj) directly without -f ext"
TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_dangle_noobj.out.h5 -s /group_ext/extlink_notyet1 -d /copy_dangle1_1
echo "Test copying dangling external link (no obj) directly with -f ext"
- TOOLTEST_F -f ext -i $TESTFILE -o $TESTDIR/ext_dangle_noobj_f.out.h5 -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_2
+ TOOLTEST -f ext -i $TESTFILE -o $TESTDIR/ext_dangle_noobj_f.out.h5 -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_2
echo "Test copying dangling external link (no file) directly without -f ext"
TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_dangle_nofile.out.h5 -s /group_ext/extlink_notyet2 -d /copy_dangle2_1
echo "Test copying dangling external link (no file) directly with -f ext"
- TOOLTEST_F -f ext -i $TESTFILE -o $TESTDIR/ext_dangle_nofile_f.out.h5 -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_2
+ TOOLTEST -f ext -i $TESTFILE -o $TESTDIR/ext_dangle_nofile_f.out.h5 -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_2
echo "Test copying a group contains external links without -f ext"
TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_link_group.out.h5 -s /group_ext -d /copy1_group
echo "Test copying a group contains external links with -f ext"
- TOOLTEST_F -f ext -i $TESTFILE -o $TESTDIR/ext_link_group_f.out.h5 -v -s /group_ext -d /copy2_group
+ TOOLTEST -f ext -i $TESTFILE -o $TESTDIR/ext_link_group_f.out.h5 -v -s /group_ext -d /copy2_group
}
# Test misc.
diff --git a/tools/h5diff/ph5diff_main.c b/tools/h5diff/ph5diff_main.c
index 1fc563b..b9bd404 100644
--- a/tools/h5diff/ph5diff_main.c
+++ b/tools/h5diff/ph5diff_main.c
@@ -275,6 +275,9 @@ void h5diff_exit(int status)
if(g_Parallel)
MPI_Finalize();
- exit(status);
+ /* Always exit(0), since MPI implementations do weird stuff when they
+ * receive a non-zero exit value. - QAK
+ */
+ exit(0);
}
diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in
index 14e1d04..ca25183 100644
--- a/tools/h5repack/h5repack.sh.in
+++ b/tools/h5repack/h5repack.sh.in
@@ -244,8 +244,11 @@ VERIFY_LAYOUT_DSET()
shift
shift
shift
-
- $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+
+ TESTING $H5REPACK $@
+ (
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ )
RET=$?
if [ $RET != 0 ] ; then
echo "*FAILED*"
@@ -266,6 +269,7 @@ VERIFY_LAYOUT_DSET()
echo " PASSED"
else
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
fi
# clean up tmp files
@@ -277,6 +281,7 @@ VERIFY_LAYOUT_DSET()
# Verifying layouts from entire file
VERIFY_LAYOUT_ALL()
{
+ infile=$2
outfile=$TESTDIR/out-$1.$2
layoutfile=$TESTDIR/layout-$1.$2
expectlayout=$3
@@ -284,7 +289,10 @@ VERIFY_LAYOUT_ALL()
shift
shift
- $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ TESTING $H5REPACK $@
+ (
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ )
RET=$?
if [ $RET != 0 ] ; then
echo "*FAILED*"
@@ -300,6 +308,7 @@ VERIFY_LAYOUT_ALL()
# check if the other layouts still exsit
VERIFY "layouts"
(
+ echo
# if CONTIGUOUS
if [ $expectlayout = "CONTIGUOUS" ]; then
TESTING $H5DUMP_BIN -pH $outfile
@@ -309,10 +318,12 @@ VERIFY_LAYOUT_ALL()
$GREP "COMPACT" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
else
$GREP "CHUNKED" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
@@ -327,10 +338,12 @@ VERIFY_LAYOUT_ALL()
$GREP "CHUNKED" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
else
$GREP "CONTIGUOUS" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
@@ -345,10 +358,12 @@ VERIFY_LAYOUT_ALL()
$GREP "CONTIGUOUS" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
else
$GREP "COMPACT" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
@@ -523,6 +538,7 @@ TOOLTEST_META()
else
#fail
echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
fi
rm -f $outfile
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index dbb5f98..d6cd0a0 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -2958,11 +2958,14 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
int ndims = H5Sget_simple_extent_dims(sid, dims, NULL);
/* only print the compression ratio for these filters */
- for(i = 0; i < nfilters; i++) {
+ for(i = 0; i < nfilters && !ok; i++) {
cd_nelmts = NELMTS(cd_values);
filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts,
cd_values, sizeof(f_name), f_name, NULL);
-
+ ok = (filtn>=0);
+
+ /* this following code will not show compression ratio for
+ user defined filter. For example, see HDFFV-8344 --xcao@hdfgroup.org
switch(filtn) {
case H5Z_FILTER_DEFLATE:
case H5Z_FILTER_SZIP:
@@ -2971,6 +2974,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
ok = 1;
break;
}
+ */
}
if(ndims && ok) {
@@ -3148,6 +3152,9 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
cd_nelmts = NELMTS(cd_values);
filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts,
cd_values, sizeof(f_name), f_name, NULL);
+
+ if (filtn<0)
+ continue; /* nothing to print for invalid filter */
ctx->need_prefix = TRUE;
h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
@@ -3241,10 +3248,13 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, ncols, 0, 0);
break;
default:
+ /* filter do not have to be avaiable for showing registered filter info.
+ see HDFFV-8346 for details. --xcao@hdfgroup.org
if(H5Zfilter_avail(filtn))
h5tools_str_append(&buffer, "%s %s", "USER_REGISTERED_FILTER", BEGIN);
else
- h5tools_str_append(&buffer, "%s %s", "UNKNOWN_FILTER", BEGIN);
+ */
+ h5tools_str_append(&buffer, "%s %s", "USER_DEFINED_FILTER", BEGIN);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, ncols, 0, 0);
ctx->indent_level++;
diff --git a/tools/testfiles/tfletcher32.ddl b/tools/testfiles/tfletcher32.ddl
index 072ef23..c341ded 100644
--- a/tools/testfiles/tfletcher32.ddl
+++ b/tools/testfiles/tfletcher32.ddl
@@ -4,7 +4,7 @@ DATASET "fletcher32" {
DATASPACE SIMPLE { ( 20, 10 ) / ( 20, 10 ) }
STORAGE_LAYOUT {
CHUNKED ( 10, 5 )
- SIZE 816
+ SIZE 816 (0.980:1 COMPRESSION)
}
FILTERS {
CHECKSUM FLETCHER32
diff --git a/tools/testfiles/tshuffle.ddl b/tools/testfiles/tshuffle.ddl
index cd1b5f8..5c183fe 100644
--- a/tools/testfiles/tshuffle.ddl
+++ b/tools/testfiles/tshuffle.ddl
@@ -4,7 +4,7 @@ DATASET "shuffle" {
DATASPACE SIMPLE { ( 20, 10 ) / ( 20, 10 ) }
STORAGE_LAYOUT {
CHUNKED ( 10, 5 )
- SIZE 800
+ SIZE 800 (1.000:1 COMPRESSION)
}
FILTERS {
PREPROCESSING SHUFFLE
diff --git a/tools/testfiles/tuserfilter.ddl b/tools/testfiles/tuserfilter.ddl
index 07b478f..24745b9 100644
--- a/tools/testfiles/tuserfilter.ddl
+++ b/tools/testfiles/tuserfilter.ddl
@@ -4,10 +4,10 @@ DATASET "myfilter" {
DATASPACE SIMPLE { ( 20, 10 ) / ( 20, 10 ) }
STORAGE_LAYOUT {
CHUNKED ( 10, 5 )
- SIZE 800
+ SIZE 800 (1.000:1 COMPRESSION)
}
FILTERS {
- UNKNOWN_FILTER {
+ USER_DEFINED_FILTER {
FILTER_ID 405
COMMENT myfilter
PARAMS { 5 6 }