Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix H5Oexist test result after HDF5 bugfix #1170

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

derobins
Copy link
Contributor

A bugfix in the HDF5 library changed the return value of the H5Oexists(_by_name) API call. In earlier versions of the library, when the ID was a file ID and the object didn't exist, the call would return FAIL (-1). The correct behavior is to return false (0). This change will appear in the next released version of HDF5, which is planned to be 2.0.0.

This change updates the object test to expect FAIL for 1.14.5 and earlier and false for later versions.

A bugfix in the HDF5 library changed the return value of the
H5Oexists(_by_name) API call. In earlier versions of the library,
when the ID was a file ID and the object doesn't exist, the call
would return FAIL (-1). The correct behavior is to return false (0).
This change will appear in the next released version of HDF5,
which is planned to be 2.0.0.

This change updates the object test to expect FAIL for 1.14.5 and
earlier and false for later versions.
@derobins
Copy link
Contributor Author

I'm applying this patch in our CI, so getting this in ASAP isn't critical

@@ -16,7 +16,13 @@ using HDF5.API
h5open(fn, "r") do h5f
@test API.h5o_exists_by_name(h5f, "data")
@test API.h5o_exists_by_name(h5f, "lore")
@test_throws API.H5Error API.h5o_exists_by_name(h5f, "noonian")
@static if HDF5.API.h5_get_libversion() <= v"1.14.5"
Copy link
Collaborator

@simonbyrne simonbyrne Oct 24, 2024

Choose a reason for hiding this comment

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

@derobins Are there no further planned patch releases on 1.14? Would it be safer to use

Suggested change
@static if HDF5.API.h5_get_libversion() <= v"1.14.5"
@static if HDF5.API.h5_get_libversion() < v"2"

Copy link
Contributor Author

@derobins derobins Oct 24, 2024

Choose a reason for hiding this comment

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

If there were another release of 1.14, it would include the H5Oexists bugfix, so >= 1.14.5 is probably safer.

@mkitti
Copy link
Member

mkitti commented Oct 24, 2024

Thank you, @derobins .

@mkitti mkitti merged commit 612cec7 into JuliaIO:master Oct 24, 2024
18 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants