summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MANIFEST2
-rw-r--r--tools/h5dump/CMakeLists.txt8
-rw-r--r--tools/h5dump/testh5dump.sh.in3
-rw-r--r--tools/lib/h5tools_dump.c14
-rw-r--r--tools/testfiles/trawssetfile.ddl14
-rw-r--r--tools/testfiles/trawssetfile.exp2
6 files changed, 35 insertions, 8 deletions
diff --git a/MANIFEST b/MANIFEST
index d9ff5db..fc36d36 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1511,6 +1511,8 @@
./tools/testfiles/topaque.h5
./tools/testfiles/trawdatafile.ddl
./tools/testfiles/trawdatafile.exp
+./tools/testfiles/trawssetfile.ddl
+./tools/testfiles/trawssetfile.exp
./tools/testfiles/tsaf.ddl
./tools/testfiles/tsaf.h5
./tools/testfiles/tscalarattrintsize.ddl
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index c7ebe63..3adea56 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -148,6 +148,7 @@ IF (BUILD_TESTING)
${HDF5_TOOLS_SRC_DIR}/testfiles/tno-subset.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tnullspace.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/trawdatafile.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/trawssetfile.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr1.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr2.ddl
@@ -199,6 +200,7 @@ IF (BUILD_TESTING)
tall-6.exp
tnoddlfile.exp
trawdatafile.exp
+ trawssetfile.exp
tstr2bin2.exp
tstr2bin6.exp
twithddl.exp
@@ -1254,6 +1256,9 @@ IF (BUILD_TESTING)
trawdatafile.out
trawdatafile.out.err
trawdatafile.txt
+ trawssetfile.out
+ trawssetfile.out.err
+ trawssetfile.txt
tno-subset.out
tno-subset.out.err
tnullspace.out
@@ -1369,7 +1374,8 @@ IF (BUILD_TESTING)
ADD_H5_TEST (tnoattrdata 0 --enable-error-stack -A -o tattr.h5)
ADD_H5_TEST_EXPORT (trawdatafile packedbits.h5 0 --enable-error-stack -y -o)
ADD_H5_TEST_EXPORT (tnoddlfile packedbits.h5 0 --enable-error-stack -O -y -o)
-
+ ADD_H5_TEST_EXPORT (trawssetfile tdset.h5 0 --enable-error-stack -d "/dset1[1,1;;;]" -y -o)
+
ADD_H5_TEST_EXPORT_DDL (twithddlfile packedbits.h5 0 twithddl --enable-error-stack --ddl=twithddl.txt -y -o)
# test for maximum display datasets
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 6d45b4c..f55ecf8 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -276,6 +276,8 @@ $SRC_H5DUMP_TESTFILES/tno-subset.ddl
$SRC_H5DUMP_TESTFILES/tnullspace.ddl
$SRC_H5DUMP_TESTFILES/trawdatafile.ddl
$SRC_H5DUMP_TESTFILES/trawdatafile.exp
+$SRC_H5DUMP_TESTFILES/trawssetfile.ddl
+$SRC_H5DUMP_TESTFILES/trawssetfile.exp
$SRC_H5DUMP_TESTFILES/zerodim.ddl
$SRC_H5DUMP_TESTFILES/tordergr1.ddl
$SRC_H5DUMP_TESTFILES/tordergr2.ddl
@@ -875,6 +877,7 @@ TOOLTEST tnoattrdata.ddl --enable-error-stack -A -o tattr.h5
TOOLTEST2 trawdatafile.exp --enable-error-stack -y -o trawdatafile.txt packedbits.h5
TOOLTEST2 tnoddlfile.exp --enable-error-stack -O -y -o tnoddlfile.txt packedbits.h5
TOOLTEST2A twithddlfile.exp twithddl.exp --enable-error-stack --ddl=twithddl.txt -y -o twithddlfile.txt packedbits.h5
+TOOLTEST2 trawssetfile.exp --enable-error-stack -d "/dset1[1,1;;;]" -y -o trawssetfile.txt tdset.h5
# test for maximum display datasets
TOOLTEST twidedisplay.ddl --enable-error-stack -w0 packedbits.h5
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index b3c8f5e..e4fe3a4 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -314,13 +314,13 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t contai
if (region_space >= 0) {
if (h5tools_is_zero(memref, H5Tget_size(type))) {
ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+ h5tools_simple_prefix(rawoutstream, info, ctx, curr_pos, 0);
/* Render the region element begin */
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "NULL");
- dimension_break = h5tools_render_element(stream, info,
+ dimension_break = h5tools_render_element(rawoutstream, info,
ctx, &buffer, &curr_pos, ncols, i, elmt_counter);
}
else {
@@ -328,25 +328,25 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t contai
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Rget_name failed");
ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos+i, 0);
+ h5tools_simple_prefix(rawoutstream, info, ctx, curr_pos+i, 0);
/* Render the region element begin */
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, info->dset_format, ref_name);
- dimension_break = h5tools_render_element(stream, info,
+ dimension_break = h5tools_render_element(rawoutstream, info,
ctx, &buffer, &curr_pos, ncols, i, elmt_counter);
region_type = H5Sget_select_type(region_space);
if(region_type == H5S_SEL_POINTS)
/* Print point information */
dimension_break = h5tools_dump_region_data_points(
- region_space, region_id, stream, info, ctx,
+ region_space, region_id, rawoutstream, info, ctx,
&buffer, &curr_pos, ncols, i, elmt_counter);
else if(region_type == H5S_SEL_HYPERSLABS)
/* Print block information */
dimension_break = h5tools_dump_region_data_blocks(
- region_space, region_id, stream, info, ctx,
+ region_space, region_id, rawoutstream, info, ctx,
&buffer, &curr_pos, ncols, i, elmt_counter);
else
HERROR(H5E_tools_g, H5E_tools_min_id_g, "invalid region type");
@@ -1790,7 +1790,7 @@ h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
if(!sset)
status = h5tools_dump_simple_dset(rawdatastream, info, ctx, dset, p_type);
else
- status = h5tools_dump_simple_subset(stream, info, ctx, dset, p_type, sset);
+ status = h5tools_dump_simple_subset(rawdatastream, info, ctx, dset, p_type, sset);
}
else
/* space is H5S_NULL */
diff --git a/tools/testfiles/trawssetfile.ddl b/tools/testfiles/trawssetfile.ddl
new file mode 100644
index 0000000..e8f07f8
--- /dev/null
+++ b/tools/testfiles/trawssetfile.ddl
@@ -0,0 +1,14 @@
+HDF5 "tdset.h5" {
+DATASET "/dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 10, 20 ) / ( 10, 20 ) }
+ SUBSET {
+ START ( 1, 1 );
+ STRIDE ( 1, 1 );
+ COUNT ( 1, 1 );
+ BLOCK ( 1, 1 );
+ DATA {
+ }
+ }
+}
+}
diff --git a/tools/testfiles/trawssetfile.exp b/tools/testfiles/trawssetfile.exp
new file mode 100644
index 0000000..2de8392
--- /dev/null
+++ b/tools/testfiles/trawssetfile.exp
@@ -0,0 +1,2 @@
+
+ 2 \ No newline at end of file