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)