Message ID | 20180328163705.24509-2-ldoktor@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 2018-03-28 18:37, Lukáš Doktor wrote: > Currently the QEMU_PROG detection simply gets the first available > qemu-binary. This patch adds to the list the current architecture which > should give better results. > > Signed-off-by: Lukáš Doktor <ldoktor@redhat.com> > --- > tests/qemu-iotests/check | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check > index ec8033350d..ef2aede965 100755 > --- a/tests/qemu-iotests/check > +++ b/tests/qemu-iotests/check > @@ -542,7 +542,9 @@ then > export QEMU_PROG="$build_root/$arch-softmmu/qemu-system-$arch" Actually, the QEMU_PROG detection tries to use exactly the binary you'd like it to, the only thing that's missing is the "*ppc64*" -> "ppc64" replacement this patch adds. :-) Maybe just add something like qemu_arch=$arch [[ "$qemu_arch" =~ "ppc64" ]] && qemu_arch=ppc64 And then let the above branch use $qemu_arch instead of $arch? Max > else > pushd "$build_root" > /dev/null > - for binary in *-softmmu/qemu-system-* > + arch=$(uname -m) > + [[ "$arch" =~ "ppc64" ]] && arch=ppc64 # ppc64le machine uses ppc64 target > + for binary in "$arch-softmmu/qemu-system-$arch" *-softmmu/qemu-system-* > do > if [ -x "$binary" ] > then >
Dne 28.3.2018 v 19:48 Max Reitz napsal(a): > On 2018-03-28 18:37, Lukáš Doktor wrote: >> Currently the QEMU_PROG detection simply gets the first available >> qemu-binary. This patch adds to the list the current architecture which >> should give better results. >> >> Signed-off-by: Lukáš Doktor <ldoktor@redhat.com> >> --- >> tests/qemu-iotests/check | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check >> index ec8033350d..ef2aede965 100755 >> --- a/tests/qemu-iotests/check >> +++ b/tests/qemu-iotests/check >> @@ -542,7 +542,9 @@ then >> export QEMU_PROG="$build_root/$arch-softmmu/qemu-system-$arch" > > Actually, the QEMU_PROG detection tries to use exactly the binary you'd > like it to, the only thing that's missing is the "*ppc64*" -> "ppc64" > replacement this patch adds. :-) > > Maybe just add something like > > qemu_arch=$arch > [[ "$qemu_arch" =~ "ppc64" ]] && qemu_arch=ppc64 > > And then let the above branch use $qemu_arch instead of $arch? > Oh, I'm blind. Thank you for pointing this out, v2 is coming. Lukáš > Max > >> else >> pushd "$build_root" > /dev/null >> - for binary in *-softmmu/qemu-system-* >> + arch=$(uname -m) >> + [[ "$arch" =~ "ppc64" ]] && arch=ppc64 # ppc64le machine uses ppc64 target >> + for binary in "$arch-softmmu/qemu-system-$arch" *-softmmu/qemu-system-* >> do >> if [ -x "$binary" ] >> then >> >
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index ec8033350d..ef2aede965 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -542,7 +542,9 @@ then export QEMU_PROG="$build_root/$arch-softmmu/qemu-system-$arch" else pushd "$build_root" > /dev/null - for binary in *-softmmu/qemu-system-* + arch=$(uname -m) + [[ "$arch" =~ "ppc64" ]] && arch=ppc64 # ppc64le machine uses ppc64 target + for binary in "$arch-softmmu/qemu-system-$arch" *-softmmu/qemu-system-* do if [ -x "$binary" ] then
Currently the QEMU_PROG detection simply gets the first available qemu-binary. This patch adds to the list the current architecture which should give better results. Signed-off-by: Lukáš Doktor <ldoktor@redhat.com> --- tests/qemu-iotests/check | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)