Blame SOURCES/kvm-iotests-ensure-we-print-nbd-server-log-on-error.patch

7711c0
From c5f12193572b8d67f30a7a2b4e33ff6eef97558d Mon Sep 17 00:00:00 2001
7711c0
From: John Snow <jsnow@redhat.com>
7711c0
Date: Wed, 27 Mar 2019 17:23:05 +0100
7711c0
Subject: [PATCH 127/163] iotests: ensure we print nbd server log on error
7711c0
MIME-Version: 1.0
7711c0
Content-Type: text/plain; charset=UTF-8
7711c0
Content-Transfer-Encoding: 8bit
7711c0
7711c0
RH-Author: John Snow <jsnow@redhat.com>
7711c0
Message-id: <20190327172308.31077-53-jsnow@redhat.com>
7711c0
Patchwork-id: 85222
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 52/55] iotests: ensure we print nbd server log on error
7711c0
Bugzilla: 1691009
7711c0
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
7711c0
RH-Acked-by: Max Reitz <mreitz@redhat.com>
7711c0
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
7711c0
From: Daniel P. Berrangé <berrange@redhat.com>
7711c0
7711c0
If we abort the iotest early the server.log file might contain useful
7711c0
information for diagnosing the problem. Ensure its contents are
7711c0
displayed in this case.
7711c0
7711c0
Reviewed-by: Eric Blake <eblake@redhat.com>
7711c0
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7711c0
Message-Id: <20190220145819.30969-2-berrange@redhat.com>
7711c0
[eblake: fix shell quoting]
7711c0
Signed-off-by: Eric Blake <eblake@redhat.com>
7711c0
(cherry picked from commit 84f8b840a2d9ed248c80b3601d2d212cdf60cecf)
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 tests/qemu-iotests/233 | 3 +++
7711c0
 1 file changed, 3 insertions(+)
7711c0
7711c0
diff --git a/tests/qemu-iotests/233 b/tests/qemu-iotests/233
7711c0
index fc345a1..adb742f 100755
7711c0
--- a/tests/qemu-iotests/233
7711c0
+++ b/tests/qemu-iotests/233
7711c0
@@ -30,6 +30,8 @@ _cleanup()
7711c0
 {
7711c0
     nbd_server_stop
7711c0
     _cleanup_test_img
7711c0
+    # If we aborted early we want to see this log for diagnosis
7711c0
+    test -f "$TEST_DIR/server.log" && cat "$TEST_DIR/server.log"
7711c0
     rm -f "$TEST_DIR/server.log"
7711c0
     tls_x509_cleanup
7711c0
 }
7711c0
@@ -120,6 +122,7 @@ $QEMU_IO -f $IMGFMT -r -U -c 'r -P 0x22 1m 1m' "$TEST_IMG" | _filter_qemu_io
7711c0
 echo
7711c0
 echo "== final server log =="
7711c0
 cat "$TEST_DIR/server.log"
7711c0
+rm -f "$TEST_DIR/server.log"
7711c0
 
7711c0
 # success, all done
7711c0
 echo "*** done"
7711c0
-- 
7711c0
1.8.3.1
7711c0