Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1663981rdb; Sun, 8 Oct 2023 20:20:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGtyl6Io1Fg9+Rrkn+QuaVyHsw6Jja+xsOpN7duDSjBN5ItyvVfsGhogZK2SPDRL2KTNI0O X-Received: by 2002:a17:902:a409:b0:1c5:b1a6:8111 with SMTP id p9-20020a170902a40900b001c5b1a68111mr12099211plq.31.1696821651877; Sun, 08 Oct 2023 20:20:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696821651; cv=none; d=google.com; s=arc-20160816; b=NCWx/qkajYuUaOWdbqZF4zqLUrJwIjZwnRfVgl0YAe1bnXTVNqh7qnMn0OFnilu1C4 8WumfeMIeorHpshNOvW2g9K7TUsFEnuLwoVvL8ZYm1ldzVICa3zkVBq8sZnrWlh1UyyR VQX5ogqbbaTMt9YAK4aWRLRZ9y3viOsVhhQ0NyLn7TRcoRvZDzCD+fp3xG/SPI+Mcy2I UudTaxCSexcTWIdd8x0NjHeDygeZam0+3ANgQImqbDAAh+Y7eTsKOUHgwl+ZhenBgqOI wIFuTPf74rDyjK7ZF4nkAQ5Xang5x8m6g/2DxoLV2V5vn75wkY74HXh0d00xhZaOVs3m sPpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=W973SkUzSi52EyNuqGg/IiCt5l7KS6E/onMMdjSAdi0=; fh=fJfH+s2J0AqVM4BBq6VxSWWZnZvUhrSdtxbe+jCyYbQ=; b=tzhscN59PzcyNfT+PIjY5G38zIX4fEjLnj1RXGJCIsTY5K56YNYmjdV0vvTuvszQih BtvM8SgkfLcAbq3T7pyCvS4sGqmXKxlc2/x6nCzzP810gBv6USW+62OPEPDxre0GeepQ qFlJjsUUlkUiAFagfdTboOxX90/h5abBGsz4dv3EKpCg9G/8fLzKKaoKVumnYl8J4wpz dO/WsaF9WK1seDFf6bYRXUhXlgAue2vU+HcsqGSEgwcirGOqsdIffNSao4NJT3LghIvL nq7DrKRWP6/vc5V+FyeQ8SeUtP3ytwX4chzmrZAKCIj7pgBAJOc+j5qXRtu3b/vC1qrO h0sQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id d16-20020a170902ced000b001b8af83d939si9543475plg.537.2023.10.08.20.20.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Oct 2023 20:20:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id A23B980225A7; Sun, 8 Oct 2023 20:20:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344903AbjJIDT7 (ORCPT + 99 others); Sun, 8 Oct 2023 23:19:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232250AbjJIDT6 (ORCPT ); Sun, 8 Oct 2023 23:19:58 -0400 X-Greylist: delayed 187 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 08 Oct 2023 20:19:42 PDT Received: from cmccmta1.chinamobile.com (cmccmta2.chinamobile.com [111.22.67.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0AAD5A3 for ; Sun, 8 Oct 2023 20:19:41 -0700 (PDT) X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from spf.mail.chinamobile.com (unknown[10.188.0.87]) by rmmx-syy-dmz-app03-12003 (RichMail) with SMTP id 2ee36523708c9b7-d01a6; Mon, 09 Oct 2023 11:16:30 +0800 (CST) X-RM-TRANSID: 2ee36523708c9b7-d01a6 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from ubuntu.localdomain (unknown[10.54.5.252]) by rmsmtp-syy-appsvr06-12006 (RichMail) with SMTP id 2ee66523708bf6c-bf76f; Mon, 09 Oct 2023 11:16:30 +0800 (CST) X-RM-TRANSID: 2ee66523708bf6c-bf76f From: zhujun2 To: shuah@kernel.org Cc: nathan@kernel.org, ndesaulniers@google.com, trix@redhat.com, linux-kernel@vger.kernel.org, zhujun2@cmss.chinamobile.com Subject: [PATCH] selftests:modify the incorrect print format Date: Sun, 8 Oct 2023 20:16:24 -0700 Message-Id: <20231009031624.4132-1-zhujun2@cmss.chinamobile.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Sun, 08 Oct 2023 20:20:49 -0700 (PDT) X-Spam-Level: ** printf %d in format string requires 'int' but the argument type is 'unsigned int' Signed-off-by: zhujun2 --- tools/testing/selftests/kselftest.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h index 529d29a35..bec2fae58 100644 --- a/tools/testing/selftests/kselftest.h +++ b/tools/testing/selftests/kselftest.h @@ -129,7 +129,7 @@ static inline void ksft_print_header(void) static inline void ksft_set_plan(unsigned int plan) { ksft_plan = plan; - printf("1..%d\n", ksft_plan); + printf("1..%u\n", ksft_plan); } static inline void ksft_print_cnts(void) @@ -137,7 +137,7 @@ static inline void ksft_print_cnts(void) if (ksft_plan != ksft_test_num()) printf("# Planned tests != run tests (%u != %u)\n", ksft_plan, ksft_test_num()); - printf("# Totals: pass:%d fail:%d xfail:%d xpass:%d skip:%d error:%d\n", + printf("# Totals: pass:%u fail:%u xfail:%u xpass:%u skip:%u error:%u\n", ksft_cnt.ksft_pass, ksft_cnt.ksft_fail, ksft_cnt.ksft_xfail, ksft_cnt.ksft_xpass, ksft_cnt.ksft_xskip, ksft_cnt.ksft_error); @@ -163,7 +163,7 @@ static inline void ksft_test_result_pass(const char *msg, ...) ksft_cnt.ksft_pass++; va_start(args, msg); - printf("ok %d ", ksft_test_num()); + printf("ok %u ", ksft_test_num()); errno = saved_errno; vprintf(msg, args); va_end(args); @@ -177,7 +177,7 @@ static inline void ksft_test_result_fail(const char *msg, ...) ksft_cnt.ksft_fail++; va_start(args, msg); - printf("not ok %d ", ksft_test_num()); + printf("not ok %u ", ksft_test_num()); errno = saved_errno; vprintf(msg, args); va_end(args); @@ -203,7 +203,7 @@ static inline void ksft_test_result_xfail(const char *msg, ...) ksft_cnt.ksft_xfail++; va_start(args, msg); - printf("ok %d # XFAIL ", ksft_test_num()); + printf("ok %u # XFAIL ", ksft_test_num()); errno = saved_errno; vprintf(msg, args); va_end(args); @@ -217,7 +217,7 @@ static inline void ksft_test_result_skip(const char *msg, ...) ksft_cnt.ksft_xskip++; va_start(args, msg); - printf("ok %d # SKIP ", ksft_test_num()); + printf("ok %u # SKIP ", ksft_test_num()); errno = saved_errno; vprintf(msg, args); va_end(args); @@ -232,7 +232,7 @@ static inline void ksft_test_result_error(const char *msg, ...) ksft_cnt.ksft_error++; va_start(args, msg); - printf("not ok %d # error ", ksft_test_num()); + printf("not ok %u # error ", ksft_test_num()); errno = saved_errno; vprintf(msg, args); va_end(args); -- 2.17.1