fix(tools): h5rs diff compares every name of a hard-linked object
The path walk skipped the second hard link to an object, so a file that shares one dataset between /x and /y differed from a file holding two identical copies: "</y> exists only in <B>", exit 1, where h5diff exits 0. For a hard-linked group every member was reported the same way. diff now enumerates every path below the start object (a hard link back to an ancestor is recorded but not descended into), so each name is compared. A group whose links cannot be read is now an error instead of an empty group. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
+4
-2
@@ -130,8 +130,10 @@
|
||||
files); metadata space is one figure, not broken down.
|
||||
- `h5rs diff [-r] [-q] [-d D] [-p R] A B [OBJ1 [OBJ2]]` compares objects,
|
||||
kinds, datatypes, shapes, attributes, values and link targets; exit
|
||||
status 0/1/2 as h5diff's. Objects that cannot be compared count as a
|
||||
difference (h5diff exits 0 for them), and NaN equals NaN.
|
||||
status 0/1/2 as h5diff's. Every path is compared, including every name
|
||||
of a hard-linked object and the members of a hard-linked group. Objects
|
||||
that cannot be compared count as a difference (h5diff exits 0 for them),
|
||||
and NaN equals NaN.
|
||||
- `h5rs check [--data] FILE` is a structural validator: it walks every
|
||||
object, parses every header message, verifies the checksums of every
|
||||
version 2+ structure it meets (superblock, object headers and
|
||||
|
||||
Reference in New Issue
Block a user