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

Skip part of dsets.c test for IBM long double type #4136

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions test/dsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -5899,6 +5899,14 @@ test_floattypes(hid_t file)
if ((datatype = H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0)
goto error;

/* Skip creating a custom floating-point type when long double
* is the IBM long double. The library detects different formats
* for the type on big-endian vs. little-endian systems and will
* cause this to fail on little-endian systems while passing on
* big-endian systems. The library needs proper support for the
* IBM long double type before we can test this.
*/
#if LDBL_MANT_DIG != 106
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I plan to eventually fix the library's configure checks and convert this to a more meaningful #ifdef, but for now this will do for IBM long double detection.

/* Get the layout of the native long double type */
if (H5Tget_fields(datatype, &ld_spos, &ld_epos, &ld_esize, &ld_mpos, &ld_msize) < 0)
goto error;
Expand All @@ -5919,6 +5927,7 @@ test_floattypes(hid_t file)
if (H5Tset_size(datatype, 16) < 0)
goto error;
}
#endif

/* Create the data space */
if ((space = H5Screate_simple(2, size, NULL)) < 0)
Expand Down
Loading