Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4106561rwb; Mon, 31 Jul 2023 01:06:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlHo5K7mE5apWRD5TRihYZPuhcCeJizz64yCVie9bqUOtmEeM9HjcRVZkklbJ851K4m0K5sh X-Received: by 2002:a17:902:e5c2:b0:1b8:8b72:fa28 with SMTP id u2-20020a170902e5c200b001b88b72fa28mr10302903plf.58.1690790764113; Mon, 31 Jul 2023 01:06:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690790764; cv=none; d=google.com; s=arc-20160816; b=a14iLsawo0V6r0Cf4kv3NUlRSyrmzLjLy7Vi1EPjEDNKPGx8fdACbAZIXaF2IyQWhI UhP2zQKZfTKl+rFa8K2caN7SnI1MBPbaIysRAdHSwNj41IhQLrlAoOBgcesSADguMcqo M6oINZjAci/3crKfYjgLVxF2kg1YlhPnvhnlHeYEokSGtZeuVuox6HIGlKwQJiQwYmnV mS0rCM5u0dxf7rcv0LsPLp4WCxjcvc67mTQu854/WjJ54v71UVnQGQnz1vTebD5uAkgW 8euBB6Sm8OUWCYc+3U0WlHMlQL9GbAz0m1CHZhykG/Eqx36e9mig1Qv0qDfRCHr4CRyt ZUgg== 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=PGuJvpPCRpc3MlJ8eu57b47w/+nIL7lUNURo7OjN43o=; fh=Q4MvkSz8FYcHPE+pFaGSR8c4aLVk8U0IU8szbKVfuTg=; b=uGFgRKQRlcE/SBc62bmVA1pMR27GiMT9WqUG6mB0EYz6xi+EUfOkCJVTzG8FsTuYeS 6o49RmpCyr0mWh9sisCzIgpOyy+jssEXo9CMaoun9nRpWh881TafahKVQL8G+xsZwFZN YujCNFG37yrgVf/1DF3dO7jUlPrOoxK0ZKt3xZHHqeBJFDvcdIjEiv0MT6cxsY0ZQ4f9 NAGIyT1+Nsaa95OcnOb+NsVuFGKqc25W08D9g/rwDIoF+a9RPfnEncmqd9q2pw/N0SnC TbWt1ZmxVXbia/18KT46v0iG/RWxnE+oFEnuN6PzRwZgMv4z3TckA9+JNsIQJdUDCg+a gz3Q== 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 le11-20020a170902fb0b00b001bbca0a8393si2772644plb.56.2023.07.31.01.05.51; Mon, 31 Jul 2023 01:06:04 -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 S231495AbjGaHen (ORCPT + 99 others); Mon, 31 Jul 2023 03:34:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231567AbjGaHe1 (ORCPT ); Mon, 31 Jul 2023 03:34:27 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F52B1BDB; Mon, 31 Jul 2023 00:33:15 -0700 (PDT) X-QQ-mid: bizesmtp81t1690788769tazke485 Received: from linux-lab-host.localdomain ( [61.141.77.223]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 31 Jul 2023 15:32:48 +0800 (CST) X-QQ-SSF: 01200000000000E0X000000A0000000 X-QQ-FEAT: +ynUkgUhZJm85FAZbkyW/ARdkukn/5LhQOlgp3bb1aSv8vaTE8cp43kPg84Gb aMBELMYE/aDW+oGKaST/q+B3pDjxpg2JDjd9NIJGO5f5O83NVNHtQSLjQ+a/EerQr1jQRfH bl5yjDQ4CvsCsrXPyGX/9PbC7PrOhxqgV+suiH9/Gno80p3O7tZYUXUOwJ6r9YZpKOHuyPm tCjY5NRWscY6zQ+GU/9wOUNQXxyvNb1DUHqFuGlmYVjjEWAzni3A07zT1tK2Et+yF7O0dXr I0etkqOryfKdPrJhfN0Oegw6aa5xarfQh+m6XVix6ODYHR0I8O5oepGOW9YcTw3A0LgTWOH 3cfTt7sDULc/eehuisq/Woyz302dBBbp8yEZHlbo+R5BIDWrMDYjDRICMA9G/kBZHlRhAty X-QQ-GoodBg: 0 X-BIZMAIL-ID: 5349350938179748455 From: Zhangjin Wu To: linux@weissschuh.net Cc: falcon@tinylab.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, shuah@kernel.org, tanyuan@tinylab.org, w@1wt.eu Subject: Re: Re: [PATCH 1/4] selftests/nolibc: drop unused test helpers Date: Mon, 31 Jul 2023 15:32:43 +0800 Message-Id: <20230731073243.21265-1-falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <7d8dee88-16af-464f-b7f3-55b77dbc3c46@t-8ch.de> References: <7d8dee88-16af-464f-b7f3-55b77dbc3c46@t-8ch.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 Hi, Thomas > Note: > > It seems your mail client does not add the prefix "Re: " to responses. > Is that intentional? > I use a lightweight 'b4 + git send-email' method to reply emails, sometimes, I forgot manually adding the 'Re: ' prefix, perhaps I should write a simple script to do that or carefully check the Subject title everytime, Thanks! > On 2023-07-31 14:48:26+0800, Zhangjin Wu wrote: > > Hi, Thomas > > > > > As we want to enable compiler warnings in the future these would be > > > reported as unused functions. > > > > > > If we need them in the future they are easy to recreate from their still > > > existing siblings. > > > > > > Signed-off-by: Thomas Weißschuh > > > --- > > > tools/testing/selftests/nolibc/nolibc-test.c | 99 ---------------------------- > > > 1 file changed, 99 deletions(-) > > > > > > diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c > > > index 03b1d30f5507..53e2d448eded 100644 > > > --- a/tools/testing/selftests/nolibc/nolibc-test.c > > > +++ b/tools/testing/selftests/nolibc/nolibc-test.c > > > @@ -161,31 +161,6 @@ static void result(int llen, enum RESULT r) > > > * of failures, thus either 0 or 1. > > > */ > > > > > > -#define EXPECT_ZR(cond, expr) \ > > > - do { if (!(cond)) result(llen, SKIPPED); else ret += expect_zr(expr, llen); } while (0) > > > - > > > -static int expect_zr(int expr, int llen) > > > -{ > > > > Why not a simple 'static __attribute__((unused))' line, then, no need to > > add them again next time. > > > > -static int expect_zr(int expr, int llen) > > +static __attribute__((unused)) > > +int expect_zr(int expr, int llen) > > { > > Personally I don't like having dead code lying around that needs to be > maintained and skipped over while reading. > It's not a given that we will need those helpers in the future at all. > It is reasonable in some degree from current status, especially for these ones are newly added, but let us think about these scenes: when we would drop or change some test cases in the future and the helpers may would be not referenced by any test cases in a short time, and warnings there, but some other cases may be added later to use them again ... I'm ok to drop these ones, but another patch may be required to add 'static __attribute__((unused))' for all of the currently used ones, otherwise, there will be warnings randomly by a test case change or drop. Or even further, is it possible to merge some of them to some more generic helpers like the ones used from the selftest.h in your last RFC patchset? Thanks, Zhangjin > Thomas > > > > > Thanks, > > Zhangjin