[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 13/19] qemu-iotests: common.rc: drop unused _do()
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 13/19] qemu-iotests: common.rc: drop unused _do() |
Date: |
Fri, 15 Apr 2016 19:02:16 +0200 |
From: Sascha Silbe <address@hidden>
_do() was never used and possibly creates temporary files at
predictable, world-writable locations. Get rid of it.
Signed-off-by: Sascha Silbe <address@hidden>
Reviewed-by: Bo Tu <address@hidden>
Message-id: address@hidden
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/common.rc | 46 --------------------------------------------
1 file changed, 46 deletions(-)
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index d9913f8..5249ec5 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -287,52 +287,6 @@ _need_to_be_root()
fi
}
-
-# Do a command, log it to $seq.full, optionally test return status
-# and die if command fails. If called with one argument _do executes the
-# command, logs it, and returns its exit status. With two arguments _do
-# first prints the message passed in the first argument, and then "done"
-# or "fail" depending on the return status of the command passed in the
-# second argument. If the command fails and the variable _do_die_on_error
-# is set to "always" or the two argument form is used and _do_die_on_error
-# is set to "message_only" _do will print an error message to
-# $seq.out and exit.
-
-_do()
-{
- if [ $# -eq 1 ]; then
- _cmd=$1
- elif [ $# -eq 2 ]; then
- _note=$1
- _cmd=$2
- echo -n "$_note... "
- else
- echo "Usage: _do [note] cmd" 1>&2
- status=1; exit
- fi
-
- (eval "echo '---' \"$_cmd\"") >>"$OUTPUT_DIR/$seq.full"
- (eval "$_cmd") >$tmp._out 2>&1; ret=$?
- cat $tmp._out >>"$OUTPUT_DIR/$seq.full"
- if [ $# -eq 2 ]; then
- if [ $ret -eq 0 ]; then
- echo "done"
- else
- echo "fail"
- fi
- fi
- if [ $ret -ne 0 ] \
- && [ "$_do_die_on_error" = "always" \
- -o \( $# -eq 2 -a "$_do_die_on_error" = "message_only" \) ]
- then
- [ $# -ne 2 ] && echo
- eval "echo \"$_cmd\" failed \(returned $ret\): see $seq.full"
- status=1; exit
- fi
-
- return $ret
-}
-
# bail out, setting up .notrun file
#
_notrun()
--
1.8.3.1
- [Qemu-block] [PULL 00/19] Block layer patches for 2.6.0-rc3, Kevin Wolf, 2016/04/15
- [Qemu-block] [PULL 02/19] block: Fix blk_aio_write_zeroes(), Kevin Wolf, 2016/04/15
- [Qemu-block] [PULL 01/19] qemu-io: Support 'aio_write -z', Kevin Wolf, 2016/04/15
- [Qemu-block] [PULL 05/19] block/vpc: use current_size field for XenConverter VHD images, Kevin Wolf, 2016/04/15
- [Qemu-block] [PULL 03/19] block/vpc: set errp in vpc_create, Kevin Wolf, 2016/04/15
- [Qemu-block] [PULL 06/19] block/vpc: Use the correct max sector count for VHD images, Kevin Wolf, 2016/04/15
- [Qemu-block] [PULL 04/19] vpc: use current_size field for XenServer VHD images, Kevin Wolf, 2016/04/15
- [Qemu-block] [PULL 08/19] block/vpc: set errp in vpc_open, Kevin Wolf, 2016/04/15
- [Qemu-block] [PULL 10/19] block: Don't ignore flags in blk_{, co, aio}_write_zeroes(), Kevin Wolf, 2016/04/15
- [Qemu-block] [PULL 13/19] qemu-iotests: common.rc: drop unused _do(),
Kevin Wolf <=
- [Qemu-block] [PULL 07/19] block/vpc: make checks on max table size a bit more lax, Kevin Wolf, 2016/04/15
- [Qemu-block] [PULL 09/19] block/vpc: update comments to be compliant w/coding guidelines, Kevin Wolf, 2016/04/15
- [Qemu-block] [PULL 11/19] Fix pflash migration, Kevin Wolf, 2016/04/15
- [Qemu-block] [PULL 17/19] nbd: Don't fail handshake on NBD_OPT_LIST descriptions, Kevin Wolf, 2016/04/15
- [Qemu-block] [PULL 16/19] qemu-iotests: 041: More robust assertion on quorum node, Kevin Wolf, 2016/04/15
- [Qemu-block] [PULL 15/19] qemu-iotests: place valgrind log file in scratch dir, Kevin Wolf, 2016/04/15
- [Qemu-block] [PULL 12/19] qemu-iotests: drop unused _within_tolerance() filter, Kevin Wolf, 2016/04/15
- [Qemu-block] [PULL 18/19] nbd: fix assert() on qemu-nbd stop, Kevin Wolf, 2016/04/15
- [Qemu-block] [PULL 19/19] nbd: Don't kill server on client that doesn't request TLS, Kevin Wolf, 2016/04/15
- [Qemu-block] [PULL 14/19] qemu-iotests: tests: do not set unused tmp variable, Kevin Wolf, 2016/04/15