37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
From 4b69e586155d10781390a607eb346421187bd72d Mon Sep 17 00:00:00 2001
|
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
Date: Wed, 27 Oct 2021 20:21:24 +0100
|
|
Subject: [PATCH] tests/test-vddk-real.sh: Don't hide log messages on failure
|
|
|
|
Use tee here so we always get the log messages in the log file.
|
|
Previously if nbdkit returned an error then the log messages were not
|
|
printed (since "cat $log" line was not reached).
|
|
|
|
(cherry picked from commit efa13d12cd5eb1e15d783a39da5a9e709d157843)
|
|
---
|
|
tests/test-vddk-real.sh | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/tests/test-vddk-real.sh b/tests/test-vddk-real.sh
|
|
index e7007bfa..a6aceac9 100755
|
|
--- a/tests/test-vddk-real.sh
|
|
+++ b/tests/test-vddk-real.sh
|
|
@@ -80,11 +80,11 @@ qemu-img create -f vmdk $vmdk 10M
|
|
# Check first that the VDDK library can be fully loaded. We have to
|
|
# check the log file for missing modules since they may not show up as
|
|
# errors.
|
|
-nbdkit -fv -U - vddk libdir="$vddkdir" $vmdk --run 'nbdinfo "$uri"' >$log 2>&1
|
|
+nbdkit -fv -U - vddk libdir="$vddkdir" $vmdk --run 'nbdinfo "$uri"' 2>&1 |
|
|
+ tee $log
|
|
|
|
# Check the log for missing modules
|
|
-cat $log
|
|
-if grep 'cannot open shared object file' test-vddk-real.log; then
|
|
+if grep 'cannot open shared object file' $log; then
|
|
exit 1
|
|
fi
|
|
|
|
--
|
|
2.31.1
|
|
|