On 10/4/19 10:59 AM, Laurent Vivier wrote:
On 04/10/2019 10:53, Philippe Mathieu-Daudé wrote:
On 10/4/19 10:05 AM, Laurent Vivier wrote:
On 04/10/2019 00:54, Philippe Mathieu-Daudé wrote:
We have been restricting our fw_cfg tests to the PC machine,
which is a little-endian architecture.
The fw_cfg device is also used on the SPARC and PowerPC
architectures, which can run in big-endian configuration.
Since we want to be sure our device does not regress
regardless the endianess used, enable this test one
these targets.
The NUMA selector is X86 specific, restrict it to this arch.
Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com>
---
tests/Makefile.include | 2 ++
tests/fw_cfg-test.c | 18 +++++++++++++++---
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 3543451ed3..322bdb36ff 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -242,6 +242,7 @@ check-qtest-ppc64-$(CONFIG_VGA) +=
tests/display-vga-test$(EXESUF)
check-qtest-ppc64-y += tests/numa-test$(EXESUF)
check-qtest-ppc64-$(CONFIG_IVSHMEM_DEVICE) +=
tests/ivshmem-test$(EXESUF)
check-qtest-ppc64-y += tests/cpu-plug-test$(EXESUF)
+check-qtest-ppc64-y += tests/fw_cfg-test$(EXESUF)
Perhaps only a detail, but ppc64 (pseries) doesn't use fw_cfg, but ppc
(mac99, g3beige and prep) does, so perhaps you should rather add the
test to check-qtest-ppc-y (and it will be inherited by ppc64)?
The test only runs the mac99 machine.
What happens when running "qemu-system-ppc64 -M mac99"? Does it runs in
64-bit?
Yes, it's way used to emulate a ppc64 powermac (G5)
Oh.
$ qemu-system-ppc64 -M mac99 -serial tdio
=============================================================
OpenBIOS 1.1 [Feb 2 2019 05:05]
Configuration device id QEMU version 1 machine id 3
CPUs: 1
Memory: 128M
UUID: 00000000-0000-0000-0000-000000000000
CPU type PowerPC,970FX
So this would test the 64-bit/big-endian,
$ qemu-system-ppc -M mac99 -serial stdio
=============================================================
OpenBIOS 1.1 [Feb 2 2019 05:05]
Configuration device id QEMU version 1 machine id 1
CPUs: 1
Memory: 128M
UUID: 00000000-0000-0000-0000-000000000000
CPU type PowerPC,G4
and this the 32-bit/big-endian device, is that correct?