Skip to content

Conversation

@mattjala
Copy link
Contributor

@mattjala mattjala commented Dec 11, 2025

h5diff silently returns an error code of 1 whenever the two provided files differ structurally (one contains an object the other does not, different total object count). This PR adds a message indicating that the two files do not contain the same object set.

Resolves #6102


Important

Add message in h5diff to indicate when files do not have the same set of objects, with updates to expected test outputs.

  • Behavior:
    • Adds message in print_info() in h5diff_common.c when files differ structurally and opts->contents is 0, suggesting to use -v for more details.
  • Tests:
    • Updates h5diff_11.txt and h5diff_13.txt to include new message about differing object sets.

This description was created by Ellipsis for 2a42195. You can customize this summary. It will automatically update as commits are pushed.

@mattjala mattjala added the Component - Tools Command-line tools like h5dump, includes high-level tools label Dec 11, 2025
@github-project-automation github-project-automation bot moved this to To be triaged in HDF5 - TRIAGE & TRACK Dec 11, 2025
@mattjala mattjala marked this pull request as draft December 11, 2025 18:06
hyoklee
hyoklee previously approved these changes Dec 11, 2025
Copy link
Member

@hyoklee hyoklee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattjala , thank you for the quick fix!

@mattjala mattjala marked this pull request as ready for review December 12, 2025 16:07

if (opts->contents == 0 && !opts->mode_verbose) {
printf("Files do not have the same set of objects.\n");
printf("Use -v for a list of objects.\n");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know whether "a list of objects" means objects in both files or just one file and, if so, which one and should it be both? If it should be both, then it can be a separate issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -v option prints a list of the objects in both of the files and indicates which ones are not shared between the two files. I don't think the -v option needs any changes - what specific change are you requesting?

@github-project-automation github-project-automation bot moved this from To be triaged to In progress in HDF5 - TRIAGE & TRACK Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component - Tools Command-line tools like h5dump, includes high-level tools

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

h5diff report mode should indicate when there is a diff due to a missing dataset in one file

3 participants