From c7bbed79bb3bb1fbbe1523bd7b6dea4ac9d3aa6b Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Thu, 6 Feb 2025 10:59:37 -0600 Subject: [PATCH 1/7] Fix error in H5Ddebug(). Add h5ls test cases. --- src/H5Ddbg.c | 7 ++ tools/test/h5ls/expected/tall-3.ls | 76 ++++++++++++++++ .../expected/{tdset_idx.ls => tdset_idx-1.ls} | 0 tools/test/h5ls/expected/tdset_idx-2.ls | 86 +++++++++++++++++++ tools/test/h5ls/testh5ls.sh.in | 8 +- 5 files changed, 175 insertions(+), 2 deletions(-) create mode 100644 tools/test/h5ls/expected/tall-3.ls rename tools/test/h5ls/expected/{tdset_idx.ls => tdset_idx-1.ls} (100%) create mode 100644 tools/test/h5ls/expected/tdset_idx-2.ls diff --git a/src/H5Ddbg.c b/src/H5Ddbg.c index 1baed0231e8..4cab555cdd7 100644 --- a/src/H5Ddbg.c +++ b/src/H5Ddbg.c @@ -63,6 +63,7 @@ herr_t H5Ddebug(hid_t dset_id) { H5D_t *dset; /* Dataset to debug */ + haddr_t prev_tag = HADDR_UNDEF; /* Previous metadata tag (should always be undefined since this is an API function, but we'll include it anyways as it's proper form) */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) @@ -71,12 +72,18 @@ H5Ddebug(hid_t dset_id) if (NULL == (dset = (H5D_t *)H5VL_object_verify(dset_id, H5I_DATASET))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset"); + /* Set metadata tagging with dset oheader addr */ + H5AC_tag(dset->oloc.addr, &prev_tag); + /* Print B-tree information */ if (H5D_CHUNKED == dset->shared->layout.type) (void)H5D__chunk_dump_index(dset, stdout); else if (H5D_CONTIGUOUS == dset->shared->layout.type) fprintf(stdout, " %-10s %" PRIuHADDR "\n", "Address:", dset->shared->layout.storage.u.contig.addr); + /* Reset metadata tagging */ + H5AC_tag(prev_tag, NULL); + done: FUNC_LEAVE_API(ret_value) } /* end H5Ddebug() */ diff --git a/tools/test/h5ls/expected/tall-3.ls b/tools/test/h5ls/expected/tall-3.ls new file mode 100644 index 00000000000..7a676c98c71 --- /dev/null +++ b/tools/test/h5ls/expected/tall-3.ls @@ -0,0 +1,76 @@ +Opened "tall.h5" with sec2 driver. +/ Group + Attribute: attr1 {10} + Type: 8-bit integer + Data: + 97, 98, 99, 100, 101, 102, 103, 104, 105, 0 + Attribute: attr2 {2, 2} + Type: 32-bit big-endian integer + Data: + 0, 1, 2, 3 + Location: 1:96 + Links: 1 +/g1 Group + Location: 1:800 + Links: 1 +/g1/g1.1 Group + Location: 1:2536 + Links: 1 +/g1/g1.1/dset1.1.1 Dataset {10/10, 10/10} + Attribute: attr1 {27} + Type: 8-bit integer + Data: + 49, 115, 116, 32, 97, 116, 116, 114, 105, 98, 117, 116, 101, + 32, 111, 102, 32, 100, 115, 101, 116, 49, 46, 49, 46, 49, 0 + Attribute: attr2 {27} + Type: 8-bit integer + Data: + 50, 110, 100, 32, 97, 116, 116, 114, 105, 98, 117, 116, 101, + 32, 111, 102, 32, 100, 115, 101, 116, 49, 46, 49, 46, 49, 0 + Location: 1:5480 + Links: 1 + Storage: 400 logical bytes, 400 allocated bytes, 100.00% utilization + Type: 32-bit big-endian integer + Address: 6224 + Data: + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 2, 4, 6, + 8, 10, 12, 14, 16, 18, 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 0, 4, 8, 12, + 16, 20, 24, 28, 32, 36, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 0, 6, 12, + 18, 24, 30, 36, 42, 48, 54, 0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 0, 8, + 16, 24, 32, 40, 48, 56, 64, 72, 0, 9, 18, 27, 36, 45, 54, 63, 72, 81 +/g1/g1.1/dset1.1.2 Dataset {20/20} + Location: 1:8272 + Links: 1 + Storage: 80 logical bytes, 80 allocated bytes, 100.00% utilization + Type: 32-bit big-endian integer + Address: 6624 + Data: + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 +/g1/g1.2 Group + Location: 1:3568 + Links: 1 +/g1/g1.2/extlink External Link {somefile//somepath} +/g1/g1.2/g1.2.1 Group + Location: 1:4272 + Links: 1 +/g1/g1.2/g1.2.1/slink Soft Link {somevalue} +/g2 Group + Location: 1:1832 + Links: 1 +/g2/dset2.1 Dataset {10/10} + Location: 1:8960 + Links: 1 + Storage: 40 logical bytes, 40 allocated bytes, 100.00% utilization + Type: IEEE 32-bit big-endian float + Address: 6704 + Data: + 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9 +/g2/dset2.2 Dataset {3/3, 5/5} + Location: 1:9560 + Links: 1 + Storage: 60 logical bytes, 60 allocated bytes, 100.00% utilization + Type: IEEE 32-bit big-endian float + Address: 6744 + Data: + 0, 0.1, 0.2, 0.3, 0.4, 0, 0.2, 0.4, 0.6, 0.8, 0, 0.3, 0.6, 0.9, 1.2 +/g2/udlink UD Link {cannot follow UD links} diff --git a/tools/test/h5ls/expected/tdset_idx.ls b/tools/test/h5ls/expected/tdset_idx-1.ls similarity index 100% rename from tools/test/h5ls/expected/tdset_idx.ls rename to tools/test/h5ls/expected/tdset_idx-1.ls diff --git a/tools/test/h5ls/expected/tdset_idx-2.ls b/tools/test/h5ls/expected/tdset_idx-2.ls new file mode 100644 index 00000000000..03fd23aa879 --- /dev/null +++ b/tools/test/h5ls/expected/tdset_idx-2.ls @@ -0,0 +1,86 @@ +Opened "tdset_idx.h5" with sec2 driver. +dset_btree Dataset {20/200, 10/100} + Location: 1:589 + Links: 1 + Modified: 2016-04-24 03:03:49 CDT + Chunks: {5, 5} 100 bytes + Storage: 800 logical bytes, 800 allocated bytes, 100.00% utilization + Type: native int + Address: 873 + Flags Bytes Address Logical Offset + ========== ======== ========== ============================== + 0x00000000 100 2896 [0, 0, 0] + 0x00000000 100 2996 [0, 5, 0] + 0x00000000 100 3096 [5, 0, 0] + 0x00000000 100 3196 [5, 5, 0] + 0x00000000 100 3296 [10, 0, 0] + 0x00000000 100 3396 [10, 5, 0] + 0x00000000 100 3496 [15, 0, 0] + 0x00000000 100 3596 [15, 5, 0] + Data: + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, + 2, 3, 4, 5, 6, 7, 8, 9 +dset_filter Dataset {20/20, 10/10} + Location: 1:901 + Links: 1 + Modified: 2016-04-24 03:03:49 CDT + Chunks: {5, 5} 100 bytes + Storage: 800 logical bytes, 200 allocated bytes, 400.00% utilization + Filter-0: deflate-1 OPT {9} + Type: native int + Address: 1185 + Flags Bytes Address Logical Offset + ========== ======== ========== ============================== + 0x00000000 25 3696 [0, 0, 0] + 0x00000000 25 3721 [0, 5, 0] + 0x00000000 25 3746 [5, 0, 0] + 0x00000000 25 3771 [5, 5, 0] + 0x00000000 25 3796 [10, 0, 0] + 0x00000000 25 3821 [10, 5, 0] + 0x00000000 25 3846 [15, 0, 0] + 0x00000000 25 3871 [15, 5, 0] + Data: + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, + 2, 3, 4, 5, 6, 7, 8, 9 +dset_fixed Dataset {20/20, 10/10} + Location: 1:195 + Links: 1 + Modified: 2016-04-24 03:03:49 CDT + Chunks: {5, 5} 100 bytes + Storage: 800 logical bytes, 800 allocated bytes, 100.00% utilization + Type: native int + Address: 479 + Flags Bytes Address Logical Offset + ========== ======== ========== ============================== + 0x00000000 100 2096 [0, 0, 0] + 0x00000000 100 2196 [0, 5, 0] + 0x00000000 100 2296 [5, 0, 0] + 0x00000000 100 2396 [5, 5, 0] + 0x00000000 100 2496 [10, 0, 0] + 0x00000000 100 2596 [10, 5, 0] + 0x00000000 100 2696 [15, 0, 0] + 0x00000000 100 2796 [15, 5, 0] + Data: + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, + 2, 3, 4, 5, 6, 7, 8, 9 diff --git a/tools/test/h5ls/testh5ls.sh.in b/tools/test/h5ls/testh5ls.sh.in index be1eb845e88..5916f7970e1 100644 --- a/tools/test/h5ls/testh5ls.sh.in +++ b/tools/test/h5ls/testh5ls.sh.in @@ -104,6 +104,7 @@ $SRC_H5LS_OUTFILES/help-3.ls $SRC_H5LS_OUTFILES/nosuchfile.ls $SRC_H5LS_OUTFILES/tall-1.ls $SRC_H5LS_OUTFILES/tall-2.ls +$SRC_H5LS_OUTFILES/tall-3.ls $SRC_H5LS_OUTFILES/tarray1.ls $SRC_H5LS_OUTFILES/tattr2.ls $SRC_H5LS_OUTFILES/tattrreg_le.ls @@ -163,7 +164,8 @@ $SRC_H5LS_OUTFILES/tudlink-1.ls $SRC_H5LS_OUTFILES/tvldtypes1.ls $SRC_H5LS_OUTFILES/tvldtypes2le.ls $SRC_H5LS_OUTFILES/tvldtypes2be.ls -$SRC_H5LS_OUTFILES/tdset_idx.ls +$SRC_H5LS_OUTFILES/tdset_idx-1.ls +$SRC_H5LS_OUTFILES/tdset_idx-2.ls " @@ -311,6 +313,7 @@ TOOLTEST help-3.ls 0 -w80 -? # test simple command TOOLTEST tall-1.ls 0 -w80 tall.h5 TOOLTEST tall-2.ls 0 -w80 -r -d tall.h5 +TOOLTEST tall-3.ls 0 -w80 -r -d -v -a tall.h5 TOOLTEST tgroup.ls 0 -w80 tgroup.h5 TOOLTEST tgroup-3.ls 0 -w80 tgroup.h5/g1 @@ -469,7 +472,8 @@ fi # test for file with datasets that use Fixed Array chunk indices if test $USE_FILTER_DEFLATE = "yes" ; then # data read internal filters - TOOLTEST tdset_idx.ls 0 -w80 -d tdset_idx.h5 + TOOLTEST tdset_idx-1.ls 0 -w80 -d tdset_idx.h5 + TOOLTEST tdset_idx-2.ls 0 -w80 -d -v -a tdset_idx.h5 else echo "***skip testing tdset_idx.h5" fi From a9c80593164e384b660043b8b132ac63e8e9a5a5 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2025 17:02:42 +0000 Subject: [PATCH 2/7] Committing clang-format changes --- src/H5Ddbg.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/H5Ddbg.c b/src/H5Ddbg.c index 4cab555cdd7..bb672203ac9 100644 --- a/src/H5Ddbg.c +++ b/src/H5Ddbg.c @@ -62,9 +62,10 @@ herr_t H5Ddebug(hid_t dset_id) { - H5D_t *dset; /* Dataset to debug */ - haddr_t prev_tag = HADDR_UNDEF; /* Previous metadata tag (should always be undefined since this is an API function, but we'll include it anyways as it's proper form) */ - herr_t ret_value = SUCCEED; /* Return value */ + H5D_t *dset; /* Dataset to debug */ + haddr_t prev_tag = HADDR_UNDEF; /* Previous metadata tag (should always be undefined since this is an API + function, but we'll include it anyways as it's proper form) */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) From 988c81763f77ae0c06cfdf08c926b5c317dbfc67 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Thu, 6 Feb 2025 11:19:50 -0600 Subject: [PATCH 3/7] Fix cmake (hopefully) --- tools/test/h5ls/CMakeTests.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/test/h5ls/CMakeTests.cmake b/tools/test/h5ls/CMakeTests.cmake index 39ec81aa99d..72bea403aec 100644 --- a/tools/test/h5ls/CMakeTests.cmake +++ b/tools/test/h5ls/CMakeTests.cmake @@ -60,6 +60,7 @@ nosuchfile.ls tall-1.ls tall-2.ls + tall-3.ls tarray1.ls tattr2.ls tattrreg_le.ls @@ -72,7 +73,8 @@ tdataregbe.ls tdataregle.ls tdset-1.ls - tdset_idx.ls + tdset_idx-1.ls + tdset_idx-2.ls tempty.ls textlink-1.ls textlinksrc-1.ls @@ -261,6 +263,7 @@ # test simple command ADD_H5_TEST (tall-1 0 -w80 tall.h5) ADD_H5_TEST (tall-2 0 -w80 -r -d tall.h5) + ADD_H5_TEST (tall-2 0 -w80 -r -d -v -a tall.h5) ADD_H5_TEST (tgroup 0 -w80 tgroup.h5) ADD_H5_TEST (tgroup-3 0 -w80 tgroup.h5/g1) @@ -457,7 +460,8 @@ # test for file with datasets that use Fixed Array chunk indices if (USE_FILTER_DEFLATE) # data read internal filters - ADD_H5_TEST (tdset_idx 0 -w80 -d tdset_idx.h5) + ADD_H5_TEST (tdset_idx-1 0 -w80 -d tdset_idx.h5) + ADD_H5_TEST (tdset_idx-2 0 -w80 -d -v -a tdset_idx.h5) endif () From 828f6f0998053a3049d994053653f7f9a0e6ce77 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Thu, 6 Feb 2025 11:28:05 -0600 Subject: [PATCH 4/7] Fix cmake again (hopefully) --- tools/test/h5ls/CMakeTests.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/h5ls/CMakeTests.cmake b/tools/test/h5ls/CMakeTests.cmake index 72bea403aec..a8d25a680f1 100644 --- a/tools/test/h5ls/CMakeTests.cmake +++ b/tools/test/h5ls/CMakeTests.cmake @@ -263,7 +263,7 @@ # test simple command ADD_H5_TEST (tall-1 0 -w80 tall.h5) ADD_H5_TEST (tall-2 0 -w80 -r -d tall.h5) - ADD_H5_TEST (tall-2 0 -w80 -r -d -v -a tall.h5) + ADD_H5_TEST (tall-3 0 -w80 -r -d -v -a tall.h5) ADD_H5_TEST (tgroup 0 -w80 tgroup.h5) ADD_H5_TEST (tgroup-3 0 -w80 tgroup.h5/g1) From ccd595ecd5baad95c0b56133c869d6af8e9a2dc8 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Thu, 6 Feb 2025 20:05:51 -0600 Subject: [PATCH 5/7] Fix issue with modification times showing up differently on different systems. Add test case for v1 b-trees. --- tools/test/h5dump/h5dumpgentest.c | 4 ++ tools/test/h5ls/expected/tdset2-1.ls | 28 ++++++++++ tools/test/h5ls/expected/tdset2-2.ls | 67 ++++++++++++++++++++++++ tools/test/h5ls/expected/tdset_idx-2.ls | 61 ++++++++++----------- tools/test/h5ls/testfiles/tdset2.h5 | Bin 0 -> 10152 bytes tools/test/h5ls/testfiles/tdset_idx.h5 | Bin 10562 -> 10514 bytes tools/test/h5ls/testh5ls.sh.in | 7 +++ 7 files changed, 135 insertions(+), 32 deletions(-) create mode 100644 tools/test/h5ls/expected/tdset2-1.ls create mode 100644 tools/test/h5ls/expected/tdset2-2.ls create mode 100644 tools/test/h5ls/testfiles/tdset2.h5 diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index c81d114164f..825f75f2112 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -7291,6 +7291,10 @@ gent_dataset_idx(void) ret = H5Pset_chunk(dcpl, RANK, dims); assert(ret >= 0); + /* Disable storing object creation times as this causes problems with output repeatability */ + ret = H5Pset_obj_track_times(dcpl, false); + assert(ret >= 0); + /* dataset with fixed dimensions */ dims[0] = F68a_DIM20; dims[1] = F68a_DIM10; diff --git a/tools/test/h5ls/expected/tdset2-1.ls b/tools/test/h5ls/expected/tdset2-1.ls new file mode 100644 index 00000000000..f7647b94cf0 --- /dev/null +++ b/tools/test/h5ls/expected/tdset2-1.ls @@ -0,0 +1,28 @@ +/ Group +/dset1 Dataset {10/Inf, 20} + Data: + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 +/dset2 Dataset {30, 10/Inf} + Data: + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 diff --git a/tools/test/h5ls/expected/tdset2-2.ls b/tools/test/h5ls/expected/tdset2-2.ls new file mode 100644 index 00000000000..b74969b279d --- /dev/null +++ b/tools/test/h5ls/expected/tdset2-2.ls @@ -0,0 +1,67 @@ +Opened "tdset2.h5" with sec2 driver. +/ Group + Location: 1:96 + Links: 1 +/dset1 Dataset {10/Inf, 20/20} + Location: 1:800 + Links: 1 + Chunks: {5, 5} 100 bytes + Storage: 800 logical bytes, 800 allocated bytes, 100.00% utilization + Type: 32-bit big-endian integer + Address: 1400 + Flags Bytes Address Logical Offset + ========== ======== ========== ============================== + 0x00000000 100 4016 [0, 0, 0] + 0x00000000 100 4116 [0, 5, 0] + 0x00000000 100 4216 [0, 10, 0] + 0x00000000 100 4316 [0, 15, 0] + 0x00000000 100 4416 [5, 0, 0] + 0x00000000 100 4516 [5, 5, 0] + 0x00000000 100 4616 [5, 10, 0] + 0x00000000 100 4716 [5, 15, 0] + Data: + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 +/dset2 Dataset {30/30, 10/Inf} + Location: 1:6064 + Links: 1 + Chunks: {5, 5} 200 bytes + Storage: 2400 logical bytes, 2400 allocated bytes, 100.00% utilization + Type: IEEE 64-bit big-endian float + Address: 6336 + Flags Bytes Address Logical Offset + ========== ======== ========== ============================== + 0x00000000 200 4816 [0, 0, 0] + 0x00000000 200 5016 [0, 5, 0] + 0x00000000 200 5216 [5, 0, 0] + 0x00000000 200 5416 [5, 5, 0] + 0x00000000 200 5616 [10, 0, 0] + 0x00000000 200 5816 [10, 5, 0] + 0x00000000 200 8952 [15, 0, 0] + 0x00000000 200 9152 [15, 5, 0] + 0x00000000 200 9352 [20, 0, 0] + 0x00000000 200 9552 [20, 5, 0] + 0x00000000 200 9752 [25, 0, 0] + 0x00000000 200 9952 [25, 5, 0] + Data: + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 diff --git a/tools/test/h5ls/expected/tdset_idx-2.ls b/tools/test/h5ls/expected/tdset_idx-2.ls index 03fd23aa879..29675f30318 100644 --- a/tools/test/h5ls/expected/tdset_idx-2.ls +++ b/tools/test/h5ls/expected/tdset_idx-2.ls @@ -1,22 +1,21 @@ Opened "tdset_idx.h5" with sec2 driver. dset_btree Dataset {20/200, 10/100} - Location: 1:589 + Location: 1:573 Links: 1 - Modified: 2016-04-24 03:03:49 CDT Chunks: {5, 5} 100 bytes Storage: 800 logical bytes, 800 allocated bytes, 100.00% utilization Type: native int - Address: 873 + Address: 841 Flags Bytes Address Logical Offset ========== ======== ========== ============================== - 0x00000000 100 2896 [0, 0, 0] - 0x00000000 100 2996 [0, 5, 0] - 0x00000000 100 3096 [5, 0, 0] - 0x00000000 100 3196 [5, 5, 0] - 0x00000000 100 3296 [10, 0, 0] - 0x00000000 100 3396 [10, 5, 0] - 0x00000000 100 3496 [15, 0, 0] - 0x00000000 100 3596 [15, 5, 0] + 0x00000000 100 2848 [0, 0, 0] + 0x00000000 100 2948 [0, 5, 0] + 0x00000000 100 3048 [5, 0, 0] + 0x00000000 100 3148 [5, 5, 0] + 0x00000000 100 3248 [10, 0, 0] + 0x00000000 100 3348 [10, 5, 0] + 0x00000000 100 3448 [15, 0, 0] + 0x00000000 100 3548 [15, 5, 0] Data: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, @@ -28,24 +27,23 @@ dset_btree Dataset {20/200, 10/100} 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 dset_filter Dataset {20/20, 10/10} - Location: 1:901 + Location: 1:869 Links: 1 - Modified: 2016-04-24 03:03:49 CDT Chunks: {5, 5} 100 bytes Storage: 800 logical bytes, 200 allocated bytes, 400.00% utilization Filter-0: deflate-1 OPT {9} Type: native int - Address: 1185 + Address: 1137 Flags Bytes Address Logical Offset ========== ======== ========== ============================== - 0x00000000 25 3696 [0, 0, 0] - 0x00000000 25 3721 [0, 5, 0] - 0x00000000 25 3746 [5, 0, 0] - 0x00000000 25 3771 [5, 5, 0] - 0x00000000 25 3796 [10, 0, 0] - 0x00000000 25 3821 [10, 5, 0] - 0x00000000 25 3846 [15, 0, 0] - 0x00000000 25 3871 [15, 5, 0] + 0x00000000 25 3648 [0, 0, 0] + 0x00000000 25 3673 [0, 5, 0] + 0x00000000 25 3698 [5, 0, 0] + 0x00000000 25 3723 [5, 5, 0] + 0x00000000 25 3748 [10, 0, 0] + 0x00000000 25 3773 [10, 5, 0] + 0x00000000 25 3798 [15, 0, 0] + 0x00000000 25 3823 [15, 5, 0] Data: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, @@ -59,21 +57,20 @@ dset_filter Dataset {20/20, 10/10} dset_fixed Dataset {20/20, 10/10} Location: 1:195 Links: 1 - Modified: 2016-04-24 03:03:49 CDT Chunks: {5, 5} 100 bytes Storage: 800 logical bytes, 800 allocated bytes, 100.00% utilization Type: native int - Address: 479 + Address: 463 Flags Bytes Address Logical Offset ========== ======== ========== ============================== - 0x00000000 100 2096 [0, 0, 0] - 0x00000000 100 2196 [0, 5, 0] - 0x00000000 100 2296 [5, 0, 0] - 0x00000000 100 2396 [5, 5, 0] - 0x00000000 100 2496 [10, 0, 0] - 0x00000000 100 2596 [10, 5, 0] - 0x00000000 100 2696 [15, 0, 0] - 0x00000000 100 2796 [15, 5, 0] + 0x00000000 100 2048 [0, 0, 0] + 0x00000000 100 2148 [0, 5, 0] + 0x00000000 100 2248 [5, 0, 0] + 0x00000000 100 2348 [5, 5, 0] + 0x00000000 100 2448 [10, 0, 0] + 0x00000000 100 2548 [10, 5, 0] + 0x00000000 100 2648 [15, 0, 0] + 0x00000000 100 2748 [15, 5, 0] Data: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, diff --git a/tools/test/h5ls/testfiles/tdset2.h5 b/tools/test/h5ls/testfiles/tdset2.h5 new file mode 100644 index 0000000000000000000000000000000000000000..e532af16f0e1599f45a93486d632ff22c2a867f8 GIT binary patch literal 10152 zcmeHLy>8S%5FVc|!Q=;WAwWQY!hcFY>9a^VlnNrCpiB`21w|w%@(AG#cmR;DOi7tC zB@aNsBc!AYGduGk-Nbh%Br6^p; zXMAN3iuH70>kQAo_5SsThujeRh%MG-0^kpAL6gd1L+9j`d zLC&2eez&A7<>LfZxxZB^QDtvP*(!G?GJ?cN&6mwHUW#z_u77z$w4K{0eR%Qo*;+v@ zn+-orIeZ3qU-vE#$Ng`k^1UlqMXVRttr0@(omYUz*_!!%^@0iSaagYa?hL@$Z2+V1 z4(IO&VCv`@?h70&aGwX@{QRolv=H@!;J{-itKZCn4H2*BP#}T+eZBx=+GCiCiVxlnC(x*QWcJ zQnzw!!ym(a*|hd`eBuvUJmFNNvIIi1L`S-2&$DFqmf11K=`6z^ zX-xbU{;>CE%=`hrjIyKhkvEJ0`46;_Un)7zD1k!f=BnlJ60JnFSkLxJWrhSJ!&f}La>J`Aj zPvC()9DwtDUoZ9Z$sb}}`Dyp+G1Q3WNd!6o@>53X}eFJ^}6te}q3ofu`2MY00Dg0(27q A0{{R3 literal 0 HcmV?d00001 diff --git a/tools/test/h5ls/testfiles/tdset_idx.h5 b/tools/test/h5ls/testfiles/tdset_idx.h5 index b31d5c3fd8c1ba0e7691672e348384676d7118e8..a93192247da2d2be5d089f336cc0bf2a412c1ae1 100644 GIT binary patch delta 603 zcmX>UG%3if)5FD$mrII^nS+A?2L3~VkS0XL04kxpTl<~Ahf5HX!u*V->BxAZn>(ZJ z#6C%-RA#7J9++Vex^!x9B3LWqTo1=#d0|N&a%muF* zA)5Z%H?+Drx;QZ~oQH}qK$WCG=@U>|hZCY>0+jv&r6af?;(MU9>;z$Jh%*=%8C4h< zm?ke`7M@(oWWwahJXw=*liEo|CS{m&6kvW4fEW_J=1vaW4{?lzlYcQUuHR_ka0IM@ zkq_?vUKWUkApd!@!R}`)go-%uL1ZMsR3r+o2!+>;!drsE+l$~S0}Z-{-~xH?QFsNX zT#syaWc|!E*^R?*a|6dVb_q|Yw-mS`ZfSwilMRI?2)uxDe4z0M7Tf^ki10#mfCVd{ VoI6l@v!M{LI6E-qShOwc0sz#TWeWfR literal 10562 zcmeD5aB<`1lHy|G;9!7(|4`th2@x@XN_aIL&-3?i31U)sS}PNdj4POgKx$wbVKf&L z10w?in$(?~=#^4RdpP^+k;BaH) zgQwuVP@OGo{uAuPVqVU-GkAfa(xXO${o^V5JB(#aMynvH>wW5QAzVP~k;wF`$vaVsX?T#DoF0!ycP? zqwxU>0pijmw(z627_n}lL>;x=jLkes+()clZ1z%Hj99l&qK?{b#%5l{t>gqCU`bL_ zNMlP9W8+w`OoD;)2!k Date: Thu, 6 Feb 2025 20:14:30 -0600 Subject: [PATCH 6/7] Add cmake for new tests --- tools/test/h5ls/CMakeTests.cmake | 7 +++++++ tools/test/h5ls/testh5ls.sh.in | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/test/h5ls/CMakeTests.cmake b/tools/test/h5ls/CMakeTests.cmake index a8d25a680f1..56ba06ab5e7 100644 --- a/tools/test/h5ls/CMakeTests.cmake +++ b/tools/test/h5ls/CMakeTests.cmake @@ -20,6 +20,7 @@ # Copy all the test files from source directory to test directory # -------------------------------------------------------------------- set (LIST_HDF5_TESTLS_FILES + tdset2.h5 tdset_idx.h5 ) @@ -73,6 +74,8 @@ tdataregbe.ls tdataregle.ls tdset-1.ls + tdset2-1.ls + tdset2-2.ls tdset_idx-1.ls tdset_idx-2.ls tempty.ls @@ -282,6 +285,10 @@ # test for displaying simple space datasets ADD_H5_TEST (tdset-1 0 -w80 -r -d tdset.h5) + # tests for displaying chunked datasets + ADD_H5_TEST (tdset2-1 0 -w80 -r -d tdset2.h5) + ADD_H5_TEST (tdset2-2 0 -w80 -r -d -v -a tdset2.h5) + # test for displaying soft links (dangle) ADD_H5_TEST (tslink-1 0 -w80 -r tslink.h5) diff --git a/tools/test/h5ls/testh5ls.sh.in b/tools/test/h5ls/testh5ls.sh.in index 84164543fe2..86827ab2dda 100644 --- a/tools/test/h5ls/testh5ls.sh.in +++ b/tools/test/h5ls/testh5ls.sh.in @@ -332,7 +332,7 @@ TOOLTEST tgrp_comments.ls 0 -w80 -v -g tgrp_comments.h5/glongcomment # test for displaying simple space datasets TOOLTEST tdset-1.ls 0 -w80 -r -d tdset.h5 -# test for displaying chunked datasets +# tests for displaying chunked datasets TOOLTEST tdset2-1.ls 0 -w80 -r -d tdset2.h5 TOOLTEST tdset2-2.ls 0 -w80 -r -d -v -a tdset2.h5 From 200e4896d8f859e7e90975ebc9f68e5c3967ea41 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Fri, 7 Feb 2025 13:43:25 -0600 Subject: [PATCH 7/7] Add RELEASE.txt entry --- release_docs/RELEASE.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index a7d67f698c5..bf729405618 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -514,6 +514,13 @@ Bug Fixes since HDF5-2.0.0 release =================================== Library ------- + - Fixed an error in H5Ddebug + + H5Ddebug would fail for any chunked dataset with a chunk index, due to its + failure to tag the dataset before performing metadata operations. This + caused h5ls -va to silently fail to print chunk addresses. This has been + fixed. + - Fixed a bug in the H5Oexists and H5Oexists_by_name API routines that would cause those routines to return FAIL instead of FALSE when checking the existence of a non-existent object with a file ID instead of a