All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhangjin Wu <falcon@tinylab.org>
To: w@1wt.eu
Cc: thomas@t-8ch.de, arnd@arndb.de, falcon@tinylab.org,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: [PATCH v2 14/14] selftests/nolibc: tinyconfig: add support for 32/64-bit powerpc
Date: Wed, 19 Jul 2023 21:32:46 +0800	[thread overview]
Message-ID: <15b47c6901f79a22b985a53efeae71dc7b172a5f.1689759351.git.falcon@tinylab.org> (raw)
In-Reply-To: <cover.1689759351.git.falcon@tinylab.org>

Firstly, add extra config files for powerpc, powerpc64le and powerpc64.

Second, QEMU_TIMEOUT is configured as 60 seconds for powerpc to allow
quit qemu-system-ppc even if poweroff fails. In normal host machine, ~20
seconds may be enough for boot+test+poweroff, but 60 seconds is used
here to gurantee it at least finish even in a very slow host machine or
the host machine is too busy. Both powerpc64le and powerpc64 can
poweroff normally, no need to configure QEMU_TIMEOUT for them.

It is able to use tinyconfig as the minimal config target to speed up
the run target of powerpc:

    $ for arch in powerpc powerpc64 powerpc64le; do \
        rm -rf $PWD/kernel-$arch; \
        mkdir -p $PWD/kernel-$arch; \
        make tinyconfig run XARCH=$arch O=$PWD/kernel-$arch | grep status ; \
      done

rerun with architecture specific run.out (for later report):

    $ for arch in powerpc powerpc64 powerpc64le; do \
        mkdir -p $PWD/kernel-$arch; \
        make rerun XARCH=$arch O=$PWD/kernel-$arch RUN_OUT=$PWD/run.$arch.out | grep status ; \
      done

report:

    $ for arch in powerpc powerpc64 powerpc64le; do \
        make report RUN_OUT=$PWD/run.$arch.out | grep status ; \
      done

Signed-off-by: Zhangjin Wu <falcon@tinylab.org>
---
 tools/testing/selftests/nolibc/Makefile                   | 1 +
 tools/testing/selftests/nolibc/configs/powerpc.config     | 3 +++
 tools/testing/selftests/nolibc/configs/powerpc64.config   | 3 +++
 tools/testing/selftests/nolibc/configs/powerpc64le.config | 4 ++++
 4 files changed, 11 insertions(+)
 create mode 100644 tools/testing/selftests/nolibc/configs/powerpc64.config
 create mode 100644 tools/testing/selftests/nolibc/configs/powerpc64le.config

diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
index f42782fa78a9..b01346323e35 100644
--- a/tools/testing/selftests/nolibc/Makefile
+++ b/tools/testing/selftests/nolibc/Makefile
@@ -103,6 +103,7 @@ QEMU_ARGS_loongarch  = -M virt -append "console=ttyS0,115200 panic=-1 $(TEST:%=N
 QEMU_ARGS            = $(QEMU_ARGS_$(XARCH)) $(QEMU_ARGS_EXTRA)
 
 # QEMU_TIMEOUT: some architectures can not poweroff normally, especially for tinyconfig
+QEMU_TIMEOUT_powerpc     = 60
 QEMU_TIMEOUT             = $(QEMU_TIMEOUT_$(XARCH))
 
 # OUTPUT is only set when run from the main makefile, otherwise
diff --git a/tools/testing/selftests/nolibc/configs/powerpc.config b/tools/testing/selftests/nolibc/configs/powerpc.config
index b1975f8253f7..29123cee14c4 100644
--- a/tools/testing/selftests/nolibc/configs/powerpc.config
+++ b/tools/testing/selftests/nolibc/configs/powerpc.config
@@ -1,3 +1,6 @@
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_PPC_PMAC=y
+CONFIG_PPC_OF_BOOT_TRAMPOLINE=y
 CONFIG_SERIAL_PMACZILOG=y
 CONFIG_SERIAL_PMACZILOG_TTYS=y
 CONFIG_SERIAL_PMACZILOG_CONSOLE=y
