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: 112665 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7005573vqr; Sun, 25 Jun 2023 09:52:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7wCUb8FL+ZZiCk3sn1V4HVsRX4odNF9DbPz/r/WFQKs2HTixsEkxtp42y6/rE7s75bZwKN X-Received: by 2002:a17:907:6e87:b0:987:86b8:9cdf with SMTP id sh7-20020a1709076e8700b0098786b89cdfmr25326393ejc.8.1687711952991; Sun, 25 Jun 2023 09:52:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687711952; cv=none; d=google.com; s=arc-20160816; b=T+BBXOkZH7vGhp/EyEoaI+avgLsBcFl/Wnj0QoAJTYjTXq/0s+P/Y5TnjkY5qczQYB 3JL93Cd2r31D8E8/cELUCJWkvQfO5AHsub3usOwi6TBW5b+H5J+ubGcsWFnIyF3NeV8X syGFayQ0AoKHzvua7f+YCNUc8YdMoJnqskvs07GJKbRNtHWFnnrSaeddspbHUIPoWn71 M5M+vpJ3uC8o/7akU4omnMim/s/ugOAzKe1sxO6C+4eZTtUjJm5FaHBziSAWNOeISbj8 YMAvcrPZIqWBKaE02KWeprhAR90pwHOJ6+ecjujx86PJVb9p6JiZpgTki2ZI2FHtbak/ ESkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=f+puTmXJWtuihg8V05yUVfjCzIdJghWECyE3L4ab3YY=; fh=GzghTQzqgly4pZn8BwQ4U8bZ8zCadAK8Sl/utskeyEs=; b=nH8BlXeDsaubc3D3d//P0oFA2WnubDYSasCCH/a9aDsvEuY57ziJ1xuNqbPR0Uv/m+ JPlQzq30ySOitSseH9RTJHRr45b/tika8q0qG5wZTGV/rOTzRQnWQjTJaLgHT9CJjSIW ZBAg4d8OjP2NYB5xMlcI6pK2Ad0qiU/TtxqXKNluddNANT6+Fdqu1WyEOQ+htasD/0Gm 0zTUciAbYxuKhsWlZW2TCoTgAhAxh7Z6IjnEe8ny1IHw0C5N+FrRpumqQAczU36YOQAI 8oGiIQlN8jT4oQU+w/7iERIBQ7gNCihJv6WDjcEQ86nFnsXg0lOyQcfHw/cbcaR98QjB tqsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt24-20020a170906b79800b0098e296a0aa5si1021310ejb.416.2023.06.25.09.52.08; Sun, 25 Jun 2023 09:52:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230189AbjFYQm5 (ORCPT + 99 others); Sun, 25 Jun 2023 12:42:57 -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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769694248817626682?= X-GMAIL-MSGID: =?utf-8?q?1769694248817626682?= 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)