diff mbox

[v2,1/1] qemu-iotests: Use ppc64 qemu_arch on ppc64le host

Message ID 20180329112053.5399-2-ldoktor@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lukáš Doktor March 29, 2018, 11:20 a.m. UTC
The qemu target does not always correspond to the host machine type. For
example ppc64le machine target is ppc64. Let's introduce "qemu_arch"
variable to store the matching qemu architecture related to the current
architecture and use it when auto-detecting the default qemu binary.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
---
 tests/qemu-iotests/check         | 4 ++--
 tests/qemu-iotests/common.config | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

Max Reitz March 29, 2018, 2:31 p.m. UTC | #1
On 2018-03-29 13:20, Lukáš Doktor wrote:
> The qemu target does not always correspond to the host machine type. For
> example ppc64le machine target is ppc64. Let's introduce "qemu_arch"
> variable to store the matching qemu architecture related to the current
> architecture and use it when auto-detecting the default qemu binary.
> 
> Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
> ---
>  tests/qemu-iotests/check         | 4 ++--
>  tests/qemu-iotests/common.config | 1 +
>  2 files changed, 3 insertions(+), 2 deletions(-)

Thanks, applied to my block branch:

https://github.com/XanClic/qemu/commits/block

Max
Kevin Wolf April 3, 2018, 12:25 p.m. UTC | #2
Am 29.03.2018 um 16:31 hat Max Reitz geschrieben:
> On 2018-03-29 13:20, Lukáš Doktor wrote:
> > The qemu target does not always correspond to the host machine type. For
> > example ppc64le machine target is ppc64. Let's introduce "qemu_arch"
> > variable to store the matching qemu architecture related to the current
> > architecture and use it when auto-detecting the default qemu binary.
> > 
> > Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
> > ---
> >  tests/qemu-iotests/check         | 4 ++--
> >  tests/qemu-iotests/common.config | 1 +
> >  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> Thanks, applied to my block branch:
> 
> https://github.com/XanClic/qemu/commits/block

Please don't forget to CC qemu-block and qemu-devel for patches to
qemu-iotests (the kvm list isn't really necessary, though). Adding it to
this reply so that people can see that something was merged.

Kevin
diff mbox

Patch

diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index ec8033350d..aa94c6c7ea 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -538,8 +538,8 @@  if [ -z "$QEMU_PROG" ]
 then
     if [ -x "$build_iotests/qemu" ]; then
         export QEMU_PROG="$build_iotests/qemu"
-    elif [ -x "$build_root/$arch-softmmu/qemu-system-$arch" ]; then
-        export QEMU_PROG="$build_root/$arch-softmmu/qemu-system-$arch"
+    elif [ -x "$build_root/${qemu_arch}-softmmu/qemu-system-${qemu_arch}" ]; then
+        export QEMU_PROG="$build_root/${qemu_arch}-softmmu/qemu-system-${qemu_arch}"
     else
         pushd "$build_root" > /dev/null
         for binary in *-softmmu/qemu-system-*
diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
index cdcda54546..102aa6878a 100644
--- a/tests/qemu-iotests/common.config
+++ b/tests/qemu-iotests/common.config
@@ -23,6 +23,7 @@  PATH=".:$PATH"
 
 HOSTOS=`uname -s`
 arch=`uname -m`
+[[ "$arch" =~ "ppc64" ]] && qemu_arch=ppc64 || qemu_arch="$arch"
 
 export PWD=`pwd`