Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp3926071rwp; Sat, 15 Jul 2023 12:16:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlFKOZvxsFOjW1UFxIBehBmutkFuGBOjlm9HaBgM0Lro4TDDb3zGIt25Y4p8a75uUGhBnEnZ X-Received: by 2002:a05:6402:1511:b0:51e:362d:b172 with SMTP id f17-20020a056402151100b0051e362db172mr7876329edw.32.1689448568553; Sat, 15 Jul 2023 12:16:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689448568; cv=none; d=google.com; s=arc-20160816; b=e85bYQ5SmKVQMPQiS17URIyAFNI47QJmBL7FLaJWZCjGXJleXwwsep0jvN8YD70L0y LoKPeh8raf47dpIOYopzRjLev7OEii4qXvHmEXZl6SNN4iLfUIODNhUbU3crdoTOqvEO 5f5YdjSGun892FIQNhYzeM3witi+/X8MyMHfIfn2yIdmKpyb45rSKhdTaPRCKTy0R1yU NFt9tYPFyReCDdz/ImxedfIdPX6FF9EdRBRLoiX5fYknf0w3VEASOvVZzlRMOZCqMwT5 mWOgdr9h8BehH/BxCa+g3QkLcdk/ygqaJEaDvcQpFUHyHCUtBarwG9SsO7pSLpPhWfsr 6EhA== 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=KJhpZcNdPe10xJ5gop9qz4B8O7AZMb5tDI+BZ7GikYE=; fh=sXngqCw1oXONrSSImRxZmGyzcK67QhJYp1RgY40tBsg=; b=1DmM/3SdKzpK1JLILYFjsyukvzeWI5wmT/pR/+GV7uIhfRPKCi4VICfFMrG3qcC/bV P6KSI5IfckesZ+u0FTr5ZZQ2DmpvBEtHyScmC7KcHmbDcYj0ZgO7+UVsb5gbGXL/7TOS 1AT7cSOmgquFeMmib3OjFmoApIEnA1RTz7oRKbeVNHPlXgqxOXWKLekcPT2FsaSUyNtX fZUk+2eMavK5x6Ykm7hSH42V/3nZ1/LWqdyDO/TUyuxzTziLRcd9cwozTOdrRU6fxiKS dQlyYY45cGzonMOcqjRg0PtMJgVytG0qEVCtjx88wuaOvmZ3KGuj3V3Vq351bUrER+O7 nRhA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s13-20020a170906960d00b009829ea99a16si10523830ejx.577.2023.07.15.12.15.44; Sat, 15 Jul 2023 12:16:08 -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 S230317AbjGOSfy (ORCPT + 99 others); Sat, 15 Jul 2023 14:35:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229490AbjGOSfw (ORCPT ); Sat, 15 Jul 2023 14:35:52 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 643BD128; Sat, 15 Jul 2023 11:35:50 -0700 (PDT) X-QQ-mid: bizesmtp69t1689446141t0a64ark Received: from linux-lab-host.localdomain ( [119.123.131.162]) by bizesmtp.qq.com (ESMTP) with id ; Sun, 16 Jul 2023 02:35:40 +0800 (CST) X-QQ-SSF: 01200000002000D0W000B00A0000000 X-QQ-FEAT: hoArX50alxEP2Sb8uvEvfwqp0isWNa+zWwxc+jw4R+V+O93iv1AjpTAT4wLPu PukhzTWa5syj0mOwXIxwt0hxvE5xVzWIFKWesXrgJV0hpeKOypPkgDYnMS7Tt2sswDV9/iq kqHik0GlrccCDs2yLDgwMqnl4JgV7v/9IFfvXrnAjx6IwMQxHdl95E4qf6rgLheAkX/nQjJ QPFVtZc8LbWahGJwD4hnWHgPHEoTYdW64iNXQVS5wBazPhBlInFmUJnPhDdl71FqipoAXqb EvCRA6HfO625yW8Ci3t92M2P58BsQJcT14wuvIfsx8iHA04UnnglO9FrLGV394Uvghh4YNP cOJ/hBnYw/i4Nuiq5Q/RgH10ERc+f54VMnkJQpu6/iySfbER4Nl2tpVNVbUfBdRHA4q37VQ tgPSxoAPSLY= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 13372605302875324200 From: Zhangjin Wu To: w@1wt.eu Cc: arnd@arndb.de, falcon@tinylab.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, thomas@t-8ch.de Subject: [PATCH v4 17/18] selftests/nolibc: allow run nolibc-test locally Date: Sun, 16 Jul 2023 02:35:39 +0800 Message-Id: <03aa4c73f88806a7c3a7648a24793246a6e70afa.1689444638.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,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 It is able to run nolibc-test directly without qemu-user when the target machine is the same as the host machine. Sometimes, the result running locally may help a lot when the qemu-user package is too old. When the target machine differs from the host machine, it is also able to run nolibc-test directly with qemu-user-static + binfmt_misc. Link: https://lore.kernel.org/lkml/ZKutZwIOfy5MqedG@1wt.eu/ 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 d31d6cea82e2..b42e67b1a7e2 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -133,10 +133,16 @@ nolibc-test: nolibc-test.c sysroot/$(ARCH)/include libc-test: nolibc-test.c $(QUIET_CC)$(CC) -o $@ $< +# local libc-test run-libc-test: libc-test $(Q)./libc-test > "$(CURDIR)/run.out" || : $(Q)$(REPORT) $(CURDIR)/run.out +# local nolibc-test +run-nolibc-test: nolibc-test + $(Q)./nolibc-test > "$(CURDIR)/run.out" || : + $(Q)$(REPORT) $(CURDIR)/run.out + # qemu user-land test run-user: nolibc-test $(Q)qemu-$(QEMU_ARCH) ./nolibc-test > "$(CURDIR)/run.out" || : -- 2.25.1