769 Commits
Author SHA1 Message Date
jhendersonHDF 57128d33b2 Fix h5ls issue with quoting when displaying integer data as ASCII characters (#6553)
When using the '-s' (h5ls) or '-r' (h5dump) option to display 1-byte integer datasets and attributes as ASCII characters, a closing double-quote character for data values was dropped in some cases.
2026-08-07 12:27:55 -05:00
scivisionandscivision d006fb8d3a CMake Fortran float128 check simplification / correction (#6584)
* CMake bracket-quote Fortran float128 check

this eliminates ambiguous escaping flagged by CMake CMP0219 warning

* CMake fix test escaping

---------

Co-authored-by: scivision <scivision@users.noreply.github.com>
2026-08-06 12:16:06 -05:00
Scot BreitenfeldandH. Joe Lee cab98811c6 h5repack: fix silent loss of a declared cd_nelmts for UD filters (#6466)
A declared cd_nelmts with no values following it (e.g. UD=<filtn>,<flag>,1)
was never committed to filt->cd_nelmts: the trailing token (no comma after
it) was always treated as a value, never checked against the l/f/p pending
flags the way the comma-triggered branch does. h5repack's own validation
then silently passed since cd_nelmts stayed at its default 0, and the
mismatch was only ever caught by coincidence when the underlying filter
plugin did its own internal cd_values check (issue #6462).

Commit the trailing token to whichever UD field is still pending, mirroring
the comma-triggered branch exactly.

Co-authored-by: H. Joe Lee <hyoklee@hdfgroup.org>
2026-07-01 16:45:16 -05:00
4891139ebd Updated h5dump --xml (#6394)
* Updated h5dump --xml

The location of the files HDF5-File.xsd and HDF5-File.dtd no longer exists, and
the files were added to the repo (PR #5490).  Before the --xml is actually removed,
running the h5dump tests will fail.  This PR updated h5dump and the expected output
to use the correct files' location and actually completed the ticket HELP-2668.

* Added missing expected files from the previous commit

* Fixed typo

* Made corrections per review feedbacks

* Committing clang-format changes

* Missing files from previous commit

* Use valid URL for xmlns

---------

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-08 14:44:10 -04:00
Aleksandar Jelenak 58b87ef4ae Test sec2 metadata block size for all libver bounds (#6427)
After PR #6352 made h5repack default to H5F_LIBVER_V18 as the low bound,
the existing metadata block size option check broke because with V18+
the larger meta_block_size shrinks the output file rather than growing
it. Loop the check over every H5F_LIBVER_* low bound and assert the
size ordering appropriate to each regime.
2026-06-03 10:30:22 -04:00
Aleksandar Jelenak 00af022f1e Change h5repack low library bound to H5F_LIBVER_V18 (#6352) 2026-05-26 15:00:56 -04:00
H. Joe LeeandClaude Sonnet 4.6 72b352bd7f fix: zlib-ng build error on mingw (#6402)
Fixed integer size mismatch in Windows builds in issue  #5730.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 16:37:20 -05:00
86bdc78365 ✨[Feature] Digital Signature Verification for HDF5 Plugins (#6198)
feat: add optional digital signature verification for HDF5 filter plugins

Introduce an opt-in plugin signing and verification system that allows
HDF5 deployments to require cryptographically signed filter plugins before
loading them. Disabled by default (HDF5_REQUIRE_SIGNED_PLUGINS=OFF).

New tool: h5sign
- Signs plugin shared libraries by appending an RSA signature and a
  14-byte footer (algo_id | sig_len | 8-byte magic | format_ver) to the
  binary without modifying the original content.
- Supports SHA-512 (default), SHA-256, SHA-384, and their PSS variants
  (-a/--algorithm flag).
- Detects already-signed plugins; --force strips the old signature and
  re-signs.
- Security hardened: keeps the file descriptor open through hashing and
  appending (no TOCTOU window), enforces a 2048-bit minimum RSA key size,
  rolls back partial writes on failure, and rejects paths that are not
  regular files.

Verification (H5PLsig.c)
- At plugin load time, reads the footer, validates the magic and format
  version, then checks the RSA signature against all public keys found in
  the KeyStore directory.
- File is hashed once; per-key verification operates on the pre-computed
  digest (no redundant I/O for multi-key keystores).
- Plugins whose signature hash appears in revoked_signatures.txt are
  rejected regardless of key validity.
- Runtime debug output via HDF5_DEBUG=pl.

KeyStore management
- Trusted public keys are PEM files in a directory specified by
  HDF5_PLUGIN_KEYSTORE_DIR (build time) or HDF5_PLUGIN_KEYSTORE (env var).
- HDF5_LOCK_PLUGIN_KEYSTORE cmake option disables the env-var override for
  security-hardened deployments.

Test infrastructure
- h5signverifytest: positive, negative, tamper, re-sign, and revocation
  test cases.
- CTest fixture-based dependency graph (FIXTURES_SETUP/FIXTURES_REQUIRED)
  replaces fragile DEPENDS chains so tests remain correct under -R filtering.
- Dedicated signed-plugins.yml CI workflow; full test suite scoped to
  H5SIGN and H5PLUGIN-signature tests to avoid unrelated flaky failures.
- Cross-platform: Linux, macOS, and Windows (MSVC-compatible, BIO-based
  OpenSSL I/O, HDsleep/HDsetenv portability wrappers).

Documentation: docs/PLUGIN_SIGNATURE_README.md covers usage, footer
format, revocation file format, FAQ, and troubleshooting.

Co-authored-by: Glenn Song <gsong@hdfgroup.org>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-06 09:35:19 -05:00
jhendersonHDF 5a11a79fc4 Improvements to CMake logic for handling filters (#6287)
* Re-write zlib/szip CMake logic for clarity

* Update external libaec, zlib-ng and zlib builds to not use patching process

* Add FindZLIBNG module to locate zlib-ng on system

* Rework HDF5 filter plugins support
2026-03-16 13:46:48 -05:00
Scot Breitenfeld 322b30b6e8 Fix POSIX header guard to include _WIN32 for Intel icx on Windows (#6244)
Intel's icx compiler defines _WIN32 (with underscore) but not WIN32,
causing unistd.h and other POSIX headers to be incorrectly included
on Windows builds.
2026-03-01 07:19:05 -06:00
Julien Schueller d58638be09 CMake: Fix Fortran cross-compilation support
Refactor the cross-compilation infrastructure to rely on the standard
CMAKE_CROSSCOMPILING_EMULATOR variable instead of the custom
CROSSCOMPILING_PATH environment hack.

Key changes:
- Removed `ENVIRONMENT "${CROSSCOMPILING_PATH}"` from all test definitions.
- Updated custom commands (e.g., H5match_types, H5_gen) to invoke the
  emulator explicitly when cross-compiling.
- Updated ConfigureChecks.cmake and HDF5UseFortran.cmake to enable
  `try_run` checks when an emulator is defined.
- Added config/toolchain/mingw-w64-x86-64-wine.sh wrapper to automatically
  locate MinGW runtime libraries (like libgfortran) for Wine execution.
- Cleaned up toolchain files to remove hardcoded emulator paths, deferring
  configuration to the build environment.
2026-02-13 14:45:02 -06:00
Matt L e98e0aa951 Add h5diff message about file object difference (#6103)
* Correct reference files

* Prevent multiple h5diff error messages
2026-01-23 11:34:45 -06:00
jhendersonHDF d1efeba7be Add predefined datatype for FP4 format (#6122)
Adds predefined datatype for FP4 data in E2M1 format

Does not add support for any native FP4 types; datatype conversions are performed in software
2025-12-31 11:44:08 -06:00
jhendersonHDF 441d83a896 Add predefined datatypes for FP6 formats (#6097)
Adds predefined datatypes for FP6 data in E2M3 and E3M2 formats

Does not add support for any native FP6 types; datatype conversions are performed in software
2025-12-19 12:56:54 -06:00
Matt L a7fdefc0ea Resolve VOL CI h5dump/h5repack failures (#6054)
* Replace filter change with format change
2025-12-02 13:44:51 -06:00
jhendersonHDF eb72e67ed2 Add predefined datatypes for FP8 formats (#5882)
Adds predefined datatypes for FP8 data in E4M3 and E5M2 formats

Does not add support for any native FP8 types; datatype conversions are performed in software
2025-11-03 15:10:22 -06:00
Neil Fortner 5e03b3a315 Change default file format to 1.8 (#5949)
Change default file format to 1.8 across various tests and examples, updating file creation and access logic accordingly.

Behavior:
Default file format version changed to 1.8 in H5Pfapl.c.
Updated file creation and access to use 1.8 format in h5ex_g_compact.c and test_file_image.c.
Set earliest file format in multiple test files including cache_tagging.c, dtypes.c, and links.c.
Tests:
Modified expected output in tools/test/misc/expected/*.ls files to reflect new file format locations.
Adjusted test logic in test_file_image.c and cache_tagging.c to accommodate format changes.
Misc:
Added comments and TODOs for future format testing in test_file_image.c.
Minor variable renaming for clarity in test_file_image.c.
2025-10-30 15:26:12 -05:00
Matt L e5f526b62d Fix use of uninit memory in h5dumpgentest (#5947)
Fix uninitialized memory usage in h5dumpgentest.c by initializing arrays and structures, using calloc, and adding memory deallocation.
2025-10-27 09:25:00 -05:00
Matt L 21aaab4885 Close resources in h5dumpgentest properly (#5913)
Ensure proper closure of resources in gent_array1_big, gent_nested_compound_dt, and gent_intscalars in h5dumpgentest.c.
Add error handling and cleanup logic to prevent resource leaks.
2025-10-16 08:43:41 -05:00
Matt L d17773e209 Disable szip/deflate VOL tests when those files can't be generated (#5909) 2025-10-16 08:34:29 -05:00
Allen Byrne fb35cde24a Rework Fortran configure to allow cross compile overrides (#5720)
Behavior:
Modify HDF5UseFortran.cmake to handle cross-compilation by providing default KINDs and sizes when CMAKE_CROSSCOMPILING is true.
Default values for INTEGER and REAL KINDs and their sizes are set when cross-compiling.
Error messages are adjusted to reflect cross-compilation scenarios.
Logic:
Conditional checks added for CMAKE_CROSSCOMPILING to determine if default values should be used.
Default values include INTEGER KINDs {1,2,4,8,16} and REAL KINDs {4,8,10,16}.
Default sizes for native kinds are set to 4 for INTEGER and REAL, and 8 for DOUBLE PRECISION when cross-compiling.
Misc:
Adjustments to verbose messages to indicate when defaults are used during cross-compilation.
2025-10-12 17:30:46 -05:00
Matt L c83b798de5 Generate VOL tests for h5repack (#5793)
* Generate VOL tests for h5repack

* Correct cleanup depends

* Correct wrong varname

* Remove 'cmake' specification
2025-09-30 20:24:41 -05:00
Matt L af77085d3f Generate VOL tests for h5dump (#5763)
Add VOL tests for h5dump, update test generation logic, and modify test configurations.

Tests:
      Add VOL tests for h5dump in CMakeTests.cmake and CMakeTestsXML.cmake.
      Modify ADD_H5_TEST macro to support VOL-specific tests and filtering.
      Add gent_tvms() function in h5dumpgentest.c and h5dumpgentest.h for generating test files.
2025-09-30 13:14:44 -05:00
Allen Byrne 8f89d1fe7c Develop big endianCorrect BE testing issues (#5866)
* Use bigendian specific files on those machine
* Examples need a bigendian check and var
* Update the reference files
2025-09-27 08:21:12 -05:00
jhendersonHDF 748875a7d7 Add predefined datatypes for bfloat16 data (#5402)
Adds predefined datatypes for little- and big-endian bfloat16 data

Does not add support for any native bfloat16 types; datatype conversions are performed in software

Also adds missing float16 predefined types to fortran
2025-09-26 13:33:56 -05:00
Matt L fe7ae303b1 Add missing cleanup dependency to h5repack tests (#5878)
* Fix overwriting dependency list
2025-09-25 17:10:24 -05:00
Matt L d072fcce90 Merge h5repack test macros (#5792) 2025-09-25 08:57:14 -05:00
Matt L fdabc30649 Generate VOL tests for h5ls (#5769)
* Generate VOL tests for h5ls
* Update workflow
* Rework test skipping
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
2025-09-24 11:54:52 -05:00
Matt L 9d2134e24a Add missing test files to h5gentest --h5repack (#5791)
* Add missing test files to h5gentest --h5repack  and update generator routines for type handling.
2025-09-22 08:42:55 -05:00
Matt L 6ea1f50431 Generate VOL tests for h5mkgrp (#5772)
* Rework h5mkgrp ADD_H5_TEST

* Generate VOL tests for h5mkgrp

* Fix h5ls-verification test not being skipped with regex
2025-09-20 12:23:32 -05:00
Dana Robinson 5be9b57ccc Remove checks for sys/types.h (#5821)
This is present on all systems we support, including Windows. There is
no reason to check for it or hide its inclusion behind ifdefs.
2025-09-15 12:38:08 -05:00
Matt L 0a73bd9b57 Merge h5dump test macros (#5752) 2025-09-15 08:00:53 -05:00
Matt L baa182a743 Add external ref test files to h5dumpgentest (#5761)
The trefer_extR test depends upon this pair of files, but always uses the pre-generated ones checked into the repo. This adds a routine to generate them, which will soon be used by the h5dump VOL tests.
2025-09-03 22:52:10 -05:00
Matt L 3d6d43ba87 Merge h5ls add-test macros (#5766)
Refactor ADD_H5_TEST macro in CMakeTests.cmake to consolidate test definitions and improve consistency.

Macros:
Consolidated ADD_H5_TEST and ADD_H5_ERR_TEST into a single ADD_H5_TEST macro in CMakeTests.cmake.
ADD_H5_TEST now accepts RESULT_CODE and optional RESULT_ERRCHECK as keyword arguments.

Test Definitions:
Updated all test invocations to use the new ADD_H5_TEST macro format with RESULT_CODE and RESULT_ERRCHECK where applicable.
Removed redundant ADD_H5_ERR_TEST macro usage.

Behavior:
Ensures consistent test setup and error handling across all h5ls tests.
2025-09-03 22:51:14 -05:00
Matt L 8093d2dd90 Remove unused args from h5diff test macro (#5753) 2025-09-02 06:43:06 -05:00
Allen Byrne 63803d7115 allow better CMake version testing (#5727)
* add cmake latest workflow with lukka/get-cmake@latest
* Upgrade minimum CMake version to 3.26
2025-08-23 06:43:20 -05:00
Matt L 30c3636684 Correct VFD h5repack test file cleanup (#5717)
Improve test file cleanup in h5repacktst.c by using h5_delete_test_file and avoiding deletion of default-driver exclusive files with non-default drivers.

Behavior:
Use h5_delete_test_file in h5repacktst.c for file deletions, ensuring compatibility with Family VFD filename requirements.
Avoid deleting default-driver exclusive files with non-default drivers in h5repacktst.c.

File Management:
Reorganize file arrays in h5repackgentest.h to separate default-driver files from others.
2025-08-19 07:29:04 -05:00
Matt L abada2661b Generate VOL tests for h5diff (#5680) 2025-08-15 11:39:33 -05:00
Allen Byrne 497b65ad0f Add file header comments to CMake files (#5688) 2025-08-13 07:19:57 -05:00
Matt L e05cff7391 Fix VOL CMake builds (#5719)
* Correct target emptiness check
* Quote string literal
2025-08-13 07:06:07 -05:00
Matt L 43f1310905 Generate VOL tests for h5copy (#5551)
* Add VOL testing to h5copy
2025-08-07 07:43:02 -05:00
Matt L 9cce779ba1 Consolidate h5diff add-test macros (#5675) 2025-08-01 06:19:50 -05:00
Aleksandar Jelenak 21ab06b517 h5ls, h5dump, and h5stat don't need explicit ROS3 VFD option when S3 URI is used (#5684)
* Tools assume ROS3 VFD when S3 URI is used
   h5dump, h5ls, and h5stat so far
* Add h5dump, h5ls, and h5stat tests
2025-07-29 14:00:32 -05:00
Matt L ad76f8274b Move h5repacktst file generation to h5repackgentest (#5564) 2025-07-18 11:58:52 -05:00
Matt L b68ec8d119 Consolidate h5copy add-test macros (#5650)
* Merge ADD_H5_F_TEST macro
* Merge ADD_H5_TEST2 macro
* Merge ADD_H5_TEST_SAME macro
* Merge ADD_H5_CMP_TEST macro
* Simplify UD macros
* Remove redundant test properties
* Rework ADD_H5_TEST arg handling
2025-07-10 07:05:54 -05:00
jhendersonHDF 75c8b636dd Correct usage of H5_HAVE__FLOAT16 macro (#5653) 2025-07-10 07:03:03 -05:00
Matt L d212ae6b41 Remove extra indentation in tools test CMake (#5646) 2025-07-07 08:32:15 -05:00
Matt L 3b054fe7cc Always build test generators (#5622) 2025-06-23 07:47:05 -05:00
jhendersonHDF 39c6d87dee Fix tools testfile URLs for subfiling tests (#5621) 2025-06-23 07:35:54 -05:00
0743df227f Add documentation and s3proxy testing for ROS3 VFD (#5560)
Adds workflow to build ROS3 VFD and optionally build aws-c-s3 library
from source or use package managers

Adds testing of ROS3 VFD with s3proxy and docker

Adds new H5Pset_fapl_ros3_endpoint()/H5Pget_fapl_ros3_endpoint() API
functions to set/get an alternative endpoint URL to use when opening
files with the ROS3 VFD

Cleans up warnings in tools and tests related to ROS3 VFD structure size

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com>
2025-06-19 16:22:49 -05:00