nbd-server 3.24 behaves like 'nbdkit --no-sr', and we were gracefully
handling that. But nbd-server 3.25 added structured replies while
still leaving meta contexts unsupported. This patch adds testsuite
coverage for that case by relying on a new feature in upcoming nbdkit
1.38, independently of two previous patches (one to nbdcopy and one to
nbd_can_meta_context), so that you can rearrange application of the
patch series and see that either fix in isolation prevents nbdcopy
from tripping over a spurious failure.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
copy/copy-nbd-error.sh | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/copy/copy-nbd-error.sh b/copy/copy-nbd-error.sh
index df883274..a0e7676d 100755
--- a/copy/copy-nbd-error.sh
+++ b/copy/copy-nbd-error.sh
@@ -31,9 +31,17 @@ requires $NBDKIT --filter=nozero memory --version
fail=0
+# Failure to negotiate block status should not be fatal, but merely downgrade
+# to reading the entire image as if data
+if $NBDKIT --help | grep 'no-meta-contexts'; then
+ echo "Testing early extents failures on source"
+ $VG nbdcopy -- [ $NBDKIT --exit-with-parent -v --no-meta-contexts \
+ pattern 5M ] null: || fail=1
+fi
+
# Failure to get block status should not be fatal, but merely downgrade to
# reading the entire image as if data
-echo "Testing extents failures on source"
+echo "Testing late extents failures on source"
$VG nbdcopy -- [ $NBDKIT --exit-with-parent -v --filter=error pattern 5M \
error-extents-rate=1 ] null: || fail=1
--
2.43.2