-
Notifications
You must be signed in to change notification settings - Fork 289
Description
I have a fix and will put it up when current PRs clear out of the way...
h5_test/run_h5_zstd_tests.sh fails when configured with --disable-utilities
Problem Summary
When netCDF-C is configured with --disable-utilities, the h5_test/run_h5_zstd_tests.sh test fails because it depends on ncdump/ncpathcvt, which is not built when utilities are disabled.
Environment
- OS: CYGWIN_NT-10.0-26100 (x86_64)
- netCDF Version: 4.10.0-development
- Build Type: Autotools (
./configure && make)
Steps to Reproduce
autoreconf -i
./configure --disable-dap --disable-utilities
make -j checkExpected Behavior
Tests that depend on utilities should either:
- Be skipped when
--disable-utilitiesis used, OR - Not depend on utility programs
Actual Behavior
The test fails with:
FAIL: run_h5_zstd_tests
=======================
./run_h5_zstd_tests.sh: 1: /home/ed/netcdf-c/h5_test/findplugin.sh: /home/ed/netcdf-c/ncdump/ncpathcvt: not found
FAIL run_h5_zstd_tests.sh (exit status: 127)
Root Cause
The h5_test/findplugin.sh script calls ncpathcvt (located in ncdump/) to perform path conversions. When utilities are disabled, ncdump is not built, so ncpathcvt does not exist, causing the test script to fail with exit code 127 (command not found).
The relevant code in h5_test/findplugin.sh:
# The script sources test_common.sh which eventually calls ncpathcvtImpact
- 26 out of 27 HDF5 tests pass (
tst_h_*programs) - Only the shell script wrapper
run_h5_zstd_tests.shfails - This is a test infrastructure issue, not a library bug
Possible Solutions
Option 1: Skip the test when utilities are disabled
Add a check at the start of run_h5_zstd_tests.sh:
if test ! -x "${TOPBUILDDIR}/ncdump/ncpathcvt"; then
echo "SKIPPED: ncpathcvt not available (configured with --disable-utilities)"
exit 77
fiOption 2: Guard in Makefile.am
Only include run_h5_zstd_tests.sh in TESTS if utilities are enabled:
if ENABLE_UTILITIES
TESTS += run_h5_zstd_tests.sh
endifOption 3: Remove the dependency
Refactor findplugin.sh to not require ncpathcvt for basic path operations that could be done with standard shell utilities.
Workaround
Until this is fixed, users can:
- Run individual HDF5 tests directly:
make check TESTS=tst_h_zstd - Or rebuild without
--disable-utilities
Additional Notes
- This issue likely affects other shell script tests in
h5_test/that usefindplugin.sh - The actual HDF5 zstd functionality works fine (the
tst_h_zstdbinary passes when run directly)