Message ID | 9620a07294e4c099587170e84aba167bf849e841.1688633188.git.falcon@tinylab.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp2422179vqx; Thu, 6 Jul 2023 02:20:21 -0700 (PDT) X-Google-Smtp-Source: APBJJlHrcmcA9GybtKb7e68+ra4RhWT4GutoVUnxMubcU872S5w/TsjNwMvR6aMsSPSPN+lbqVv2 X-Received: by 2002:a17:903:1247:b0:1b6:6625:d3a8 with SMTP id u7-20020a170903124700b001b66625d3a8mr1528402plh.16.1688635221125; Thu, 06 Jul 2023 02:20:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688635221; cv=none; d=google.com; s=arc-20160816; b=nWNf7Mvk6LCKgHuVD72nNL8K6Ror1FWSZvH8m1PHkPntpPyvVCBaE2Q/Y71LekPtVH rVtPdicZN4Ky1skCZyE8DkngScyP9OhlLa8F+A303akk86NTxe2fiWWfYQ79QTk5YNC/ y0ItISPpgwK4n62cPs/OQi5xLM7NTC6/6K8NeqTOe5BkgrGZOLd58h5Fo0YNfd/jYlJV 98b8WsVGZ4D1fuyoOyA1afXYQwDB3pAK53GG/UVENI54T7/RIE9TG8qBl0Ga5GjEjT02 krl9pLqs5Pj2GtWnLXQALU1wwB5LkEwXw4TbUNN29pOBBxxK6MbRdi3b6rTd60MiZS7x ZF+g== 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=UOhx2BdgGb2OicwVMw0CtcRZ45GkRFF1aa/fErN6iMY=; fh=kgRNfNE6xRCHBUX3iUlrLhv5pQPglsdZFzOkxo2Fhpc=; b=re0aBFXXLYJ31+mhbQPPA65ZM9NMeH88DdteoXYRmIanHwl3QHOFRACkqQ3bP6JvYN ym8jWLFEYRxy3rKYygNaqceQT/jkUeuCEOeJJOgcnUZMh2YKreDnVNMegGeLYXjER54+ /mAK8HCsbLX+k8ebGP0ZePigRxYoERESi3EWO81egLj9RpRIQFbQ4jgGk6iBdQFGA9pt z8Mzu/JiK9kZFoWm77WXL6MhHa7x3ozUzNBZzRGtHxUJ6YMTozyV5RAjS1DMbs1Dnazu 1HibQj8gDa5SmNIhoC7iiv9OxFdl4C7gbsqFPWj2jSbai8RqKHKhfUYJoXH4/JG92kxh ws8w== 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 u5-20020a170902e20500b001b829a32f2dsi840319plb.457.2023.07.06.02.20.04; Thu, 06 Jul 2023 02:20:21 -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 S231867AbjGFJKZ (ORCPT <rfc822;hadasmailinglist@gmail.com> + 99 others); Thu, 6 Jul 2023 05:10:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230159AbjGFJKX (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 6 Jul 2023 05:10:23 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76B5EDB; Thu, 6 Jul 2023 02:10:22 -0700 (PDT) X-QQ-mid: bizesmtp80t1688634613ts83xwgr Received: from linux-lab-host.localdomain ( [116.30.131.119]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 06 Jul 2023 17:10:11 +0800 (CST) X-QQ-SSF: 01200000000000D0W000000A0000000 X-QQ-FEAT: znfcQSa1hKZ0tbn8MHp6xFgP1iCflF/1wRHbbM/MX29g0UPfyXKPGv7UuxKRc o+VMYE/xIBRFYN6vNLhFVe25N4UPDV6vCrk5TNaJaQRJPK4UANWpvCMQvmt4xX+IY0r1p5o hFAHSJeAGBUMoaP7tyPaChYBWxv5UXyjaRofqIXHcbOUssCCQX5acT4O1BlJ3JeZgwH7If3 XtzumcHZU61a2mgPs6BbIFukdhH5VKoDPIr2cIeEqnvasg8/8O8bk546SpKWS43woGClCbE 357R8kSWQ+LeRSFMHIlVh/PyZY/ECFXt+VkpwZsUKziVn93RlyBAmoBR4GgO+yUZ43RxH9a MVatrs3slDMmIoTtZ2PyptUL1kDEgK0+5zMQly/izoXLhRVVWeLxwF2T3382A== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 13378550366425220871 From: Zhangjin Wu <falcon@tinylab.org> To: w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, thomas@t-8ch.de Subject: [PATCH v1 3/5] selftests/nolibc: report: align passed, skipped and failed Date: Thu, 6 Jul 2023 17:10:08 +0800 Message-Id: <9620a07294e4c099587170e84aba167bf849e841.1688633188.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <cover.1688633188.git.falcon@tinylab.org> References: <cover.1688633188.git.falcon@tinylab.org> 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_NONE, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770662365712997313?= X-GMAIL-MSGID: =?utf-8?q?1770662365712997313?= |
Series |
selftests/nolibc: report: print test status
|
|
Commit Message
Zhangjin Wu
July 6, 2023, 9:10 a.m. UTC
align the test values for different runs and different architectures.
Since the total number of tests is not bigger than 1000 currently, let's
align them with "%03d".
Signed-off-by: Zhangjin Wu <falcon@tinylab.org>
---
tools/testing/selftests/nolibc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Thu, Jul 06, 2023 at 05:10:08PM +0800, Zhangjin Wu wrote: > align the test values for different runs and different architectures. > > Since the total number of tests is not bigger than 1000 currently, let's > align them with "%03d". %03d is not great for those who want to use them in scripts because it will prepend zeroes. Better use %3d. Look for example: $ x=$(printf "%03d\n" 19) $ echo $x 019 $ echo $((x+1)) -bash: 019: value too great for base (error token is "019") Instead: $ printf "%3d\n" 19 19 $ x=$(printf "%3d\n" 19) $ echo $x 19 $ echo $((x+1)) 20 If you're fine with it I'll change your patch and commit message accordingly. Willy
Hi, Willy > On Thu, Jul 06, 2023 at 05:10:08PM +0800, Zhangjin Wu wrote: > > align the test values for different runs and different architectures. > > > > Since the total number of tests is not bigger than 1000 currently, let's > > align them with "%03d". > > %03d is not great for those who want to use them in scripts because it will > prepend zeroes. Better use %3d. Look for example: > > $ x=$(printf "%03d\n" 19) > $ echo $x > 019 > $ echo $((x+1)) > -bash: 019: value too great for base (error token is "019") > I have tried both '%03d' and '%3d' locally, but used '%03d' at last. 190 passed, 021 skipped, 001 failed 190 passed, 21 skipped, 1 failed Beside the calculate issue you pointed out, the 0 prefix although align all of them with 'numbers' but also bring us some noises, filling the left parts as whitespaces really looks better. > Instead: > > $ printf "%3d\n" 19 > 19 > $ x=$(printf "%3d\n" 19) > $ echo $x > 19 > $ echo $((x+1)) > 20 > > If you're fine with it I'll change your patch and commit message > accordingly. Ok, let's use '%3d' instead of '%03d'. Thanks, Zhangjin > > Willy
diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index a02be8b0a569..2c53bf41967b 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -85,7 +85,7 @@ CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 \ LDFLAGS := -s REPORT ?= awk '/\[OK\][\r]*$$/{p++} /\[FAIL\][\r]*$$/{f++;print} /\[SKIPPED\][\r]*$$/{s++} \ - END{ printf("%d test(s): %d passed, %d skipped, %d failed => status: ", p+s+f, p, s, f); \ + END{ printf("%03d test(s): %03d passed, %03d skipped, %03d failed => status: ", p+s+f, p, s, f); \ if (f) printf("failure\n"); else if (s) printf("warning\n"); else printf("success\n");; \ printf("See all results in %s\n", ARGV[1]); }'