[med-svn] [Git][med-team/libvbz-hdf-plugin][master] Fix autopkgtest: correct VBZ filter params and plugin path
Andreas Tille (@tille)
gitlab at salsa.debian.org
Sun Oct 18 17:26:32 BST 2026
Andreas Tille pushed to branch master at Debian Med / libvbz-hdf-plugin
Commits:
74c17f71 by Andreas Tille at 2026-10-18T18:24:00+02:00
Fix autopkgtest: correct VBZ filter params and plugin path
The test passed a 5-arg parameter array {0,0,2,1,1} while the plugin
consumes {version, integer_size, zig-zag, zstd_level} (vbz_plugin.h).
integer_size was therefore 0, causing a division by zero in vbz_filter
on the write path. Point HDF5_PLUGIN_PATH at a directory containing only
the plugin (found via dpkg -L) instead of a non-existent hdf5/plugins
subdir, and add libhdf5-dev + gcc to the test Depends (h5cc needs the
headers and a C compiler).
- - - - -
4 changed files:
- debian/changelog
- debian/tests/control
- debian/tests/run-unit-test
- debian/tests/test_vbz.c
Changes:
=====================================
debian/changelog
=====================================
@@ -1,7 +1,8 @@
libvbz-hdf-plugin (1.0.13-2) UNRELEASED; urgency=medium
* d/watch: Use Dist in Gihub template
- * Add autopkgtest
+ * Add autopkgtest: VBZ write/read round trip; fix filter parameters and
+ HDF5_PLUGIN_PATH so the test works with HDF5 2.x
* fix-filter-buf-size.patch: new: use nbytes as compressed input size in
the HDF5 filter (HDF5 2.x changed the meaning of *buf_size on the
decompression path). Fixes reading VBZ compressed data with
=====================================
debian/tests/control
=====================================
@@ -1,3 +1,3 @@
Tests: run-unit-test
-Depends: @, hdf5-helpers
+Depends: @, hdf5-helpers, libhdf5-dev, gcc
Restrictions: allow-stderr
=====================================
debian/tests/run-unit-test
=====================================
@@ -16,7 +16,11 @@ cd "${AUTOPKGTEST_TMP}"
h5cc -Wall -O2 test_vbz.c -o test_vbz
-DEB_HOST_MULTIARCH=$(dpkg-architecture -qDEB_HOST_MULTIARCH)
-export HDF5_PLUGIN_PATH="/usr/lib/${DEB_HOST_MULTIARCH}/hdf5/plugins"
+# HDF5 dlopens every file in HDF5_PLUGIN_PATH, so point it at a directory
+# that contains only the VBZ plugin (a symlink into a private plugins dir).
+PLUGIN=$(dpkg -L ${pkg}0t64 | awk '/\/libvbz_hdf_plugin\.so/ {print; exit}')
+mkdir -p "${AUTOPKGTEST_TMP}/plugins"
+ln -s "${PLUGIN}" "${AUTOPKGTEST_TMP}/plugins/libvbz_hdf_plugin.so"
+export HDF5_PLUGIN_PATH="${AUTOPKGTEST_TMP}/plugins"
./test_vbz
=====================================
debian/tests/test_vbz.c
=====================================
@@ -5,14 +5,13 @@
#define VBZ_FILTER_ID 32020
-/* Parameters documented by the VBZ plugin:
+/* Parameters consumed by the VBZ plugin (see vbz_plugin/vbz_plugin.h):
* 0: filter version
- * 0: padding
- * 2: integer size
- * 1: zig-zag encoding
- * 1: zstd compression level
+ * 1: integer size (bytes)
+ * 2: zig-zag encoding
+ * 3: zstd compression level
*/
-static const unsigned int vbz_params[] = { 0, 0, 2, 1, 1 };
+static const unsigned int vbz_params[] = { 1, 2, 1, 1 };
#define N 10000
View it on GitLab: https://salsa.debian.org/med-team/libvbz-hdf-plugin/-/commit/74c17f71db9a101d3a503fbaad91439712e53515
--
View it on GitLab: https://salsa.debian.org/med-team/libvbz-hdf-plugin/-/commit/74c17f71db9a101d3a503fbaad91439712e53515
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20261018/d75f3aaf/attachment-0001.htm>
More information about the debian-med-commit
mailing list