forked from HDFGroup/hdf5
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch over buggy library behavior in Julia CI
A recent fix for H5Oexists(_by_name) changes the returned value of the API call when checking for a non-existent object with a file ID (FAIL should be false). The Julia CI explicitly tests for the buggy result. We've notified the maintainers and this source patch will fix the issue for our CI until it is fixed upstream.
- Loading branch information
Showing
5 changed files
with
35 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff --git a/test/objects.jl b/test/objects.jl | ||
index d68dd749..0541e91a 100644 | ||
--- a/test/objects.jl | ||
+++ b/test/objects.jl | ||
@@ -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" | ||
+ # Buggy behavior in earlier versions of HDF5 returns FAIL (-1) | ||
+ @test_throws API.H5Error API.h5o_exists_by_name(h5f, "noonian") | ||
+ else | ||
+ # The correct behavior is to return false (0) | ||
+ @test API.h5o_exists_by_name(h5f, "noonian") == 0 | ||
+ end | ||
|
||
loc_id = API.h5o_open(h5f, "data", API.H5P_DEFAULT) | ||
try |