H5LS-tintascii fails on big-endian ppc64: h5ls prints "8-bit integer" instead of "native signed char"
- Dominant language
- C
- Stars
- 988
- Forks
- 355
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 12
Description
### Describe the bug
The `H5LS-tintascii` CTest fails on a **big-endian PowerPC (ppc64)** machine because `h5ls` reports the datatype of an 8-bit signed integer as a generic `8-bit integer` instead of the expected `native signed char`.
On PowerPC, the default `char` is *unsigned*, so `H5T_NATIVE_SCHAR` no longer matches the file's signed 8-bit integer type. `h5ls` falls back to printing the generic `8-bit integer` description, which does not match the portable reference output `tintascii.ls`.
### Expected behavior
`h5ls -w80 -vldrs tintascii.h5` prints:
```
Type: native signed char
```
### Actual behavior
On ppc64 (big endian), it prints:
```
Type: 8-bit integer
```
### CDash test result
https://my.cdash.org/tests/444670969
Relevant diff from the test output:
```
-- line = 7
***ACTUAL: Type: 8-bit integer
****REFER: Type: native signed char
-- line = 15
***ACTUAL: Type: 8-bit integer
****REFER: Type: native signed char
```
Command run:
```
h5ls -w80 -vldrs tintascii.h5
```
### Platform (please complete the following information)
- **Site:** echidna (Continuous)
- **OS:** Linux 3.10.0-1160.36.2.el7.ppc64 (RHEL 7.9), **ppc64, big endian**
- **Compiler:** gcc 4.8
- **MPI:** mpich 3.3
- **Build config:** `ppc64/rh-7.9/mpich-3.3/gcc-4.8/-sh/f/mp/nr/np=4`
- **CMake/CTest:** ctest 3.29.0-rc2
### Additional context
The root cause is that `char` signedness is platform-dependent (unsigned by default on PowerPC). The reference expected output assumes `signed char` maps to `H5T_NATIVE_SCHAR`. Either the reference output needs a big-endian / unsigned-char variant, or the test needs to account for platforms where the native `char` is unsigned.
Contributor guide
Assessment
This issue has not been assessed yet.