Re: [Qemu-devel] [PATCH 01/12] qemu-iotests: remove dead code

2017-09-12 Thread Kevin Wolf
Am 10.08.2017 um 00:43 hat Paolo Bonzini geschrieben:
> 
> 
> - Original Message -
> > From: "Eric Blake" 
> > To: "Paolo Bonzini" , qemu-devel@nongnu.org
> > Cc: kw...@redhat.com, qemu-bl...@nongnu.org
> > Sent: Thursday, August 10, 2017 12:18:54 AM
> > Subject: Re: [Qemu-devel] [PATCH 01/12] qemu-iotests: remove dead code
> > 
> > On 08/09/2017 04:54 PM, Paolo Bonzini wrote:
> > > This includes shell function, shell variables, command line options
> > > (randomize.awk does not exist) and conditions that can never be true
> > > (./qemu does not exist anymore).
> > 
> > Can we point to a commit id where we stopped making ./qemu?
> 
> commit 9aed1e036dc0de49d08d713f9e5c4655e94acb56
> Author: Anthony Liguori 
> Date:   Mon Aug 29 09:55:36 2011 -0500
> 
> Rename qemu -> qemu-system-i386
> 
> This has been discussed before in the past.  The special casing really 
> makes no
> sense anymore.  This seems like a good change to make for 1.0.
> 
> Signed-off-by: Anthony Liguori 

This is not related to ./qemu in the qemu-iotests directory. It's just
the name of the binary that is created in i386-softmmu/, but that has
never been the working directory for qemu-iotests.

> > Is it still worth supporting a local symlink?
> 
> Not sure who would have one...

I have always been using symlinks in the qemu-iotests directory. And, as
you probably expect now, ./qemu does exist in my setup.

Now, I must admit that I haven't actually made real use of it recently
because the symlinks only point to the binaries that qemu-iotests would
pick up anyway. But when running qemu-iotests against a different qemu
version or installed binaries instead of whatever is in the build tree,
I always found the symlinks more convenient that setting up a bunch of
environment variables.

So maybe supporting them isn't completely useless.

Kevin



Re: [Qemu-devel] [PATCH 01/12] qemu-iotests: remove dead code

2017-08-09 Thread Paolo Bonzini


- Original Message -
> From: "Eric Blake" 
> To: "Paolo Bonzini" , qemu-devel@nongnu.org
> Cc: kw...@redhat.com, qemu-bl...@nongnu.org
> Sent: Thursday, August 10, 2017 12:18:54 AM
> Subject: Re: [Qemu-devel] [PATCH 01/12] qemu-iotests: remove dead code
> 
> On 08/09/2017 04:54 PM, Paolo Bonzini wrote:
> > This includes shell function, shell variables, command line options
> > (randomize.awk does not exist) and conditions that can never be true
> > (./qemu does not exist anymore).
> 
> Can we point to a commit id where we stopped making ./qemu?

commit 9aed1e036dc0de49d08d713f9e5c4655e94acb56
Author: Anthony Liguori 
Date:   Mon Aug 29 09:55:36 2011 -0500

Rename qemu -> qemu-system-i386

This has been discussed before in the past.  The special casing really 
makes no
sense anymore.  This seems like a good change to make for 1.0.

Signed-off-by: Anthony Liguori 

> Is it still worth supporting a local symlink?

Not sure who would have one...

Paolo



Re: [Qemu-devel] [PATCH 01/12] qemu-iotests: remove dead code

2017-08-09 Thread Eric Blake
On 08/09/2017 04:54 PM, Paolo Bonzini wrote:
> This includes shell function, shell variables, command line options
> (randomize.awk does not exist) and conditions that can never be true
> (./qemu does not exist anymore).

Can we point to a commit id where we stopped making ./qemu?  Is it still
worth supporting a local symlink?

> 
> Signed-off-by: Paolo Bonzini 
> ---
>  tests/qemu-iotests/check | 36 +
>  tests/qemu-iotests/common| 23 --
>  tests/qemu-iotests/common.config | 26 ---
>  tests/qemu-iotests/common.rc | 68 
> 
>  4 files changed, 1 insertion(+), 152 deletions(-)
> 
> -#
> -# - These can be added to $HOST_CONFIG_DIR (witch default to ./config)

Good riddance to the wrong word ('which' was intended)

Other than possibly still wanting ./qemu convenience, this looks like a
reasonable cleanup.

Reviewed-by: Eric Blake 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.   +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



signature.asc
Description: OpenPGP digital signature


[Qemu-devel] [PATCH 01/12] qemu-iotests: remove dead code

2017-08-09 Thread Paolo Bonzini
This includes shell function, shell variables, command line options
(randomize.awk does not exist) and conditions that can never be true
(./qemu does not exist anymore).

Signed-off-by: Paolo Bonzini 
---
 tests/qemu-iotests/check | 36 +
 tests/qemu-iotests/common| 23 --
 tests/qemu-iotests/common.config | 26 ---
 tests/qemu-iotests/common.rc | 68 
 4 files changed, 1 insertion(+), 152 deletions(-)

diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index 2a55ec9ada..01fd5a26e5 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -65,8 +65,7 @@ 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' ]]
+if [[ -z "$QEMU_PROG" ]]
 then
 arch=$(uname -m 2> /dev/null)
 
@@ -123,12 +122,6 @@ fi
 # we need common
 . "$source_iotests/common"
 
-#if [ `id -u` -ne 0 ]
-#then
-#echo "check: QA must be run as root"
-#exit 1
-#fi
-
 TIMESTAMP_FILE=check.time-$IMGPROTO-$IMGFMT
 
 tmp="${TEST_DIR}"/$$
@@ -146,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
 :
@@ -207,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`
@@ -287,9 +256,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 .
 #
-#
-# 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.
-#
-