diff --git a/tools/testing/selftests/nolibc/configs/powerpc64.config b/tools/testing/selftests/nolibc/configs/powerpc64.config
new file mode 100644
index 000000000000..4e17f0cdb99f
--- /dev/null
+++ b/tools/testing/selftests/nolibc/configs/powerpc64.config
@@ -0,0 +1,3 @@
+CONFIG_PPC64=y
+CONFIG_PPC_POWERNV=y
+CONFIG_HVC_OPAL=y
diff --git a/tools/testing/selftests/nolibc/configs/powerpc64le.config b/tools/testing/selftests/nolibc/configs/powerpc64le.config
new file mode 100644
index 000000000000..713b227f506f
--- /dev/null
+++ b/tools/testing/selftests/nolibc/configs/powerpc64le.config
@@ -0,0 +1,4 @@
+CONFIG_PPC64=y
+CONFIG_PPC_POWERNV=y
+CONFIG_HVC_OPAL=y
+CONFIG_CPU_LITTLE_ENDIAN=y
-- 
2.25.1


  parent reply	other threads:[~2023-07-19 13:33 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-19 13:16 [PATCH v2 00/14] selftests/nolibc: add minimal kernel config support - part1 Zhangjin Wu
2023-07-19 13:17 ` [PATCH v2 01/14] selftests/nolibc: allow report with existing test log Zhangjin Wu
2023-07-19 13:19 ` [PATCH v2 02/14] selftests/nolibc: add macros to enhance maintainability Zhangjin Wu
2023-07-22 12:20   ` Willy Tarreau
2023-07-25 12:37     ` Zhangjin Wu
2023-07-19 13:20 ` [PATCH v2 03/14] selftests/nolibc: print running log to screen Zhangjin Wu
2023-07-22 12:29   ` Willy Tarreau
2023-07-25 12:46     ` Zhangjin Wu
2023-07-19 13:21 ` [PATCH v2 04/14] selftests/nolibc: fix up O= option support Zhangjin Wu
2023-07-19 13:22 ` [PATCH v2 05/14] selftests/nolibc: add menuconfig for development Zhangjin Wu
2023-07-22 12:35   ` Willy Tarreau
2023-07-25 13:51     ` Zhangjin Wu
2023-07-27 13:24       ` Zhangjin Wu
2023-07-29  8:22         ` Willy Tarreau
2023-07-29 13:54           ` Zhangjin Wu
2023-07-19 13:23 ` [PATCH v2 06/14] selftests/nolibc: add mrproper " Zhangjin Wu
2023-07-22 12:36   ` Willy Tarreau
2023-07-19 13:24 ` [PATCH v2 07/14] selftests/nolibc: defconfig: remove mrproper target Zhangjin Wu
2023-07-22 12:46   ` Willy Tarreau
2023-07-25 14:04     ` Zhangjin Wu
2023-07-19 13:26 ` [PATCH v2 08/14] selftests/nolibc: string the core targets Zhangjin Wu
2023-07-22 12:57   ` Willy Tarreau
2023-07-25 14:20     ` Zhangjin Wu
2023-07-29  7:53       ` Willy Tarreau
2023-07-29  9:54         ` Zhangjin Wu
2023-07-29 17:15           ` Willy Tarreau
2023-07-29 17:44             ` Zhangjin Wu
2023-07-19 13:27 ` [PATCH v2 09/14] selftests/nolibc: allow quit qemu-system when poweroff fails Zhangjin Wu
2023-07-22 13:02   ` Willy Tarreau
2023-07-25 14:59     ` Zhangjin Wu
2023-07-29  8:04       ` Willy Tarreau
2023-07-19 13:28 ` [PATCH v2 10/14] selftests/nolibc: allow customize CROSS_COMPILE by architecture Zhangjin Wu
2023-07-19 13:29 ` [PATCH v2 11/14] selftests/nolibc: customize CROSS_COMPILE for 32/64-bit powerpc Zhangjin Wu
2023-07-19 13:30 ` [PATCH v2 12/14] selftests/nolibc: add tinyconfig target Zhangjin Wu
2023-07-22 13:07   ` Willy Tarreau
2023-07-25 15:13     ` Zhangjin Wu
2023-07-19 13:31 ` [PATCH v2 13/14] selftests/nolibc: tinyconfig: add extra common options Zhangjin Wu
2023-07-19 13:32 ` Zhangjin Wu [this message]
2023-07-22 13:17   ` [PATCH v2 14/14] selftests/nolibc: tinyconfig: add support for 32/64-bit powerpc Willy Tarreau
2023-07-25 16:04     ` Zhangjin Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15b47c6901f79a22b985a53efeae71dc7b172a5f.1689759351.git.falcon@tinylab.org \
    --to=falcon@tinylab.org \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=thomas@t-8ch.de \
    --cc=w@1wt.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.