From patchwork Mon Jun 5 03:50:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 690412 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 AA811C7EE2C for ; Mon, 5 Jun 2023 03:56:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232819AbjFED4t (ORCPT ); Sun, 4 Jun 2023 23:56:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232781AbjFED4s (ORCPT ); Sun, 4 Jun 2023 23:56:48 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED18DA6; Sun, 4 Jun 2023 20:56:46 -0700 (PDT) X-QQ-mid: bizesmtp82t1685937396t1aouh5f Received: from linux-lab-host.localdomain ( [61.141.77.49]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 05 Jun 2023 11:56:35 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: lm7sZZPcOdbJD8cVKMiASAi6Ml/t7tG1bkV1nfPLPi2vvHA+K/8f3KsCqtD4h LE7aT9mS730pQq+6dEcXz/fpRaJJRtqKoGlSuiNVsKvopYVg0cchyzAmQN9oq/txeCU22Sd CtnySZNGMOe0xBHD2xeYxw2OQr70b6yN+52l56pzPKka2ALTCEBKeBuW23qLP+UI0C17/ZT FDVh4zmtUmyLVGcrRaHhAefpzv6rSxiSNhLs0n/lIGGT3uPSjid8Wb+hDTXXLloZckxNl7C Xk8INamYkM+Qj5L/j5hdbxmrrK3ixkkfp0o5M+oHUvvv3n5hMAY+4nr40sgBq2pu3rQgU2K dP6IxQmVW1fAi4AhrjN1OKB0FAz02D2lObYwHl7xcncwCU+IL3Csj8V2sYGTTnAA3pKlDul X-QQ-GoodBg: 0 X-BIZMAIL-ID: 9763339930852643474 From: Zhangjin Wu To: w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org, thomas@t-8ch.de Subject: [PATCH 2/4] selftests/nolibc: allow run test-report directly Date: Mon, 5 Jun 2023 11:50:04 +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 This allows to re-check the test report via 'make test-report' without the requirement to re-run the dependency targets. 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 8149ace2938a..5b0af8d8f5f3 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -128,10 +128,10 @@ libc-test: nolibc-test.c $(QUIET_CC)$(CC) -o $@ $< test-report: - $(Q)awk '/\[OK\]$$/{p++} /\[FAIL\]$$/{f++} /\[SKIPPED\]$$/{s++} \ + $(Q)[ -f $(CURDIR)/run.out ] && awk '/\[OK\]$$/{p++} /\[FAIL\]$$/{f++} /\[SKIPPED\]$$/{s++} \ END{ printf("%d test(s) passed, %d skipped, %d failed.", p, s, f); \ if (s+f > 0) printf(" See all results in %s\n", ARGV[1]); else print; }' \ - $(CURDIR)/run.out + $(CURDIR)/run.out || : # qemu user-land test _run-user: nolibc-test From patchwork Mon Jun 5 03:58: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: 690411 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 F015BC7EE24 for ; Mon, 5 Jun 2023 03:59:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232351AbjFED7t (ORCPT ); Sun, 4 Jun 2023 23:59:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231531AbjFED7s (ORCPT ); Sun, 4 Jun 2023 23:59:48 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A795BD; Sun, 4 Jun 2023 20:59:47 -0700 (PDT) X-QQ-mid: bizesmtp68t1685937578tx69i1ko Received: from linux-lab-host.localdomain ( [61.141.77.49]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 05 Jun 2023 11:59:37 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: lm7sZZPcOdYzjWmXFGgj6E3I64yRDtOeBkKpihw5JkC6Lh5HJLerIyruOvXGE kZaWrOoWRl3kQBx61WfeP9JGjH3DVcuICln3tJb6hodrhPrC4CzBb293lFd6sXzKdXUSkYo fkvOPxW86R2WYemPnw5yHFVCGrS3BXT5m82EELWi4l7NsT1L7/a3d+SgCnA3y7Z5KDgIUzM Lj4owyhk4zremCkMU+87WSmz4hMxzd3fzkDRBRpSbTUgzsPtC7vT3pz4IzKim/SlQr7rYHW 9K3/kzT9fCpGzRik5GAItVGrbM4SqnTp0TF3XyrNqJlcoFgoB5zbOI1CE0Is01X4gJuhpil bAXNTEUPVGbvTyowOFEia/SH6FHOIeTHxV04gii9MpmlGM8W0BVdODaI+JQBQ== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 185392236661113198 From: Zhangjin Wu To: w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org, thomas@t-8ch.de Subject: [PATCH 4/4] selftests/nolibc: fix up test-report for run target Date: Mon, 5 Jun 2023 11:58:56 +0800 Message-Id: <48a994c40ac739a0e20ed7a34f290637e417bb0b.1685936428.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 There is a '\r' at the end of every log line when run nolibc-test on qemu-system (make run), add support for this case, otherwise, the test result will like this: 0 test(s) passed, 0 skipped, 0 failed. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 518f85c77fe3..70a27fc41c22 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -128,7 +128,7 @@ libc-test: nolibc-test.c $(QUIET_CC)$(CC) -o $@ $< test-report: - $(Q)[ -f $(CURDIR)/run.out ] && awk '/\[OK\]$$/{p++} /\[FAIL\]$$/{f++} /\[SKIPPED\]$$/{s++} \ + $(Q)[ -f $(CURDIR)/run.out ] && awk '/\[OK\][\r]*$$/{p++} /\[FAIL\][\r]*$$/{f++} /\[SKIPPED\][\r]*$$/{s++} \ END{ printf("%d test(s) passed, %d skipped, %d failed.", p, s, f); \ printf(" See all results in %s\n", ARGV[1]); }' \ $(CURDIR)/run.out || :