Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c04cf77
removed empty prints
brtnfld Sep 22, 2023
995da47
adjusted print widths
brtnfld Sep 22, 2023
5453e77
Merge remote-tracking branch 'upstream/master'
brtnfld Nov 26, 2024
e5ffd44
ci: add DAOS-backed CI job (build DAOS + HDF5 1.14.6/develop, run VOL…
brtnfld Jul 2, 2026
0b50093
fix: correct connector bugs and HDF5 2.0 compatibility issues found v…
brtnfld Jul 2, 2026
19b6300
test: bump test/vol submodule to HDFGroup/vol-tests (merged fix PRs)
brtnfld Jul 2, 2026
43de89c
ci: bump clang-format to 17, drop stale version-pin comment
brtnfld Jul 6, 2026
5448cf4
ci: skip h5vl_test pending two known bugs
brtnfld Jul 7, 2026
ae17fad
test: make DAOS server target count configurable, split h5vl_test by …
brtnfld Jul 7, 2026
a94c6ce
docs: note the DAOS version tested by CI
brtnfld Jul 7, 2026
244ea63
fix: release the connector-ID reference taken in H5_DAOS_G_INIT()
brtnfld Jul 7, 2026
b4dc0ad
fix: cache committed datatypes as an open hid_t again, not encoded bytes
brtnfld Jul 7, 2026
e87ffde
test: gate h5vl_test's two known-broken checks at the source instead …
brtnfld Jul 7, 2026
3f7821d
fix: restore DAOS_TARGET_OVERSUBSCRIBE, drop nproc-based target count…
brtnfld Jul 7, 2026
2596e9d
fix: release the connector-ID reference taken in H5_DAOS_G_INIT()
brtnfld Jul 7, 2026
dc61172
doc: spell out the H5_DAOS_G_INIT() reference-leak edge case
brtnfld Jul 8, 2026
1907823
test: replace vol-tests submodule with HDF5's in-tree API test suite
brtnfld Jul 8, 2026
e2d2e85
fix: always launch the DAOS server with mpiexec -n 1
brtnfld Jul 8, 2026
00127c1
fix: run --init-command before starting the server, not after
brtnfld Jul 8, 2026
bebe9ab
test: print client-init output live, flush server/client-helper output
brtnfld Jul 8, 2026
2e2beb7
fix: run init-command and exit-commands through a shell
brtnfld Jul 8, 2026
40d653b
test: build inline via HDF5_VOL_ALLOW_EXTERNAL instead of a private d…
brtnfld Jul 8, 2026
57ca48f
test: build inline via HDF5_VOL_ALLOW_EXTERNAL instead of a private d…
brtnfld Jul 8, 2026
6462380
fix: use \$(pwd) instead of github.workspace inside the container job
brtnfld Jul 8, 2026
010875b
fix: skip the hdf5-shared target existence check when built inline
brtnfld Jul 8, 2026
55b9f17
fix: skip exporting vol-daos targets when built inline
brtnfld Jul 9, 2026
209f839
fix: point DAOS_AGENT_DRPC_DIR at the agent socket's actual directory
brtnfld Jul 9, 2026
00df820
fix: wait for the DAOS pool's client-attach path to settle before ctest
brtnfld Jul 9, 2026
6a10d44
fix: use absolute paths for daos_agent_sh/daos_server_yml/HDF5_PLUGIN…
brtnfld Jul 9, 2026
46aa501
docs: update known-gaps exclude list to match actual test names
brtnfld Jul 9, 2026
f0a60de
fix: exclude h5_api_test_testhdf5 again - same known attribute gap
brtnfld Jul 9, 2026
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
181 changes: 179 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@ jobs:
runs-on: ubuntu-latest

env:
CLANG_FORMAT_VERSION: 13
CLANG_FORMAT_VERSION: 17

steps:
- name: Checkout source
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
submodules: true

- name: Install package dependencies
run: sudo apt-get install -y clang-format-${{ env.CLANG_FORMAT_VERSION }}
Expand All @@ -55,3 +54,181 @@ jobs:
if: github.event_name == 'pull_request'
run: test/scripts/gh_format.sh origin/${{ github.base_ref }}

daos-test:
runs-on: ubuntu-latest

container:
image: rockylinux:8
options: --privileged

continue-on-error: ${{ matrix.hdf5_ref == 'develop' }}

strategy:
fail-fast: false
matrix:
hdf5_ref: [hdf5_1.14.6, develop]

env:
DAOS_REPO_URL: https://packages.daos.io/v2.6/EL8/packages/x86_64/daos_packages.repo
DAOS_GPG_KEY_URL: https://packages.daos.io/RPM-GPG-KEY

steps:
- name: Install build prerequisites
run: |
dnf install -y epel-release
dnf groupinstall -y "Development Tools"
dnf install -y cmake git wget mpich mpich-devel libuuid-devel psmisc python3
echo "/usr/lib64/mpich/bin" >> "$GITHUB_PATH"
echo "LD_LIBRARY_PATH=/usr/lib64/mpich/lib:$LD_LIBRARY_PATH" >> "$GITHUB_ENV"

- name: Install DAOS (server, client, admin, devel)
run: |
wget -O /etc/yum.repos.d/daos-packages.repo "$DAOS_REPO_URL"
rpm --import "$DAOS_GPG_KEY_URL"
dnf install -y daos-server daos-client daos-admin daos-devel

- name: Disable transparent hugepages
run: |
echo "Before: $(cat /sys/kernel/mm/transparent_hugepage/enabled)"
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo "After: $(cat /sys/kernel/mm/transparent_hugepage/enabled)"

- name: Mount /dev/hugepages
# We run with no NVMe/bdev tier and nr_hugepages=0, but daos_server's
# SPDK housekeeping still unconditionally tries to clean up hugepages
# at engine start/stop and logs a scary (but harmless) "ERROR:" line
# when /dev/hugepages doesn't exist.
run: |
mkdir -p /dev/hugepages
mount -t hugetlbfs none /dev/hugepages || true

- name: Checkout vol-daos
uses: actions/checkout@v3
with:
fetch-depth: 0
path: vol-daos

- name: Checkout HDF5 (${{ matrix.hdf5_ref }})
uses: actions/checkout@v3
with:
repository: HDFGroup/hdf5
ref: ${{ matrix.hdf5_ref }}
path: hdf5

# Builds HDF5 as the top-level project with vol-daos pulled in as an
# HDF5_VOL_ALLOW_EXTERNAL=LOCAL_DIR subproject, matching how HDF5's own
# CI tests other external VOL connectors (vol_async.yml, vol_cache.yml,
# vol_rest.yml in HDFGroup/hdf5). HDF5's test/API/CMakeLists.txt
# registers ctest entries for vol-daos automatically via
# HDF5_EXTERNAL_VOL_TARGETS -- vol-daos does not need its own API-test
# CMake wiring. See docs/api-tests-migration.md.
- name: Configure HDF5 with vol-daos as an external VOL connector
run: |
cmake -S hdf5 -B build \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=ON \
-DHDF5_TEST_API=ON \
-DHDF5_ENABLE_PARALLEL=ON \
-DHDF5_ENABLE_MAP_API=ON \
-DMPIEXEC_MAX_NUMPROCS=2 \
-DHDF5_VOL_TEST_ENABLE_PARALLEL=ON \
-DHDF5_VOL_ALLOW_EXTERNAL=LOCAL_DIR \
-DHDF5_VOL_PATH01="$(pwd)/vol-daos" \
"-DHDF5_VOL_VOL-DAOS_NAME=daos" \
"-DHDF5_VOL_VOL-DAOS_TEST_PARALLEL=ON"

- name: Build HDF5 and vol-daos
run: cmake --build build -j"$(nproc)"

- name: Start DAOS server/agent and create pool
# Started once for the whole job (not per test), matching how HDF5's
# own CI starts REST VOL's HSDS server: a plain background process
# outside CMake/ctest, not through HDF5's own C++ test-API driver.
run: |
# Absolute paths: ctest runs these tests with a per-connector
# WORKING_DIRECTORY (set by HDF5's own test/API/CMakeLists.txt),
# not the directory these paths are computed relative to here, so
# a relative path would resolve to the wrong location downstream.
daos_server_yml=$(realpath "$(find build -name daos_server.yml -print -quit)")
daos_agent_sh=$(realpath "$(find build -name daos_agent.sh -print -quit)")
daos_pool_sh=$(realpath "$(find build -name daos_pool.sh -print -quit)")
echo "daos_server_yml=$daos_server_yml" >> "$GITHUB_ENV"
echo "daos_agent_sh=$daos_agent_sh" >> "$GITHUB_ENV"
echo "D_LOG_FILE=$(pwd)/daos_client.log" >> "$GITHUB_ENV"

mpiexec -n 1 -genv DAOS_DISABLE_REQ_FWD 1 \
daos_server start -o "$daos_server_yml" \
> daos_server.out 2>&1 &
for i in $(seq 1 60); do
grep -q "DAOS I/O Engine" daos_server.out && break
sleep 1
done
cat daos_server.out

"$daos_agent_sh" > daos_agent.out 2>&1 &
for i in $(seq 1 60); do
grep -q "listening on" daos_agent.out && break
sleep 1
done
cat daos_agent.out

"$daos_pool_sh" | tee daos_pool.out
pool_uuid=$(grep -oE '[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}' daos_pool.out | head -n1)
if [ -z "$pool_uuid" ]; then
echo "::error::failed to create DAOS pool, no UUID found in daos_pool_sh output"
exit 1
fi
echo "DAOS_POOL=$pool_uuid" >> "$GITHUB_ENV"

- name: Run tests
env:
D_LOG_MASK: ERR
CRT_PHY_ADDR_STR: ofi+tcp
OFI_INTERFACE: lo
HDF5_VOL_CONNECTOR: daos
# Disable automatic chunk sizing for the API tests
HDF5_DAOS_CHUNK_TARGET_SIZE: "1073741824"
# Excludes known, tracked connector gaps (not regressions) so CI
# stays green on everything actually verified so far. See
# docs/api-tests-migration.md for how these are tracked:
# - h5_api_test_attribute: decreasing-order (H5_ITER_DEC) attribute
# iteration is unsupported (daos_vol_attr.c).
# - h5_api_test_testhdf5: its tattr.c subtest hits the same
# paginated/by-idx attribute lookup gap while iterating hundreds
# of attributes, cascading into enough diagnostic output to blow
# past the ctest timeout rather than failing fast.
# - h5_api_test_parallel_t_bigio: fails with DER_NOSPACE - the 4GB
# test pool (DAOS_POOL_SIZE) is too small for this test's writes.
# - h5_api_test_parallel_testphdf5: its h5oflusherror subtest
# expects H5Oflush to fail (a native-VOL-only limitation); DAOS
# correctly succeeds, but there's no per-subtest exclusion
# available without HDF5's own C++ test-API driver, so the whole
# binary is excluded.
run: |
# daos_agent_sh lives in test/scripts/; the agent socket it starts
# lives one level up, in test/.
daos_agent_dir=$(dirname "$(dirname "$daos_agent_sh")")
HDF5_PLUGIN_PATH="$(realpath "$(find build -name 'libhdf5_vol_daos*' -printf '%h\n' -quit)")" \
DAOS_AGENT_DRPC_DIR="$daos_agent_dir" \
ctest --test-dir build --output-on-failure --timeout 300 \
-R 'HDF5_VOL_vol-daos' \
-E '^HDF5_VOL_vol-daos-h5_api_test_attribute$|^HDF5_VOL_vol-daos-h5_api_test_testhdf5$|^HDF5_VOL_vol-daos-h5_api_test_parallel_t_bigio$|^HDF5_VOL_vol-daos-h5_api_test_parallel_testphdf5$'

- name: Stop DAOS server/agent
if: always()
run: |
killall -9 daos_server || true
killall daos_agent || true

- name: Dump DAOS logs
if: always()
run: |
for f in daos_server.out daos_agent.out daos_pool.out; do
[ -f "$f" ] && echo "=============== $f ===============" && cat "$f"
done
for f in $(find build -name '*.log' 2>/dev/null); do
echo "=============== $f ==============="
cat "$f"
done

2 changes: 0 additions & 2 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ jobs:
steps:
- name: Checkout source
uses: actions/checkout@v3
with:
submodules: true

- name: Extract version number
id: get_version
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
steps:
- name: Checkout source
uses: actions/checkout@v3
with:
submodules: true

- name: Extract version number
id: get_version
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build
.vscode
__pycache__
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,12 @@ if(NOT HDF5_VOL_DAOS_EXTERNALLY_CONFIGURED AND BUILD_TESTING)
enable_testing()
include(CTest)
add_subdirectory(test)

# Relay HDF5_API_EXT_SERIAL_TESTS / HDF5_API_EXT_PARALLEL_TESTS out of this
# project's scope so they reach HDF5's own top-level scope when this
# connector is built inline as an HDF5_VOL_ALLOW_EXTERNAL subproject.
set(HDF5_API_EXT_SERIAL_TESTS ${HDF5_API_EXT_SERIAL_TESTS} PARENT_SCOPE)
set(HDF5_API_EXT_PARALLEL_TESTS ${HDF5_API_EXT_PARALLEL_TESTS} PARENT_SCOPE)
endif()

#-----------------------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ To build the DAOS VOL connector, the following libraries are required:
(i.e., `-DHDF5_ENABLE_MAP_API=ON` CMake option).

+ `libdaos` - The [DAOS](https://github.com/daos-stack/daos) library.
Minimum version required is 1.3.106-tb.
Minimum version required is 1.3.106-tb. CI builds and tests
against DAOS 2.6.5 (see `.github/workflows/ci.yml`).

+ `libuuid` - UUID support.

Expand Down
83 changes: 83 additions & 0 deletions docs/api-tests-migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# HDF5 API test suite migration

`test/` no longer depends on the `HDFGroup/vol-tests` submodule. CI instead
builds HDF5 from source as the top-level project and pulls this connector
in as an `HDF5_VOL_ALLOW_EXTERNAL` subproject, the same mechanism HDF5's own
CI uses to test other external VOL connectors (see `vol_async.yml`,
`vol_cache.yml`, and `vol_rest.yml` in `HDFGroup/hdf5`'s
`.github/workflows/`). HDF5's own `test/API`/`testpar/API` suite then
registers this connector's ctest entries automatically.

## How it's wired

CI configures HDF5 with:

```
-DHDF5_VOL_ALLOW_EXTERNAL=LOCAL_DIR
-DHDF5_VOL_PATH01=<path to this checkout>
-DHDF5_VOL_VOL-DAOS_NAME=daos
-DHDF5_VOL_VOL-DAOS_TEST_PARALLEL=ON
```

HDF5's `CMakeVOL.cmake` `add_subdirectory()`s this repo directly into its
own build, auto-stripping this project's `find_package(HDF5 ...)` calls
(they'd conflict with targets HDF5's own in-progress build is generating)
and pre-setting `HDF5_FOUND`/`HDF5_LIBRARIES`/etc. for this project to
consume instead. `test/API/CMakeLists.txt` then registers one
`HDF5_VOL_vol-daos-h5_api_test_<iface>` ctest entry per API test interface,
plus `HDF5_VOL_vol-daos-h5_api_ext_test_<name>` entries for this
connector's own native tests (`test/daos_vol`'s `h5daos_test_*` binaries,
exposed via the `HDF5_API_EXT_SERIAL_TESTS`/`HDF5_API_EXT_PARALLEL_TESTS`
variables `test/daos_vol/CMakeLists.txt` sets).

This project does not run its own test-orchestration driver. The DAOS
server, agent, and pool are started once per CI job via plain shell steps
(`ci.yml`), not per test -- the same pattern HDF5's own CI uses to start
HSDS once for `vol-rest`. `test/CMakeLists.txt` still renders
`daos_server.yml`/`daos_agent.sh`/`daos_pool.sh` from their `.in` templates
via `configure_file()`; CI locates and runs them directly.

## Handling unsupported features

Where the test suite checks `H5VL_CAP_FLAG_*` before exercising a feature,
no exclusion is needed -- the connector's capability query already tells
the test to skip it. Gaps with no capability flag to gate on are excluded
at the ctest level in `ci.yml` (see "Known gaps" below); HDF5's own driver
mechanism for finer-grained per-subtest exclusion (`-x <subtest>`) is not
used here since this project doesn't run through it.

## Known gaps

`ci.yml`'s `ctest` invocation excludes the following as known, tracked
connector gaps rather than regressions:

- `HDF5_VOL_vol-daos-h5_api_test_attribute` -- decreasing-order
(`H5_ITER_DEC`) attribute iteration is unsupported (`src/daos_vol_attr.c`).
- `HDF5_VOL_vol-daos-h5_api_test_testhdf5` -- its `tattr.c` subtest hits the
same by-idx/paginated attribute lookup gap while iterating hundreds of
attributes. Manifests non-deterministically: sometimes each lookup fails
fast and the binary finishes in ~20s, other times the cascading
diagnostic output from hundreds of failing lookups is enough to blow
past the ctest timeout instead.
- `HDF5_VOL_vol-daos-h5_api_test_parallel_t_bigio` -- fails with
`DER_NOSPACE`; the 4GB test pool (`DAOS_POOL_SIZE`) is too small for this
test's writes.
- `HDF5_VOL_vol-daos-h5_api_test_parallel_testphdf5` -- its `h5oflusherror`
subtest expects `H5Oflush` to fail (a native-VOL-only limitation); DAOS
correctly succeeds, but there's no per-subtest exclusion available
without HDF5's own C++ test-API driver, so the whole binary is excluded.

Beyond the core API test suite, `-R 'HDF5_VOL_vol-daos'` also matches
HDF5's own tool-test suites (`tools/test/{h5dump,h5diff,h5copy,h5ls}`,
which likewise iterate `HDF5_EXTERNAL_VOL_TARGETS`). On the `develop`
matrix leg this currently surfaces a real connector gap, not a test
harness bug: `h5dumpgentest` (the fixture that generates reference files
for nearly all `H5DUMP` comparison tests) crashes because DAOS VOL
correctly reports external-link creation, UD-link creation, and
`H5Oset_comment`/object-optional as unsupported, and `h5dumpgentest`'s own
generator code (written for the native VOL) doesn't check those return
codes before using the resulting handle. Since `h5dumpgentest` is a single
shared fixture, this one crash cascades into most of the tool-test
failures on that leg. The real fix is adding external-link, UD-link, and
`H5Oset_comment` support to `src/daos_vol_link.c`/`src/daos_vol_obj.c` --
tracked as a separate connector-feature gap, not addressed by this PR.
14 changes: 12 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ set(HDF5_VOL_DAOS_EXT_LIB_DEPENDENCIES
find_package(HDF5 1.14.0 NO_MODULE NAMES hdf5 COMPONENTS C shared)
if(HDF5_FOUND)
set(HDF5_C_SHARED_LIBRARY hdf5-shared)
if(NOT TARGET ${HDF5_C_SHARED_LIBRARY})
# When built inline as an HDF5_VOL_ALLOW_EXTERNAL subproject, HDF5's own
# CMakeVOL.cmake pre-sets HDF5_FOUND/HDF5_LIBRARIES before HDF5's src/
# subdirectory (which actually creates the hdf5-shared target) has been
# added, so this target doesn't exist yet at this point in the configure
# pass -- it's still a valid forward reference for target_link_libraries.
if(NOT TARGET ${HDF5_C_SHARED_LIBRARY} AND NOT HDF5_VOL_ALLOW_EXTERNAL)
message(FATAL_ERROR "Could not find hdf5 shared target, please make "
"sure that HDF5 has ben compiled with shared libraries enabled.")
endif()
Expand Down Expand Up @@ -204,8 +209,13 @@ install(

#-----------------------------------------------------------------------------
# Export all exported targets to the build tree for use by parent project
#
# Skipped when built inline as an HDF5_VOL_ALLOW_EXTERNAL subproject: this
# target links against HDF5's own hdf5-shared target, which isn't part of
# any export set until HDF5 itself is installed, so export() can't resolve
# it mid-build.
#-----------------------------------------------------------------------------
if(NOT HDF5_VOL_DAOS_EXTERNALLY_CONFIGURED)
if(NOT HDF5_VOL_DAOS_EXTERNALLY_CONFIGURED AND NOT HDF5_VOL_ALLOW_EXTERNAL)
export(
TARGETS
${HDF5_VOL_DAOS_EXPORTED_LIBS}
Expand Down
Loading
Loading