Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4136178rwb; Mon, 31 Jul 2023 01:49:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlH+TATI/OJuL7gOLk8TF4QBoC1bLXDwIqe1B6YA8a3Ux1AzacfQSsq8j3Z7chWZWIOLkADT X-Received: by 2002:a17:907:2cea:b0:993:e860:f20 with SMTP id hz10-20020a1709072cea00b00993e8600f20mr6217500ejc.19.1690793363897; Mon, 31 Jul 2023 01:49:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690793363; cv=none; d=google.com; s=arc-20160816; b=fVhV8NCWiv+6RNa7fxzKq7PY4LYNn2ChG7vOwFWbBPxMNkXI4/5TvL7tYkQvQloPDv M0cISX2pGQT3PA7As+SGH2CZTIbSEIzXsem0jHasWe7mJV15heXu0ibBRbjF2LKzE5vA UoQvDD8YQEFj2jNoaZS/u+5MaTABI4lxSeCm41CT6DZuPy8CyBYeU8f3sHYqpQziNQGG /OOBNa0RnQpkhb2mOp8fjbzu7kXJE98kPz0zL26Aoc67yKx/jhX808pfj4FxhwmfaLKS LntHZ6fManyHQOpj/iOFSCD6P/xHyYscacYM/rE6saZw56Qrefmvn8Z5nZFJGYJZUL7e sM7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=sZc8s4prQDqmPrGNlq2HNM9ktiqHn3kyXt0mqupgof8=; fh=xRdaOVXaRGrwW+9cTzkYYWmW/o9rqCRdnarYV03e28c=; b=RLreg0aFumBY7Dl0ylzipl/FQ4eW8rVN0O81Jt9Pj/RcSyPL+8Dd1hxLduPLVIDujq ksjrdepIIzfSHh6B7MgpAnrKpx/EcJLTH/k2OgcbR4K0gJjdFCR5gfobxIu30T5c9SAY p1DItfPGwHE0pasQB9L6yz62wO8hgg2KoNlX+Nvl5E0U8p75b6bJP+rIAhdLXPg82bN6 lX8E5BVZAYMEkKZ/lt+BNsnAqdmN7rINQaIgYAQ93kfcdLAi7SrcCf1hhozvqnwxyG1y iIzn5MMMmGjmPuKa5uFGQWf8UexHRSt63dOZRCCX9zhNC53en9kiOqF0np7u5t91N/Ls AhHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=qsbab1Zw; 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 l24-20020a170906415800b00992ee6da875si6573697ejk.218.2023.07.31.01.48.58; Mon, 31 Jul 2023 01:49:23 -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; dkim=pass header.i=@weissschuh.net header.s=mail header.b=qsbab1Zw; 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 S230324AbjGaIYb (ORCPT + 99 others); Mon, 31 Jul 2023 04:24:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbjGaIYF (ORCPT ); Mon, 31 Jul 2023 04:24:05 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A4F4100; Mon, 31 Jul 2023 01:23:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1690791814; bh=o4ZP7HQGo4gMjq/hTymI7aXSSPaGkBsKhC2IAgsvtG8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qsbab1ZwOC6tk39x6en9ADZqisxvSVTNqk5Cw8rEXrso4FXN3+2R6qYIvbfrQAneK ZycHCRorkLU0jDCRQaXf2YPV9k2xN5roj/kF79i70f0t8bflo0laIBoWtsAzttoe3S 1THqY4S/2WoJx3M9R+x7MFuMWKaa+/HToYeSFlS0= Date: Mon, 31 Jul 2023 10:23:33 +0200 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Zhangjin Wu Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, shuah@kernel.org, tanyuan@tinylab.org, w@1wt.eu Subject: Re: [PATCH 1/4] selftests/nolibc: drop unused test helpers Message-ID: <0d441f70-bdc3-4aa1-b392-6ec170c9a5bb@t-8ch.de> References: <7d8dee88-16af-464f-b7f3-55b77dbc3c46@t-8ch.de> <20230731073243.21265-1-falcon@tinylab.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230731073243.21265-1-falcon@tinylab.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 On 2023-07-31 15:32:43+0800, Zhangjin Wu wrote: > 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! Now there are two "Re: " prefixes :-) My understanding is that there is exactly one "Re: " prefix iff the message is any response at all. > > 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 ... That doesn't seem very likely. Did it happen recently? > 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. Then we just drop the helper when we don't need it anymore. I also dislike the __attribute__ spam to be honest. > 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? Something like this will indeed be part of the KTAP rework. But it's a change for another time. Thomas