Skip to contentSkip to conversation

tests.acceptance.avocado_qemu: Add support for powerpc

PATCH In review [email protected] 3 participants 3 messages Aug 19, 2019 – Aug 27, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 tests.acceptance.avocado_qemu: Add support for powerpc

From: Satheesh Rajendran <[email protected]>

Current acceptance test will not run properly in powerpc environment due qemu target is different from arch, this usually matches, except with bi-endian architectures like ppc64. uname would return ppc64 or ppc64le based big or little endian but qemu target is always ppc64. Let's handle it.

---
 tests/acceptance/avocado_qemu/__init__.py | 3 +++
 1 file changed, 3 insertions(+)
tests/acceptance/avocado_qemu/__init__.py +3 -0
index aee5d820ed..bd41e0443c 100644
@@ -39,6 +39,9 @@ def pick_default_qemu_bin(arch=None):
     """
     if arch is None:
         arch = os.uname()[4]
+    # qemu binary path does not match arch for powerpc, handle it
+    if 'ppc64le' in arch:
+        arch = 'ppc64'
     qemu_bin_relative_path = os.path.join("%s-softmmu" % arch,
                                           "qemu-system-%s" % arch)
     if is_readable_executable_file(qemu_bin_relative_path):
Signature · 1 line
2.21.0
Reviewed-by on v2 1/2
#1 lore raw
Quoted 10 lines · On Mon, Aug 19, 2019 at 01:58:20PM +0530, [email protected] wrote:

From: Satheesh Rajendran <[email protected]>

Current acceptance test will not run properly in powerpc environment due qemu target is different from arch, this usually matches, except with bi-endian architectures like ppc64. uname would return ppc64 or ppc64le based big or little endian but qemu target is always ppc64. Let's handle it.

I sent a similar patch a little while back, but it seems it got lost.

Quoted 18 lines
---
 tests/acceptance/avocado_qemu/__init__.py | 3 +++
 1 file changed, 3 insertions(+)
tests/acceptance/avocado_qemu/__init__.py +3 -0
index aee5d820ed..bd41e0443c 100644
@@ -39,6 +39,9 @@ def pick_default_qemu_bin(arch=None):
     """
     if arch is None:
         arch = os.uname()[4]
+    # qemu binary path does not match arch for powerpc, handle it
+    if 'ppc64le' in arch:
+        arch = 'ppc64'
     qemu_bin_relative_path = os.path.join("%s-softmmu" % arch,
                                           "qemu-system-%s" % arch)
     if is_readable_executable_file(qemu_bin_relative_path):
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#2 lore raw
Quoted 21 lines · David Gibson
Quoted 10 lines · On Mon, Aug 19, 2019 at 01:58:20PM +0530, [email protected] wrote:

From: Satheesh Rajendran <[email protected]>

Current acceptance test will not run properly in powerpc environment due qemu target is different from arch, this usually matches, except with bi-endian architectures like ppc64. uname would return ppc64 or ppc64le based big or little endian but qemu target is always ppc64. Let's handle it.

I sent a similar patch a little while back, but it seems it got lost.

Quoted 4 lines
---
 tests/acceptance/avocado_qemu/__init__.py | 3 +++
 1 file changed, 3 insertions(+)
Quoted 20 lines
Quoted 14 lines
tests/acceptance/avocado_qemu/__init__.py +3 -0
index aee5d820ed..bd41e0443c 100644
@@ -39,6 +39,9 @@ def pick_default_qemu_bin(arch=None):
     """
     if arch is None:
         arch = os.uname()[4]
+    # qemu binary path does not match arch for powerpc, handle it
+    if 'ppc64le' in arch:
+        arch = 'ppc64'
     qemu_bin_relative_path = os.path.join("%s-softmmu" % arch,
                                           "qemu-system-%s" % arch)
     if is_readable_executable_file(qemu_bin_relative_path):
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Yes, I remember that. I have the feeling the discussion evolved into "let's do it for all other arch differences", because I found a patch here about that. Anyway, sorry about that.

I've queued this one.

- Cleber.