From patchwork Thu Jul 27 20:22:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 707280 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 D0503C0015E for ; Thu, 27 Jul 2023 20:23:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232796AbjG0UXD (ORCPT ); Thu, 27 Jul 2023 16:23:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232824AbjG0UW6 (ORCPT ); Thu, 27 Jul 2023 16:22:58 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F236F2D67; Thu, 27 Jul 2023 13:22:53 -0700 (PDT) X-QQ-mid: bizesmtp88t1690489363tb8slm3z Received: from linux-lab-host.localdomain ( [61.141.78.189]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 28 Jul 2023 04:22:42 +0800 (CST) X-QQ-SSF: 01200000000000D0X000000A0000000 X-QQ-FEAT: q+EIYT+FhZqrDLdu2684eR5Czllj1f6+FLo1hVSobBXoXKvq/9go9/jOS6tRf PMdHGvcVLRKu36l8VlpvSphXqPDUm3AUSHxcqiESgvAcL7AJo+WmsIjTUO/LxAoBSM0eJU/ blFkSG7ZX8zYzDeZgvyOUJg0tFPY5bmbL2H8e9Lts7azb/kRUQHD7ehMUHtHtImPOD7thfl OhnAOBmITZ1+AEG1C7T0101m/QGw6Kknh6cL9Pql4xM5AQTaHrlGCNgwc2JNzdWxOWSHf/X YJzlOtdku2Qhpw0/ME39BXaXp8mT7DfTn4tgzoyamTd6f9g7PxTUCXGIA9PrQOZ8wUZMkn0 w0RWIrpNYFUtwKfwf1M27fgCeRVlzRFEgVPq66fNTfowH1QQ/nLUuArh7OLjg== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 5556135556970039063 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 v3 01/12] selftests/nolibc: allow report with existing test log Date: Fri, 28 Jul 2023 04:22:42 +0800 Message-Id: <50b239f40ddbf4bd3e067c39330f99bf63c71147.1690489039.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:qybglogicsvrgz:qybglogicsvrgz5a-1 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org After the tests finish, it is valuable to report and summarize with existing test log. This avoid rerun or run the tests again when not necessary. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 2e9694370913..75419b695f0d 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -207,6 +207,10 @@ rerun: $(Q)qemu-system-$(QEMU_ARCH) -display none -no-reboot -kernel "$(srctree)/$(IMAGE)" -serial stdio $(QEMU_ARGS) > "$(CURDIR)/run.out" $(Q)$(REPORT) $(CURDIR)/run.out +# report with existing test log +report: + $(Q)$(REPORT_RUN_OUT) + clean: $(call QUIET_CLEAN, sysroot) $(Q)rm -rf sysroot From patchwork Thu Jul 27 20:24:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 707279 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 44119C0015E for ; Thu, 27 Jul 2023 20:25:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230223AbjG0UZJ (ORCPT ); Thu, 27 Jul 2023 16:25:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229595AbjG0UZI (ORCPT ); Thu, 27 Jul 2023 16:25:08 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32ECD213A; Thu, 27 Jul 2023 13:25:07 -0700 (PDT) X-QQ-mid: bizesmtp76t1690489498tn31pf5y Received: from linux-lab-host.localdomain ( [61.141.78.189]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 28 Jul 2023 04:24:56 +0800 (CST) X-QQ-SSF: 01200000000000D0X000000A0000000 X-QQ-FEAT: OFQdrTmJ2CT0tv/k26zD61DgunIr3+i0gone8E+YGqdNlrN1NMVMfNlBeM907 QHYMz8CJvGbNGo2HcSksGZidroSyt7+Jq0dU4tKx5ZZiLbBmsl82jsZXPz/fIp7su2ohykc 554yQkRI4nz5yiK3mB6DzQ4AUpgeLhpu3NvDkupV1A4BbpHKbl+nPP2OAKUDI22ThM7qUKK flti2txnb6ObvovHXy8v5rve33RQFJdVlo49Y31TT1pCPBQgSu2+DxtHvQf9Pb/7F5LC0/d vCjccB3olddvLIM1bmTiA+Wf3Hb76B0A27Y0PylTN7gPtLhNMevIhh9v1KvAmL8lQjHWUUA DhqwfpUhbSJaTlO3jnl/uFVJDaGyBW5Ij8WS61t2uqI0G7jdJzG3DM/UvtLyQ== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 6039361887706887061 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 v3 03/12] selftests/nolibc: fix up O= option support Date: Fri, 28 Jul 2023 04:24:56 +0800 Message-Id: <1da6cedc8a7232833dbb7aaada5ae9df3e60ed7e.1690489039.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:qybglogicsvrgz:qybglogicsvrgz5a-1 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org To avoid pollute the source code tree and avoid mrproper for every architecture switch, the O= argument must be supported. Both IMAGE and .config are from the building directory, let's use objtree instead of srctree for them. If no O= option specified, means building kernel in source code tree, objtree should be srctree in such case. Suggested-by: Willy Tarreau Link: https://lore.kernel.org/lkml/ZK0AB1OXH1s2xYsh@1wt.eu/ Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index bfea1ea0b4e7..f5680b9ed85c 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -9,6 +9,9 @@ ifeq ($(srctree),) srctree := $(patsubst %/tools/testing/selftests/,%,$(dir $(CURDIR))) endif +# add objtree for O= argument, required by IMAGE and .config +objtree ?= $(srctree) + ifeq ($(ARCH),) include $(srctree)/scripts/subarch.include ARCH = $(SUBARCH) @@ -194,12 +197,12 @@ initramfs: nolibc-test # common macros for kernel targets MAKE_KERNEL = $(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) -KERNEL_CONFIG = $(srctree)/.config -KERNEL_IMAGE = $(srctree)/$(IMAGE) +KERNEL_CONFIG = $(objtree)/.config +KERNEL_IMAGE = $(objtree)/$(IMAGE) defconfig: $(Q)$(MAKE_KERNEL) mrproper $(DEFCONFIG) prepare - $(Q)$(srctree)/scripts/kconfig/merge_config.sh -O "$(srctree)" -m "$(KERNEL_CONFIG)" $(foreach c,$(EXTCONFIG),$(wildcard $(CURDIR)/configs/$c)) + $(Q)$(srctree)/scripts/kconfig/merge_config.sh -O "$(objtree)" -m "$(KERNEL_CONFIG)" $(foreach c,$(EXTCONFIG),$(wildcard $(CURDIR)/configs/$c)) $(Q)$(MAKE_KERNEL) KCONFIG_ALLCONFIG="$(KERNEL_CONFIG)" allnoconfig kernel: initramfs From patchwork Thu Jul 27 20:27:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 707275 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 C2B47C001DC for ; Thu, 27 Jul 2023 20:28:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229552AbjG0U2M (ORCPT ); Thu, 27 Jul 2023 16:28:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231248AbjG0U16 (ORCPT ); Thu, 27 Jul 2023 16:27:58 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C409C30CD; Thu, 27 Jul 2023 13:27:39 -0700 (PDT) X-QQ-mid: bizesmtp70t1690489632tls6eljb Received: from linux-lab-host.localdomain ( [61.141.78.189]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 28 Jul 2023 04:27:11 +0800 (CST) X-QQ-SSF: 01200000000000D0X000000A0000000 X-QQ-FEAT: 3M0okmaRx3gIqvGRracM+M018bYz/CeLA38os0ZqnkmoJW4wVgNSRIQZdhvX6 5EL3U0qRh1Axy5sg9nEMQa38Xh1XKzC3OxtnQ5dPOq/ijA/xvg4dJGdWt09QYM8U6n1AeOO gWyTYSsHDZ8DyuU9ABRFFQUF8o6y9L+bcrYPZ45mBij+b4Jt6Qcsx52aQVkbgkGXoqwQVKE 2hbxOFotjr3YrNdj7gQHjgIsXMs7fKzDwgxwnckcRnGOjpsGNj7AH9X7LQbdvH3F72D5ZxN Om1OiM1U+BEAu/CEPdnCykyL2Z2kJ4Z370aR0Jg3WG30L1+ED5CpK57rgYiqO0oaEcIr58I BISGpTKi5+LFxkX/uBje4OCPzEVcwl4ue7TkGUJFKN5XXAojYn6Xfrkf9QtPw== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 7483023099886591231 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 v3 05/12] selftests/nolibc: allow customize CROSS_COMPILE by architecture Date: Fri, 28 Jul 2023 04:27:10 +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:qybglogicsvrgz:qybglogicsvrgz5a-1 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Some cross compilers may not just be prefixed with ARCH, customize them by architecture may simplify the test a lot, especially, when iterate with ARCH. After customizing this for every architecture, the minimal test argument will be architecture itself, no CROSS_COMPILE required to be passed. If the prefix of installed cross compiler is not the same as the one customized, we can also pass CROSS_COMPILE as before or even pass CROSS_COMPILE_. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 3a61fa7e42a0..3f15c7f7ef76 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -45,6 +45,12 @@ IMAGE_loongarch = arch/loongarch/boot/vmlinuz.efi IMAGE = $(IMAGE_$(XARCH)) IMAGE_NAME = $(notdir $(IMAGE)) +# CROSS_COMPILE: cross toolchain prefix by architecture +CROSS_COMPILE ?= $(CROSS_COMPILE_$(XARCH)) + +# make sure CC is prefixed with CROSS_COMPILE +$(call allow-override,CC,$(CROSS_COMPILE)gcc) + # default kernel configurations that appear to be usable DEFCONFIG_i386 = defconfig DEFCONFIG_x86_64 = defconfig From patchwork Thu Jul 27 20:29:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 707274 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 97985EB64DD for ; Thu, 27 Jul 2023 20:29:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229777AbjG0U3i (ORCPT ); Thu, 27 Jul 2023 16:29:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbjG0U3h (ORCPT ); Thu, 27 Jul 2023 16:29:37 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A5BC2688; Thu, 27 Jul 2023 13:29:35 -0700 (PDT) X-QQ-mid: bizesmtp65t1690489766t9v338bu Received: from linux-lab-host.localdomain ( [61.141.78.189]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 28 Jul 2023 04:29:25 +0800 (CST) X-QQ-SSF: 01200000000000D0X000000A0000000 X-QQ-FEAT: 3M0okmaRx3hs8KjjHXgV3Mnz1SbuFa76sKO20ziBuLGO5QLIvoP9RFy4OEgee Cy0+ZWIn7BRQWovusTQnisGvElCqSK+hdthX7FIZJa0rDEywrtYE9JwNPGXNfugDB1nTF7U +JD/jIMyAb7+eEg0Bn/XSgdSX5NQVY0+YUYRJWS4/IHQE1Ym0tZSaJxcMRrXSsP6FflLo58 ld499Ozr6Eo+sFi2CqSszJD/SCrP5OBpOuy7ATwW2fq0QokE/CUxRfcyR92DNJ5NFMCuU7c TAx3dnUznunh2zaCrxSAqWa6uSZUfImNSRnq/BT2eRS9LgbGmvO6jNZ56OyddZZ0bBhKyOE iCrVoZGvHR+BjNUKyxKqLGA7XIeg1nMUOzYarGvfLMWgJIkVJCEtrVdioJdpq2hM3UldzBO X-QQ-GoodBg: 0 X-BIZMAIL-ID: 17253053822244597306 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 v3 07/12] selftests/nolibc: add menuconfig and mrproper for development Date: Fri, 28 Jul 2023 04:29:24 +0800 Message-Id: <45c0c24e77f4ae78ac3ace099f2e6678d15456e0.1690489039.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:qybglogicsvrgz:qybglogicsvrgz5a-1 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org menuconfig and mrproper are frequently used operations during a new architecture porting, testing or debugging. menuconfig is required to tune and test extra kernel config options for tinyconfig. mrproper is required to get a clean srctree while want to start a new building with O= option, the old generated files in srctree must be mrproper-ed. differ from local nolibc targets, the menuconfig and mrproper targets from top-level Makefile accept different ARCH variable and require extra '-C /path/to/srctree', which make development not consistent and therefore very painful, let's add local menuconfig and mrproper targets too. To reduce duplicated entries, menuconfig and mrproper are added together. 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 6385915d16c9..a214745e0f3e 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -215,6 +215,9 @@ defconfig: $(Q)$(srctree)/scripts/kconfig/merge_config.sh -O "$(objtree)" -m "$(KERNEL_CONFIG)" $(foreach c,$(EXTCONFIG),$(wildcard $(CURDIR)/configs/$c)) $(Q)$(MAKE_KERNEL) KCONFIG_ALLCONFIG="$(KERNEL_CONFIG)" allnoconfig +menuconfig mrproper: + $(Q)$(MAKE_KERNEL) $@ + PHONY += $(KERNEL_CONFIG) $(KERNEL_CONFIG): $(Q)if [ ! -f "$(KERNEL_CONFIG)" ]; then $(MAKE) --no-print-directory defconfig; fi From patchwork Thu Jul 27 20:31: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: 707273 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 83037C001DC for ; Thu, 27 Jul 2023 20:32:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231824AbjG0UcK (ORCPT ); Thu, 27 Jul 2023 16:32:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231398AbjG0UcI (ORCPT ); Thu, 27 Jul 2023 16:32:08 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D05E30DB; Thu, 27 Jul 2023 13:31:50 -0700 (PDT) X-QQ-mid: bizesmtp71t1690489900tiuhvymd Received: from linux-lab-host.localdomain ( [61.141.78.189]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 28 Jul 2023 04:31:39 +0800 (CST) X-QQ-SSF: 01200000000000D0X000000A0000000 X-QQ-FEAT: 3M0okmaRx3iio5UHKEhK5b2ClrY+IfoQsoiyLkp16KXoPNZd6NKJ6Hq2TkPOp lxuEVdu0iqSsDofWqZLbsQNWgPuh4dTi3eZroNw+JgJBygfCJFjpuRtgX7H8WMWgkbAg4Lx HpQCjdORRam1SuzECvY3se07e0xnOANa0+i63yBaLR2iLK1CL3yVwmcFjZ0ZptN7WavMAhs 1X1RMFp4Mcb7h8SZhMJ966izSIJvKs6VM+7Rz+6TqgzWp+/SYLMiOQ2LhWCqRvqE0Dyva9V 8Df/r12xiCcEP4zb1cAwJ/yl39Tid5XJd1HShHLXUqPMkt7sEpx1X+eF8Rhcs7sGJ55iMFe iFUzR0cIPJ1QNBsh8JfDO5wzHsY2Eha/SLBOaLqj3UT0zUcKgLDQppuzwPvIQ== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 8403613974557991608 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 v3 09/12] selftests/nolibc: customize QEMU_TIMEOUT for ppc64/ppc64le Date: Fri, 28 Jul 2023 04:31:39 +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:qybglogicsvrgz:qybglogicsvrgz5a-1 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Both ppc64 and ppc64le use slow bios in some qemu versions, let's increase the timeout to make sure the running qemu would not be killed before the test finish. 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 9a57de3b283c..ad2538ec5eb0 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -106,6 +106,8 @@ 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_ppc64 = 15 +QEMU_TIMEOUT_ppc64le = 25 QEMU_TIMEOUT = $(or $(QEMU_TIMEOUT_$(XARCH)),10) # OUTPUT is only set when run from the main makefile, otherwise From patchwork Thu Jul 27 20:32: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: 707272 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 E7C08C41513 for ; Thu, 27 Jul 2023 20:33:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231302AbjG0UdL (ORCPT ); Thu, 27 Jul 2023 16:33:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231959AbjG0Uc6 (ORCPT ); Thu, 27 Jul 2023 16:32:58 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45940F5; Thu, 27 Jul 2023 13:32:57 -0700 (PDT) X-QQ-mid: bizesmtp89t1690489968tjf0ydyx Received: from linux-lab-host.localdomain ( [61.141.78.189]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 28 Jul 2023 04:32:46 +0800 (CST) X-QQ-SSF: 01200000002000D0X000B00A0000000 X-QQ-FEAT: +ynUkgUhZJkRxmTCWl75yKqo2fa1gLrTMSfYGM0V6uWTshSZ0cgdrv7cH/mZn dmX2sbf39Iyx1LX2kZa+vgxT8UOo4T5hxuT7dgpiJ6+3y3K8zuQZcX3CaCxWmcYdHJ9+ScP GtJIUU3bQdI6s8wWEomWlMCiLYKRgcLvtXD2NlwTiAdCGYpeChxDvfT3AIwmNa6xpnjdykf F476R5yc11Cn8Ive9Q1+bHgrFnZOLe3e+4hNszy2MRvJMbavTSgYGQ1JdwFqfWcDQg0qmSe yA9ajOz5duRz1dhmUpw0ZewPx1EkoNjQ0VE0Jla10GreyzUpKEo4XLv7AHBjcaVVYGxDTFp zmSCihnPDQlMRJptYUFdN3udt3VV2nKnCwfQYajztRIpHI0bFhWt7qZn1o9bw== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 7408932279377289764 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 v3 10/12] selftests/nolibc: tinyconfig: add extra common options Date: Fri, 28 Jul 2023 04:32:46 +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:qybglogicsvrgz:qybglogicsvrgz5a-1 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org The tinyconfig target from top-level Makefile has already enabled some common options, but they are not enough to enable boot and print. $ find kernel/ arch/*/ -name "tiny*.config" kernel/configs/tiny-base.config kernel/configs/tiny.config arch/x86/configs/tiny.config To enable qemu boot and console print, additional kernel config options are required, include the common parts and the architecture specific parts. Here adds minimal extra common parts for all architectures: * for initrd: CONFIG_BLK_DEV_INITRD * for init executable: CONFIG_BINFMT_ELF * for test result print: CONFIG_PRINTK, CONFIG_TTY Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/configs/common.config | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tools/testing/selftests/nolibc/configs/common.config diff --git a/tools/testing/selftests/nolibc/configs/common.config b/tools/testing/selftests/nolibc/configs/common.config new file mode 100644 index 000000000000..3957f812faac --- /dev/null +++ b/tools/testing/selftests/nolibc/configs/common.config @@ -0,0 +1,4 @@ +CONFIG_BLK_DEV_INITRD=y +CONFIG_BINFMT_ELF=y +CONFIG_PRINTK=y +CONFIG_TTY=y From patchwork Thu Jul 27 20:35: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: 707271 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 E531EEB64DD for ; Thu, 27 Jul 2023 20:35:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229661AbjG0UfQ (ORCPT ); Thu, 27 Jul 2023 16:35:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbjG0UfP (ORCPT ); Thu, 27 Jul 2023 16:35:15 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4828271C; Thu, 27 Jul 2023 13:35:13 -0700 (PDT) X-QQ-mid: bizesmtp65t1690490104tdo0lyfq Received: from linux-lab-host.localdomain ( [61.141.78.189]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 28 Jul 2023 04:35:02 +0800 (CST) X-QQ-SSF: 01200000002000D0X000B00A0000000 X-QQ-FEAT: rZJGTgY0+YOFURgI4rO4FCPYfZtEtfnMGBKFe0DXq/9mV7CVBMsYHOMR4+JVr IOjcZ4pyh73O5L5n/JDvdzIMMCtbuhFCCO44m0pvqeXuESuDcN2xUKASBx63aVhk3t7tc54 K5DJI5ifluK37jWOc54qO9uY6B3j7f6msEJ8K4yVhVodJOILbBFPFeriiptpNxGRDN0SVzJ Q6zx9zbVOo6TBjyF0plarqxyqxegL9TDqmSSy4/oP38NYrS2lTTjvH79Hzqz5m4OQVs6vjL vsaaZv8k0s2lQFP7yYJ4HG9hvlPonlQFkvnbhJJHdbZbXZYswjhieFAky/22sa+CtrvtdqC igOmTDSJsdVqG0HL6MOGxfRS1rUxlxkwcxbP5F0GyD0dy1RYaF83ud/JsEbRQ== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 17780552390268563941 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 v3 12/12] selftests/nolibc: speed up some targets with multiple jobs Date: Fri, 28 Jul 2023 04:35: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:qybglogicsvrgz:qybglogicsvrgz5a-1 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org The sysroot install and kernel build targets are time cost, let's use -j to parallelize them with multiple jobs. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index ad2538ec5eb0..1b45c22f9a94 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -171,7 +171,7 @@ PHONY = sysroot/$(ARCH)/include sysroot/$(ARCH)/include: $(Q)rm -rf sysroot/$(ARCH) sysroot/sysroot $(QUIET_MKDIR)mkdir -p sysroot - $(Q)$(MAKE) -C ../../../include/nolibc ARCH=$(ARCH) OUTPUT=$(CURDIR)/sysroot/ headers_standalone + $(Q)$(MAKE) -j$$(nproc) -C ../../../include/nolibc ARCH=$(ARCH) OUTPUT=$(CURDIR)/sysroot/ headers_standalone $(Q)mv sysroot/sysroot sysroot/$(ARCH) ifneq ($(NOLIBC_SYSROOT),0) @@ -211,7 +211,7 @@ initramfs: nolibc-test $(Q)cp nolibc-test initramfs/init # common macros for kernel targets -MAKE_KERNEL = $(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) +MAKE_KERNEL = $(MAKE) -j$$(nproc) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) KERNEL_CONFIG = $(objtree)/.config KERNEL_IMAGE = $(objtree)/$(IMAGE)