On Wed, Feb 21, 2024 at 08:53:52AM -0600, Eric Blake wrote:
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
For 1 & 3:
Reviewed-by: Richard W.M. Jones <rjones(a)redhat.com>
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW