From patchwork Sun Jun 25 16:12:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696767 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35AA3EB64DC for ; Sun, 25 Jun 2023 16:12:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229660AbjFYQMX (ORCPT ); Sun, 25 Jun 2023 12:12:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbjFYQMW (ORCPT ); Sun, 25 Jun 2023 12:12:22 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2791D18D; Sun, 25 Jun 2023 09:12:20 -0700 (PDT) X-QQ-mid: bizesmtp85t1687709530tsvfo8pm Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:12:09 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: XBN7tc9DADJ/OcMdENJaOzWBkZLGnIpxol5HU5eHhMJPihloFMK4nV8tycOqP HcFbWitRT8ddnSgIxB4OEtcz18ioeAnXfZ/MrBw4IpHZfmtCgWRpTgqxkPqh0g72G187XBG FBxsQ2+M1egZBKQKwY+g8lqoc/5WHoHP2t7aZUQuOLiB643WygQ27rWCZ6T/8cgN29l5DaG EcF9AjMPzwmnUmCEc0CulnMK1nfUeR+Bp7UMx8LCV5GJcYxQ/P5TzVexQWbEERiTWMbyDm5 P9yDZVUU3EoY3HD1BSRnFTFnBLHyPyunUd3s1RkxhHMPz/U5jCHY27tlTa9cA5pNbdN4z9U +iX6V2Hsgg+we5SNg2ilRyctvtMS61cx8HrbAIJ+kGfYUsx4cg= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 15070065792118708961 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 01/22] selftests/nolibc: add test for -include /path/to/nolibc.h Date: Mon, 26 Jun 2023 00:12:00 +0800 Message-Id: <149d51ee77cdd4936de4a02ee8b2cff239fd8253.1687706332.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org As the head comment of nolibc-test.c shows, it can be built in 3 ways: The program may be built in 3 ways: $(CC) -nostdlib -include /path/to/nolibc.h => NOLIBC already defined $(CC) -nostdlib -I/path/to/nolibc/sysroot => _NOLIBC_* guards are present $(CC) with default libc => NOLIBC* never defined Only last two of them are tested currently, let's allow test the first one too. This may help to find issues about using nolibc.h to build programs. it derives from this change: commit 3a8039e289a3 ("tools/nolibc: Fix build of stdio.h due to header ordering") Usage: // test with sysroot $ make run-user SYSROOT=1 // test without sysroot, using nolibc.h directly $ make run-user SYSROOT=0 Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 848884204a84..0b66b7a79cea 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -102,6 +102,9 @@ REPORT ?= awk '/\[OK\][\r]*$$/{p++} /\[FAIL\][\r]*$$/{f++;print} /\[SKIPPED\][\ END{ printf("%d test(s) passed, %d skipped, %d failed.\n", p, s, f); \ printf("See all results in %s\n", ARGV[1]); }' +# allow switch nolibc headers include method: 1 for sysroot, 0 for nolibc.h +SYSROOT ?= 1 + help: @echo "Supported targets under selftests/nolibc:" @echo " all call the \"run\" target below" @@ -139,9 +142,15 @@ sysroot/$(ARCH)/include: $(Q)$(MAKE) -C ../../../include/nolibc ARCH=$(ARCH) OUTPUT=$(CURDIR)/sysroot/ headers_standalone $(Q)mv sysroot/sysroot sysroot/$(ARCH) +ifeq ($(SYSROOT), 1) nolibc-test: nolibc-test.c sysroot/$(ARCH)/include $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ \ -nostdlib -static -Isysroot/$(ARCH)/include $< -lgcc +else +nolibc-test: nolibc-test.c + $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ \ + -nostdlib -static -include ../../../include/nolibc/nolibc.h $< -lgcc +endif libc-test: nolibc-test.c $(QUIET_CC)$(CC) -o $@ $< From patchwork Sun Jun 25 16:13:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696374 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D85D2EB64DC for ; Sun, 25 Jun 2023 16:13:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230242AbjFYQNt (ORCPT ); Sun, 25 Jun 2023 12:13:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbjFYQNs (ORCPT ); Sun, 25 Jun 2023 12:13:48 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5BF418D; Sun, 25 Jun 2023 09:13:45 -0700 (PDT) X-QQ-mid: bizesmtp62t1687709616tzy4rqig Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:13:34 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: IV30oiqrgAbOfnJiGwL0dLz5UNsInBixLxruPzcz1JdYKW91p3ui4yAH+JKDY HQKHcMsMzV7Nrt2LT0lOsKzUTJ0H9bt/KtrowcD3Pfllvf6wEiJnFhxCUg9KKvLIKIyFTpZ Qc7xqQfgMj13ozkOMYLJkvEmyX8wmvWwF48GzR2LQHHHVpjLN3vSx+h1LcsT5iWoGFVPXoJ RvNpGhcDVu0px1OGCdiLeqj6wUYSomUpNfUkyCIqAisVI0JthFgsE4ylvqwrwVCDLndbNYR o3JXtkq+Lp+rbXJ4NW0V0ORgwNEh/lv2+GFWOJMzmqPNUW/A4kN5ir6l6Edo/IVLSFqaWlD p6W0vN+6xNVMrW/NhLD/dL57AyXiA9bIMyEfb9iLvINukdCZso= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 15177638908459309453 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 02/22] selftests/nolibc: print result to the screen too Date: Mon, 26 Jun 2023 00:13:14 +0800 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org printing the running log to the screen helps users to learn what happens, especially to find potential issues immediately. If want to silence a lot, simply pass a QUIET_RUN=1 is enough. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 0b66b7a79cea..3300b5ab7de3 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -98,6 +98,14 @@ CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 \ $(CFLAGS_$(ARCH)) $(CFLAGS_STACKPROTECTOR) LDFLAGS := -s +# allow silence the running test log +QUIET_RUN ?= 0 +ifeq ($(QUIET_RUN),0) +LOG_OUTPUT = | tee "$(CURDIR)/run.out" +else +LOG_OUTPUT = > "$(CURDIR)/run.out" +endif + REPORT ?= awk '/\[OK\][\r]*$$/{p++} /\[FAIL\][\r]*$$/{f++;print} /\[SKIPPED\][\r]*$$/{s++} \ END{ printf("%d test(s) passed, %d skipped, %d failed.\n", p, s, f); \ printf("See all results in %s\n", ARGV[1]); }' @@ -157,7 +165,7 @@ libc-test: nolibc-test.c # qemu user-land test run-user: nolibc-test - $(Q)qemu-$(QEMU_ARCH) ./nolibc-test > "$(CURDIR)/run.out" || : + $(Q)qemu-$(QEMU_ARCH) ./nolibc-test $(LOG_OUTPUT) || : $(Q)$(REPORT) $(CURDIR)/run.out initramfs: nolibc-test @@ -173,12 +181,12 @@ kernel: initramfs # run the tests after building the kernel run: kernel - $(Q)qemu-system-$(QEMU_ARCH) -display none -no-reboot -kernel "$(srctree)/$(IMAGE)" -serial stdio $(QEMU_ARGS) > "$(CURDIR)/run.out" + $(Q)qemu-system-$(QEMU_ARCH) -display none -no-reboot -kernel "$(srctree)/$(IMAGE)" -serial stdio $(QEMU_ARGS) $(LOG_OUTPUT) $(Q)$(REPORT) $(CURDIR)/run.out # re-run the tests from an existing kernel rerun: - $(Q)qemu-system-$(QEMU_ARCH) -display none -no-reboot -kernel "$(srctree)/$(IMAGE)" -serial stdio $(QEMU_ARGS) > "$(CURDIR)/run.out" + $(Q)qemu-system-$(QEMU_ARCH) -display none -no-reboot -kernel "$(srctree)/$(IMAGE)" -serial stdio $(QEMU_ARGS) $(LOG_OUTPUT) $(Q)$(REPORT) $(CURDIR)/run.out clean: From patchwork Sun Jun 25 16:14:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696766 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9EA2EB64DC for ; Sun, 25 Jun 2023 16:15:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230389AbjFYQPH (ORCPT ); Sun, 25 Jun 2023 12:15:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbjFYQPF (ORCPT ); Sun, 25 Jun 2023 12:15:05 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BE7318E; Sun, 25 Jun 2023 09:15:04 -0700 (PDT) X-QQ-mid: bizesmtp71t1687709694tuoksfxz Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:14:53 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: 3M0okmaRx3i2MOPnCI0DZtGYFOuu7wfpxwOZApJIBL9P6JET0xdK3TkWYCaDq ma+xXXNKIgM7SvfXg+wmihzPEHOJacQkejX+xsKp9znG3mfWK0KAlGIYOIWJ76861t6BE2X Ko59kt50r7bMB27RqUSdNnNcM3N99bI8UFDG+sfgKr6CYTw/QgS2RlZ5b3Mzvob6uY80tWx ufISYGlQFCsmji0qqnp5I6z+upiWdKU/Jk9plVPzzTsQpK/q/LGmHVNRBK1zIcpmdrYzuCi DC7sh1y9WihwxneGyHQVukRQR6g3egva+EcA/l1JukSC3ccQguTx95qM8ot8TKi6alBRTVy h+fyUFviFcdWz4uq1XSx+LPbjVr0CO8BzvYqPUsTmcI63JmyrE= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 3414960781867070073 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 03/22] selftests/nolibc: allow use x86_64 toolchain for i386 Date: Mon, 26 Jun 2023 00:14:39 +0800 Message-Id: <57f6d5abddf5b126589faedefbf25556939b093a.1687706332.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Add extra '-m32 -Wl,-melf_i386' flags to tell x86_64 toolchains to generate i386 executable. This allows to use the same x86_64 toolchain for i386 architecture. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 3300b5ab7de3..f8be0de0ce0e 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -89,6 +89,7 @@ else Q=@ endif +CFLAGS_i386 = -m32 -Wl,-melf_i386 CFLAGS_riscv32 = -march=rv32im -mabi=ilp32 CFLAGS_s390 = -m64 CFLAGS_mips = -EL From patchwork Sun Jun 25 16:15:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696373 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1922EB64DC for ; Sun, 25 Jun 2023 16:18:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230169AbjFYQSe (ORCPT ); Sun, 25 Jun 2023 12:18:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbjFYQSd (ORCPT ); Sun, 25 Jun 2023 12:18:33 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97A8B18D; Sun, 25 Jun 2023 09:18:31 -0700 (PDT) X-QQ-mid: bizesmtp79t1687709901tb2iajrv Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:18:20 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: 3M0okmaRx3hcF+S99Fpw/jxjR7hoHB1tjQPBUK8gngnJMi+HZ2VtCebvgRwRp y9Rc5husLEZJxYSNuJLBiqv1VvbA7z4Bh5k9x6oCWZR3j+I7wa/PncQEDZKTcOuuBOLOlWo s3+XSH5JiK0/PzxZVKyhmUAVuYOZk4hKY8a6RhTkte4JjGcXsjcZleXt0Wy8BKMWe14H/Rr oKGXxweT29IeiZuEWTl+VZUaGonZWfGCEdaoKk7TiPbIG6lnm/gP9v3ciVxPpDNWGJo5R1x ZF8MtgZemdf0EdEqLGD/wtVaP7sQIaoJZ4KRn8f5DpkWXj9fhmayPJOCLDWHNMieCuh0IGM aXQuZTofIvKITjgkBAMFI3lvaF8wTV+A2UVr846ThvApEtSUHfYc2Ij9KJfAw== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 10532903300621852071 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 04/22] selftests/nolibc: add menuconfig target for manual config Date: Mon, 26 Jun 2023 00:15:58 +0800 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org The default DEFCONFIG_ may not really work for all architectures, let's allow users to tune some configs with 'menuconfig'. This is important when porting nolibc to a new architecture, it also allows to speed up nolibc 'run' target testing via manually disabling tons of unnecessary configs. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index f8be0de0ce0e..10579396e60e 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -177,6 +177,9 @@ initramfs: nolibc-test defconfig: $(Q)$(MAKE) -C $(srctree) ARCH=$(KARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) mrproper $(DEFCONFIG) prepare +menuconfig: + $(Q)$(MAKE) -C $(srctree) ARCH=$(KARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) menuconfig + kernel: initramfs $(Q)$(MAKE) -C $(srctree) ARCH=$(KARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) $(IMAGE_NAME) CONFIG_INITRAMFS_SOURCE=$(CURDIR)/initramfs From patchwork Sun Jun 25 16:19:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696765 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A661EB64DC for ; Sun, 25 Jun 2023 16:20:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229496AbjFYQUZ (ORCPT ); Sun, 25 Jun 2023 12:20:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbjFYQUZ (ORCPT ); Sun, 25 Jun 2023 12:20:25 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2B95196; Sun, 25 Jun 2023 09:20:23 -0700 (PDT) X-QQ-mid: bizesmtp71t1687710014tpfmvubo Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:20:13 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: jXjag1m6xl6R91bDdyf1kEZlGAuEgRHMqwEDnc6K0vRXlfiEBLwMKYD92YoTN pjBT+ISlgvbX0swP/T8UItt1HmbMqxTkrdMjG0NeRlSMeCZB2iprXG8R93kuvFWk9Nqun1c ok2HuytLUklY/iTjypQ1RAszOxis1N60KzDTHVQaPd0TT3W8qUSql2jbeG5EIIMCIeqMW62 qbkLaecm3oKftgevIaIy4LwjvOigmvKTdBNAXkljZX1RlC3Flc+OsmHH/iqSrCfCCaAR268 iT/BZaVryHiHDJ3++DkT2xsMVASigy6QTOQ9BMhOW29RFJCySflN0kE4xnkwAMQT8J4buXx XWv3ZXOkiW1iKOwtLtkpv8IXoTwoL3vdtEXxozeINhRJg6xkBlJ2rO06i+1BQ== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 10052516696424218847 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Subject: [PATCH v1 05/22] selftests/nolibc: add tinyconfig target Date: Mon, 26 Jun 2023 00:19:25 +0800 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org The default DEFCONFIG_ enables too many options, the kernel building with such options is very slow. To speed up the 'run' target, in parallel with the 'defconfig' target, another 'tinyconfig' target is added to allow only enable necessary options to just let nolibc-test pass. Note, this 'tinyconfig' target is not enough to let qemu really boot and print, the coming patches will add more options to let nolibc-test be able to run, print the results and let all tests pass. Suggested-by: Thomas Weißschuh Link: https://lore.kernel.org/lkml/bc635c4f-67fe-4e86-bfdf-bcb4879b928d@t-8ch.de/ Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 10579396e60e..5caf3e7023d7 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -177,6 +177,9 @@ initramfs: nolibc-test defconfig: $(Q)$(MAKE) -C $(srctree) ARCH=$(KARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) mrproper $(DEFCONFIG) prepare +tinyconfig: + $(Q)$(MAKE) -C $(srctree) ARCH=$(KARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) mrproper tinyconfig prepare + menuconfig: $(Q)$(MAKE) -C $(srctree) ARCH=$(KARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) menuconfig From patchwork Sun Jun 25 16:21:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696372 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29928EB64DC for ; Sun, 25 Jun 2023 16:21:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229670AbjFYQVu (ORCPT ); Sun, 25 Jun 2023 12:21:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbjFYQVt (ORCPT ); Sun, 25 Jun 2023 12:21:49 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4656A8; Sun, 25 Jun 2023 09:21:46 -0700 (PDT) X-QQ-mid: bizesmtp87t1687710097tb0hug14 Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:21:36 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: xwvWJGGFd7OpckdxdG9LSdgq7u/95vEIQ4fFtJ7ibMS131dQf/iSj19Z7iyZB LPUobVEaAbpGncd4a28NvNHDXa4p514cbGVK4Pfbg5ou4M8S18404GherJ8BriFkhEsA+cc oL4JAFEmm+AxUxofALbjSu8MNrA/5DurqmnWKlTDB5ADkhfNI/YVUxCLDO2PAMQTM33og0c xPf00HBJxozyti9AGEnVpESan5ViGLVv0Wzc2VlmzDpXFOk0hGYKYC8pzYSwEEHWBox3GjF WVXgPkl+t886mLVlIHJVBplw0vlKxbB5gIpVZuekWPw4M/WcfTKUntap1DhJ7jDXo8Xlwgh pVc5uuzJZtKWffJAKjd7UipxbhH9x66h+FmsMbGFwR7VgdzLEY= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 14215416064968937971 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 06/22] selftests/nolibc: allow customize extra kernel config options Date: Mon, 26 Jun 2023 00:21:18 +0800 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org The default DEFCONFIG_ may not really work for all architectures, tuning it with the 'menuconfig' target is good for development stage, but not enough for the default compile. Since both of the 'defconfig' and 'tinyconfig' targets may not meet our requirement, just like the 'CONFIG_INITRAMFS_SOURCE' we added, some architectures may require to add extra configs, this adds a new 'extconfig' target to unify such requirement. It allows to customize extra config options by architecture and then trigger 'allnoconfig' to let them take effect and with missing configs as disabled. The old common 'CONFIG_INITRAMFS_SOURCE' setting from the 'kernel' target is moved to this target too. It is safe enough to share this 'extconfig' between 'defconfig' and 'tinyconfig', because 'extconfig' is often a subset of 'defconfig' or an additions of 'defconfig' and 'tinyconfig'. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 5caf3e7023d7..0b810681547b 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -48,6 +48,15 @@ DEFCONFIG_s390 = defconfig DEFCONFIG_loongarch = defconfig DEFCONFIG = $(DEFCONFIG_$(ARCH)) +# extra kernel configs shared among architectures +EXTCONFIG_COMMON = --set-str CONFIG_INITRAMFS_SOURCE $(CURDIR)/initramfs + +# extra kernel configs by architecture +EXTCONFIG_ARCH = $(EXTCONFIG_$(ARCH)) + +# extra kernel configs, include common + architecture specific +EXTCONFIG = $(EXTCONFIG_ARCH) $(EXTCONFIG_COMMON) + # optional tests to run (default = all) TEST = @@ -183,8 +192,12 @@ tinyconfig: menuconfig: $(Q)$(MAKE) -C $(srctree) ARCH=$(KARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) menuconfig -kernel: initramfs - $(Q)$(MAKE) -C $(srctree) ARCH=$(KARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) $(IMAGE_NAME) CONFIG_INITRAMFS_SOURCE=$(CURDIR)/initramfs +extconfig: + $(Q)$(srctree)/scripts/config --file $(srctree)/.config $(EXTCONFIG) + $(Q)$(MAKE) -C $(srctree) ARCH=$(KARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) KCONFIG_ALLCONFIG=$(srctree)/.config allnoconfig + +kernel: initramfs extconfig + $(Q)$(MAKE) -C $(srctree) ARCH=$(KARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) $(IMAGE_NAME) # run the tests after building the kernel run: kernel From patchwork Sun Jun 25 16:22:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696764 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41208EB64DC for ; Sun, 25 Jun 2023 16:23:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229740AbjFYQXH (ORCPT ); Sun, 25 Jun 2023 12:23:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229634AbjFYQXH (ORCPT ); Sun, 25 Jun 2023 12:23:07 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5420EF7; Sun, 25 Jun 2023 09:23:05 -0700 (PDT) X-QQ-mid: bizesmtp75t1687710174trrepom4 Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:22:53 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: znfcQSa1hKYSewel9R5tfK6iXWL0tG+7XzUCS2dRMwYgVkTzq+dnMLaN0SZdd KsHYnCbiyvVHTBeIzWRqb8bviJBXXxVYzlfu/Om2L6rc3PHQKwooqGWi+zqIfThXS6Dygc3 WwkE3aWak9gg+eo3ddAO6C3qsX3MPEs+JoyzlUprXf84p3nQiUBXkvMjRNPw3TWJLyqILmG JO/YbLUK870quZTewdQq9dfIbi590Lk8nEDkN/agMayfvxS+cgcS5XpbronNLem/armSCfW FnsFRrtHGzfkuU5V26Me6cYIWZvM0rvrs3OHJm+42uVvr8Tr0861JBI+aG3d4ibT3XzibwY 5oV5+sNF+xT1otht/uwHo5ZcTu4vDaAN04QmE6Z0cbUA+o34hw= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 13042838406856188047 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 07/22] selftests/nolibc: add common extra config options Date: Mon, 26 Jun 2023 00:22:41 +0800 Message-Id: <8eec688082dc5c3fde88748600b3763d13b0ba09.1687706332.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org This adds config options required by all of the architectures. * for initrd -e BLK_DEV_INITRD --set-str CONFIG_INITRAMFS_SOURCE $(CURDIR)/initramfs * for init executable -e BINFMT_ELF * for test result print -e PRINTK -e TTY * for panic reset instead of hang --set-val PANIC_TIMEOUT 1 Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 0b810681547b..147c2db49635 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -49,7 +49,10 @@ DEFCONFIG_loongarch = defconfig DEFCONFIG = $(DEFCONFIG_$(ARCH)) # extra kernel configs shared among architectures -EXTCONFIG_COMMON = --set-str CONFIG_INITRAMFS_SOURCE $(CURDIR)/initramfs +EXTCONFIG_COMMON = -e BLK_DEV_INITRD --set-str INITRAMFS_SOURCE $(CURDIR)/initramfs +EXTCONFIG_COMMON += --set-val PANIC_TIMEOUT 1 +EXTCONFIG_COMMON += -e PRINTK -e TTY +EXTCONFIG_COMMON += -e BINFMT_ELF # extra kernel configs by architecture EXTCONFIG_ARCH = $(EXTCONFIG_$(ARCH)) From patchwork Sun Jun 25 16:23:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696371 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6A63EB64DC for ; Sun, 25 Jun 2023 16:24:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229480AbjFYQYP (ORCPT ); Sun, 25 Jun 2023 12:24:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjFYQYN (ORCPT ); Sun, 25 Jun 2023 12:24:13 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F8D0FB; Sun, 25 Jun 2023 09:24:12 -0700 (PDT) X-QQ-mid: bizesmtp91t1687710243tcm1mhg6 Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:24:01 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: LE7C6P2vL8RGulXWTTLakwGCbDFVogyRym+KcgI8bU6ETz331jXlzFM5MTin9 CA+sFl4YVEPL6MSq+ixvxplRIFqOTDkDC5NKXwsqkB9WPq2xjlElrvw84ep+MC8DFb0vwk7 XZPPcIQtMJJglM+j+fwH2oTrJNysRCScR8Y5Use/Lw9XL44i3wyj2Amq+DF1Ym1Fxvx4aOj rOwhCL5FZnaqXZPJDQ34+PEMkz3VHEi4/2po95wETckplOa1BVBG1yvZZn5dlHp2xi1lRVp uaArzlPWpSRTPVuMQbOh8gNMafrGTw6SarbAUIQcOvzraSWHZCbFEnJwYdfKqbnZAA6AQeQ zQrGhTt9pjUN8UL5DCwPEVxQSK25U8bH79V1EYU0jnXRCD5ZVodR4ESDAdQkA== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 8067436170865169837 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 08/22] selftests/nolibc: add power reset control support Date: Mon, 26 Jun 2023 00:23:58 +0800 Message-Id: <7b9dd1d0b70de3917ee3d375187a5cb572303e7c.1687706332.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Some boards require the power reset control options, they should have no side effect, enable them for all. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 147c2db49635..ae8519fb1b49 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -53,6 +53,7 @@ EXTCONFIG_COMMON = -e BLK_DEV_INITRD --set-str INITRAMFS_SOURCE $(CURDIR)/in EXTCONFIG_COMMON += --set-val PANIC_TIMEOUT 1 EXTCONFIG_COMMON += -e PRINTK -e TTY EXTCONFIG_COMMON += -e BINFMT_ELF +EXTCONFIG_COMMON += -e POWER_RESET -e POWER_RESET_SYSCON # extra kernel configs by architecture EXTCONFIG_ARCH = $(EXTCONFIG_$(ARCH)) From patchwork Sun Jun 25 16:25:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696763 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D885EB64DC for ; Sun, 25 Jun 2023 16:25:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229489AbjFYQZi (ORCPT ); Sun, 25 Jun 2023 12:25:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjFYQZi (ORCPT ); Sun, 25 Jun 2023 12:25:38 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFCA4A8; Sun, 25 Jun 2023 09:25:36 -0700 (PDT) X-QQ-mid: bizesmtp64t1687710327t7nggopr Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:25:25 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: LE7C6P2vL8T0B3PKGrZcHQ0BTeQiRu2DlqZ7sGIG0uR51RWmpLUTcegpB6InK CCVs7YfKvpjQoKPFVDpuimCYFIVaewN3N15vb+WlMFVzP5OiTYDHzymJeYhIXO/DJiqtCGy EUxD4V59l44dI/wgm/siwof/WJNJsY7oXoF/7KEX1lyPqOL/H1pL5HSmA3T4s8JgSytC6un LxZfNJTm+aAgmGA6mzz2/1HgZ9YYnp/le4VtYuidOs9SrQ8GsrwcR2DwLHWHoEP3t0ey9uW vIiiSZPaNybdwX2APMlAWicvsu2dBHZX0bCcn8Y4KhT1nqW84ZWyW2mA1iYEWTpdoa5e+pG DRe5Tz3qlokEDuW+AaaHy+FJ214aDN/3iEU+Swc X-QQ-GoodBg: 0 X-BIZMAIL-ID: 6478744900005020789 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 09/22] selftests/nolibc: add procfs, shmem and tmpfs Date: Mon, 26 Jun 2023 00:25:07 +0800 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Some test cases want to use procfs and tmpfs, let's enable them. Because tmpfs depends on shmem, let's enable it too. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index ae8519fb1b49..1cddacbeb95e 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -54,6 +54,8 @@ EXTCONFIG_COMMON += --set-val PANIC_TIMEOUT 1 EXTCONFIG_COMMON += -e PRINTK -e TTY EXTCONFIG_COMMON += -e BINFMT_ELF EXTCONFIG_COMMON += -e POWER_RESET -e POWER_RESET_SYSCON +EXTCONFIG_COMMON += -e PROC_FS +EXTCONFIG_COMMON += -e SHMEM -e TMPFS # extra kernel configs by architecture EXTCONFIG_ARCH = $(EXTCONFIG_$(ARCH)) From patchwork Sun Jun 25 16:26:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696370 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94524EB64DC for ; Sun, 25 Jun 2023 16:27:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229519AbjFYQ1f (ORCPT ); Sun, 25 Jun 2023 12:27:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbjFYQ1e (ORCPT ); Sun, 25 Jun 2023 12:27:34 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C361F7; Sun, 25 Jun 2023 09:27:32 -0700 (PDT) X-QQ-mid: bizesmtp77t1687710441t3hpzh77 Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:27:16 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: 3M0okmaRx3jfv+GrddGy/h732CQmxjaLBuw5R7mVsFbalvzaON6GtUk2EqZiu yil084Xx27fPqRjLobtwWVFo7IvOvFlhslNa8GzceazCMbcUhHFNrHC+lwMzVUiL4S2kSdH K9GOr0sgynSUm8WOXFab3g+7Zqi50/2Q8GI01zDu8jAbco2urpJCZF/xr7VzbboZhI/wLUj 32v2kQDpnY2unmncRMtucZo5zAitwlV00cV5ZqDTaqvE3AVp+TZkxIs24rcvNsmRF6Vu7Up Iy1qAwPGCUY9flOO0FZOYzO9y3j6tOPyFav11bCRDIagzJODzej/cfOEflphlq5/v79G/OG QyyL9ocHaYXR3JfV347eLsFMZZKUnqWjcMJoCDrESycuacsjR4= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 986414869022069346 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 10/22] selftests/nolibc: add extra configs for i386 Date: Mon, 26 Jun 2023 00:26:31 +0800 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Enable CONFIG_COMPAT_32BIT_TIME for the poll test cases. Add 8250 console for test result print. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 1cddacbeb95e..16bfb6f9644a 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -58,6 +58,7 @@ EXTCONFIG_COMMON += -e PROC_FS EXTCONFIG_COMMON += -e SHMEM -e TMPFS # extra kernel configs by architecture +EXTCONFIG_i386 = -e COMPAT_32BIT_TIME -e SERIAL_8250 -e SERIAL_8250_CONSOLE EXTCONFIG_ARCH = $(EXTCONFIG_$(ARCH)) # extra kernel configs, include common + architecture specific From patchwork Sun Jun 25 16:28:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696760 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B617EB64DC for ; Sun, 25 Jun 2023 16:35:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229529AbjFYQfs (ORCPT ); Sun, 25 Jun 2023 12:35:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229662AbjFYQfp (ORCPT ); Sun, 25 Jun 2023 12:35:45 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83180D2; Sun, 25 Jun 2023 09:35:27 -0700 (PDT) X-QQ-mid: bizesmtp65t1687710553t98ik04m Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:29:12 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: 3M0okmaRx3jAAyOIuYctrEAjhb6lfe3FzB4NnUfK8VafOKQE7HZhtdj4uDGS+ 1W00RXUROLI+idPD0bhJrNaGXY12br/ovI2SbZ7XL0oyCPVpVDMC/PGb/MshT2mM3Bv8G6V Yq4Jsio/H2+5DbAvbgUXDjZGAsdmVKeUwVcYMoafnUtjcXkTWbK5kZTAL27NYh5dQcEABaG NVXtVp51mAfJbZ+vMl3/Ja7EpiaPJywcET9lwTrfb16YsP3QcUGy9J5wv/F3DT+Oqea9z3d UdPwSsJgcXT4edZ58GD9Oi7nLGD/i7yzQLBS0mZZlQGjqaz6Je+nVfZ55ssegksEk6HAaJ4 gBGUstM9JmOQDP/E28rvhGrgsuwIHaiDU2VLu3s6LrJxq07BEg= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 15685378674173329080 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 11/22] selftests/nolibc: add extra configs for x86_64 Date: Mon, 26 Jun 2023 00:28:26 +0800 Message-Id: <3a29bf1052f72703ec4fca867164ae13fa6c90c7.1687706332.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Enable CONFIG_64BIT for x86_64 and x86. Add 8250 console for test result print. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 16bfb6f9644a..d45454f86ae1 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -59,6 +59,8 @@ EXTCONFIG_COMMON += -e SHMEM -e TMPFS # extra kernel configs by architecture EXTCONFIG_i386 = -e COMPAT_32BIT_TIME -e SERIAL_8250 -e SERIAL_8250_CONSOLE +EXTCONFIG_x86_64 = -e 64BIT -e SERIAL_8250 -e SERIAL_8250_CONSOLE +EXTCONFIG_x86 = -e 64BIT -e SERIAL_8250 -e SERIAL_8250_CONSOLE EXTCONFIG_ARCH = $(EXTCONFIG_$(ARCH)) # extra kernel configs, include common + architecture specific From patchwork Sun Jun 25 16:30:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696762 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B240AEB64DD for ; Sun, 25 Jun 2023 16:32:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231808AbjFYQcT (ORCPT ); Sun, 25 Jun 2023 12:32:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231806AbjFYQcG (ORCPT ); Sun, 25 Jun 2023 12:32:06 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59D412728; Sun, 25 Jun 2023 09:31:30 -0700 (PDT) X-QQ-mid: bizesmtp85t1687710626t7jbsr0w Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:30:25 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: CR3LFp2JE4mpAf5y1pCIlD9ZuX5yZ9/MFjh9Rx/IYCq+dZVYGNuGoTwWI2/cU 7y7AqL44Pdv4fR6BRFE2lKIGGIqoK7WSllgvTCbiF7Pt8YiUDmgoWHuaE8vvDnY+kob8aD4 rcRFHrAWameWRiSQXD4QKc6YlPDfxIzaySY1pj4n91YVobq79egaQIPRAOBoL2w6xj1KX90 rbJYg/39ozxNvpn0O7+NW9mQyyWrrN6yhBjt3CXXQboXTRbjlGk8sl0/6rjRnvp1w9Lbgiu Qwvd0ki0gNaYVTUHb1oNuJoIv0UZODB0/WFuM31AGbiFatgymF9gTMwqsJboJt+o6sISVp8 R0T37t5eMjeoZHVqoaRHxNNYneZp41r5cY9m6ZV691Y9P+tG1s= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 16565260553308252172 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 12/22] selftests/nolibc: add extra configs for arm64 Date: Mon, 26 Jun 2023 00:30:17 +0800 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Add AMBA PL011 console for test result print. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index d45454f86ae1..6e59a694096d 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -61,6 +61,7 @@ EXTCONFIG_COMMON += -e SHMEM -e TMPFS EXTCONFIG_i386 = -e COMPAT_32BIT_TIME -e SERIAL_8250 -e SERIAL_8250_CONSOLE EXTCONFIG_x86_64 = -e 64BIT -e SERIAL_8250 -e SERIAL_8250_CONSOLE EXTCONFIG_x86 = -e 64BIT -e SERIAL_8250 -e SERIAL_8250_CONSOLE +EXTCONFIG_arm64 = -e SERIAL_AMBA_PL011 -e SERIAL_AMBA_PL011_CONSOLE EXTCONFIG_ARCH = $(EXTCONFIG_$(ARCH)) # extra kernel configs, include common + architecture specific From patchwork Sun Jun 25 16:31:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696369 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DDF3EB64DD for ; Sun, 25 Jun 2023 16:33:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231627AbjFYQdi (ORCPT ); Sun, 25 Jun 2023 12:33:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231288AbjFYQd2 (ORCPT ); Sun, 25 Jun 2023 12:33:28 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AEDA1BE4; Sun, 25 Jun 2023 09:33:05 -0700 (PDT) X-QQ-mid: bizesmtp66t1687710716t7j8m98e Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:31:55 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: LE7C6P2vL8RGulXWTTLak4tKHmM9RyxNo4MpbhA1cetkjXVlxD7BfmIkGgBxZ Ucd2qvMGnBiNEi1gt8gFRG/QB4iuakqK4bLQWTHiXz1IFwr0pOKNSipi+OQqDhF0Xlr1Erx YjmmGzMcDzYy5AeV9+gNwwrympcxJjWnFXHhFjuQCcKDNm76J/5XjOVV+mce7JRpYWu5t7h 6oynNPEO+ZTpgOFIBwTo5o0vPxK3IFg2rh6vYk3RQG9dDPAv7S67oy4ZdlgYzahE/ppOHyz vjDr8orwmf4JL47UyysQnYEeHvjyV+jojY+XvtHZCdTb1609MzK+3yXbnVp9QMHWeszl11t KU0+RkddaxiUciiOajhmc54aRNxd1T5qnX7/jvvTmjghBGlEOY= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 7069103967638041911 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 13/22] selftests/nolibc: add extra configs for arm Date: Mon, 26 Jun 2023 00:31:30 +0800 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Enable minimal configs for the arm virt board of qemu. Enable CONFIG_COMPAT_32BIT_TIME for the poll test cases. Add AMBA PL011 console for test result print. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 6e59a694096d..79983ddc1584 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -62,6 +62,7 @@ EXTCONFIG_i386 = -e COMPAT_32BIT_TIME -e SERIAL_8250 -e SERIAL_8250_CONSOL EXTCONFIG_x86_64 = -e 64BIT -e SERIAL_8250 -e SERIAL_8250_CONSOLE EXTCONFIG_x86 = -e 64BIT -e SERIAL_8250 -e SERIAL_8250_CONSOLE EXTCONFIG_arm64 = -e SERIAL_AMBA_PL011 -e SERIAL_AMBA_PL011_CONSOLE +EXTCONFIG_arm = $(addprefix -e ,COMPAT_32BIT_TIME MMU ARCH_MULTIPLATFORM ARCH_MULTI_V7 ARM_PATCH_PHYS_VIRT ARCH_VIRT SERIAL_AMBA_PL011 SERIAL_AMBA_PL011_CONSOLE) EXTCONFIG_ARCH = $(EXTCONFIG_$(ARCH)) # extra kernel configs, include common + architecture specific From patchwork Sun Jun 25 16:32:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696761 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 178D5EB64DD for ; Sun, 25 Jun 2023 16:34:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229670AbjFYQeQ (ORCPT ); Sun, 25 Jun 2023 12:34:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231288AbjFYQeN (ORCPT ); Sun, 25 Jun 2023 12:34:13 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B90EFBB; Sun, 25 Jun 2023 09:33:45 -0700 (PDT) X-QQ-mid: bizesmtp87t1687710788t6lq8x2e Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:33:07 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: rZJGTgY0+YNWjHTNB7Dh56ShOV2PiCWCmyfgKvezs6NaTZuHDGAZg/4YPbaHK PtaaTRTEkNvLKXw1sBjG4HMF8CnGnG26BlT3rUYAFk4uF5IVWgqHgL0QmYfdWSl4ehu96hG 5h6/oS7JkFmnotsk3I5ym2OYZMxiGs4Cg/Vy4S8fukcz0cd8RrbSme60jYuquP8xWYeHu7z yb3syMYnI8NTnrJjlq9XGrW+ILtIIoF/ND79VkXZyIfb89B7Fu2FQE7MwCytyv7Ar4dJVNG Ol3BCS/796y0UtJmP9ETQyERpR9vAbhNZ5vPPHnigMwM6wRhu9qImtlMMZfJoSyKMfUFvSV oBHqBBWoGNxyrkBSK3A1QF6XO5pPDoXtebCZ3ICHU9Mp85U48U= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 6973877681573296904 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 14/22] selftests/nolibc: add extra configs for mips Date: Mon, 26 Jun 2023 00:32:59 +0800 Message-Id: <335d7f5a0091878da56fae1d3a20bdf28c77d888.1687706332.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Enable minimal configs for the mips malta board of qemu. Enable CONFIG_COMPAT_32BIT_TIME for the poll test cases. Add 8250 console for test result print. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 79983ddc1584..234abf54cac5 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -63,6 +63,7 @@ EXTCONFIG_x86_64 = -e 64BIT -e SERIAL_8250 -e SERIAL_8250_CONSOLE EXTCONFIG_x86 = -e 64BIT -e SERIAL_8250 -e SERIAL_8250_CONSOLE EXTCONFIG_arm64 = -e SERIAL_AMBA_PL011 -e SERIAL_AMBA_PL011_CONSOLE EXTCONFIG_arm = $(addprefix -e ,COMPAT_32BIT_TIME MMU ARCH_MULTIPLATFORM ARCH_MULTI_V7 ARM_PATCH_PHYS_VIRT ARCH_VIRT SERIAL_AMBA_PL011 SERIAL_AMBA_PL011_CONSOLE) +EXTCONFIG_mips = $(addprefix -e ,COMPAT_32BIT_TIME MIPS_MALTA CPU_LITTLE_ENDIAN CPU_MIPS32_R2 SERIAL_8250 SERIAL_8250_CONSOLE) EXTCONFIG_ARCH = $(EXTCONFIG_$(ARCH)) # extra kernel configs, include common + architecture specific From patchwork Sun Jun 25 16:34:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696368 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60C8DEB64DC for ; Sun, 25 Jun 2023 16:35:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231381AbjFYQff (ORCPT ); Sun, 25 Jun 2023 12:35:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230192AbjFYQfc (ORCPT ); Sun, 25 Jun 2023 12:35:32 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AC7F119; Sun, 25 Jun 2023 09:35:09 -0700 (PDT) X-QQ-mid: bizesmtp79t1687710859tqxiqm8q Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:34:18 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: k0mQ4ihyJQOTuhpss9scD3ORA7HKx+iDT2vgzMbOMHbCOBVM+4lja0YIoyg57 mGvpXZCoXiOqeclB7d/EcpYmus7bMLSlYJ1eE/eKkh/qjwS09IAIsVQ2wRLmZzRF7/dFNr2 oZCbeqr+xhAGQyHU2YJ8b2BlykzXaME7H09r8es2lfMeDwwUsDLFvWknZq/yuRqSfSINUqA xvDCGR45cEsV3By50UOGQB+HG8M7F6e+B/Ao4PwV/1bDP2zivVn+XPL2dqBzWPU9HwQPEsQ JR8h+bAe/pOvbatOxNWnHrmGaevw0Erj9mn0H9mOlg+vFnmXjrWkliSyKtlccRK8zn363mQ ORbWVVBnVidFO2QvJCOxQaRmhje8MrZ4pt7FrLPQMz8umtgxQyPO+35kkx/fQ== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 4357656909882141855 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 15/22] selftests/nolibc: add extra configs for riscv32 Date: Mon, 26 Jun 2023 00:34:12 +0800 Message-Id: <4937593aec1f39fbc44231a874a787eb29d7a47f.1687706332.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Enable minimal configs for the riscv32 virt board of qemu. Add 8250 console for test result print. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 234abf54cac5..3ba2c25eaa8e 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -64,6 +64,7 @@ EXTCONFIG_x86 = -e 64BIT -e SERIAL_8250 -e SERIAL_8250_CONSOLE EXTCONFIG_arm64 = -e SERIAL_AMBA_PL011 -e SERIAL_AMBA_PL011_CONSOLE EXTCONFIG_arm = $(addprefix -e ,COMPAT_32BIT_TIME MMU ARCH_MULTIPLATFORM ARCH_MULTI_V7 ARM_PATCH_PHYS_VIRT ARCH_VIRT SERIAL_AMBA_PL011 SERIAL_AMBA_PL011_CONSOLE) EXTCONFIG_mips = $(addprefix -e ,COMPAT_32BIT_TIME MIPS_MALTA CPU_LITTLE_ENDIAN CPU_MIPS32_R2 SERIAL_8250 SERIAL_8250_CONSOLE) +EXTCONFIG_riscv32 = $(addprefix -e ,MMU ARCH_RV32I NONPORTABLE SERIAL_8250 SERIAL_8250_CONSOLE SERIAL_OF_PLATFORM) EXTCONFIG_ARCH = $(EXTCONFIG_$(ARCH)) # extra kernel configs, include common + architecture specific From patchwork Sun Jun 25 16:35:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696367 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDE8BEB64DC for ; Sun, 25 Jun 2023 16:36:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231247AbjFYQgR (ORCPT ); Sun, 25 Jun 2023 12:36:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230389AbjFYQgJ (ORCPT ); Sun, 25 Jun 2023 12:36:09 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 523C210E7; Sun, 25 Jun 2023 09:35:53 -0700 (PDT) X-QQ-mid: bizesmtp91t1687710943ty5a4ucc Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:35:42 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: QHkcO4X2U8hovBxPmn/3fLiGx7agNworDtGVv7Cb7ihBg5UWBCc18OSIeh6Le IUaG7oTsKmsWdN1jJ/6vOl4WQLNgLuIDGG/hDmNprRW4tddA/UyU3VrCx+lV/TrEcfe2toy 3THX4LXODQSQIUcCLGglclpDWQmf6kaxY2P3Yh57UDj8LCOzSUewZDs0oJxvSl2Ij4LPVIX /C5rzPXH5Om7hLdMuQyXxaG5h0x6GtzMKzNTt+vV1nToUxls/iqBOi2FHxnGesLy3V0hb0t 35tnaExf9PXCWSBfW4hYoeu+6Xbs+ieFNMKQhl6dBm2B+Z9oVw4ZRbGMI7gQZaUV3Hw05fg Igf18mJeZsxb0XR233Xhfd0qNd85MZP7Epeo46AKIPmMCO/VVk= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 13129285188948517709 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 16/22] selftests/nolibc: add extra configs for riscv64 Date: Mon, 26 Jun 2023 00:35:23 +0800 Message-Id: <0bea7430b0c9e1fbc77ddbdbd91d698634726e3d.1687706332.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org riscv implies riscv64, so, the same config options added for riscv and riscv64. Add 8250 console for test result print. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 3ba2c25eaa8e..8f9cb118cefe 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -65,6 +65,8 @@ EXTCONFIG_arm64 = -e SERIAL_AMBA_PL011 -e SERIAL_AMBA_PL011_CONSOLE EXTCONFIG_arm = $(addprefix -e ,COMPAT_32BIT_TIME MMU ARCH_MULTIPLATFORM ARCH_MULTI_V7 ARM_PATCH_PHYS_VIRT ARCH_VIRT SERIAL_AMBA_PL011 SERIAL_AMBA_PL011_CONSOLE) EXTCONFIG_mips = $(addprefix -e ,COMPAT_32BIT_TIME MIPS_MALTA CPU_LITTLE_ENDIAN CPU_MIPS32_R2 SERIAL_8250 SERIAL_8250_CONSOLE) EXTCONFIG_riscv32 = $(addprefix -e ,MMU ARCH_RV32I NONPORTABLE SERIAL_8250 SERIAL_8250_CONSOLE SERIAL_OF_PLATFORM) +EXTCONFIG_riscv64 = -e SERIAL_8250 -e SERIAL_8250_CONSOLE -e SERIAL_OF_PLATFORM +EXTCONFIG_riscv = -e SERIAL_8250 -e SERIAL_8250_CONSOLE -e SERIAL_OF_PLATFORM EXTCONFIG_ARCH = $(EXTCONFIG_$(ARCH)) # extra kernel configs, include common + architecture specific From patchwork Sun Jun 25 16:36:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696759 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3E86EB64DC for ; Sun, 25 Jun 2023 16:37:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229456AbjFYQhK (ORCPT ); Sun, 25 Jun 2023 12:37:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjFYQhI (ORCPT ); Sun, 25 Jun 2023 12:37:08 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98294119; Sun, 25 Jun 2023 09:37:06 -0700 (PDT) X-QQ-mid: bizesmtp75t1687711017tppn3g8b Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:36:56 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: D2GZf6M6C/jnrzaM/7cYWsO2GcCj0igagDr7PV1z4cEq6WN6WlYwJodtMIHN/ Hnl1tikDNdJv3IbomWQz1ZAijLcfpKiglb9dlWrzBRDFn5I9vZgyMZBV6+FZoRHObY+a66H KK+Fa/wCuOTydHQ7SiXwDZdqgJTPW9izf5tJSZL76NI9AZcA6EUvEl+vTCr35/6EnPsR4nw XXLRcx4ALagiODjy7XnWeht6FzgUZUModD+/50YD1iqY7CJNkop8BZnI1DuRAoFRse3vtfk hc0wjmmWj28BgedMdnxM6xlQDRD6VooQPRjHFL23hkCfXhRLZEBW5YLEFIf0FA7jO3BgpRG eEvWHnfpyup5Y4kZ9SzesC4vNIL8NbLZQUYSQvVnMwRb36gXa8= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 17452886390884145354 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 17/22] selftests/nolibc: add extra configs for s390x Date: Mon, 26 Jun 2023 00:36:46 +0800 Message-Id: <0a9d0c36a9332409b63691a49f4f629285e82372.1687706332.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Add SCLP VT220 console for test result print. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 8f9cb118cefe..4d0de9e90d86 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -67,6 +67,7 @@ EXTCONFIG_mips = $(addprefix -e ,COMPAT_32BIT_TIME MIPS_MALTA CPU_LITTLE_E EXTCONFIG_riscv32 = $(addprefix -e ,MMU ARCH_RV32I NONPORTABLE SERIAL_8250 SERIAL_8250_CONSOLE SERIAL_OF_PLATFORM) EXTCONFIG_riscv64 = -e SERIAL_8250 -e SERIAL_8250_CONSOLE -e SERIAL_OF_PLATFORM EXTCONFIG_riscv = -e SERIAL_8250 -e SERIAL_8250_CONSOLE -e SERIAL_OF_PLATFORM +EXTCONFIG_s390 = -e SCLP_VT220_TTY -e SCLP_VT220_CONSOLE EXTCONFIG_ARCH = $(EXTCONFIG_$(ARCH)) # extra kernel configs, include common + architecture specific From patchwork Sun Jun 25 16:38:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696366 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 299FFEB64DC for ; Sun, 25 Jun 2023 16:38:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229901AbjFYQit (ORCPT ); Sun, 25 Jun 2023 12:38:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjFYQis (ORCPT ); Sun, 25 Jun 2023 12:38:48 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9FDEB9; Sun, 25 Jun 2023 09:38:46 -0700 (PDT) X-QQ-mid: bizesmtp73t1687711115t4rohu2l Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:38:34 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: 2d9G4llBGh4DhBoewQkeqNdbGbShZj+bIjJtuorGsg9cHW2fmzqLOFLxYqvxw pEqO5rq3507HWCbQcfrPUIMZINYQMoOtFqdx41gYZGHTemgu4FSZIrkqKqDysRj8Q0wlxvE 2XSwxmPS/dZv978bg86pm8FzAbz9mng4G+DHzgUSY/JvlBYs1OWdeUK1+KJC7lEPOCSzW/z S9ENACer8nmXJJTVVwA+so5Y+avPCzbhXhpdOPcDRQ4mHhOlBMtPwGpHqDMaKERVve+OqHp DPCQiiRT+1bFE3S6QjMXlEaRH6N668GgmhKH2TFBJqjlpOi/YIEfvJ8JjlEebaAEopQqgxj BwqaA01EvQ4uXoaFNmwpP0ocbQE3SwLJFTo9HU8eZ8Eo9q/Kxj3FrSZGP/+zA== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 6002407721714959409 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 18/22] selftests/nolibc: add extra configs for loongarch Date: Mon, 26 Jun 2023 00:38:01 +0800 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Enable efi support for vmlinuz.efi boot. Add 8250 console for test result print. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 4d0de9e90d86..9092d209ebd0 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -68,6 +68,7 @@ EXTCONFIG_riscv32 = $(addprefix -e ,MMU ARCH_RV32I NONPORTABLE SERIAL_8250 SE EXTCONFIG_riscv64 = -e SERIAL_8250 -e SERIAL_8250_CONSOLE -e SERIAL_OF_PLATFORM EXTCONFIG_riscv = -e SERIAL_8250 -e SERIAL_8250_CONSOLE -e SERIAL_OF_PLATFORM EXTCONFIG_s390 = -e SCLP_VT220_TTY -e SCLP_VT220_CONSOLE +EXTCONFIG_loongarch = $(addprefix -e ,EFI_STUB EFI_ZBOOT SERIAL_8250 SERIAL_8250_CONSOLE SERIAL_8250_PNP) EXTCONFIG_ARCH = $(EXTCONFIG_$(ARCH)) # extra kernel configs, include common + architecture specific From patchwork Sun Jun 25 16:39:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696758 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD567EB64DC for ; Sun, 25 Jun 2023 16:40:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229446AbjFYQkc (ORCPT ); Sun, 25 Jun 2023 12:40:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjFYQkb (ORCPT ); Sun, 25 Jun 2023 12:40:31 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8F27B9; Sun, 25 Jun 2023 09:40:29 -0700 (PDT) X-QQ-mid: bizesmtp83t1687711219tx6hnmn1 Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:40:18 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: znfcQSa1hKZqkmvXmtk4w2PqRZkl6g8YSFZFLRaCCD2Q9Qr0cKHfrxz1j5Oc7 qrqCMPwRHqHkl11Msd8LYesoCQIlP+Q+Fx9dLpcPU0/07y9SlF9d34z/l9arx1QkrsLh6S5 eylyhUe0Ulm9cHjqbtDv2QGbH1VT0l5qF0x1Q1EqLZj6ShuaRRhdWDduoBADK40lNAS5aKE QjdPqx9LmVcpGN6iGbzxbTXpv8eArmXIRy+CvdTWOPiMz8+S7TSsjByBKz1ca90xi9mNJ68 L3kF6gi1mMxDtXCQKY39ncXHB3pOtFQ3oxpVbrhFwnR7HKp6kfFxkE9oyaOpKEC0d3doxqg Sk+p/1Ci+XA1QZSMlhDDPo750RP2Zigg/olwBCAVUXFdUrOTvvWqMrIIDHZ7A== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 6776819239009598717 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 19/22] selftests/nolibc: config default CROSS_COMPILE Date: Mon, 26 Jun 2023 00:39:39 +0800 Message-Id: <0ef9f42e04b8b62b8d53c0f3106f5e50629e01d5.1687706332.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org This further simplify the 'make' commands, only require an ARCH now. Almost all distributions provide toolchains for i386, x86_64, arm64, arm, mips, riscv32, riscv64 and s390x. If can not find toolchains from the distribution repositories, we can download them from https://mirrors.edge.kernel.org/pub/tools/crosstool/ and then customize CROSS_COMPILE_ for the testing. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 9092d209ebd0..a847a2264fed 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -74,6 +74,25 @@ EXTCONFIG_ARCH = $(EXTCONFIG_$(ARCH)) # extra kernel configs, include common + architecture specific EXTCONFIG = $(EXTCONFIG_ARCH) $(EXTCONFIG_COMMON) +# CROSS_COMPILE by architecture +CROSS_COMPILE_i386 ?= x86_64-linux-gnu- +CROSS_COMPILE_x86_64 ?= x86_64-linux-gnu- +CROSS_COMPILE_x86 ?= x86_64-linux-gnu- +CROSS_COMPILE_arm64 ?= aarch64-linux-gnu- +CROSS_COMPILE_arm ?= arm-linux-gnueabi- +CROSS_COMPILE_mips ?= mipsel-linux-gnu- +CROSS_COMPILE_riscv32 ?= riscv64-linux-gnu- +CROSS_COMPILE_riscv64 ?= riscv64-linux-gnu- +CROSS_COMPILE_riscv ?= riscv64-linux-gnu- +CROSS_COMPILE_s390 ?= s390x-linux-gnu- +CROSS_COMPILE_loongarch ?= loongarch64-linux- +CROSS_COMPILE ?= $(CROSS_COMPILE_$(ARCH)) + +# Make sure CC has $(CROSS_COMPILE) prefix +ifneq ($(CC),$(CROSS_COMPILE)$(CC)) +CC := $(CROSS_COMPILE)$(CC) +endif + # optional tests to run (default = all) TEST = From patchwork Sun Jun 25 16:41:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696365 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86AFAEB64DC for ; Sun, 25 Jun 2023 16:42:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229480AbjFYQm4 (ORCPT ); Sun, 25 Jun 2023 12:42:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjFYQmz (ORCPT ); Sun, 25 Jun 2023 12:42:55 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7620B9; Sun, 25 Jun 2023 09:42:53 -0700 (PDT) X-QQ-mid: bizesmtp68t1687711364tfahxxx2 Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:42:43 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: znfcQSa1hKZz5eb5VjrwTSUMnFub5FvDyyA4AG4JS/NVFi6m4xL1PtTDGgki7 SnsDQs5vU8T2xxkzc/oQqnSLaM+Eb1dLFNj38am5/Wsi7PonpRZPJLPoSX7a3tMDRZLk/pV 71pkSdtf97HRjCdyV3yJW9/Dydg25/CNLggbKiBiZmd5B/Dz6F8hkfadC1zK8vAdTd8jtBL kxsqr/munTIt4/beyvN1G7SHWaLcUKzcqMcrvv+x6q7ntH0mgrZeMwEk6TTDdV7uicaBSbv r65823BCKd6NGoenKBL68UpMVikNP1JDO2ZkWo4EtJ4O0FzjR5q80g9NjOSaS2qhIVjv7nH J6GTuwkFT1S3q6lNOQeiOMy3m1bCOW7k52mr0noySIBSO43zao= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 11765547641019653024 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 20/22] selftests/nolibc: add run-tiny and run-default Date: Mon, 26 Jun 2023 00:41:23 +0800 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org These two targets allow to do config and run together. - run-tiny: do tinyconfig, extconfig and then run. - run-default: do defconfig, extconfig and then run. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index a847a2264fed..3e7e51bd7082 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -156,6 +156,14 @@ REPORT ?= awk '/\[OK\][\r]*$$/{p++} /\[FAIL\][\r]*$$/{f++;print} /\[SKIPPED\][\ END{ printf("%d test(s) passed, %d skipped, %d failed.\n", p, s, f); \ printf("See all results in %s\n", ARGV[1]); }' +# allow run with a config target together: run-tiny = tinyconfig + run; run-default = defconfig + run +ifeq (run-tiny, $(MAKECMDGOALS)) +AUTOCONFIG ?= tinyconfig +endif +ifeq (run-default, $(MAKECMDGOALS)) +AUTOCONFIG ?= defconfig +endif + # allow switch nolibc headers include method: 1 for sysroot, 0 for nolibc.h SYSROOT ?= 1 @@ -228,7 +236,7 @@ tinyconfig: menuconfig: $(Q)$(MAKE) -C $(srctree) ARCH=$(KARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) menuconfig -extconfig: +extconfig: $(AUTOCONFIG) $(Q)$(srctree)/scripts/config --file $(srctree)/.config $(EXTCONFIG) $(Q)$(MAKE) -C $(srctree) ARCH=$(KARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) KCONFIG_ALLCONFIG=$(srctree)/.config allnoconfig @@ -240,6 +248,8 @@ run: kernel $(Q)qemu-system-$(QEMU_ARCH) -display none -no-reboot -kernel "$(srctree)/$(IMAGE)" -serial stdio $(QEMU_ARGS) $(LOG_OUTPUT) $(Q)$(REPORT) $(CURDIR)/run.out +run-tiny run-default: run + # re-run the tests from an existing kernel rerun: $(Q)qemu-system-$(QEMU_ARCH) -display none -no-reboot -kernel "$(srctree)/$(IMAGE)" -serial stdio $(QEMU_ARGS) $(LOG_OUTPUT) From patchwork Sun Jun 25 16:43:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696757 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DF61EB64DC for ; Sun, 25 Jun 2023 16:44:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230185AbjFYQoX (ORCPT ); Sun, 25 Jun 2023 12:44:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjFYQoW (ORCPT ); Sun, 25 Jun 2023 12:44:22 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EB80B9; Sun, 25 Jun 2023 09:44:19 -0700 (PDT) X-QQ-mid: bizesmtp78t1687711448t7y8lnvs Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:44:07 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: 3M0okmaRx3jkxQ1nfJIDUjtpCEo7hFHklIWcIzySUOaPurOu8rwjLO/y2+NUO W93KshJtFv7+VMr/QSSxuIHeHKMJciFIpJD22TFiR/mDO7IAKpBt3Aat95kyxQPfY1k2XvN lGtpzVqYYKxbkWqZkaIKhwtf/g3AyjEUxhpw0zIZsyWJ9f+pRVx5g2Lz2H2oTc4JBITSyxk QkCRCrmVpE+12c9DWpZIGBhmzubclG5C6Jo1xwuTDZwQ6+hxClW1060y6JB3/mZK3I17r/F Q/Zlv6OAzOeFDMBEtgfzXniU4GYvqXEtMVATn0SAc44gAaFSMV5wSBx/QN6JmZd0vBE3Y4O zAsgT7eZlE8eefnLAISYwteNq3qhcqfjE3sj3S9MQNgNv54YLNyF6CGBEPhUQ== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 11520936945867067429 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 21/22] selftests/nolibc: allow run tests on all targets Date: Mon, 26 Jun 2023 00:43:48 +0800 Message-Id: <49a3c3f75e2f433f42112a246b20488bf7c9e7f4.1687706332.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org This lists all of the supported architectures and allow testing for all of them. These targets are supported: - run-user-all: testing run-user for all architectures - run-all / run-default-all: testing run-default for all architectures - run-tiny-all: testing run-tiny for all architectures Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 3e7e51bd7082..470923dc10e1 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -164,6 +164,18 @@ ifeq (run-default, $(MAKECMDGOALS)) AUTOCONFIG ?= defconfig endif +# allow run tests on all architectures: run-user-all, run-all (=run-default-all), run-tiny-all +ARCHS ?= $(shell sed -ne 's/^DEFCONFIG_\([^ ]*\) .*/\1/p' $(CURDIR)/Makefile) +GOALS ?= run-user run-tiny run-default +RUN_ALL ?= _t=$@; t=$${_t%-all}; [ "$$t" = "run" ] && t=run-default; \ + if echo $(GOALS) | grep -wq "$$t"; then \ + for a in $(ARCHS); do echo "Testing $$t for $${a}:"; make $$t ARCH=$$a; cp $(CURDIR)/run.out $(CURDIR)/run-$$a.out; done; \ + echo "\n\nTesting summary of $$t:\n"; \ + for a in $(ARCHS); do echo $${a}:; echo; $(REPORT) $(CURDIR)/run-$$a.out; echo; done; \ + else \ + echo "Ignoring unknown target: $$t, available targets: $(GOALS)"; \ + fi + # allow switch nolibc headers include method: 1 for sysroot, 0 for nolibc.h SYSROOT ?= 1 @@ -255,6 +267,10 @@ rerun: $(Q)qemu-system-$(QEMU_ARCH) -display none -no-reboot -kernel "$(srctree)/$(IMAGE)" -serial stdio $(QEMU_ARGS) $(LOG_OUTPUT) $(Q)$(REPORT) $(CURDIR)/run.out +# test for all architectures +%-all: + $(Q)$(RUN_ALL) + clean: $(call QUIET_CLEAN, sysroot) $(Q)rm -rf sysroot From patchwork Sun Jun 25 16:45:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 696364 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55855EB64DC for ; Sun, 25 Jun 2023 16:46:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230436AbjFYQqQ (ORCPT ); Sun, 25 Jun 2023 12:46:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230406AbjFYQqP (ORCPT ); Sun, 25 Jun 2023 12:46:15 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D827B9; Sun, 25 Jun 2023 09:46:13 -0700 (PDT) X-QQ-mid: bizesmtp73t1687711564t4chllr1 Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:46:03 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: ao4JQgu0M3+P2mO/XdPQo3WMzS7AkUKvL5kFRZNSONL5c40x0ZX0LVB9bEsvW DlsKdmb+/rhmOhIqe+gdnrJxqGLJMYQee9Pen0KN20fqgNIo5wNfahNXi3Wyq6OSvfMW1ld GiQjMHOd4Qnp++RZ+a/NFg+/IPYfyUf8g/GLkjpUmQzoExt8XBn+S3ZM4xTx5GARdZhsLoi Zy1LNrxN2OfgSjd/3GsGsebmo8WcGJburzcOPtE1wgRAR1lGsi0xzZs5l7vv36loWeF4DDY Uuhu6PZwpjzVCvLj0KT+/iJ2sWr5XQ+0fhcj+fl91ChGrgJCBry4aiA/GThHOEWV+uKsJQN JDYHBPrtXQ4KagFeWiwMXI/mbvLrjUMN3+eY+swcaIT7jW5XhCXVtsKoZ/GBg== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 3366391044335302866 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 22/22] selftests/nolibc: detect bios existing to avoid hang Date: Mon, 26 Jun 2023 00:45:12 +0800 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Without a right -bios option, riscv32 and loongarch will hang during boot and therefore block the whole testing, this adds necessary detection. Before testing, the required bios should be downloaded at first, for a future working qemu (without a manual -bios), we can simply clear the QEMU_BIOS_ to stop the detection. By default, the bios should be downloaded and put into tools/testing/selftests/nolibc/, otherwise, users should specify the path via QEMU_BIOS_. Without this patch, it is not possible to directly run tests for all architectures, otherwise, we should pass our own 'ARCHS' and remove the unsupported ones explicitly, which is not convenient. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 470923dc10e1..b529bb40444a 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -110,6 +110,14 @@ QEMU_ARCH_s390 = s390x QEMU_ARCH_loongarch = loongarch64 QEMU_ARCH = $(QEMU_ARCH_$(ARCH)) +# QEMU_BIOS: bios used by qemu +# https://github.com/loongson/Firmware/raw/main/LoongArchVirtMachine/edk2-loongarch64-code.fd +QEMU_BIOS_loongarch ?= edk2-loongarch64-code.fd +# https://gitlab.com/qemu-project/qemu/-/blob/master/pc-bios/opensbi-riscv32-generic-fw_dynamic.bin +QEMU_BIOS_riscv32 ?= opensbi-riscv32-generic-fw_dynamic.bin +QEMU_BIOS = $(QEMU_BIOS_$(ARCH)) +QEMU_ARGS_BIOS = $(if $(QEMU_BIOS),-bios $(QEMU_BIOS)) + # QEMU_ARGS : some arch-specific args to pass to qemu QEMU_ARGS_i386 = -M pc -append "console=ttyS0,9600 i8042.noaux panic=-1 $(TEST:%=NOLIBC_TEST=%)" QEMU_ARGS_x86_64 = -M pc -append "console=ttyS0,9600 i8042.noaux panic=-1 $(TEST:%=NOLIBC_TEST=%)" @@ -122,7 +130,7 @@ QEMU_ARGS_riscv64 = -M virt -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_T QEMU_ARGS_riscv = -M virt -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" QEMU_ARGS_s390 = -M s390-ccw-virtio -m 1G -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" QEMU_ARGS_loongarch = -M virt -append "console=ttyS0,115200 panic=-1 $(TEST:%=NOLIBC_TEST=%)" -QEMU_ARGS = $(QEMU_ARGS_$(ARCH)) $(QEMU_ARGS_EXTRA) +QEMU_ARGS = $(QEMU_ARGS_$(ARCH)) $(QEMU_ARGS_BIOS) $(QEMU_ARGS_EXTRA) # OUTPUT is only set when run from the main makefile, otherwise # it defaults to this nolibc directory. @@ -167,9 +175,15 @@ endif # allow run tests on all architectures: run-user-all, run-all (=run-default-all), run-tiny-all ARCHS ?= $(shell sed -ne 's/^DEFCONFIG_\([^ ]*\) .*/\1/p' $(CURDIR)/Makefile) GOALS ?= run-user run-tiny run-default +export $(foreach a, $(ARCHS), QEMU_BIOS_$a) RUN_ALL ?= _t=$@; t=$${_t%-all}; [ "$$t" = "run" ] && t=run-default; \ if echo $(GOALS) | grep -wq "$$t"; then \ - for a in $(ARCHS); do echo "Testing $$t for $${a}:"; make $$t ARCH=$$a; cp $(CURDIR)/run.out $(CURDIR)/run-$$a.out; done; \ + for a in $(ARCHS); do \ + echo "Testing $$t for $${a}:"; \ + eval bios=\$${QEMU_BIOS_$$a}; \ + if [ -n "$${bios}" -a ! -f "$${bios}" ]; then echo "\nIgnoring $$a test, no bios: $${bios} found."; exit 0; fi; \ + make $$t ARCH=$$a; cp $(CURDIR)/run.out $(CURDIR)/run-$$a.out; \ + done; \ echo "\n\nTesting summary of $$t:\n"; \ for a in $(ARCHS); do echo $${a}:; echo; $(REPORT) $(CURDIR)/run-$$a.out; echo; done; \ else \