diff options
author | Richard Jones <rjones@redhat.com> | 2010-07-22 16:49:06 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-08-17 16:01:40 +0100 |
commit | 85bb71b5d5aca07b0437567c609e4acb0689e787 (patch) | |
tree | 60bdb4628ef70da99d18f2c1e3562e79c45eaddc | |
parent | 3f29445be95f31fff90f38fa724e70e7d7173772 (diff) | |
download | libguestfs-85bb71b5d5aca07b0437567c609e4acb0689e787.tar.gz libguestfs-85bb71b5d5aca07b0437567c609e4acb0689e787.tar.xz libguestfs-85bb71b5d5aca07b0437567c609e4acb0689e787.zip |
regressions: Don't print misleading 'Expect error ...' lines.
Some tests in the regressions directory deliberately print
error messages. As long as they still PASS, this is OK.
However these tests also printed some misleading messages
about what error to expect. Since error messages were slightly
different across distros, these messages were not accurate.
Therefore remove these messages, and replace with a general
message before all tests telling users not to worry about
errors from the tests as long as the tests don't fail.
Cherry picked from commit e7ee6eebed6ee3a5b56c0482ba2770e697d8febc
and rebased for stable branch.
-rw-r--r-- | regressions/Makefile.am | 1 | ||||
-rwxr-xr-x | regressions/tell-user-to-ignore-errors.sh | 26 | ||||
-rwxr-xr-x | regressions/test-cancellation-download-librarycancels.sh | 1 | ||||
-rwxr-xr-x | regressions/test-cancellation-upload-daemoncancels.sh | 1 | ||||
-rwxr-xr-x | regressions/test-qemudie-killsub.sh | 1 | ||||
-rwxr-xr-x | regressions/test-qemudie-midcommand.sh | 1 | ||||
-rwxr-xr-x | regressions/test-qemudie-synch.sh | 1 |
7 files changed, 27 insertions, 5 deletions
diff --git a/regressions/Makefile.am b/regressions/Makefile.am index 8513f9ae..b32ddb47 100644 --- a/regressions/Makefile.am +++ b/regressions/Makefile.am @@ -24,6 +24,7 @@ include $(top_srcdir)/subdir-rules.mk TESTS = \ + tell-user-to-ignore-errors.sh \ rhbz503169c10.sh \ rhbz503169c13.sh \ rhbz557655.sh \ diff --git a/regressions/tell-user-to-ignore-errors.sh b/regressions/tell-user-to-ignore-errors.sh new file mode 100755 index 00000000..b17bf755 --- /dev/null +++ b/regressions/tell-user-to-ignore-errors.sh @@ -0,0 +1,26 @@ +#!/bin/bash - +# libguestfs +# Copyright (C) 2010 Red Hat Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +echo +echo '*****' +echo +echo 'Some of these tests print error messages. You can ignore' +echo 'these error messages as long as the tests print "PASS".' +echo +echo '*****' +echo diff --git a/regressions/test-cancellation-download-librarycancels.sh b/regressions/test-cancellation-download-librarycancels.sh index 7b59b7e1..20f89d23 100755 --- a/regressions/test-cancellation-download-librarycancels.sh +++ b/regressions/test-cancellation-download-librarycancels.sh @@ -31,7 +31,6 @@ run mount-ro /dev/sda / # Download a file to /dev/full. -echo "Expect: write: /dev/full: No space left on device" -download /100krandom /dev/full ping-daemon diff --git a/regressions/test-cancellation-upload-daemoncancels.sh b/regressions/test-cancellation-upload-daemoncancels.sh index 4962c255..6c65ef1b 100755 --- a/regressions/test-cancellation-upload-daemoncancels.sh +++ b/regressions/test-cancellation-upload-daemoncancels.sh @@ -34,7 +34,6 @@ mount-options "" /dev/sda1 / # Upload image, daemon should cancel because the image is too large # to upload into itself. -echo "Expect: write: /test: No space left on device" -upload test.img /test ping-daemon diff --git a/regressions/test-qemudie-killsub.sh b/regressions/test-qemudie-killsub.sh index 14b46882..434d3852 100755 --- a/regressions/test-qemudie-killsub.sh +++ b/regressions/test-qemudie-killsub.sh @@ -30,7 +30,6 @@ run kill-subprocess # XXX The following sleep should NOT be necessary. -echo "Expect an error from the next command" -sleep 1 # We should now be able to rerun the subprocess. diff --git a/regressions/test-qemudie-midcommand.sh b/regressions/test-qemudie-midcommand.sh index 92a4c688..c9510a90 100755 --- a/regressions/test-qemudie-midcommand.sh +++ b/regressions/test-qemudie-midcommand.sh @@ -30,7 +30,6 @@ run pid | cat > test.pid ! sleep 2 ; kill $(cat test.pid) & -echo "Expect: 'guestfs_sleep reply failed, see earlier error messages'" -sleep 1000 # We should now be able to rerun the subprocess. diff --git a/regressions/test-qemudie-synch.sh b/regressions/test-qemudie-synch.sh index 5932fef2..af290d97 100755 --- a/regressions/test-qemudie-synch.sh +++ b/regressions/test-qemudie-synch.sh @@ -31,7 +31,6 @@ pid | cat > test.pid ! kill $(cat test.pid) ; sleep 2 # XXX The following sleep should NOT be necessary. -echo "Expect an error from the next command" -sleep 1 # We should now be able to rerun the subprocess. |