[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH nbdkit 2/7] tests/test-debug-flags.sh: Log the error from nbdkit unconditionally.



Useful to print the error displayed by nbdkit in all cases, not
just when the test fails.

Also fix the error message if the test does fail (unexpected -> expected).
---
 tests/test-debug-flags.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/test-debug-flags.sh b/tests/test-debug-flags.sh
index 10e916c..88f5a22 100755
--- a/tests/test-debug-flags.sh
+++ b/tests/test-debug-flags.sh
@@ -49,10 +49,9 @@ expected_failure ()
 
 check_error ()
 {
+    cat debug-flags.out
     if ! grep -sq "$1" debug-flags.out; then
-        echo "unexpected error message containing: $1"
-        echo "actual output:"
-        cat debug-flags.out
+        echo "expected error message containing: $1"
         exit 1
     fi
 }
-- 
2.23.0


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]