From nobody Tue Feb 10 19:23:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1505227845836487.7458419368918; Tue, 12 Sep 2017 07:50:45 -0700 (PDT) Received: from localhost ([::1]:36327 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drmWR-0008MI-7K for importer@patchew.org; Tue, 12 Sep 2017 10:50:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drmRF-0003sB-N0 for qemu-devel@nongnu.org; Tue, 12 Sep 2017 10:45:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drmR9-0001lx-3g for qemu-devel@nongnu.org; Tue, 12 Sep 2017 10:45:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54546) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1drmR2-0001eD-Rl; Tue, 12 Sep 2017 10:45:09 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D8CAF7EA8E; Tue, 12 Sep 2017 14:45:07 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-117-43.ams2.redhat.com [10.36.117.43]) by smtp.corp.redhat.com (Postfix) with ESMTP id 86DE977DE2; Tue, 12 Sep 2017 14:45:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D8CAF7EA8E Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=pbonzini@redhat.com From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 12 Sep 2017 16:44:50 +0200 Message-Id: <20170912144459.11359-2-pbonzini@redhat.com> In-Reply-To: <20170912144459.11359-1-pbonzini@redhat.com> References: <20170912144459.11359-1-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 12 Sep 2017 14:45:08 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 01/10] qemu-iotests: remove dead code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-block@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This includes shell function, shell variables and command line options (randomize.awk does not exist). Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake --- 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=3D"$build_iotests/socket_scm_helper" fi =20 -# if ./qemu exists, it should be prioritized and will be chosen by common.= config if [[ -z "$QEMU_PROG" && ! -x './qemu' ]] then arch=3D$(uname -m 2> /dev/null) @@ -140,12 +139,6 @@ _timestamp() =20 _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) { =20 trap "_wrapup; exit \$status" 0 1 2 3 15 =20 -# 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 =20 FULL_IMGFMT_DETAILS=3D`_full_imgfmt_details` @@ -276,9 +251,6 @@ do fi rm -f core $seq.notrun =20 - # for hangcheck ... - echo "$seq" > "${TEST_DIR}"/check.sts - start=3D`_wallclock` $timestamp && printf %s " [$(date "+%T")]" =20 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 # =20 -_setenvironment() -{ - MSGVERB=3D"text:action" - export MSGVERB -} - -rm -f "$OUTPUT_DIR/$iam.out" -_setenvironment - -check=3D${check-true} - diff=3D"diff -u" verbose=3Dfalse debug=3Dfalse @@ -40,7 +29,6 @@ showme=3Dfalse sortme=3Dfalse expunge=3Dtrue have_test_arg=3Dfalse -randomize=3Dfalse cachemode=3Dfalse rm -f $tmp.list $tmp.tmp $tmp.sed =20 @@ -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 =20 testlist options @@ -327,11 +314,6 @@ testlist options cachemode=3Dtrue xpand=3Dfalse ;; - -r) # randomize test order - randomize=3Dtrue - xpand=3Dfalse - ;; - -T) # turn on timestamp output timestamp=3Dtrue xpand=3Dfalse @@ -445,11 +427,6 @@ fi list=3D`sort $tmp.list` rm -f $tmp.list $tmp.tmp $tmp.sed =20 -if $randomize -then - list=3D`echo $list | awk -f randomize.awk` -fi - [ "$QEMU" =3D "" ] && _fatal "qemu not found" [ "$QEMU_IMG" =3D "" ] && _fatal "qemu-img not found" [ "$QEMU_IO" =3D "" ] && _fatal "qemu-io not found" diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.c= onfig 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 . # -# -# 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=3DC =20 PATH=3D".:$PATH" =20 -HOST=3D`hostname -s 2> /dev/null` HOSTOS=3D`uname -s` =20 -EMAIL=3Droot@localhost # where auto-qa will send its status messages -export HOST_OPTIONS=3D${HOST_OPTIONS:=3Dlocal.config} -export CHECK_OPTIONS=3D${CHECK_OPTIONS:=3D"-g auto"} export PWD=3D`pwd` =20 export _QEMU_HANDLE=3D0 @@ -78,11 +59,6 @@ _fatal() export AWK_PROG=3D"`set_prog_path awk`" [ "$AWK_PROG" =3D "" ] && _fatal "awk not found" =20 -export SED_PROG=3D"`set_prog_path sed`" -[ "$SED_PROG" =3D "" ] && _fatal "sed not found" - -export PS_ALL_FLAGS=3D"-ef" - if [ -z "$QEMU_PROG" ]; then export QEMU_PROG=3D"`set_prog_path qemu`" fi @@ -198,8 +174,6 @@ fi =20 export QEMU_DEFAULT_MACHINE=3D"$default_machine" =20 -[ -f /etc/qemu-iotest.config ] && . /etc/qemu-iotest.config - if [ -z "$TEST_DIR" ]; then TEST_DIR=3D`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 } =20 -_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=3D`hostname` - $NSLOOKUP_PROG $host | $AWK_PROG '{ if ($1 =3D=3D "Name:") print $2 }' -} - -# check if run as root -# -_need_to_be_root() -{ - id=3D`id | $SED_PROG -e 's/(.*//' -e 's/.*=3D//'` - if [ "$id" -ne 0 ] - then - echo "Arrgh ... you need to be root (not uid=3D$id) to run this te= st" - exit 1 - fi -} - # bail out, setting up .notrun file # _notrun() @@ -491,28 +446,5 @@ _full_platform_details() echo "$os/$platform $host $kernel" } =20 -_link_out_file() -{ - if [ -z "$1" ]; then - echo Error must pass \$seq. - exit - fi - rm -f $1 - if [ "`uname`" =3D=3D "IRIX64" ] || [ "`uname`" =3D=3D "IRIX" ]; then - ln -s $1.irix $1 - elif [ "`uname`" =3D=3D "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 --=20 2.13.5