The can_cache flag was introduced in 1.13.4, so the tests might fail on an older
one.  To make the check easier, only run this test with nbdkit >= 1.14

Signed-off-by: Martin Kletzander <[email protected]>
---
 info/info-can.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/info/info-can.sh b/info/info-can.sh
index 4154e38e85ba..afa6043e24bc 100755
--- a/info/info-can.sh
+++ b/info/info-can.sh
@@ -24,6 +24,10 @@ set -x
 requires nbdkit --version
 requires nbdkit sh --version
 
+# This test requires nbdkit >= 1.13.3 due to can_cache, check for at least 
1.14.
+minor=$( nbdkit --dump-config | grep ^version_minor | cut -d= -f2 )
+requires test $minor -ge 14
+
 # --is read-only and --can write are tested in info-is-read-only.sh
 
 # --can connect is tested in info-can-connect.sh
-- 
2.32.0

_______________________________________________
Libguestfs mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to