{"id":812890,"url":"http://patchwork.ozlabs.org/api/patches/812890/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170912144459.11359-2-pbonzini@redhat.com/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170912144459.11359-2-pbonzini@redhat.com>","list_archive_url":null,"date":"2017-09-12T14:44:50","name":"[01/10] qemu-iotests: remove dead code","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"7d7927a0604e7f87fbb8cc7bc86082ee1c5b41f3","submitter":{"id":2701,"url":"http://patchwork.ozlabs.org/api/people/2701/?format=json","name":"Paolo Bonzini","email":"pbonzini@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170912144459.11359-2-pbonzini@redhat.com/mbox/","series":[{"id":2722,"url":"http://patchwork.ozlabs.org/api/series/2722/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2722","date":"2017-09-12T14:44:51","name":"cleanup qemu-iotests","version":1,"mbox":"http://patchwork.ozlabs.org/series/2722/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/812890/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/812890/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=pbonzini@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xs73n3knrz9s7g\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 00:49:25 +1000 (AEST)","from localhost ([::1]:36320 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1drmV9-0006ko-Hd\n\tfor incoming@patchwork.ozlabs.org; Tue, 12 Sep 2017 10:49:23 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:51721)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <pbonzini@redhat.com>) id 1drmRF-0003sB-N0\n\tfor qemu-devel@nongnu.org; Tue, 12 Sep 2017 10:45:28 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <pbonzini@redhat.com>) id 1drmR9-0001lx-3g\n\tfor qemu-devel@nongnu.org; Tue, 12 Sep 2017 10:45:21 -0400","from mx1.redhat.com ([209.132.183.28]:54546)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <pbonzini@redhat.com>)\n\tid 1drmR2-0001eD-Rl; Tue, 12 Sep 2017 10:45:09 -0400","from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id D8CAF7EA8E;\n\tTue, 12 Sep 2017 14:45:07 +0000 (UTC)","from donizetti.redhat.com (ovpn-117-43.ams2.redhat.com\n\t[10.36.117.43])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 86DE977DE2;\n\tTue, 12 Sep 2017 14:45:02 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com D8CAF7EA8E","From":"Paolo Bonzini <pbonzini@redhat.com>","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\n\t(mx1.redhat.com [10.5.110.28]);\n\tTue, 12 Sep 2017 14:45:08 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[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":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"kwolf@redhat.com, qemu-block@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"},"content":"This includes shell function, shell variables and command line options\n(randomize.awk does not exist).\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\n---\n tests/qemu-iotests/check         | 28 -----------------\n tests/qemu-iotests/common        | 23 --------------\n tests/qemu-iotests/common.config | 26 ---------------\n tests/qemu-iotests/common.rc     | 68 ----------------------------------------\n 4 files changed, 145 deletions(-)","diff":"diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check\nindex d504b6e455..4a6ed67b42 100755\n--- a/tests/qemu-iotests/check\n+++ b/tests/qemu-iotests/check\n@@ -65,7 +65,6 @@ then\n     export SOCKET_SCM_HELPER=\"$build_iotests/socket_scm_helper\"\n fi\n \n-# if ./qemu exists, it should be prioritized and will be chosen by common.config\n if [[ -z \"$QEMU_PROG\" && ! -x './qemu' ]]\n then\n     arch=$(uname -m 2> /dev/null)\n@@ -140,12 +139,6 @@ _timestamp()\n \n _wrapup()\n {\n-    # for hangcheck ...\n-    # remove files that were used by hangcheck\n-    #\n-    [ -f \"${TEST_DIR}\"/check.pid ] && rm -rf \"${TEST_DIR}\"/check.pid\n-    [ -f \"${TEST_DIR}\"/check.sts ] && rm -rf \"${TEST_DIR}\"/check.sts\n-\n     if $showme\n     then\n         :\n@@ -201,24 +194,6 @@ END        { if (NR > 0) {\n \n trap \"_wrapup; exit \\$status\" 0 1 2 3 15\n \n-# for hangcheck ...\n-# Save pid of check in a well known place, so that hangcheck can be sure it\n-# has the right pid (getting the pid from ps output is not reliable enough).\n-#\n-rm -rf \"${TEST_DIR}\"/check.pid\n-echo $$ > \"${TEST_DIR}\"/check.pid\n-\n-# for hangcheck ...\n-# Save the status of check in a well known place, so that hangcheck can be\n-# sure to know where check is up to (getting test number from ps output is\n-# not reliable enough since the trace stuff has been introduced).\n-#\n-rm -rf \"${TEST_DIR}\"/check.sts\n-echo \"preamble\" > \"${TEST_DIR}\"/check.sts\n-\n-# don't leave old full output behind on a clean run\n-rm -f check.full\n-\n [ -f $TIMESTAMP_FILE ] || touch $TIMESTAMP_FILE\n \n FULL_IMGFMT_DETAILS=`_full_imgfmt_details`\n@@ -276,9 +251,6 @@ do\n         fi\n         rm -f core $seq.notrun\n \n-        # for hangcheck ...\n-        echo \"$seq\" > \"${TEST_DIR}\"/check.sts\n-\n         start=`_wallclock`\n         $timestamp && printf %s \"        [$(date \"+%T\")]\"\n \ndiff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common\nindex d34c11c056..867918895b 100644\n--- a/tests/qemu-iotests/common\n+++ b/tests/qemu-iotests/common\n@@ -19,17 +19,6 @@\n # common procedures for QA scripts\n #\n \n-_setenvironment()\n-{\n-    MSGVERB=\"text:action\"\n-    export MSGVERB\n-}\n-\n-rm -f \"$OUTPUT_DIR/$iam.out\"\n-_setenvironment\n-\n-check=${check-true}\n-\n diff=\"diff -u\"\n verbose=false\n debug=false\n@@ -40,7 +29,6 @@ showme=false\n sortme=false\n expunge=true\n have_test_arg=false\n-randomize=false\n cachemode=false\n rm -f $tmp.list $tmp.tmp $tmp.sed\n \n@@ -170,7 +158,6 @@ other options\n     -n                  show me, do not run tests\n     -o options          -o options to pass to qemu-img create/convert\n     -T                  output timestamps\n-    -r                  randomize test order\n     -c mode             cache mode\n \n testlist options\n@@ -327,11 +314,6 @@ testlist options\n             cachemode=true\n             xpand=false\n             ;;\n-        -r)        # randomize test order\n-            randomize=true\n-            xpand=false\n-            ;;\n-\n         -T)        # turn on timestamp output\n             timestamp=true\n             xpand=false\n@@ -445,11 +427,6 @@ fi\n list=`sort $tmp.list`\n rm -f $tmp.list $tmp.tmp $tmp.sed\n \n-if $randomize\n-then\n-    list=`echo $list | awk -f randomize.awk`\n-fi\n-\n [ \"$QEMU\" = \"\" ] && _fatal \"qemu not found\"\n [ \"$QEMU_IMG\" = \"\" ] && _fatal \"qemu-img not found\"\n [ \"$QEMU_IO\" = \"\" ] && _fatal \"qemu-io not found\"\ndiff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config\nindex e0883a0c65..b599c72211 100644\n--- a/tests/qemu-iotests/common.config\n+++ b/tests/qemu-iotests/common.config\n@@ -15,33 +15,14 @@\n # You should have received a copy of the GNU General Public License\n # along with this program.  If not, see <http://www.gnu.org/licenses/>.\n #\n-#\n-# setup and check for config parameters, and in particular\n-#\n-# EMAIL -           email of the script runner.\n-# TEST_DIR -        scratch test directory\n-#\n-# - These can be added to $HOST_CONFIG_DIR (witch default to ./config)\n-#   below or a separate local configuration file can be used (using\n-#   the HOST_OPTIONS variable).\n-# - This script is shared by the stress test system and the auto-qa\n-#   system (includes both regression test and benchmark components).\n-# - this script shouldn't make any assertions about filesystem\n-#   validity or mountedness.\n-#\n-\n # all tests should use a common language setting to prevent golden\n # output mismatches.\n export LANG=C\n \n PATH=\".:$PATH\"\n \n-HOST=`hostname -s 2> /dev/null`\n HOSTOS=`uname -s`\n \n-EMAIL=root@localhost    # where auto-qa will send its status messages\n-export HOST_OPTIONS=${HOST_OPTIONS:=local.config}\n-export CHECK_OPTIONS=${CHECK_OPTIONS:=\"-g auto\"}\n export PWD=`pwd`\n \n export _QEMU_HANDLE=0\n@@ -78,11 +59,6 @@ _fatal()\n export AWK_PROG=\"`set_prog_path awk`\"\n [ \"$AWK_PROG\" = \"\" ] && _fatal \"awk not found\"\n \n-export SED_PROG=\"`set_prog_path sed`\"\n-[ \"$SED_PROG\" = \"\" ] && _fatal \"sed not found\"\n-\n-export PS_ALL_FLAGS=\"-ef\"\n-\n if [ -z \"$QEMU_PROG\" ]; then\n     export QEMU_PROG=\"`set_prog_path qemu`\"\n fi\n@@ -198,8 +174,6 @@ fi\n \n export QEMU_DEFAULT_MACHINE=\"$default_machine\"\n \n-[ -f /etc/qemu-iotest.config ]       && . /etc/qemu-iotest.config\n-\n if [ -z \"$TEST_DIR\" ]; then\n         TEST_DIR=`pwd`/scratch\n fi\ndiff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc\nindex 8d486dbeb4..5938d5145f 100644\n--- a/tests/qemu-iotests/common.rc\n+++ b/tests/qemu-iotests/common.rc\n@@ -293,51 +293,6 @@ _img_info()\n         done\n }\n \n-_get_pids_by_name()\n-{\n-    if [ $# -ne 1 ]\n-    then\n-        echo \"Usage: _get_pids_by_name process-name\" 1>&2\n-        exit 1\n-    fi\n-\n-    # Algorithm ... all ps(1) variants have a time of the form MM:SS or\n-    # HH:MM:SS before the psargs field, use this as the search anchor.\n-    #\n-    # Matches with $1 (process-name) occur if the first psarg is $1\n-    # or ends in /$1 ... the matching uses sed's regular expressions,\n-    # so passing a regex into $1 will work.\n-\n-    ps $PS_ALL_FLAGS \\\n-    | sed -n \\\n-        -e 's/$/ /' \\\n-        -e 's/[         ][         ]*/ /g' \\\n-        -e 's/^ //' \\\n-        -e 's/^[^ ]* //' \\\n-        -e \"/[0-9]:[0-9][0-9]  *[^ ]*\\/$1 /s/ .*//p\" \\\n-        -e \"/[0-9]:[0-9][0-9]  *$1 /s/ .*//p\"\n-}\n-\n-# fqdn for localhost\n-#\n-_get_fqdn()\n-{\n-    host=`hostname`\n-    $NSLOOKUP_PROG $host | $AWK_PROG '{ if ($1 == \"Name:\") print $2 }'\n-}\n-\n-# check if run as root\n-#\n-_need_to_be_root()\n-{\n-    id=`id | $SED_PROG -e 's/(.*//' -e 's/.*=//'`\n-    if [ \"$id\" -ne 0 ]\n-    then\n-        echo \"Arrgh ... you need to be root (not uid=$id) to run this test\"\n-        exit 1\n-    fi\n-}\n-\n # bail out, setting up .notrun file\n #\n _notrun()\n@@ -491,28 +446,5 @@ _full_platform_details()\n     echo \"$os/$platform $host $kernel\"\n }\n \n-_link_out_file()\n-{\n-   if [ -z \"$1\" ]; then\n-      echo Error must pass \\$seq.\n-      exit\n-   fi\n-   rm -f $1\n-   if [ \"`uname`\" == \"IRIX64\" ] || [ \"`uname`\" == \"IRIX\" ]; then\n-      ln -s $1.irix $1\n-   elif [ \"`uname`\" == \"Linux\" ]; then\n-      ln -s $1.linux $1\n-   else\n-      echo Error test $seq does not run on the operating system: `uname`\n-      exit\n-   fi\n-}\n-\n-_die()\n-{\n-        echo $@\n-        exit 1\n-}\n-\n # make sure this script returns success\n true\n","prefixes":["01/10"]}