From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, qemu-block@nongnu.org
Subject: [Qemu-devel] [PATCH 01/10] qemu-iotests: remove dead code
Date: Tue, 12 Sep 2017 16:44:50 +0200 [thread overview]
Message-ID: <20170912144459.11359-2-pbonzini@redhat.com> (raw)
In-Reply-To: <20170912144459.11359-1-pbonzini@redhat.com>
This includes shell function, shell variables and command line options
(randomize.awk does not exist).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
tests/qemu-iotests/check | 28 -----------------
tests/qemu-iotests/common | 23 --------------
tests/qemu-iotests/common.config | 26 ---------------
tests/qemu-iotests/common.rc | 68 ----------------------------------------
4 files changed, 145 deletions(-)
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index d504b6e455..4a6ed67b42 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -65,7 +65,6 @@ then
export SOCKET_SCM_HELPER="$build_iotests/socket_scm_helper"
fi
-# if ./qemu exists, it should be prioritized and will be chosen by common.config
if [[ -z "$QEMU_PROG" && ! -x './qemu' ]]
then
arch=$(uname -m 2> /dev/null)
@@ -140,12 +139,6 @@ _timestamp()
_wrapup()
{
- # for hangcheck ...
- # remove files that were used by hangcheck
- #
- [ -f "${TEST_DIR}"/check.pid ] && rm -rf "${TEST_DIR}"/check.pid
- [ -f "${TEST_DIR}"/check.sts ] && rm -rf "${TEST_DIR}"/check.sts
-
if $showme
then
:
@@ -201,24 +194,6 @@ END { if (NR > 0) {
trap "_wrapup; exit \$status" 0 1 2 3 15
-# for hangcheck ...
-# Save pid of check in a well known place, so that hangcheck can be sure it
-# has the right pid (getting the pid from ps output is not reliable enough).
-#
-rm -rf "${TEST_DIR}"/check.pid
-echo $$ > "${TEST_DIR}"/check.pid
-
-# for hangcheck ...
-# Save the status of check in a well known place, so that hangcheck can be
-# sure to know where check is up to (getting test number from ps output is
-# not reliable enough since the trace stuff has been introduced).
-#
-rm -rf "${TEST_DIR}"/check.sts
-echo "preamble" > "${TEST_DIR}"/check.sts
-
-# don't leave old full output behind on a clean run
-rm -f check.full
-
[ -f $TIMESTAMP_FILE ] || touch $TIMESTAMP_FILE
FULL_IMGFMT_DETAILS=`_full_imgfmt_details`
@@ -276,9 +251,6 @@ do
fi
rm -f core $seq.notrun
- # for hangcheck ...
- echo "$seq" > "${TEST_DIR}"/check.sts
-
start=`_wallclock`
$timestamp && printf %s " [$(date "+%T")]"
diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common
index d34c11c056..867918895b 100644
--- a/tests/qemu-iotests/common
+++ b/tests/qemu-iotests/common
@@ -19,17 +19,6 @@
# common procedures for QA scripts
#
-_setenvironment()
-{
- MSGVERB="text:action"
- export MSGVERB
-}
-
-rm -f "$OUTPUT_DIR/$iam.out"
-_setenvironment
-
-check=${check-true}
-
diff="diff -u"
verbose=false
debug=false
@@ -40,7 +29,6 @@ showme=false
sortme=false
expunge=true
have_test_arg=false
-randomize=false
cachemode=false
rm -f $tmp.list $tmp.tmp $tmp.sed
@@ -170,7 +158,6 @@ other options
-n show me, do not run tests
-o options -o options to pass to qemu-img create/convert
-T output timestamps
- -r randomize test order
-c mode cache mode
testlist options
@@ -327,11 +314,6 @@ testlist options
cachemode=true
xpand=false
;;
- -r) # randomize test order
- randomize=true
- xpand=false
- ;;
-
-T) # turn on timestamp output
timestamp=true
xpand=false
@@ -445,11 +427,6 @@ fi
list=`sort $tmp.list`
rm -f $tmp.list $tmp.tmp $tmp.sed
-if $randomize
-then
- list=`echo $list | awk -f randomize.awk`
-fi
-
[ "$QEMU" = "" ] && _fatal "qemu not found"
[ "$QEMU_IMG" = "" ] && _fatal "qemu-img not found"
[ "$QEMU_IO" = "" ] && _fatal "qemu-io not found"
diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
index e0883a0c65..b599c72211 100644
--- a/tests/qemu-iotests/common.config
+++ b/tests/qemu-iotests/common.config
@@ -15,33 +15,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-#
-# setup and check for config parameters, and in particular
-#
-# EMAIL - email of the script runner.
-# TEST_DIR - scratch test directory
-#
-# - These can be added to $HOST_CONFIG_DIR (witch default to ./config)
-# below or a separate local configuration file can be used (using
-# the HOST_OPTIONS variable).
-# - This script is shared by the stress test system and the auto-qa
-# system (includes both regression test and benchmark components).
-# - this script shouldn't make any assertions about filesystem
-# validity or mountedness.
-#
-
# all tests should use a common language setting to prevent golden
# output mismatches.
export LANG=C
PATH=".:$PATH"
-HOST=`hostname -s 2> /dev/null`
HOSTOS=`uname -s`
-EMAIL=root@localhost # where auto-qa will send its status messages
-export HOST_OPTIONS=${HOST_OPTIONS:=local.config}
-export CHECK_OPTIONS=${CHECK_OPTIONS:="-g auto"}
export PWD=`pwd`
export _QEMU_HANDLE=0
@@ -78,11 +59,6 @@ _fatal()
export AWK_PROG="`set_prog_path awk`"
[ "$AWK_PROG" = "" ] && _fatal "awk not found"
-export SED_PROG="`set_prog_path sed`"
-[ "$SED_PROG" = "" ] && _fatal "sed not found"
-
-export PS_ALL_FLAGS="-ef"
-
if [ -z "$QEMU_PROG" ]; then
export QEMU_PROG="`set_prog_path qemu`"
fi
@@ -198,8 +174,6 @@ fi
export QEMU_DEFAULT_MACHINE="$default_machine"
-[ -f /etc/qemu-iotest.config ] && . /etc/qemu-iotest.config
-
if [ -z "$TEST_DIR" ]; then
TEST_DIR=`pwd`/scratch
fi
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 8d486dbeb4..5938d5145f 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -293,51 +293,6 @@ _img_info()
done
}
-_get_pids_by_name()
-{
- if [ $# -ne 1 ]
- then
- echo "Usage: _get_pids_by_name process-name" 1>&2
- exit 1
- fi
-
- # Algorithm ... all ps(1) variants have a time of the form MM:SS or
- # HH:MM:SS before the psargs field, use this as the search anchor.
- #
- # Matches with $1 (process-name) occur if the first psarg is $1
- # or ends in /$1 ... the matching uses sed's regular expressions,
- # so passing a regex into $1 will work.
-
- ps $PS_ALL_FLAGS \
- | sed -n \
- -e 's/$/ /' \
- -e 's/[ ][ ]*/ /g' \
- -e 's/^ //' \
- -e 's/^[^ ]* //' \
- -e "/[0-9]:[0-9][0-9] *[^ ]*\/$1 /s/ .*//p" \
- -e "/[0-9]:[0-9][0-9] *$1 /s/ .*//p"
-}
-
-# fqdn for localhost
-#
-_get_fqdn()
-{
- host=`hostname`
- $NSLOOKUP_PROG $host | $AWK_PROG '{ if ($1 == "Name:") print $2 }'
-}
-
-# check if run as root
-#
-_need_to_be_root()
-{
- id=`id | $SED_PROG -e 's/(.*//' -e 's/.*=//'`
- if [ "$id" -ne 0 ]
- then
- echo "Arrgh ... you need to be root (not uid=$id) to run this test"
- exit 1
- fi
-}
-
# bail out, setting up .notrun file
#
_notrun()
@@ -491,28 +446,5 @@ _full_platform_details()
echo "$os/$platform $host $kernel"
}
-_link_out_file()
-{
- if [ -z "$1" ]; then
- echo Error must pass \$seq.
- exit
- fi
- rm -f $1
- if [ "`uname`" == "IRIX64" ] || [ "`uname`" == "IRIX" ]; then
- ln -s $1.irix $1
- elif [ "`uname`" == "Linux" ]; then
- ln -s $1.linux $1
- else
- echo Error test $seq does not run on the operating system: `uname`
- exit
- fi
-}
-
-_die()
-{
- echo $@
- exit 1
-}
-
# make sure this script returns success
true
--
2.13.5
next prev parent reply other threads:[~2017-09-12 14:45 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-12 14:44 [Qemu-devel] [PATCH v2 00/10] cleanup qemu-iotests Paolo Bonzini
2017-09-12 14:44 ` Paolo Bonzini [this message]
2017-09-12 20:34 ` [Qemu-devel] [PATCH 01/10] qemu-iotests: remove dead code Eric Blake
2017-09-12 14:44 ` [Qemu-devel] [PATCH 02/10] qemu-iotests: get rid of AWK_PROG Paolo Bonzini
2017-09-12 16:30 ` Philippe Mathieu-Daudé
2017-09-12 16:36 ` Paolo Bonzini
2017-09-12 20:45 ` Eric Blake
2017-09-12 14:44 ` [Qemu-devel] [PATCH 03/10] qemu-iotests: move "check" code out of common.rc Paolo Bonzini
2017-09-12 21:03 ` Eric Blake
2017-09-12 14:44 ` [Qemu-devel] [PATCH 04/10] qemu-iotests: cleanup and fix search for programs Paolo Bonzini
2017-09-12 21:11 ` Eric Blake
2017-09-12 21:26 ` Paolo Bonzini
2017-09-12 21:34 ` Eric Blake
2017-09-12 14:44 ` [Qemu-devel] [PATCH 05/10] qemu-iotests: limit non-_PROG-suffixed variables to common.rc Paolo Bonzini
2017-09-12 21:15 ` Eric Blake
2017-09-12 14:44 ` [Qemu-devel] [PATCH 06/10] qemu-iotests: do not include common.rc in "check" Paolo Bonzini
2017-09-12 21:16 ` Eric Blake
2017-09-12 14:44 ` [Qemu-devel] [PATCH 07/10] qemu-iotests: disintegrate more parts of common.config Paolo Bonzini
2017-09-12 21:25 ` Eric Blake
2017-09-12 14:44 ` [Qemu-devel] [PATCH 08/10] qemu-iotests: fix uninitialized variable Paolo Bonzini
2017-09-12 21:30 ` Eric Blake
2017-09-12 14:44 ` [Qemu-devel] [PATCH 09/10] qemu-iotests: get rid of $iam Paolo Bonzini
2017-09-12 21:31 ` Eric Blake
2017-09-12 14:44 ` [Qemu-devel] [PATCH 10/10] qemu-iotests: merge "check" and "common" Paolo Bonzini
2017-09-12 21:34 ` Eric Blake
2017-09-13 6:47 ` [Qemu-devel] [PATCH v2 00/10] cleanup qemu-iotests Thomas Huth
2017-09-13 7:59 ` Fam Zheng
2017-09-13 22:06 ` Paolo Bonzini
2017-09-13 22:14 ` Eric Blake
2017-10-02 12:32 ` [Qemu-devel] [Qemu-block] " Paolo Bonzini
2017-10-04 16:26 ` [Qemu-devel] " Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170912144459.11359-2-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).